Skip to content

Commit 65e08c5

Browse files
committed
Merge tag 'linux-kselftest-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull Kselftest fix from Shuah Khan: "A single fix for a seccomp test from Kees Cook." * tag 'linux-kselftest-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/seccomp: Remove SIGSTOP si_pid check
2 parents 76a5cfb + 2bd61ab commit 65e08c5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tools/testing/selftests/seccomp/seccomp_bpf.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2731,9 +2731,14 @@ TEST(syscall_restart)
27312731
ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0));
27322732
ASSERT_EQ(true, WIFSTOPPED(status));
27332733
ASSERT_EQ(SIGSTOP, WSTOPSIG(status));
2734-
/* Verify signal delivery came from parent now. */
27352734
ASSERT_EQ(0, ptrace(PTRACE_GETSIGINFO, child_pid, NULL, &info));
2736-
EXPECT_EQ(getpid(), info.si_pid);
2735+
/*
2736+
* There is no siginfo on SIGSTOP any more, so we can't verify
2737+
* signal delivery came from parent now (getpid() == info.si_pid).
2738+
* https://lkml.kernel.org/r/CAGXu5jJaZAOzP1qFz66tYrtbuywqb+UN2SOA1VLHpCCOiYvYeg@mail.gmail.com
2739+
* At least verify the SIGSTOP via PTRACE_GETSIGINFO.
2740+
*/
2741+
EXPECT_EQ(SIGSTOP, info.si_signo);
27372742

27382743
/* Restart nanosleep with SIGCONT, which triggers restart_syscall. */
27392744
ASSERT_EQ(0, kill(child_pid, SIGCONT));

0 commit comments

Comments
 (0)