Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/elf: Use _BITUL() macro in UAPI headers

Replace BIT() in x86's UAPI header with _BITUL(). BIT() is not defined
in the UAPI headers and its usage may cause userspace build errors.

Fixes: 742c45c3ecc9 ("x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2")
Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210521085849.37676-2-joerichey94@gmail.com

authored by

Joe Richey and committed by
Borislav Petkov
d06aca98 d07f6ca9

+4 -2
+4 -2
arch/x86/include/uapi/asm/hwcap2.h
··· 2 2 #ifndef _ASM_X86_HWCAP2_H 3 3 #define _ASM_X86_HWCAP2_H 4 4 5 + #include <linux/const.h> 6 + 5 7 /* MONITOR/MWAIT enabled in Ring 3 */ 6 - #define HWCAP2_RING3MWAIT (1 << 0) 8 + #define HWCAP2_RING3MWAIT _BITUL(0) 7 9 8 10 /* Kernel allows FSGSBASE instructions available in Ring 3 */ 9 - #define HWCAP2_FSGSBASE BIT(1) 11 + #define HWCAP2_FSGSBASE _BITUL(1) 10 12 11 13 #endif