1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/arch/x86/entry/vdso/vdso32
Sebastian Andrzej Siewior 877cff5296 x86/vdso: Fake 32bit VDSO build on 64bit compile for vgetcpu
The 64bit register constrains in __arch_hweight64() cannot be
fulfilled in a 32-bit build. The function is only declared but not used
within vclock_gettime.c and gcc does not care. LLVM complains and
aborts. Reportedly because it validates extended asm even if latter
would get compiled out, see

  https://lore.kernel.org/r/Y%2BJ%2BUQ1vAKr6RHuH@dev-arch.thelio-3990X

i.e., a long standing design difference between gcc and LLVM.

Move the "fake a 32 bit kernel configuration" bits from vclock_gettime.c
into a common header file. Use this from vclock_gettime.c and vgetcpu.c.

  [ bp: Add background info from Nathan. ]

Fixes: 92d33063c0 ("x86/vdso: Provide getcpu for x86-32.")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/Y+IsCWQdXEr8d9Vy@linutronix.de
2023-02-07 18:20:41 +01:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
fake_32bit_build.h x86/vdso: Fake 32bit VDSO build on 64bit compile for vgetcpu 2023-02-07 18:20:41 +01:00
note.S x86/xen: remove 32-bit Xen PV guest support 2020-08-11 08:26:48 +02:00
sigreturn.S x86: vdso: Expose sigreturn address on vdso to the kernel 2020-12-02 10:32:16 +01:00
system_call.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
vclock_gettime.c x86/vdso: Fake 32bit VDSO build on 64bit compile for vgetcpu 2023-02-07 18:20:41 +01:00
vdso32.lds.S x86/vdso: Provide getcpu for x86-32. 2023-02-06 15:48:54 +01:00
vgetcpu.c x86/vdso: Fake 32bit VDSO build on 64bit compile for vgetcpu 2023-02-07 18:20:41 +01:00