Re: [PATCH] entry: Fix missed trap after single-step on system call return

2021-02-04 Thread Linus Torvalds
On Wed, Feb 3, 2021 at 3:55 PM Kyle Huey wrote: > > I have verified that a) the test case I sent earlier passes now and b) > all rr tests pass now. Thanks for keeping on top of this. Thomas/Andy - the patch looks straightforward and obvious enough, and I don't see any issues with it, so I

Re: [PATCH] entry: Fix missed trap after single-step on system call return

2021-02-03 Thread Kyle Huey
On Wed, Feb 3, 2021 at 10:11 AM Kyle Huey wrote: > > On Wed, Feb 3, 2021 at 10:00 AM Gabriel Krisman Bertazi > wrote: > > This seems to pass Kyle's test case. Kyle, can you verify it works with > > rr? > > I will test it later today. I have verified that a) the test case I sent earlier passes

Re: [PATCH] entry: Fix missed trap after single-step on system call return

2021-02-03 Thread Linus Torvalds
On Wed, Feb 3, 2021 at 10:18 AM Andy Lutomirski wrote: > > So if we want to reliably single-step a system call and trap after the > system call, we just need to synthesize a trap on the way out. Well, I think Gabriel's patch does exactly that, due to how SYSCALL_EXIT_TRAP is set. It looks like

Re: [PATCH] entry: Fix missed trap after single-step on system call return

2021-02-03 Thread Andy Lutomirski
On Wed, Feb 3, 2021 at 10:10 AM Linus Torvalds wrote: > > On Wed, Feb 3, 2021 at 10:00 AM Gabriel Krisman Bertazi > wrote: > > > > Does the patch below follows your suggestion? I'm setting the > > SYSCALL_WORK shadowing TIF_SINGLESTEP every time, instead of only when > > the child is inside a

Re: [PATCH] entry: Fix missed trap after single-step on system call return

2021-02-03 Thread Kyle Huey
today. > I can also turn Kyle's test case into a selftest, if it is ok with him. Sure. Consider whatever license/copyright/etc you need granted. - Kyle > Thanks, > > -- >8 -- > Subject: [PATCH] entry: Fix missed trap after single-step on a system call > return > > Commi

Re: [PATCH] entry: Fix missed trap after single-step on system call return

2021-02-03 Thread Linus Torvalds
On Wed, Feb 3, 2021 at 10:00 AM Gabriel Krisman Bertazi wrote: > > Does the patch below follows your suggestion? I'm setting the > SYSCALL_WORK shadowing TIF_SINGLESTEP every time, instead of only when > the child is inside a system call. Is this acceptable? Looks sane to me. My main worry

[PATCH] entry: Fix missed trap after single-step on system call return

2021-02-03 Thread Gabriel Krisman Bertazi
ss Kyle's test case. Kyle, can you verify it works with rr? I can also turn Kyle's test case into a selftest, if it is ok with him. Thanks, -- >8 -- Subject: [PATCH] entry: Fix missed trap after single-step on a system call return Commit 299155244770 ("entry: Drop usage of TIF flags in the gen