diff options
author | Ram Pai <linuxram@us.ibm.com> | 2018-01-18 17:50:37 -0800 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-20 22:59:03 +1100 |
commit | f2407ef3ba225665ee24965f69bc84435fb590cf (patch) | |
tree | 5883038293a5e98317f3cd8bf161f62493cd6926 /arch/powerpc/include/asm/book3s | |
parent | a6590ca55f1f49912e17e4811ccae9a51bda8859 (diff) | |
download | linux-stable-f2407ef3ba225665ee24965f69bc84435fb590cf.tar.gz linux-stable-f2407ef3ba225665ee24965f69bc84435fb590cf.tar.bz2 linux-stable-f2407ef3ba225665ee24965f69bc84435fb590cf.zip |
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')
-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) { |