lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 23 Jan 2021 03:21:32 -0800 (PST)
From:   Yuxuan Shui <yshuiv7@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     krisman@...labora.com, linux-arch@...r.kernel.org,
        kernel@...labora.com, yshuiv7@...il.com
Subject: [PATCH] ptrace: restore the previous single step reporting behavior

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@...il.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


Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