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

2016-03-22 Thread Pratyush Anand
Hi Will, Thanks for the reply. On 21/03/2016:02:52:43 PM, Will Deacon wrote: > On Fri, Mar 18, 2016 at 06:59:02PM +0530, Pratyush Anand wrote: > > On 17/03/2016:01:27:26 PM, Pratyush Anand wrote: > > > @David: This patch was added in v9 and fixup_exception() had been dropped > > > in v9. > > >

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

2016-03-22 Thread Pratyush Anand
Hi Will, Thanks for the reply. On 21/03/2016:02:52:43 PM, Will Deacon wrote: > On Fri, Mar 18, 2016 at 06:59:02PM +0530, Pratyush Anand wrote: > > On 17/03/2016:01:27:26 PM, Pratyush Anand wrote: > > > @David: This patch was added in v9 and fixup_exception() had been dropped > > > in v9. > > >

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

2016-03-21 Thread Will Deacon
On Fri, Mar 18, 2016 at 06:59:02PM +0530, Pratyush Anand wrote: > On 17/03/2016:01:27:26 PM, Pratyush Anand wrote: > > @David: This patch was added in v9 and fixup_exception() had been dropped > > in v9. > > Since, dropping of fixup_exception() also caused to fail some systemtap test > > cases,

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

2016-03-21 Thread Will Deacon
On Fri, Mar 18, 2016 at 06:59:02PM +0530, Pratyush Anand wrote: > On 17/03/2016:01:27:26 PM, Pratyush Anand wrote: > > @David: This patch was added in v9 and fixup_exception() had been dropped > > in v9. > > Since, dropping of fixup_exception() also caused to fail some systemtap test > > cases,

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

2016-03-20 Thread Pratyush Anand
Hi James, On 18/03/2016:06:12:20 PM, James Morse wrote: > Hi Pratyush, > > On 18/03/16 14:43, Pratyush Anand wrote: > > On 18/03/2016:02:02:49 PM, James Morse wrote: > >> In kernel/entry.S when entered from EL0 we test for TIF_SINGLESTEP in the > >> thread_info flags, and use

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

2016-03-20 Thread Pratyush Anand
Hi James, On 18/03/2016:06:12:20 PM, James Morse wrote: > Hi Pratyush, > > On 18/03/16 14:43, Pratyush Anand wrote: > > On 18/03/2016:02:02:49 PM, James Morse wrote: > >> In kernel/entry.S when entered from EL0 we test for TIF_SINGLESTEP in the > >> thread_info flags, and use

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

2016-03-19 Thread James Morse
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 >

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

2016-03-19 Thread James Morse
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 >

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

2016-03-19 Thread Pratyush Anand
Hi James, On 16/03/2016:10:27:22 AM, James Morse wrote: > Hi Pratyush, > > On 16/03/16 05:43, Pratyush Anand wrote: > > On 15/03/2016:06:47:52 PM, James Morse wrote: > >> If I understand this correctly - you can't kprobe these ldr/str > >> instructions > >> as the fault handler wouldn't find

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

2016-03-19 Thread Pratyush Anand
Hi James, On 16/03/2016:10:27:22 AM, James Morse wrote: > Hi Pratyush, > > On 16/03/16 05:43, Pratyush Anand wrote: > > On 15/03/2016:06:47:52 PM, James Morse wrote: > >> If I understand this correctly - you can't kprobe these ldr/str > >> instructions > >> as the fault handler wouldn't find

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

2016-03-18 Thread 平松雅巳 / HIRAMATU,MASAMI
>From: "David A. Long" > >Currrently taking exceptions when accessing user data from a kprobe'd >instruction doesn't work. Avoid this situation by blacklisting the relevant >functions. > >Signed-off-by: David A. Long Looks good to me. Reviewed-by:

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

2016-03-18 Thread 平松雅巳 / HIRAMATU,MASAMI
>From: "David A. Long" > >Currrently taking exceptions when accessing user data from a kprobe'd >instruction doesn't work. Avoid this situation by blacklisting the relevant >functions. > >Signed-off-by: David A. Long Looks good to me. Reviewed-by: Masami Hiramatsu Thanks, >--- >

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

2016-03-18 Thread Pratyush Anand
Hi James, On 18/03/2016:02:02:49 PM, James Morse wrote: > 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

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

