linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot2 for Yuxuan Shui" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Yuxuan Shui <yshuiv7@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Gabriel Krisman Bertazi <krisman@collabora.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: core/urgent] entry: Unbreak single step reporting behaviour
Date: Thu, 28 Jan 2021 12:49:58 -0000	[thread overview]
Message-ID: <161183819817.23325.234499020067024025.tip-bot2@tip-bot2> (raw)
In-Reply-To: <877do3gaq9.fsf@m5Zedd9JOGzJrf0>

The following commit has been merged into the core/urgent branch of tip:

Commit-ID:     41c1a06d1d1544bed9692ba72a5692454eee1945
Gitweb:        https://git.kernel.org/tip/41c1a06d1d1544bed9692ba72a5692454eee1945
Author:        Yuxuan Shui <yshuiv7@gmail.com>
AuthorDate:    Sat, 23 Jan 2021 03:21:32 -08:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 28 Jan 2021 13:46:55 +01:00

entry: Unbreak single step reporting behaviour

The move of TIF_SYSCALL_EMU to SYSCALL_WORK_SYSCALL_EMU broke single step
reporting. The original code reported the single step when TIF_SINGLESTEP
was set and TIF_SYSCALL_EMU was not set. The SYSCALL_WORK conversion got
the logic wrong and now the reporting only happens when both bits are set.

Restore the original behaviour.

[ tglx: Massaged changelog and dropped the pointless double negation ]

Fixes: 64eb35f701f0 ("ptrace: Migrate TIF_SYSCALL_EMU to use SYSCALL_WORK flag")
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Link: https://lore.kernel.org/r/877do3gaq9.fsf@m5Zedd9JOGzJrf0
---
 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 3783416..6dd82be 100644
--- a/kernel/entry/common.c
+++ b/kernel/entry/common.c
@@ -222,7 +222,7 @@ static inline bool report_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);

      parent reply	other threads:[~2021-01-28 12:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
2021-01-28 12:49 ` tip-bot2 for Yuxuan Shui [this message]

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=161183819817.23325.234499020067024025.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=krisman@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yshuiv7@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).