summaryrefslogtreecommitdiff
path: root/include/linux/pkeys.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pkeys.h')
-rw-r--r--include/linux/pkeys.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/pkeys.h b/include/linux/pkeys.h
index a1bacf1150b2..86be8bf27b41 100644
--- a/include/linux/pkeys.h
+++ b/include/linux/pkeys.h
@@ -1,8 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_PKEYS_H
#define _LINUX_PKEYS_H
-#include <linux/mm_types.h>
-#include <asm/mmu_context.h>
+#include <linux/mm.h>
+
+#define ARCH_DEFAULT_PKEY 0
#ifdef CONFIG_ARCH_HAS_PKEYS
#include <asm/pkeys.h>
@@ -13,6 +15,11 @@
#define PKEY_DEDICATED_EXECUTE_ONLY 0
#define ARCH_VM_PKEY_FLAGS 0
+static inline int vma_pkey(struct vm_area_struct *vma)
+{
+ return 0;
+}
+
static inline bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey)
{
return (pkey == 0);
@@ -34,8 +41,9 @@ static inline int arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
return 0;
}
-static inline void copy_init_pkru_to_fpregs(void)
+static inline bool arch_pkeys_enabled(void)
{
+ return false;
}
#endif /* ! CONFIG_ARCH_HAS_PKEYS */