diff options
author | Benjamin Gray <bgray@linux.ibm.com> | 2023-03-03 01:59:47 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-03-28 13:37:23 +0300 |
commit | 1abce0580b89464546ae06abd5891ebec43c9470 (patch) | |
tree | 7b81d20c9ae56d3242db372f2bf62e8304dba2ab /fs/pipe.c | |
parent | f2c7e3562b4c4f1699acc1538ebf3e75f5cced35 (diff) | |
download | linux-1abce0580b89464546ae06abd5891ebec43c9470.tar.xz |
powerpc/64s: Fix __pte_needs_flush() false positive warning
Userspace PROT_NONE ptes set _PAGE_PRIVILEGED, triggering a false
positive debug assertion that __pte_flags_need_flush() is not called
on a kernel mapping.
Detect when it is a userspace PROT_NONE page by checking the required
bits of PAGE_NONE are set, and none of the RWX bits are set.
pte_protnone() is insufficient here because it always returns 0 when
CONFIG_NUMA_BALANCING=n.
Fixes: b11931e9adc1 ("powerpc/64s: add pte_needs_flush and huge_pmd_needs_flush")
Cc: stable@vger.kernel.org # v6.1+
Reported-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230302225947.81083-1-bgray@linux.ibm.com
Diffstat (limited to 'fs/pipe.c')
0 files changed, 0 insertions, 0 deletions