Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1360649

Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist

From James Morse <james.morse@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist
Date 2016-03-18 15:10 +0100
Message-ID <re3ge-6UT-7@gated-at.bofh.it> (permalink)
References (2 earlier) <rd2cx-5Y5-1@gated-at.bofh.it> <rdcvf-4sX-1@gated-at.bofh.it> <rdgSe-7Ep-13@gated-at.bofh.it> <rdB0C-4pn-9@gated-at.bofh.it> <re2Dw-6m4-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Pratyush,

On 18/03/16 13:29, Pratyush Anand wrote:
> Probably, I can see why does not it work. So, when we are single stepping an
> instruction and page fault occurs, we will come to el1_da in entry.S. Here, we
> do enable_dbg. As soon as we will do this, we will start receiving single step
> exception after each instruction (not sure, probably for each alternate
> instruction). Since, there will not be any matching single step handler for
> these instructions, so we will see warning "Unexpected kernel single-step
> exception at EL1". 
> 
> So, I think, we should 
> 
> (1) may be do not enable debug for el1_da, or
> (2) enable_dbg only when single stepping is not enabled, or
> (3) or disable single stepping during el1_da execution.
> 
> (1) will solve the issue for sure, but not sure if it could be the best choice.

A variation on (3):

In kernel/entry.S when entered from EL0 we test for TIF_SINGLESTEP in the
thread_info flags, and use disable_step_tsk/enable_step_tsk to save/restore the
single-step state.

Could we do this regardless of which EL we came from?


Thanks,

James

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist Pratyush Anand <panand@redhat.com> - 2016-03-18 14:30 +0100
  Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist James Morse <james.morse@arm.com> - 2016-03-18 15:10 +0100
    Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist Pratyush Anand <panand@redhat.com> - 2016-03-18 15:50 +0100
      Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist James Morse <james.morse@arm.com> - 2016-03-18 19:20 +0100
        Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist Pratyush Anand <panand@redhat.com> - 2016-03-21 06:20 +0100
  Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist Will Deacon <will.deacon@arm.com> - 2016-03-21 16:00 +0100
    Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist Pratyush Anand <panand@redhat.com> - 2016-03-22 18:00 +0100

csiph-web