diff options
author | Ram Pai <linuxram@us.ibm.com> | 2018-01-19 04:50:37 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-20 14:59:03 +0300 |
commit | f2407ef3ba225665ee24965f69bc84435fb590cf (patch) | |
tree | 5883038293a5e98317f3cd8bf161f62493cd6926 /arch/powerpc/include/asm/book3s/64/pgtable.h | |
parent | a6590ca55f1f49912e17e4811ccae9a51bda8859 (diff) | |
download | linux-f2407ef3ba225665ee24965f69bc84435fb590cf.tar.xz |
powerpc: helper to validate key-access permissions of a pte
helper function that checks if the read/write/execute is allowed
on the pte.
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/book3s/64/pgtable.h')
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/pgtable.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index 26285fc17baf..449b797f8b7b 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h @@ -571,6 +571,8 @@ static inline int pte_present(pte_t pte) return !!(pte_raw(pte) & cpu_to_be64(_PAGE_PRESENT)); } +extern bool arch_pte_access_permitted(u64 pte, bool write, bool execute); + #define pte_access_permitted pte_access_permitted static inline bool pte_access_permitted(pte_t pte, bool write) { |