The kselftest-vDSO/vdso_test_abi test encounters failures when built and executed using GCC-13 on armv7 architecture. The issue has been observed on both TI X15 devices and QEMU-armv7.
Interestingly, the same test passes without any issues when built using Clang-19.This failure is specific to GCC-13. but test case should have been failed on clang toolchain but it did not.
The Clang toolchain likely defaults to the traditional 32-bit time_t on 32-bit Debian Trixie (except x86), leading to an ABI issue similar to older compilers. This is affecting compatibility.
This is not a new regression, this report generated on Linux next but also seen on Linux stable tree.
Test name: kselftest-vDSO/vdso_test_abi Fails: gcc-13 pass: clang-19
Arnd Bergmann investigated and proposed a patch which fixes the problem.
Test regression: selftest-vDSO/vdso_test_abi:
Reported-by: Linux Kernel Functional Testing lkft@linaro.org
# selftests: vDSO: vdso_test_abi # TAP version 13 # 1..16 # # [vDSO kselftest] VDSO_VERSION: LINUX_2.6 # # The time is 184285885525887.-5268386858514840748 # ok 1 __vdso_gettimeofday # # clock_id: CLOCK_REALTIME # # The time is 184287230099877759.-1225334784 # ok 2 __vdso_clock_gettime CLOCK_REALTIME # # The vdso resolution is 4294967296 -1225335584 # # The syscall resolution is 4294967296 -1225334784 # not ok 3 __vdso_clock_getres CLOCK_REALTIME # # clock_id: CLOCK_BOOTTIME # # The time is 3253049749439251215.-1225334784 # ok 4 __vdso_clock_gettime CLOCK_BOOTTIME # # The vdso resolution is 4294967296 -1225335584 # # The syscall resolution is 4294967296 -1225334784 # not ok 5 __vdso_clock_getres CLOCK_BOOTTIME # # clock_id: CLOCK_TAI # # The time is 184549377723756415.-1225334784 # ok 6 __vdso_clock_gettime CLOCK_TAI # # The vdso resolution is 4294967296 -1225335584 # # The syscall resolution is 4294967296 -1225334784 # not ok 7 __vdso_clock_getres CLOCK_TAI # # clock_id: CLOCK_REALTIME_COARSE # # The time is 128974845965660031.-1225334784 # ok 8 __vdso_clock_gettime CLOCK_REALTIME_COARSE # # The vdso resolution is 42949672960000000 -1225335584 # # The syscall resolution is 42949672960000000 -1225334784 # not ok 9 __vdso_clock_getres CLOCK_REALTIME_COARSE # # clock_id: CLOCK_MONOTONIC # # The time is 3253311892768162575.-1225334784 # ok 10 __vdso_clock_gettime CLOCK_MONOTONIC # # The vdso resolution is 4294967296 -1225335584 # # The syscall resolution is 4294967296 -1225334784 # not ok 11 __vdso_clock_getres CLOCK_MONOTONIC # # clock_id: CLOCK_MONOTONIC_RAW # # The time is 3253442966580101903.-1225334784 # ok 12 __vdso_clock_gettime CLOCK_MONOTONIC_RAW # # The vdso resolution is 4294967296 -1225335584 # # The syscall resolution is 4294967296 -1225334784 # not ok 13 __vdso_clock_getres CLOCK_MONOTONIC_RAW # # clock_id: CLOCK_MONOTONIC_COARSE # # The time is 3197606291493094159.-1225334784 # ok 14 __vdso_clock_gettime CLOCK_MONOTONIC_COARSE # # The vdso resolution is 42949672960000000 -1225335584 # # The syscall resolution is 42949672960000000 -1225334784 # not ok 15 __vdso_clock_getres CLOCK_MONOTONIC_COARSE # # Couldn't find __vdso_time # ok 16 # SKIP __vdso_time # # 1 skipped test(s) detected. Consider enabling relevant config options to improve coverage. # # Totals: pass:8 fail:7 xfail:0 xpass:0 skip:1 error:0 not ok 3 selftests: vDSO: vdso_test_abi # exit=1
## Build * test log: https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20241126/tes... * TI x15 test log: https://lkft.validation.linaro.org/scheduler/job/8117196#L7091 * build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/2spp0E2mMNQq16RHsbzLS...
## Source * git tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git * git sha: df5d6180169ae06a2eac57e33b077ad6f6252440 (this not new issue) * architectures: armv7 * toolchain: gcc-13 (13.3.0) - failed * toolchain: clang ( version: 19.1.7) - pass * devices: Armv7 TI beaglebone, qemu-armv7
-- Linaro LKFT https://lkft.linaro.org
On Wed, Feb 12, 2025, at 15:29, Naresh Kamboju wrote:
The kselftest-vDSO/vdso_test_abi test encounters failures when built and executed using GCC-13 on armv7 architecture. The issue has been observed on both TI X15 devices and QEMU-armv7.
Interestingly, the same test passes without any issues when built using Clang-19.This failure is specific to GCC-13. but test case should have been failed on clang toolchain but it did not.
To clarify: the failure depends on how the toolchain is built: for compilers using the default 32-bit time_t in glibc, ltp does not notice a problem, but using gcc it will run into a testcase bug because the vdso_test_abi.c file incorrectly mixes libc types and kernel types.
The Clang toolchain likely defaults to the traditional 32-bit time_t on 32-bit Debian Trixie (except x86), leading to an ABI issue similar to older compilers. This is affecting compatibility.
This is not a new regression, this report generated on Linux next but also seen on Linux stable tree.
Test name: kselftest-vDSO/vdso_test_abi Fails: gcc-13 pass: clang-19
Arnd Bergmann investigated and proposed a patch which fixes the problem.
The patch only makes changes ltp so it tests the old system calls correctly regardless of the toolchain settings.
Someone still needs to change LTP to include this change as well as add tests for the 64-bit time_t vdso functions.
Arnd