All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuxuan Shui <yshuiv7@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: krisman@collabora.com, linux-arch@vger.kernel.org,
	kernel@collabora.com, yshuiv7@gmail.com
Subject: [PATCH] ptrace: restore the previous single step reporting behavior
Date: Sat, 23 Jan 2021 03:21:32 -0800 (PST)	[thread overview]
Message-ID: <877do3gaq9.fsf@m5Zedd9JOGzJrf0> (raw)

[-- 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 --]

             reply	other threads:[~2021-01-23 11:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-23 11:21 Yuxuan Shui [this message]
2021-01-27 23:55 ` [PATCH] ptrace: restore the previous single step reporting behavior Gabriel Krisman Bertazi
2021-01-28  0:16   ` Yuxuan Shui
2021-01-28 12:40   ` Thomas Gleixner
2021-01-28 12:49 ` [tip: core/urgent] entry: Unbreak single step reporting behaviour tip-bot2 for Yuxuan Shui
2021-01-27 23:10 [PATCH] ptrace: restore the previous single step reporting behavior Kyle Huey
     [not found] ` <CAHk-=wiVj-0zV8ePHZ2rGFErJAYkRb3FZ8K9aYus6is0bALL5A@mail.gmail.com>
2021-01-28 20:15   ` Kyle Huey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877do3gaq9.fsf@m5Zedd9JOGzJrf0 \
    --to=yshuiv7@gmail.com \
    --cc=kernel@collabora.com \
    --cc=krisman@collabora.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.