Skip to content

Commit

Permalink
x86/elf: Use _BITUL() macro in UAPI headers
Browse files Browse the repository at this point in the history
[ Upstream commit d06aca9 ]

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: 742c45c ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
josephlr authored and gregkh committed Jul 14, 2021
1 parent 0c436ec commit 9d5db40
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/x86/include/uapi/asm/hwcap2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
#ifndef _ASM_X86_HWCAP2_H
#define _ASM_X86_HWCAP2_H

#include <linux/const.h>

/* MONITOR/MWAIT enabled in Ring 3 */
#define HWCAP2_RING3MWAIT (1 << 0)
#define HWCAP2_RING3MWAIT _BITUL(0)

/* Kernel allows FSGSBASE instructions available in Ring 3 */
#define HWCAP2_FSGSBASE BIT(1)
#define HWCAP2_FSGSBASE _BITUL(1)

#endif

0 comments on commit 9d5db40

Please sign in to comment.