Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'linux_kselftest-fixes-6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull kselftest fixes from Shuah Khan:
"Fixes for build, run-time errors, and reporting errors:

- ftrace: regression test for a kernel crash when running function
graph tracing and then enabling function profiler.

- rseq: fix for mm_cid test failure.

- vDSO:
- fixes to reporting skip and other error conditions
- changes unconditionally build chacha and getrandom tests on all
architectures to make it easier for them to run in CIs
- build error when sched.h to bring in CLONE_NEWTIME define"

* tag 'linux_kselftest-fixes-6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
ftrace/selftest: Test combination of function_graph tracer and function profiler
selftests/rseq: Fix mm_cid test failure
selftests: vDSO: Explicitly include sched.h
selftests: vDSO: improve getrandom and chacha error messages
selftests: vDSO: unconditionally build getrandom test
selftests: vDSO: unconditionally build chacha test

+183 -104
+31
tools/testing/selftests/ftrace/test.d/ftrace/fgraph-profiler.tc
··· 1 + #!/bin/sh 2 + # SPDX-License-Identifier: GPL-2.0 3 + # description: ftrace - function profiler with function graph tracing 4 + # requires: function_profile_enabled set_ftrace_filter function_graph:tracer 5 + 6 + # The function graph tracer can now be run along side of the function 7 + # profiler. But there was a bug that caused the combination of the two 8 + # to crash. It also required the function graph tracer to be started 9 + # first. 10 + # 11 + # This test triggers that bug 12 + # 13 + # We need both function_graph and profiling to run this test 14 + 15 + fail() { # mesg 16 + echo $1 17 + exit_fail 18 + } 19 + 20 + echo "Enabling function graph tracer:" 21 + echo function_graph > current_tracer 22 + echo "enable profiler" 23 + 24 + # Older kernels do not allow function_profile to be enabled with 25 + # function graph tracer. If the below fails, mark it as unsupported 26 + echo 1 > function_profile_enabled || exit_unsupported 27 + 28 + # Let it run for a bit to make sure nothing explodes 29 + sleep 1 30 + 31 + exit 0
+75 -35
tools/testing/selftests/rseq/rseq.c
··· 60 60 /* Flags used during rseq registration. */ 61 61 unsigned int rseq_flags; 62 62 63 - /* 64 - * rseq feature size supported by the kernel. 0 if the registration was 65 - * unsuccessful. 66 - */ 67 - unsigned int rseq_feature_size = -1U; 68 - 69 63 static int rseq_ownership; 70 64 static int rseq_reg_success; /* At least one rseq registration has succeded. */ 71 65 ··· 105 111 } 106 112 } 107 113 114 + /* The rseq areas need to be at least 32 bytes. */ 115 + static 116 + unsigned int get_rseq_min_alloc_size(void) 117 + { 118 + unsigned int alloc_size = rseq_size; 119 + 120 + if (alloc_size < ORIG_RSEQ_ALLOC_SIZE) 121 + alloc_size = ORIG_RSEQ_ALLOC_SIZE; 122 + return alloc_size; 123 + } 124 + 125 + /* 126 + * Return the feature size supported by the kernel. 127 + * 128 + * Depending on the value returned by getauxval(AT_RSEQ_FEATURE_SIZE): 129 + * 130 + * 0: Return ORIG_RSEQ_FEATURE_SIZE (20) 131 + * > 0: Return the value from getauxval(AT_RSEQ_FEATURE_SIZE). 132 + * 133 + * It should never return a value below ORIG_RSEQ_FEATURE_SIZE. 134 + */ 135 + static 136 + unsigned int get_rseq_kernel_feature_size(void) 137 + { 138 + unsigned long auxv_rseq_feature_size, auxv_rseq_align; 139 + 140 + auxv_rseq_align = getauxval(AT_RSEQ_ALIGN); 141 + assert(!auxv_rseq_align || auxv_rseq_align <= RSEQ_THREAD_AREA_ALLOC_SIZE); 142 + 143 + auxv_rseq_feature_size = getauxval(AT_RSEQ_FEATURE_SIZE); 144 + assert(!auxv_rseq_feature_size || auxv_rseq_feature_size <= RSEQ_THREAD_AREA_ALLOC_SIZE); 145 + if (auxv_rseq_feature_size) 146 + return auxv_rseq_feature_size; 147 + else 148 + return ORIG_RSEQ_FEATURE_SIZE; 149 + } 150 + 108 151 int rseq_register_current_thread(void) 109 152 { 110 153 int rc; ··· 150 119 /* Treat libc's ownership as a successful registration. */ 151 120 return 0; 152 121 } 153 - rc = sys_rseq(&__rseq_abi, rseq_size, 0, RSEQ_SIG); 122 + rc = sys_rseq(&__rseq_abi, get_rseq_min_alloc_size(), 0, RSEQ_SIG); 154 123 if (rc) { 155 124 if (RSEQ_READ_ONCE(rseq_reg_success)) { 156 125 /* Incoherent success/failure within process. */ ··· 171 140 /* Treat libc's ownership as a successful unregistration. */ 172 141 return 0; 173 142 } 174 - rc = sys_rseq(&__rseq_abi, rseq_size, RSEQ_ABI_FLAG_UNREGISTER, RSEQ_SIG); 143 + rc = sys_rseq(&__rseq_abi, get_rseq_min_alloc_size(), RSEQ_ABI_FLAG_UNREGISTER, RSEQ_SIG); 175 144 if (rc) 176 145 return -1; 177 146 return 0; 178 - } 179 - 180 - static 181 - unsigned int get_rseq_feature_size(void) 182 - { 183 - unsigned long auxv_rseq_feature_size, auxv_rseq_align; 184 - 185 - auxv_rseq_align = getauxval(AT_RSEQ_ALIGN); 186 - assert(!auxv_rseq_align || auxv_rseq_align <= RSEQ_THREAD_AREA_ALLOC_SIZE); 187 - 188 - auxv_rseq_feature_size = getauxval(AT_RSEQ_FEATURE_SIZE); 189 - assert(!auxv_rseq_feature_size || auxv_rseq_feature_size <= RSEQ_THREAD_AREA_ALLOC_SIZE); 190 - if (auxv_rseq_feature_size) 191 - return auxv_rseq_feature_size; 192 - else 193 - return ORIG_RSEQ_FEATURE_SIZE; 194 147 } 195 148 196 149 static __attribute__((constructor)) ··· 193 178 } 194 179 if (libc_rseq_size_p && libc_rseq_offset_p && libc_rseq_flags_p && 195 180 *libc_rseq_size_p != 0) { 181 + unsigned int libc_rseq_size; 182 + 196 183 /* rseq registration owned by glibc */ 197 184 rseq_offset = *libc_rseq_offset_p; 198 - rseq_size = *libc_rseq_size_p; 185 + libc_rseq_size = *libc_rseq_size_p; 199 186 rseq_flags = *libc_rseq_flags_p; 200 - rseq_feature_size = get_rseq_feature_size(); 201 - if (rseq_feature_size > rseq_size) 202 - rseq_feature_size = rseq_size; 187 + 188 + /* 189 + * Previous versions of glibc expose the value 190 + * 32 even though the kernel only supported 20 191 + * bytes initially. Therefore treat 32 as a 192 + * special-case. glibc 2.40 exposes a 20 bytes 193 + * __rseq_size without using getauxval(3) to 194 + * query the supported size, while still allocating a 32 195 + * bytes area. Also treat 20 as a special-case. 196 + * 197 + * Special-cases are handled by using the following 198 + * value as active feature set size: 199 + * 200 + * rseq_size = min(32, get_rseq_kernel_feature_size()) 201 + */ 202 + switch (libc_rseq_size) { 203 + case ORIG_RSEQ_FEATURE_SIZE: 204 + fallthrough; 205 + case ORIG_RSEQ_ALLOC_SIZE: 206 + { 207 + unsigned int rseq_kernel_feature_size = get_rseq_kernel_feature_size(); 208 + 209 + if (rseq_kernel_feature_size < ORIG_RSEQ_ALLOC_SIZE) 210 + rseq_size = rseq_kernel_feature_size; 211 + else 212 + rseq_size = ORIG_RSEQ_ALLOC_SIZE; 213 + break; 214 + } 215 + default: 216 + /* Otherwise just use the __rseq_size from libc as rseq_size. */ 217 + rseq_size = libc_rseq_size; 218 + break; 219 + } 203 220 return; 204 221 } 205 222 rseq_ownership = 1; 206 223 if (!rseq_available()) { 207 224 rseq_size = 0; 208 - rseq_feature_size = 0; 209 225 return; 210 226 } 211 227 rseq_offset = (void *)&__rseq_abi - rseq_thread_pointer(); 212 228 rseq_flags = 0; 213 - rseq_feature_size = get_rseq_feature_size(); 214 - if (rseq_feature_size == ORIG_RSEQ_FEATURE_SIZE) 215 - rseq_size = ORIG_RSEQ_ALLOC_SIZE; 216 - else 217 - rseq_size = RSEQ_THREAD_AREA_ALLOC_SIZE; 218 229 } 219 230 220 231 static __attribute__((destructor)) ··· 250 209 return; 251 210 rseq_offset = 0; 252 211 rseq_size = -1U; 253 - rseq_feature_size = -1U; 254 212 rseq_ownership = 0; 255 213 } 256 214
+2 -8
tools/testing/selftests/rseq/rseq.h
··· 68 68 /* Flags used during rseq registration. */ 69 69 extern unsigned int rseq_flags; 70 70 71 - /* 72 - * rseq feature size supported by the kernel. 0 if the registration was 73 - * unsuccessful. 74 - */ 75 - extern unsigned int rseq_feature_size; 76 - 77 71 enum rseq_mo { 78 72 RSEQ_MO_RELAXED = 0, 79 73 RSEQ_MO_CONSUME = 1, /* Unused */ ··· 187 193 188 194 static inline bool rseq_node_id_available(void) 189 195 { 190 - return (int) rseq_feature_size >= rseq_offsetofend(struct rseq_abi, node_id); 196 + return (int) rseq_size >= rseq_offsetofend(struct rseq_abi, node_id); 191 197 } 192 198 193 199 /* ··· 201 207 202 208 static inline bool rseq_mm_cid_available(void) 203 209 { 204 - return (int) rseq_feature_size >= rseq_offsetofend(struct rseq_abi, mm_cid); 210 + return (int) rseq_size >= rseq_offsetofend(struct rseq_abi, mm_cid); 205 211 } 206 212 207 213 static inline uint32_t rseq_current_mm_cid(void)
+2 -4
tools/testing/selftests/vDSO/Makefile
··· 9 9 TEST_GEN_PROGS += vdso_standalone_test_x86 10 10 endif 11 11 TEST_GEN_PROGS += vdso_test_correctness 12 - ifeq ($(ARCH)$(CONFIG_X86_32),$(filter $(ARCH)$(CONFIG_X86_32),x86 x86_64 loongarch arm64 powerpc s390)) 13 12 TEST_GEN_PROGS += vdso_test_getrandom 14 13 TEST_GEN_PROGS += vdso_test_chacha 15 - endif 16 14 17 15 CFLAGS := -std=gnu99 -O2 18 16 ··· 35 37 $(KHDR_INCLUDES) \ 36 38 -isystem $(top_srcdir)/include/uapi 37 39 38 - $(OUTPUT)/vdso_test_chacha: $(top_srcdir)/tools/arch/$(SRCARCH)/vdso/vgetrandom-chacha.S 40 + $(OUTPUT)/vdso_test_chacha: vgetrandom-chacha.S 39 41 $(OUTPUT)/vdso_test_chacha: CFLAGS += -idirafter $(top_srcdir)/tools/include \ 40 42 -idirafter $(top_srcdir)/tools/include/generated \ 41 43 -idirafter $(top_srcdir)/arch/$(SRCARCH)/include \ 42 44 -idirafter $(top_srcdir)/include \ 43 - -D__ASSEMBLY__ -Wa,--noexecstack 45 + -Wa,--noexecstack
+21 -15
tools/testing/selftests/vDSO/vdso_test_chacha.c
··· 3 3 * Copyright (C) 2022-2024 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 4 */ 5 5 6 + #include <linux/compiler.h> 6 7 #include <tools/le_byteshift.h> 7 8 #include <sys/random.h> 8 9 #include <sys/auxv.h> ··· 74 73 counter[1] = s[13]; 75 74 } 76 75 77 - typedef uint8_t u8; 78 - typedef uint32_t u32; 79 - typedef uint64_t u64; 80 - #include <vdso/getrandom.h> 76 + void __weak __arch_chacha20_blocks_nostack(uint8_t *dst_bytes, const uint32_t *key, uint32_t *counter, size_t nblocks) 77 + { 78 + ksft_exit_skip("Not implemented on architecture\n"); 79 + } 81 80 82 81 int main(int argc, char *argv[]) 83 82 { ··· 91 90 ksft_set_plan(1); 92 91 93 92 for (unsigned int trial = 0; trial < TRIALS; ++trial) { 94 - if (getrandom(key, sizeof(key), 0) != sizeof(key)) { 95 - printf("getrandom() failed!\n"); 96 - return KSFT_SKIP; 97 - } 93 + if (getrandom(key, sizeof(key), 0) != sizeof(key)) 94 + ksft_exit_skip("getrandom() failed unexpectedly\n"); 98 95 memset(counter1, 0, sizeof(counter1)); 99 96 reference_chacha20_blocks(output1, key, counter1, BLOCKS); 100 97 for (unsigned int split = 0; split < BLOCKS; ++split) { ··· 101 102 if (split) 102 103 __arch_chacha20_blocks_nostack(output2, key, counter2, split); 103 104 __arch_chacha20_blocks_nostack(output2 + split * BLOCK_SIZE, key, counter2, BLOCKS - split); 104 - if (memcmp(output1, output2, sizeof(output1)) || memcmp(counter1, counter2, sizeof(counter1))) 105 - return KSFT_FAIL; 105 + if (memcmp(output1, output2, sizeof(output1))) 106 + ksft_exit_fail_msg("Main loop outputs do not match on trial %u, split %u\n", trial, split); 107 + if (memcmp(counter1, counter2, sizeof(counter1))) 108 + ksft_exit_fail_msg("Main loop counters do not match on trial %u, split %u\n", trial, split); 106 109 } 107 110 } 108 111 memset(counter1, 0, sizeof(counter1)); ··· 114 113 115 114 reference_chacha20_blocks(output1, key, counter1, BLOCKS); 116 115 __arch_chacha20_blocks_nostack(output2, key, counter2, BLOCKS); 117 - if (memcmp(output1, output2, sizeof(output1)) || memcmp(counter1, counter2, sizeof(counter1))) 118 - return KSFT_FAIL; 116 + if (memcmp(output1, output2, sizeof(output1))) 117 + ksft_exit_fail_msg("Block limit outputs do not match after first round\n"); 118 + if (memcmp(counter1, counter2, sizeof(counter1))) 119 + ksft_exit_fail_msg("Block limit counters do not match after first round\n"); 119 120 120 121 reference_chacha20_blocks(output1, key, counter1, BLOCKS); 121 122 __arch_chacha20_blocks_nostack(output2, key, counter2, BLOCKS); 122 - if (memcmp(output1, output2, sizeof(output1)) || memcmp(counter1, counter2, sizeof(counter1))) 123 - return KSFT_FAIL; 123 + if (memcmp(output1, output2, sizeof(output1))) 124 + ksft_exit_fail_msg("Block limit outputs do not match after second round\n"); 125 + if (memcmp(counter1, counter2, sizeof(counter1))) 126 + ksft_exit_fail_msg("Block limit counters do not match after second round\n"); 124 127 125 128 ksft_test_result_pass("chacha: PASS\n"); 126 - return KSFT_PASS; 129 + ksft_exit_pass(); 130 + return 0; 127 131 }
+34 -42
tools/testing/selftests/vDSO/vdso_test_getrandom.c
··· 11 11 #include <string.h> 12 12 #include <time.h> 13 13 #include <unistd.h> 14 + #include <sched.h> 14 15 #include <signal.h> 15 16 #include <sys/auxv.h> 16 17 #include <sys/mman.h> ··· 40 39 } \ 41 40 } while (0) 42 41 #endif 42 + 43 + #define ksft_assert(condition) \ 44 + do { if (!(condition)) ksft_exit_fail_msg("Assertion failed: %s\n", #condition); } while (0) 43 45 44 46 static struct { 45 47 pthread_mutex_t lock; ··· 115 111 const char *version = versions[VDSO_VERSION]; 116 112 const char *name = names[VDSO_NAMES][6]; 117 113 unsigned long sysinfo_ehdr = getauxval(AT_SYSINFO_EHDR); 118 - size_t ret; 114 + ssize_t ret; 119 115 120 - if (!sysinfo_ehdr) { 121 - printf("AT_SYSINFO_EHDR is not present!\n"); 122 - exit(KSFT_SKIP); 123 - } 116 + if (!sysinfo_ehdr) 117 + ksft_exit_skip("AT_SYSINFO_EHDR is not present\n"); 124 118 vdso_init_from_sysinfo_ehdr(sysinfo_ehdr); 125 119 vgrnd.fn = (__typeof__(vgrnd.fn))vdso_sym(version, name); 126 - if (!vgrnd.fn) { 127 - printf("%s is missing!\n", name); 128 - exit(KSFT_FAIL); 129 - } 120 + if (!vgrnd.fn) 121 + ksft_exit_skip("%s@%s symbol is missing from vDSO\n", name, version); 130 122 ret = VDSO_CALL(vgrnd.fn, 5, NULL, 0, 0, &vgrnd.params, ~0UL); 131 - if (ret == -ENOSYS) { 132 - printf("unsupported architecture\n"); 133 - exit(KSFT_SKIP); 134 - } else if (ret) { 135 - printf("failed to fetch vgetrandom params!\n"); 136 - exit(KSFT_FAIL); 137 - } 123 + if (ret == -ENOSYS) 124 + ksft_exit_skip("CPU does not have runtime support\n"); 125 + else if (ret) 126 + ksft_exit_fail_msg("Failed to fetch vgetrandom params: %zd\n", ret); 138 127 } 139 128 140 129 static ssize_t vgetrandom(void *buf, size_t len, unsigned long flags) ··· 136 139 137 140 if (!state) { 138 141 state = vgetrandom_get_state(); 139 - if (!state) { 140 - printf("vgetrandom_get_state failed!\n"); 141 - exit(KSFT_FAIL); 142 - } 142 + ksft_assert(state); 143 143 } 144 144 return VDSO_CALL(vgrnd.fn, 5, buf, len, flags, state, vgrnd.params.size_of_opaque_state); 145 145 } ··· 148 154 for (size_t i = 0; i < TRIALS; ++i) { 149 155 unsigned int val; 150 156 ssize_t ret = vgetrandom(&val, sizeof(val), 0); 151 - assert(ret == sizeof(val)); 157 + ksft_assert(ret == sizeof(val)); 152 158 } 153 159 return NULL; 154 160 } ··· 158 164 for (size_t i = 0; i < TRIALS; ++i) { 159 165 unsigned int val; 160 166 ssize_t ret = getrandom(&val, sizeof(val), 0); 161 - assert(ret == sizeof(val)); 167 + ksft_assert(ret == sizeof(val)); 162 168 } 163 169 return NULL; 164 170 } ··· 168 174 for (size_t i = 0; i < TRIALS; ++i) { 169 175 unsigned int val; 170 176 ssize_t ret = syscall(__NR_getrandom, &val, sizeof(val), 0); 171 - assert(ret == sizeof(val)); 177 + ksft_assert(ret == sizeof(val)); 172 178 } 173 179 return NULL; 174 180 } ··· 203 209 204 210 clock_gettime(CLOCK_MONOTONIC, &start); 205 211 for (size_t i = 0; i < THREADS; ++i) 206 - assert(pthread_create(&threads[i], NULL, test_vdso_getrandom, NULL) == 0); 212 + ksft_assert(pthread_create(&threads[i], NULL, test_vdso_getrandom, NULL) == 0); 207 213 for (size_t i = 0; i < THREADS; ++i) 208 214 pthread_join(threads[i], NULL); 209 215 clock_gettime(CLOCK_MONOTONIC, &end); ··· 212 218 213 219 clock_gettime(CLOCK_MONOTONIC, &start); 214 220 for (size_t i = 0; i < THREADS; ++i) 215 - assert(pthread_create(&threads[i], NULL, test_libc_getrandom, NULL) == 0); 221 + ksft_assert(pthread_create(&threads[i], NULL, test_libc_getrandom, NULL) == 0); 216 222 for (size_t i = 0; i < THREADS; ++i) 217 223 pthread_join(threads[i], NULL); 218 224 clock_gettime(CLOCK_MONOTONIC, &end); ··· 221 227 222 228 clock_gettime(CLOCK_MONOTONIC, &start); 223 229 for (size_t i = 0; i < THREADS; ++i) 224 - assert(pthread_create(&threads[i], NULL, test_syscall_getrandom, NULL) == 0); 230 + ksft_assert(pthread_create(&threads[i], NULL, test_syscall_getrandom, NULL) == 0); 225 231 for (size_t i = 0; i < THREADS; ++i) 226 232 pthread_join(threads[i], NULL); 227 233 clock_gettime(CLOCK_MONOTONIC, &end); ··· 246 252 247 253 for (size_t i = 0; i < 1000; ++i) { 248 254 ssize_t ret = vgetrandom(weird_size, sizeof(weird_size), 0); 249 - if (ret != sizeof(weird_size)) 250 - exit(KSFT_FAIL); 255 + ksft_assert(ret == sizeof(weird_size)); 251 256 } 252 257 253 258 ksft_test_result_pass("getrandom: PASS\n"); 254 259 255 260 unshare(CLONE_NEWUSER); 256 - assert(unshare(CLONE_NEWTIME) == 0); 261 + ksft_assert(unshare(CLONE_NEWTIME) == 0); 257 262 child = fork(); 258 - assert(child >= 0); 263 + ksft_assert(child >= 0); 259 264 if (!child) { 260 265 vgetrandom_init(); 261 266 child = getpid(); 262 - assert(ptrace(PTRACE_TRACEME, 0, NULL, NULL) == 0); 263 - assert(kill(child, SIGSTOP) == 0); 264 - assert(vgetrandom(weird_size, sizeof(weird_size), 0) == sizeof(weird_size)); 267 + ksft_assert(ptrace(PTRACE_TRACEME, 0, NULL, NULL) == 0); 268 + ksft_assert(kill(child, SIGSTOP) == 0); 269 + ksft_assert(vgetrandom(weird_size, sizeof(weird_size), 0) == sizeof(weird_size)); 265 270 _exit(0); 266 271 } 267 272 for (;;) { 268 273 struct ptrace_syscall_info info = { 0 }; 269 274 int status, ret; 270 - assert(waitpid(child, &status, 0) >= 0); 275 + ksft_assert(waitpid(child, &status, 0) >= 0); 271 276 if (WIFEXITED(status)) { 272 - if (WEXITSTATUS(status) != 0) 273 - exit(KSFT_FAIL); 277 + ksft_assert(WEXITSTATUS(status) == 0); 274 278 break; 275 279 } 276 - assert(WIFSTOPPED(status)); 280 + ksft_assert(WIFSTOPPED(status)); 277 281 if (WSTOPSIG(status) == SIGSTOP) 278 - assert(ptrace(PTRACE_SETOPTIONS, child, 0, PTRACE_O_TRACESYSGOOD) == 0); 282 + ksft_assert(ptrace(PTRACE_SETOPTIONS, child, 0, PTRACE_O_TRACESYSGOOD) == 0); 279 283 else if (WSTOPSIG(status) == (SIGTRAP | 0x80)) { 280 - assert(ptrace(PTRACE_GET_SYSCALL_INFO, child, sizeof(info), &info) > 0); 284 + ksft_assert(ptrace(PTRACE_GET_SYSCALL_INFO, child, sizeof(info), &info) > 0); 281 285 if (info.op == PTRACE_SYSCALL_INFO_ENTRY && info.entry.nr == __NR_getrandom && 282 286 info.entry.args[0] == (uintptr_t)weird_size && info.entry.args[1] == sizeof(weird_size)) 283 - exit(KSFT_FAIL); 287 + ksft_exit_fail_msg("vgetrandom passed buffer to syscall getrandom unexpectedly\n"); 284 288 } 285 - assert(ptrace(PTRACE_SYSCALL, child, 0, 0) == 0); 289 + ksft_assert(ptrace(PTRACE_SYSCALL, child, 0, 0) == 0); 286 290 } 287 291 288 292 ksft_test_result_pass("getrandom timens: PASS\n"); 289 293 290 - exit(KSFT_PASS); 294 + ksft_exit_pass(); 291 295 } 292 296 293 297 static void usage(const char *argv0)
+18
tools/testing/selftests/vDSO/vgetrandom-chacha.S
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Copyright (C) 2024 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 + */ 5 + 6 + #define __ASSEMBLY__ 7 + 8 + #if defined(__aarch64__) 9 + #include "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" 10 + #elif defined(__loongarch__) 11 + #include "../../../../arch/loongarch/vdso/vgetrandom-chacha.S" 12 + #elif defined(__powerpc__) || defined(__powerpc64__) 13 + #include "../../../../arch/powerpc/kernel/vdso/vgetrandom-chacha.S" 14 + #elif defined(__s390x__) 15 + #include "../../../../arch/s390/kernel/vdso64/vgetrandom-chacha.S" 16 + #elif defined(__x86_64__) 17 + #include "../../../../arch/x86/entry/vdso/vgetrandom-chacha.S" 18 + #endif