Re: [PATCH] ARM/ARM64: don't enter kgdb when userspace executes a kgdb break instruction.

2014-07-31 Thread Omar Sandoval
Hi, Will, On Thu, Jul 31, 2014 at 11:46:53AM +0100, Will Deacon wrote: > I'll merge the arm64 diff I proposed. Could you repost the ARM part please? I've just reposted it, hopefully we can get that merged in soon as well. > I think enabling and activating kgdb by default is a pretty crazy thing t

Re: [PATCH] ARM/ARM64: don't enter kgdb when userspace executes a kgdb break instruction.

2014-07-31 Thread Will Deacon
On Thu, Jul 31, 2014 at 06:33:23AM +0100, Omar Sandoval wrote: > Hi, Hi Omar, > On Wed, Jul 30, 2014 at 12:24:14PM +0100, Will Deacon wrote: > > Whilst this sounds like a worrying problem, I've failed to reproduce it > > on arm64. Executing a brk instruction with either KGDB_DYN_DGB_BRK_IMM or >

Re: [PATCH] ARM/ARM64: don't enter kgdb when userspace executes a kgdb break instruction.

2014-07-30 Thread Omar Sandoval
Hi, On Wed, Jul 30, 2014 at 12:24:14PM +0100, Will Deacon wrote: > Whilst this sounds like a worrying problem, I've failed to reproduce it > on arm64. Executing a brk instruction with either KGDB_DYN_DGB_BRK_IMM or > KDBG_COMPILED_DBG_BRK_IMM immediates from userspace results in a SIGTRAP being >

Re: [PATCH] ARM/ARM64: don't enter kgdb when userspace executes a kgdb break instruction.

2014-07-30 Thread Will Deacon
Hello, On Wed, Jul 30, 2014 at 08:12:45AM +0100, Omar Sandoval wrote: > The kgdb breakpoint hooks (kgdb_brk_fn and kgdb_compiled_brk_fn) should only > be > entered when a kgdb break instruction is executed from the kernel. Otherwise, > if kgdb is enabled, a userspace program can cause the kernel

[PATCH] ARM/ARM64: don't enter kgdb when userspace executes a kgdb break instruction.

2014-07-30 Thread Omar Sandoval
The kgdb breakpoint hooks (kgdb_brk_fn and kgdb_compiled_brk_fn) should only be entered when a kgdb break instruction is executed from the kernel. Otherwise, if kgdb is enabled, a userspace program can cause the kernel to drop into the debugger by executing either KGDB_BREAKINST or KGDB_COMPILED_BR