diff options
author | Christophe Leroy <[email protected]> | 2018-08-21 13:03:23 +0000 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2018-08-23 12:15:58 +1000 |
commit | 810e9f86f36f59f1d6f6710220c49afe0c705f38 (patch) | |
tree | ff4a4ce016185ec171cd06466b8dec7b039bb137 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 2ea62630681027c455117aa471ea3ab8bb099ead (diff) |
powerpc/nohash: fix pte_access_permitted()
Commit 5769beaf180a8 ("powerpc/mm: Add proper pte access check helper
for other platforms") replaced generic pte_access_permitted() by an
arch specific one.
The generic one is defined as
(pte_present(pte) && (!(write) || pte_write(pte)))
The arch specific one is open coded checking that _PAGE_USER and
_PAGE_WRITE (_PAGE_RW) flags are set, but lacking to check that
_PAGE_RO and _PAGE_PRIVILEGED are unset, leading to a useless test
on targets like the 8xx which defines _PAGE_RW and _PAGE_USER as 0.
Commit 5fa5b16be5b31 ("powerpc/mm/hugetlb: Use pte_access_permitted
for hugetlb access check") replaced some tests performed with
pte helpers by a call to pte_access_permitted(), leading to the same
issue.
This patch rewrites powerpc/nohash pte_access_permitted()
using pte helpers.
Fixes: 5769beaf180a8 ("powerpc/mm: Add proper pte access check helper for other platforms")
Fixes: 5fa5b16be5b31 ("powerpc/mm/hugetlb: Use pte_access_permitted for hugetlb access check")
Cc: [email protected] # v4.15+
Signed-off-by: Christophe Leroy <[email protected]>
Reviewed-by: Aneesh Kumar K.V <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions