43707960 | 11-Jun-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: vdso_standalone_test_x86: Replace source file with symlink
With the switch over to nolibc the source file vdso_standalone_test_x86.c was intended to be replaced with a symlink to vd
selftests: vDSO: vdso_standalone_test_x86: Replace source file with symlink
With the switch over to nolibc the source file vdso_standalone_test_x86.c was intended to be replaced with a symlink to vdso_test_gettimeofday.c. This was the patch that was submitted to LKML, but during application the symlink was replaced by a textual copy of the linked-to file.
Having two copies introduces the possibility of divergence and increases maintenance burden, switch back to a symlink.
Fixes: 8770a9183fe1 ("selftests: vDSO: vdso_standalone_test_x86: Switch to nolibc") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/lkml/20250226-parse_vdso-nolibc-v2-16-28e14e031ed8@linutronix.de/ Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-9-e62e37a6bcf5@linutronix.de
show more ...
|
1158220b | 11-Jun-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: vdso_test_getrandom: Always print TAP header
The TAP specification requires that the output begins with a header line. If vgetrandom_init() fails and skips the test, that header lin
selftests: vDSO: vdso_test_getrandom: Always print TAP header
The TAP specification requires that the output begins with a header line. If vgetrandom_init() fails and skips the test, that header line is missing.
Call vgetrandom_init() after ksft_print_header().
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-8-e62e37a6bcf5@linutronix.de
show more ...
|
58265d64 | 11-Jun-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: vdso_test_correctness: Fix -Wstrict-prototypes
Functions definitions without any argument list produce a warning with -Wstrict-prototypes:
vdso_test_correctness.c:111:13: warning:
selftests: vDSO: vdso_test_correctness: Fix -Wstrict-prototypes
Functions definitions without any argument list produce a warning with -Wstrict-prototypes:
vdso_test_correctness.c:111:13: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 111 | static void fill_function_pointers() | ^~~~~~~~~~~~~~~~~~~~~~
Explicitly use an empty argument list.
Now that all selftests a free of this warning, enable it in the Makefile.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-7-e62e37a6bcf5@linutronix.de
show more ...
|
8863cd78 | 11-Jun-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: Enable -Wall
Protect against common programming errors through compiler warnings. These warnings are also used for the kernel itself.
Signed-off-by: Thomas Weißschuh <thomas.weisss
selftests: vDSO: Enable -Wall
Protect against common programming errors through compiler warnings. These warnings are also used for the kernel itself.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-6-e62e37a6bcf5@linutronix.de
show more ...
|
ecabe99a | 11-Jun-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: vdso_config: Avoid -Wunused-variables
Not all users of this header make use of all its variables. For example vdso_test_correctness.c does not use "versions":
In file included from
selftests: vDSO: vdso_config: Avoid -Wunused-variables
Not all users of this header make use of all its variables. For example vdso_test_correctness.c does not use "versions":
In file included from vdso_test_correctness.c:22: vdso_config.h:61:20: warning: ‘versions’ defined but not used [-Wunused-variable] 61 | static const char *versions[7] = { | ^~~~~~~~
Avoid those warnings through attribute((unused)).
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-5-e62e37a6bcf5@linutronix.de
show more ...
|
b8ae4308 | 11-Jun-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: vdso_test_getrandom: Avoid -Wunused
vgetrandom_put_state() and the variable "ret" in kselftest() are unused.
Drop the variable "ret". Suppress the warning for vgetrandom_put_state
selftests: vDSO: vdso_test_getrandom: Avoid -Wunused
vgetrandom_put_state() and the variable "ret" in kselftest() are unused.
Drop the variable "ret". Suppress the warning for vgetrandom_put_state() as it is meant as an example for libc implementors.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-4-e62e37a6bcf5@linutronix.de
show more ...
|
1c0fe1c7 | 11-Jun-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: vdso_test_getrandom: Drop unused include of linux/compiler.h
The header is unused. Furthermore this is not a real UAPI header, but only exists in tools/include/. This prevents build
selftests: vDSO: vdso_test_getrandom: Drop unused include of linux/compiler.h
The header is unused. Furthermore this is not a real UAPI header, but only exists in tools/include/. This prevents building the selftest against real UAPI headers.
Drop the include.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-3-e62e37a6bcf5@linutronix.de
show more ...
|
82669e15 | 11-Jun-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: clock_getres: Drop unused include of err.h
Nothing from err.h is used.
Drop the include.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gl
selftests: vDSO: clock_getres: Drop unused include of err.h
Nothing from err.h is used.
Drop the include.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-2-e62e37a6bcf5@linutronix.de
show more ...
|
8770a918 | 26-Feb-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: vdso_standalone_test_x86: Switch to nolibc
vdso_standalone_test_x86 provides its own ASM syscall wrappers and _start() implementation. The in-tree nolibc library already provides th
selftests: vDSO: vdso_standalone_test_x86: Switch to nolibc
vdso_standalone_test_x86 provides its own ASM syscall wrappers and _start() implementation. The in-tree nolibc library already provides this functionality for multiple architectures. By making use of nolibc, the standalone testcase can be built from the exact same codebase as the non-standalone version.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/all/20250226-parse_vdso-nolibc-v2-16-28e14e031ed8@linutronix.de
show more ...
|
4f65df6a | 26-Feb-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: vdso_test_gettimeofday: Make compatible with nolibc
nolibc does not provide sys/time.h and sys/auxv.h, instead their definitions are available unconditionally.
Guard the includes s
selftests: vDSO: vdso_test_gettimeofday: Make compatible with nolibc
nolibc does not provide sys/time.h and sys/auxv.h, instead their definitions are available unconditionally.
Guard the includes so they are not attempted on nolibc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/all/20250226-parse_vdso-nolibc-v2-15-28e14e031ed8@linutronix.de
show more ...
|
97a88141 | 26-Feb-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: vdso_test_gettimeofday: Clean up includes
Some unnecessary headers are included, remove them.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thoma
selftests: vDSO: vdso_test_gettimeofday: Clean up includes
Some unnecessary headers are included, remove them.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/all/20250226-parse_vdso-nolibc-v2-14-28e14e031ed8@linutronix.de
show more ...
|
032e8716 | 26-Feb-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: parse_vdso: Test __SIZEOF_LONG__ instead of ULONG_MAX
According to limits.h(2) ULONG_MAX is only guaranteed to expand to an expression, not a symbolic constant which can be evaluate
selftests: vDSO: parse_vdso: Test __SIZEOF_LONG__ instead of ULONG_MAX
According to limits.h(2) ULONG_MAX is only guaranteed to expand to an expression, not a symbolic constant which can be evaluated by the preprocessor.
Specifically the definition of ULONG_MAX from nolibc can not be evaluated by the preprocessor. To provide compatibility with nolibc, check with __SIZEOF_LONG__ instead, with is provided directly by the preprocessor and therefore always a symbolic constant.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/all/20250226-parse_vdso-nolibc-v2-13-28e14e031ed8@linutronix.de
show more ...
|
c9fbaa87 | 26-Feb-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers
To allow the usage of parse_vdso.c together with a limited libc like nolibc, use the kernels own elf.h and auxvec.h headers.
Si
selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers
To allow the usage of parse_vdso.c together with a limited libc like nolibc, use the kernels own elf.h and auxvec.h headers.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/all/20250226-parse_vdso-nolibc-v2-12-28e14e031ed8@linutronix.de
show more ...
|
09dcec64 | 26-Feb-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests: vDSO: parse_vdso: Drop vdso_init_from_auxv()
There are no users left.
This also removes the usage of ElfXX_auxv_t, which is not formally standardized.
Signed-off-by: Thomas Weißschuh <t
selftests: vDSO: parse_vdso: Drop vdso_init_from_auxv()
There are no users left.
This also removes the usage of ElfXX_auxv_t, which is not formally standardized.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/all/20250226-parse_vdso-nolibc-v2-11-28e14e031ed8@linutronix.de
show more ...
|
34d5b600 | 08-Oct-2024 |
Yu Liao <liaoyu15@huawei.com> |
selftests: vDSO: Explicitly include sched.h
The previous commit introduced the use of CLONE_NEWTIME without including <sched.h> which contains its definition.
Add an explicit include of <sched.h> t
selftests: vDSO: Explicitly include sched.h
The previous commit introduced the use of CLONE_NEWTIME without including <sched.h> which contains its definition.
Add an explicit include of <sched.h> to ensure that CLONE_NEWTIME is correctly defined before it is used.
Fixes: 2aec90036dcd ("selftests: vDSO: ensure vgetrandom works in a time namespace") Signed-off-by: Yu Liao <liaoyu15@huawei.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
3953a1d1 | 07-Oct-2024 |
Jason A. Donenfeld <Jason@zx2c4.com> |
selftests: vDSO: improve getrandom and chacha error messages
Improve the error and skip condition messages to let the developer know precisely where a test has failed. Also make better use of the ks
selftests: vDSO: improve getrandom and chacha error messages
Improve the error and skip condition messages to let the developer know precisely where a test has failed. Also make better use of the ksft api for this.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
fe6305cb | 07-Oct-2024 |
Jason A. Donenfeld <Jason@zx2c4.com> |
selftests: vDSO: unconditionally build getrandom test
Rather than building on supported archs, build on all archs, and then use the presence of the symbol in the vDSO to either skip the test or move
selftests: vDSO: unconditionally build getrandom test
Rather than building on supported archs, build on all archs, and then use the presence of the symbol in the vDSO to either skip the test or move forward with it.
Note that this means that this test no longer checks whether the symbol was correctly added to the kernel. But hopefully this will be clear enough to developers and we'll cross our fingers that symbols aren't removed by accident and not caught after this change.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|