659df86a7b
The arch_calc_vm_prot_bits() macro uses VM_PKEY_BIT0 etc. which are not part of the UAPI, so the macro is completely useless for userspace. It is also hidden behind the CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS config switch which we shouldn't expose to userspace. Thus let's move this macro into a new internal header instead. Fixes: 8f62c883222c ("x86/mm/pkeys: Add arch-specific VMA protection bits") Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Acked-by: Dave Hansen <dave.hansen@intel.com> Link: https://lore.kernel.org/r/20230906162658.142511-1-thuth@redhat.com
14 lines
413 B
C
14 lines
413 B
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
#ifndef _ASM_X86_MMAN_H
|
|
#define _ASM_X86_MMAN_H
|
|
|
|
#define MAP_32BIT 0x40 /* only give out 32bit addresses */
|
|
#define MAP_ABOVE4G 0x80 /* only map above 4GB */
|
|
|
|
/* Flags for map_shadow_stack(2) */
|
|
#define SHADOW_STACK_SET_TOKEN (1ULL << 0) /* Set up a restore token in the shadow stack */
|
|
|
|
#include <asm-generic/mman.h>
|
|
|
|
#endif /* _ASM_X86_MMAN_H */
|