mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
selftests/seccomp: Remove SIGSTOP si_pid check
Commit f149b31557
("signal: Never allocate siginfo for SIGKILL or SIGSTOP")
means that the seccomp selftest cannot check si_pid under SIGSTOP anymore.
Since it's believed[1] there are no other userspace things depending on the
old behavior, this removes the behavioral check in the selftest, since it's
more a "extra" sanity check (which turns out, maybe, not to have been
useful to test).
[1] https://lkml.kernel.org/r/CAGXu5jJaZAOzP1qFz66tYrtbuywqb+UN2SOA1VLHpCCOiYvYeg@mail.gmail.com
Reported-by: Tycho Andersen <tycho@tycho.ws>
Suggested-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <shuah@kernel.org>
This commit is contained in:
parent
651022382c
commit
2bd61abead
@ -2731,9 +2731,14 @@ TEST(syscall_restart)
|
||||
ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0));
|
||||
ASSERT_EQ(true, WIFSTOPPED(status));
|
||||
ASSERT_EQ(SIGSTOP, WSTOPSIG(status));
|
||||
/* Verify signal delivery came from parent now. */
|
||||
ASSERT_EQ(0, ptrace(PTRACE_GETSIGINFO, child_pid, NULL, &info));
|
||||
EXPECT_EQ(getpid(), info.si_pid);
|
||||
/*
|
||||
* There is no siginfo on SIGSTOP any more, so we can't verify
|
||||
* signal delivery came from parent now (getpid() == info.si_pid).
|
||||
* https://lkml.kernel.org/r/CAGXu5jJaZAOzP1qFz66tYrtbuywqb+UN2SOA1VLHpCCOiYvYeg@mail.gmail.com
|
||||
* At least verify the SIGSTOP via PTRACE_GETSIGINFO.
|
||||
*/
|
||||
EXPECT_EQ(SIGSTOP, info.si_signo);
|
||||
|
||||
/* Restart nanosleep with SIGCONT, which triggers restart_syscall. */
|
||||
ASSERT_EQ(0, kill(child_pid, SIGCONT));
|
||||
|
Loading…
Reference in New Issue
Block a user