Re: [LTP] [x86/entry] 2bbc68f837: ltp.ptrace08.fail

2020-08-14 Thread Andy Lutomirski
On Fri, Aug 14, 2020 at 7:58 AM Cyril Hrubis wrote: > > Hi! > > > do_debug is a bit of a red herring here. ptrace should not be able to > > > put a breakpoint on a kernel address, period. I would just pick a > > > fixed address that's in the kernel text range or even just in the > > > pre-KASLR

Re: [LTP] [x86/entry] 2bbc68f837: ltp.ptrace08.fail

2020-08-14 Thread Cyril Hrubis
Hi! > > do_debug is a bit of a red herring here. ptrace should not be able to > > put a breakpoint on a kernel address, period. I would just pick a > > fixed address that's in the kernel text range or even just in the > > pre-KASLR text range and make sure it gets rejected. Maybe try a few > >

Re: [LTP] [x86/entry] 2bbc68f837: ltp.ptrace08.fail

2020-08-12 Thread Cyril Hrubis
Hi! > do_debug is a bit of a red herring here. ptrace should not be able to > put a breakpoint on a kernel address, period. I would just pick a > fixed address that's in the kernel text range or even just in the > pre-KASLR text range and make sure it gets rejected. Maybe try a few > different

Re: [LKP] Re: [LTP] [x86/entry] 2bbc68f837: ltp.ptrace08.fail

2020-06-22 Thread Naresh Kamboju
On Fri, 19 Jun 2020 at 01:32, Thomas Gleixner wrote: > > Cyril Hrubis writes: > > What is does is to write: > > > > (void*)1 to u_debugreg[0] > > (void*)1 to u_debugreg[7] > > do_debug addr to u_debugreg[0] > > > > Looking at the kernel code the write to register 7 enables the

Re: [LTP] [x86/entry] 2bbc68f837: ltp.ptrace08.fail

2020-06-18 Thread Thomas Gleixner
Cyril Hrubis writes: > What is does is to write: > > (void*)1 to u_debugreg[0] > (void*)1 to u_debugreg[7] > do_debug addr to u_debugreg[0] > > Looking at the kernel code the write to register 7 enables the breakpoints and > what we attempt here is to change an invalid address

Re: [LTP] [x86/entry] 2bbc68f837: ltp.ptrace08.fail

2020-06-18 Thread Andy Lutomirski
On Wed, Jun 17, 2020 at 6:17 AM Cyril Hrubis wrote: > > Hi! > > > >> FYI, we noticed the following commit (built with gcc-9): > > > >> > > > >> commit: 2bbc68f8373c0631ebf137f376fbea00e8086be7 ("x86/entry: Convert > > > >> Debug exception to IDTENTRY_DB") > > > >>

Re: [LTP] [x86/entry] 2bbc68f837: ltp.ptrace08.fail

2020-06-17 Thread Cyril Hrubis
Hi! > > >> FYI, we noticed the following commit (built with gcc-9): > > >> > > >> commit: 2bbc68f8373c0631ebf137f376fbea00e8086be7 ("x86/entry: Convert > > >> Debug exception to IDTENTRY_DB") > > >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master > > > > > > Is the head