[PATCH v4] powerpc/ptrace: replace ptrace_report_syscall() with a tracehook call

Dmitry V. Levin ldv at altlinux.org
Sat Dec 8 05:42:46 AEDT 2018


On Fri, Dec 07, 2018 at 05:34:10PM +0100, Oleg Nesterov wrote:
> On 12/07, Dmitry V. Levin wrote:
> > On Fri, Dec 07, 2018 at 10:12:49PM +1100, Michael Ellerman wrote:
> >
> > > > Sorry, this patch does not work, please ignore it.
> > >
> > > Hmm OK. Why exactly?
> >
> > Unfortunately, I have no idea why it doesn't work.
> > All I can say is it breaks strace because the kernel no longer sends
> > syscall entry stops.
> 
> May be because TIF_SYSCALL_EMU/etc is a bit number, not a mask? IOW, rather
> than
> 
> 	whatever & TIF_XXX
> 
> you should do
> 
> 	whatever & _TIF_XXX
> 
> intstead?

Thanks Oleg, this was exactly the reason why it didn't work.
That kind of things happens when you let userspace people hack you kernel. :)


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20181207/a568d74e/attachment.sig>


More information about the Linuxppc-dev mailing list