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.

um: Fix header inclusion

User Mode Linux is a flavor of x86 that from the vDSO prospective always
falls back on system calls. This implies that it does not require any
of the unified vDSO definitions and their inclusion causes side effects
like this:

In file included from include/vdso/processor.h:10:0,
from include/vdso/datapage.h:17,
from arch/x86/include/asm/vgtod.h:7,
from arch/x86/um/../kernel/sys_ia32.c:49:
>> arch/x86/include/asm/vdso/processor.h:11:29: error: redefinition of 'rep_nop'
static __always_inline void rep_nop(void)
^~~~~~~
In file included from include/linux/rcupdate.h:30:0,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/x86/um/../kernel/sys_ia32.c:25:
arch/x86/um/asm/processor.h:24:20: note: previous definition of 'rep_nop' was here
static inline void rep_nop(void)

Make sure that the unnecessary headers are not included when um is built
to address the problem.

Fixes: abc22418db02 ("x86/vdso: Enable x86 to use common headers")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200323124109.7104-1-vincenzo.frascino@arm.com

authored by

Vincenzo Frascino and committed by
Borislav Petkov
1c1a18b0 a5d442f5

+6
+6
arch/x86/include/asm/vgtod.h
··· 2 2 #ifndef _ASM_X86_VGTOD_H 3 3 #define _ASM_X86_VGTOD_H 4 4 5 + /* 6 + * This check is required to prevent ARCH=um to include 7 + * unwanted headers. 8 + */ 9 + #ifdef CONFIG_GENERIC_GETTIMEOFDAY 5 10 #include <linux/compiler.h> 6 11 #include <asm/clocksource.h> 7 12 #include <vdso/datapage.h> ··· 19 14 #else 20 15 typedef unsigned long gtod_long_t; 21 16 #endif 17 + #endif /* CONFIG_GENERIC_GETTIMEOFDAY */ 22 18 23 19 #endif /* _ASM_X86_VGTOD_H */