Greeting,
FYI, we noticed kernel-selftests.x86.test_vsyscall_32.fail due to commit (built with gcc-11):
commit: 877cff5296faa6ef312f8002216bbf73bea006c7 ("x86/vdso: Fake 32bit VDSO build on 64bit compile for vgetcpu")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
[test failed on linux-next/master 1716a175592aff9549a0c07aac8f9cadd03003f5]
in testcase: kernel-selftests
version: kernel-selftests-x86_64-d4cf28ee-1_20230110
with following parameters:
group: x86
test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt
on test machine: 8 threads 1 sockets Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (Kaby Lake) with 32G memory
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
# selftests: x86: test_vsyscall_32
# [RUN] test gettimeofday()
# vDSO time offsets: 0.000017 0.000001
# [OK] vDSO gettimeofday()'s timeval was okay
# [RUN] test time()
# [OK] vDSO time() is okay
# [RUN] getcpu() on CPU 0
# [FAIL] vDSO reported CPU 227 but should be 0
# [OK] vDSO reported correct node
# [RUN] getcpu() on CPU 1
# [FAIL] vDSO reported CPU 227 but should be 1
# [OK] vDSO reported correct node
not ok 9 selftests: x86: test_vsyscall_32 # exit=1
If you fix the issue, kindly add following tag
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-lkp/[email protected]
To reproduce:
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
sudo bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
sudo bin/lkp run generated-yaml-file
# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
> FYI, we noticed kernel-selftests.x86.test_vsyscall_32.fail due to commit (built with
> gcc-11):
>
> commit: 877cff5296faa6ef312f8002216bbf73bea006c7 ("x86/vdso: Fake 32bit
> VDSO build on 64bit compile for vgetcpu")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
>
> [test failed on linux-next/master 1716a175592aff9549a0c07aac8f9cadd03003f5]
>
> in testcase: kernel-selftests
> version: kernel-selftests-x86_64-d4cf28ee-1_20230110
> with following parameters:
>
> group: x86
>
> test-description: The kernel contains a set of "self tests" under the
> tools/testing/selftests/ directory. These are intended to be small unit tests to
> exercise individual code paths in the kernel.
> test-url: https://www.kernel.org/doc/Documentation/kselftest.txt
>
> on test machine: 8 threads 1 sockets Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
> (Kaby Lake) with 32G memory
>
> caused below changes (please refer to attached dmesg/kmsg for entire
> log/backtrace):
>
>
> # selftests: x86: test_vsyscall_32
> # [RUN] test gettimeofday()
> # vDSO time offsets: 0.000017 0.000001
> # [OK] vDSO gettimeofday()'s timeval was okay
> # [RUN] test time()
> # [OK] vDSO time() is okay
> # [RUN] getcpu() on CPU 0
> # [FAIL] vDSO reported CPU 227 but should be 0
> # [OK] vDSO reported correct node
> # [RUN] getcpu() on CPU 1
> # [FAIL] vDSO reported CPU 227 but should be 1
> # [OK] vDSO reported correct node
> not ok 9 selftests: x86: test_vsyscall_32 # exit=1
>
>
> If you fix the issue, kindly add following tag
> | Reported-by: kernel test robot <[email protected]>
> | Link:
> | https://lore.kernel.org/oe-lkp/[email protected]
Shan Kang found the same issue when she was testing the v5 FRED patch set.
The root cause is the 32-bit getcpu() on 64-bit Linux kernel is compiled
with 32-bit Linux kernel GDT_ENTRY_CPUNODE, i.e., 28, beyond the 64-bit
Linux kernel GDT limit.
I will send a fix soon.
Thanks!
Xin