Commit 96d40793 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull seccomp updates from Kees Cook:

 - selftest fixes for arm32 (Neill Kapron, Terry Tritton)

 - documentation typo fix (Sumanth Gavini)

* tag 'seccomp-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  selftests: seccomp: Fix "performace" to "performance"
  selftests/seccomp: fix negative_ENOSYS tracer tests on arm32
  selftests/seccomp: fix syscall_restart test for arm compat
parents feacb177 a9b33aae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
/*
 * Strictly speaking, this is not a test. But it can report during test
 * runs so relative performace can be measured.
 * runs so relative performance can be measured.
 */
#define _GNU_SOURCE
#include <assert.h>
+5 −8
Original line number Diff line number Diff line
@@ -1629,14 +1629,8 @@ void teardown_trace_fixture(struct __test_metadata *_metadata,
{
	if (tracer) {
		int status;
		/*
		 * Extract the exit code from the other process and
		 * adopt it for ourselves in case its asserts failed.
		 */
		ASSERT_EQ(0, kill(tracer, SIGUSR1));
		ASSERT_EQ(tracer, waitpid(tracer, &status, 0));
		if (WEXITSTATUS(status))
			_metadata->exit_code = KSFT_FAIL;
	}
}

@@ -3166,12 +3160,15 @@ TEST(syscall_restart)
	ret = get_syscall(_metadata, child_pid);
#if defined(__arm__)
	/*
	 * FIXME:
	 * - native ARM registers do NOT expose true syscall.
	 * - compat ARM registers on ARM64 DO expose true syscall.
	 * - values of utsbuf.machine include 'armv8l' or 'armb8b'
	 *   for ARM64 running in compat mode.
	 */
	ASSERT_EQ(0, uname(&utsbuf));
	if (strncmp(utsbuf.machine, "arm", 3) == 0) {
	if ((strncmp(utsbuf.machine, "arm", 3) == 0) &&
	    (strncmp(utsbuf.machine, "armv8l", 6) != 0) &&
	    (strncmp(utsbuf.machine, "armv8b", 6) != 0)) {
		EXPECT_EQ(__NR_nanosleep, ret);
	} else
#endif