+ ptrace-add-ptrace_get_syscall_info-request-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: selftests/seccomp/seccomp_bpf: update for PTRACE_GET_SYSCALL_INFO
has been added to the -mm tree.  Its filename is
     ptrace-add-ptrace_get_syscall_info-request-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/ptrace-add-ptrace_get_syscall_info-request-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/ptrace-add-ptrace_get_syscall_info-request-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: "Dmitry V. Levin" <ldv@xxxxxxxxxxxx>
Subject: selftests/seccomp/seccomp_bpf: update for PTRACE_GET_SYSCALL_INFO

The syscall entry/exit is now exposed via PTRACE_GETEVENTMSG,
update the test accordingly.

Link: http://lkml.kernel.org/r/20190708182904.GA12332@xxxxxxxxxxxx
Signed-off-by: Dmitry V. Levin <ldv@xxxxxxxxxxxx>
Reported-by: kernel test robot <rong.a.chen@xxxxxxxxx>
Reviewed-by: Andy Lutomirski <luto@xxxxxxxxxx>
Cc: Elvira Khabirova <lineprinter@xxxxxxxxxxxx>
Cc: Oleg Nesterov <oleg@xxxxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Eugene Syromyatnikov <esyr@xxxxxxxxxx>
Cc: Shuah Khan <shuah@xxxxxxxxxx>
Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 tools/testing/selftests/seccomp/seccomp_bpf.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

--- a/tools/testing/selftests/seccomp/seccomp_bpf.c~ptrace-add-ptrace_get_syscall_info-request-fix
+++ a/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -1775,13 +1775,18 @@ void tracer_ptrace(struct __test_metadat
 	unsigned long msg;
 	static bool entry;
 
-	/* Make sure we got an empty message. */
+	/*
+	 * The traditional way to tell PTRACE_SYSCALL entry/exit
+	 * is by counting.
+	 */
+	entry = !entry;
+
+	/* Make sure we got an appropriate message. */
 	ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg);
 	EXPECT_EQ(0, ret);
-	EXPECT_EQ(0, msg);
+	EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY
+			: PTRACE_EVENTMSG_SYSCALL_EXIT, msg);
 
-	/* The only way to tell PTRACE_SYSCALL entry/exit is by counting. */
-	entry = !entry;
 	if (!entry)
 		return;
 
_

Patches currently in -mm which might be from ldv@xxxxxxxxxxxx are

nds32-fix-asm-syscallh.patch
hexagon-define-syscall_get_error-and-syscall_get_return_value.patch
mips-define-syscall_get_error.patch
parisc-define-syscall_get_error.patch
powerpc-define-syscall_get_error.patch
ptrace-add-ptrace_get_syscall_info-request-fix.patch
selftests-ptrace-add-a-test-case-for-ptrace_get_syscall_info.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux