Commit 107c948d authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'seccomp-v5.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull seccomp selftest fix from Kees Cook:

 - Avoid using stdin for read syscall testing (Jann Horn)

* tag 'seccomp-v5.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  selftests/seccomp: Don't call read() on TTY from background pgrp
parents ef8e4d3c 2bfed7d2
...@@ -955,7 +955,7 @@ TEST(ERRNO_valid) ...@@ -955,7 +955,7 @@ TEST(ERRNO_valid)
ASSERT_EQ(0, ret); ASSERT_EQ(0, ret);
EXPECT_EQ(parent, syscall(__NR_getppid)); EXPECT_EQ(parent, syscall(__NR_getppid));
EXPECT_EQ(-1, read(0, NULL, 0)); EXPECT_EQ(-1, read(-1, NULL, 0));
EXPECT_EQ(E2BIG, errno); EXPECT_EQ(E2BIG, errno);
} }
...@@ -974,7 +974,7 @@ TEST(ERRNO_zero) ...@@ -974,7 +974,7 @@ TEST(ERRNO_zero)
EXPECT_EQ(parent, syscall(__NR_getppid)); EXPECT_EQ(parent, syscall(__NR_getppid));
/* "errno" of 0 is ok. */ /* "errno" of 0 is ok. */
EXPECT_EQ(0, read(0, NULL, 0)); EXPECT_EQ(0, read(-1, NULL, 0));
} }
/* /*
...@@ -995,7 +995,7 @@ TEST(ERRNO_capped) ...@@ -995,7 +995,7 @@ TEST(ERRNO_capped)
ASSERT_EQ(0, ret); ASSERT_EQ(0, ret);
EXPECT_EQ(parent, syscall(__NR_getppid)); EXPECT_EQ(parent, syscall(__NR_getppid));
EXPECT_EQ(-1, read(0, NULL, 0)); EXPECT_EQ(-1, read(-1, NULL, 0));
EXPECT_EQ(4095, errno); EXPECT_EQ(4095, errno);
} }
...@@ -1026,7 +1026,7 @@ TEST(ERRNO_order) ...@@ -1026,7 +1026,7 @@ TEST(ERRNO_order)
ASSERT_EQ(0, ret); ASSERT_EQ(0, ret);
EXPECT_EQ(parent, syscall(__NR_getppid)); EXPECT_EQ(parent, syscall(__NR_getppid));
EXPECT_EQ(-1, read(0, NULL, 0)); EXPECT_EQ(-1, read(-1, NULL, 0));
EXPECT_EQ(12, errno); EXPECT_EQ(12, errno);
} }
...@@ -2623,7 +2623,7 @@ void *tsync_sibling(void *data) ...@@ -2623,7 +2623,7 @@ void *tsync_sibling(void *data)
ret = prctl(PR_GET_NO_NEW_PRIVS, 0, 0, 0, 0); ret = prctl(PR_GET_NO_NEW_PRIVS, 0, 0, 0, 0);
if (!ret) if (!ret)
return (void *)SIBLING_EXIT_NEWPRIVS; return (void *)SIBLING_EXIT_NEWPRIVS;
read(0, NULL, 0); read(-1, NULL, 0);
return (void *)SIBLING_EXIT_UNKILLED; return (void *)SIBLING_EXIT_UNKILLED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment