Skip to content

Commit 96d4079

Browse files
committed
Merge tag 'seccomp-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
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
2 parents feacb17 + a9b33aa commit 96d4079

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

tools/testing/selftests/seccomp/seccomp_benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Strictly speaking, this is not a test. But it can report during test
3-
* runs so relative performace can be measured.
3+
* runs so relative performance can be measured.
44
*/
55
#define _GNU_SOURCE
66
#include <assert.h>

tools/testing/selftests/seccomp/seccomp_bpf.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,14 +1629,8 @@ void teardown_trace_fixture(struct __test_metadata *_metadata,
16291629
{
16301630
if (tracer) {
16311631
int status;
1632-
/*
1633-
* Extract the exit code from the other process and
1634-
* adopt it for ourselves in case its asserts failed.
1635-
*/
16361632
ASSERT_EQ(0, kill(tracer, SIGUSR1));
16371633
ASSERT_EQ(tracer, waitpid(tracer, &status, 0));
1638-
if (WEXITSTATUS(status))
1639-
_metadata->exit_code = KSFT_FAIL;
16401634
}
16411635
}
16421636

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

0 commit comments

Comments
 (0)