2016-03-18 Thread Pratyush Anand
Hi James, On 18/03/2016:02:02:49 PM, James Morse wrote: > 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

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

2016-03-18 Thread James Morse
Hi Pratyush, On 18/03/16 14:43, Pratyush Anand wrote: > On 18/03/2016:02:02:49 PM, James Morse wrote: >> 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. >> >>

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

2016-03-18 Thread James Morse
Hi Pratyush, On 18/03/16 14:43, Pratyush Anand wrote: > On 18/03/2016:02:02:49 PM, James Morse wrote: >> 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. >> >>

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

2016-03-18 Thread Pratyush Anand
On 17/03/2016:01:27:26 PM, Pratyush Anand wrote: > @David: This patch was added in v9 and fixup_exception() had been dropped in > v9. > Since, dropping of fixup_exception() also caused to fail some systemtap test > cases, so it was added back in v10. I wonder if we really need this patch. > May

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

2016-03-18 Thread Pratyush Anand
On 17/03/2016:01:27:26 PM, Pratyush Anand wrote: > @David: This patch was added in v9 and fixup_exception() had been dropped in > v9. > Since, dropping of fixup_exception() also caused to fail some systemtap test > cases, so it was added back in v10. I wonder if we really need this patch. > May

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

2016-03-16 Thread James Morse
Hi Pratyush, On 16/03/16 05:43, Pratyush Anand wrote: > On 15/03/2016:06:47:52 PM, James Morse wrote: >> If I understand this correctly - you can't kprobe these ldr/str instructions >> as the fault handler wouldn't find kprobe's out-of line version of the >> instruction in the exception table...

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

2016-03-16 Thread James Morse
Hi Pratyush, On 16/03/16 05:43, Pratyush Anand wrote: > On 15/03/2016:06:47:52 PM, James Morse wrote: >> If I understand this correctly - you can't kprobe these ldr/str instructions >> as the fault handler wouldn't find kprobe's out-of line version of the >> instruction in the exception table...

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

2016-03-15 Thread Pratyush Anand
On 15/03/2016:06:47:52 PM, James Morse wrote: > Hi David, > > On 09/03/16 05:32, David Long wrote: > > From: "David A. Long" > > diff --git a/arch/arm64/lib/copy_from_user.S > > b/arch/arm64/lib/copy_from_user.S > > index 4699cd7..0ac2131 100644 > > ---

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

2016-03-15 Thread Pratyush Anand
On 15/03/2016:06:47:52 PM, James Morse wrote: > Hi David, > > On 09/03/16 05:32, David Long wrote: > > From: "David A. Long" > > diff --git a/arch/arm64/lib/copy_from_user.S > > b/arch/arm64/lib/copy_from_user.S > > index 4699cd7..0ac2131 100644 > > --- a/arch/arm64/lib/copy_from_user.S > > +++

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

2016-03-15 Thread James Morse
Hi David, On 09/03/16 05:32, David Long wrote: > From: "David A. Long" > diff --git a/arch/arm64/lib/copy_from_user.S b/arch/arm64/lib/copy_from_user.S > index 4699cd7..0ac2131 100644 > --- a/arch/arm64/lib/copy_from_user.S > +++ b/arch/arm64/lib/copy_from_user.S > @@ -66,6

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

2016-03-15 Thread James Morse
Hi David, On 09/03/16 05:32, David Long wrote: > From: "David A. Long" > diff --git a/arch/arm64/lib/copy_from_user.S b/arch/arm64/lib/copy_from_user.S > index 4699cd7..0ac2131 100644 > --- a/arch/arm64/lib/copy_from_user.S > +++ b/arch/arm64/lib/copy_from_user.S > @@ -66,6 +66,7 @@ >

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

2016-03-08 Thread David Long
From: "David A. Long" Currrently taking exceptions when accessing user data from a kprobe'd instruction doesn't work. Avoid this situation by blacklisting the relevant functions. Signed-off-by: David A. Long --- arch/arm64/lib/copy_from_user.S | 1 +

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

2016-03-08 Thread David Long
From: "David A. Long" Currrently taking exceptions when accessing user data from a kprobe'd instruction doesn't work. Avoid this situation by blacklisting the relevant functions. Signed-off-by: David A. Long --- arch/arm64/lib/copy_from_user.S | 1 + arch/arm64/lib/copy_to_user.S | 1 + 2