ISA v3.1 does not support the SAO storage control attribute required to implement PROT_SAO. PROT_SAO was used by specialised system software (Lx86) that has been discontinued for about 7 years, and is not thought to be used elsewhere, so removal should not cause problems. We rather remove it than keep support for older processors, because live migrating guest partitions to newer processors may not be possible if SAO is in use (or worse allowed with silent races). - PROT_SAO stays in the uapi header so code using it would still build. - arch_validate_prot() is removed, the generic version rejects PROT_SAO so applications would get a failure at mmap() time. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [mpe: Drop KVM change for the time being] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200703011958.1166620-3-npiggin@gmail.com
33 lines
771 B
C
33 lines
771 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
*/
|
|
#ifndef _ASM_POWERPC_MMAN_H
|
|
#define _ASM_POWERPC_MMAN_H
|
|
|
|
#include <uapi/asm/mman.h>
|
|
|
|
#ifdef CONFIG_PPC64
|
|
|
|
#include <asm/cputable.h>
|
|
#include <linux/mm.h>
|
|
#include <linux/pkeys.h>
|
|
#include <asm/cpu_has_feature.h>
|
|
|
|
#ifdef CONFIG_PPC_MEM_KEYS
|
|
static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot,
|
|
unsigned long pkey)
|
|
{
|
|
return pkey_to_vmflag_bits(pkey);
|
|
}
|
|
#define arch_calc_vm_prot_bits(prot, pkey) arch_calc_vm_prot_bits(prot, pkey)
|
|
|
|
static inline pgprot_t arch_vm_get_page_prot(unsigned long vm_flags)
|
|
{
|
|
return __pgprot(vmflag_to_pte_pkey_bits(vm_flags));
|
|
}
|
|
#define arch_vm_get_page_prot(vm_flags) arch_vm_get_page_prot(vm_flags)
|
|
#endif
|
|
|
|
#endif /* CONFIG_PPC64 */
|
|
#endif /* _ASM_POWERPC_MMAN_H */
|