[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wgOp10DO9jtMC=B=RoTLWe7MFTS5pH4JeZ78-tbqTY1vw@mail.gmail.com>
Date: Sun, 31 Jan 2021 15:55:54 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Kyle Huey <me@...ehuey.com>
Cc: Andy Lutomirski <luto@...capital.net>,
Thomas Gleixner <tglx@...utronix.de>,
Andy Lutomirski <luto@...nel.org>,
Gabriel Krisman Bertazi <krisman@...labora.com>,
open list <linux-kernel@...r.kernel.org>,
"Robert O'Callahan" <rocallahan@...il.com>
Subject: Re: [REGRESSION] x86/entry: TIF_SINGLESTEP handling is still broken
On Sun, Jan 31, 2021 at 3:35 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> I wonder if the simple solution is to just
>
> (a) always set one of the SYSCALL_WORK_EXIT bits on the child in
> ptrace (exactly to catch the child on system call exit)
>
> (b) basically revert 299155244770 ("entry: Drop usage of TIF flags in
> the generic syscall code") and have the syscall exit code check the
> TIF_SINGLESTEP flag
Actually, (b) looks unnecessary - as long as we get to
syscall_exit_work(), the current code will work fine.
So maybe just add a dummy SYSCALL_WORK_SYSCALL_EXIT_TRAP, and set that
flag whenever a singestep is requested for a process that is currently
in a system call?
IOW, make it a very explicit "do TF for system calls", rather than the
old code that was doing so implicitly and not very obviously. Hmm?
Linus
Powered by blists - more mailing lists