public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ptrace: restore the previous single step reporting behavior
@ 2021-01-23 11:21 Yuxuan Shui
  2021-01-27 23:55 ` Gabriel Krisman Bertazi
  0 siblings, 1 reply; 6+ messages in thread
From: Yuxuan Shui @ 2021-01-23 11:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: krisman, linux-arch, kernel, yshuiv7

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

Commit 64eb35f701f04b30706e21d1b02636b5d31a37d2 changed when single step
is reported.

Specifically, the report_single_step is changed so that single steps are
only reported when both SYSCALL_EMU and _TIF_SINGLESTEP are set, while
previously they are reported when _TIF_SINGLESTEP is set without
_TIF_SYSCALL_EMU being set.

This behavior change breaks rr [1]

This commit restores the old behavior.

[1]: https://github.com/rr-debugger/rr/issues/2793

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
---
 kernel/entry/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/entry/common.c b/kernel/entry/common.c
index 90533f34ea99c..ad3b17fcde782 100644
--- a/kernel/entry/common.c
+++ b/kernel/entry/common.c
@@ -220,7 +220,7 @@ static inline bool rep:ort_single_step(unsigned long work)
  */
 static inline bool report_single_step(unsigned long work)
 {
-	if (!(work & SYSCALL_WORK_SYSCALL_EMU))
+	if (!!(work & SYSCALL_WORK_SYSCALL_EMU))
 		return false;
 
 	return !!(current_thread_info()->flags & _TIF_SINGLESTEP);
-- 
2.30.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ptrace: restore the previous single step reporting behavior
@ 2021-01-27 23:10 Kyle Huey
       [not found] ` <CAHk-=wiVj-0zV8ePHZ2rGFErJAYkRb3FZ8K9aYus6is0bALL5A@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Kyle Huey @ 2021-01-27 23:10 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Andy Lutomirski
  Cc: kernel, krisman, linux-arch, linux-kernel, yshuiv7,
	Robert O'Callahan

Hey everyone,

This regression[0] has totally broken rr on 5.11. Could we get someone
to look at and merge Yuxuan's patch here?

- Kyle

[0] https://github.com/rr-debugger/rr/issues/2793

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ptrace: restore the previous single step reporting behavior
  2021-01-23 11:21 [PATCH] ptrace: restore the previous single step reporting behavior Yuxuan Shui
@ 2021-01-27 23:55 ` Gabriel Krisman Bertazi
  2021-01-28  0:16   ` Yuxuan Shui
  2021-01-28 12:40   ` Thomas Gleixner
  0 siblings, 2 replies; 6+ messages in thread
From: Gabriel Krisman Bertazi @ 2021-01-27 23:55 UTC (permalink / raw)
  To: Yuxuan Shui; +Cc: linux-kernel, linux-arch, kernel

Yuxuan Shui <yshuiv7@gmail.com> writes:

> Commit 64eb35f701f04b30706e21d1b02636b5d31a37d2 changed when single step
> is reported.
>
> Specifically, the report_single_step is changed so that single steps are
> only reported when both SYSCALL_EMU and _TIF_SINGLESTEP are set, while
> previously they are reported when _TIF_SINGLESTEP is set without
> _TIF_SYSCALL_EMU being set.
>
> This behavior change breaks rr [1]
>
> This commit restores the old behavior.
>
> [1]: https://github.com/rr-debugger/rr/issues/2793
>
> Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>

Looks correct to me.

To gather the right attention, you should directly CC the correct maintainers.

Fixes: 64eb35f701f0 ("ptrace: Migrate TIF_SYSCALL_EMU to use SYSCALL_WORK flag")
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>

-- 
Gabriel Krisman Bertazi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ptrace: restore the previous single step reporting behavior
  2021-01-27 23:55 ` Gabriel Krisman Bertazi
@ 2021-01-28  0:16   ` Yuxuan Shui
  2021-01-28 12:40   ` Thomas Gleixner
  1 sibling, 0 replies; 6+ messages in thread
From: Yuxuan Shui @ 2021-01-28  0:16 UTC (permalink / raw)
  To: Gabriel Krisman Bertazi
  Cc: linux-kernel, linux-arch, kernel, tglx, peterz, luto

Hi,

On Wed, Jan 27, 2021 at 11:55 PM Gabriel Krisman Bertazi
<krisman@collabora.com> wrote:
>
> Yuxuan Shui <yshuiv7@gmail.com> writes:
>
> > Commit 64eb35f701f04b30706e21d1b02636b5d31a37d2 changed when single step
> > is reported.
> >
> > Specifically, the report_single_step is changed so that single steps are
> > only reported when both SYSCALL_EMU and _TIF_SINGLESTEP are set, while
> > previously they are reported when _TIF_SINGLESTEP is set without
> > _TIF_SYSCALL_EMU being set.
> >
> > This behavior change breaks rr [1]
> >
> > This commit restores the old behavior.
> >
> > [1]: https://github.com/rr-debugger/rr/issues/2793
> >
> > Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
>
> Looks correct to me.
>
> To gather the right attention, you should directly CC the correct maintainers.

Thanks, will do.

>
> Fixes: 64eb35f701f0 ("ptrace: Migrate TIF_SYSCALL_EMU to use SYSCALL_WORK flag")
> Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>
>
> --
> Gabriel Krisman Bertazi



-- 

Regards
Yuxuan Shui

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ptrace: restore the previous single step reporting behavior
  2021-01-27 23:55 ` Gabriel Krisman Bertazi
  2021-01-28  0:16   ` Yuxuan Shui
@ 2021-01-28 12:40   ` Thomas Gleixner
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Gleixner @ 2021-01-28 12:40 UTC (permalink / raw)
  To: Gabriel Krisman Bertazi, Yuxuan Shui
  Cc: linux-kernel, linux-arch, kernel, x86

On Wed, Jan 27 2021 at 20:55, Gabriel Krisman Bertazi wrote:
> Yuxuan Shui <yshuiv7@gmail.com> writes:
>
> To gather the right attention, you should directly CC the correct
> maintainers.

You could have cc'ed them on your reply ....

> Fixes: 64eb35f701f0 ("ptrace: Migrate TIF_SYSCALL_EMU to use SYSCALL_WORK flag")
> Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ptrace: restore the previous single step reporting behavior
       [not found] ` <CAHk-=wiVj-0zV8ePHZ2rGFErJAYkRb3FZ8K9aYus6is0bALL5A@mail.gmail.com>
@ 2021-01-28 20:15   ` Kyle Huey
  0 siblings, 0 replies; 6+ messages in thread
From: Kyle Huey @ 2021-01-28 20:15 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Thomas Gleixner, Andy Lutomirski, kernel, Gabriel Krisman Bertazi,
	linux-arch, Linux Kernel Mailing List, yshuiv7,
	Robert O'Callahan, the arch/x86 maintainers

On Thu, Jan 28, 2021 at 11:10 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> You should have pointed to the actual patch.

Sorry, I broke the reply threading in my mail client.

- Kyle

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-28 20:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-23 11:21 [PATCH] ptrace: restore the previous single step reporting behavior Yuxuan Shui
2021-01-27 23:55 ` Gabriel Krisman Bertazi
2021-01-28  0:16   ` Yuxuan Shui
2021-01-28 12:40   ` Thomas Gleixner
  -- strict thread matches above, loose matches on Subject: below --
2021-01-27 23:10 Kyle Huey
     [not found] ` <CAHk-=wiVj-0zV8ePHZ2rGFErJAYkRb3FZ8K9aYus6is0bALL5A@mail.gmail.com>
2021-01-28 20:15   ` Kyle Huey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox