Files
linux/arch/powerpc/include/asm
Benjamin Gray 3f5ded2469 powerpc/64s: Fix __pte_needs_flush() false positive warning
commit 1abce0580b upstream.

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: b11931e9ad ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-06 12:10:54 +02:00
..
2015-05-28 15:31:53 +02:00
2023-03-17 08:50:30 +01:00
2021-03-24 14:09:29 +11:00
2022-06-29 19:37:07 +10:00
2022-06-29 16:58:27 +10:00
2022-09-26 22:47:37 +10:00
2022-07-27 21:36:05 +10:00
2022-09-26 23:00:14 +10:00
2022-09-26 23:00:13 +10:00
2021-07-01 11:06:03 -07:00
2021-02-09 01:09:44 +11:00
2022-05-08 22:15:40 +10:00
2018-05-25 12:04:43 +10:00
2021-12-09 22:41:21 +11:00
2022-09-28 19:22:09 +10:00
2018-07-30 22:48:21 +10:00
2019-05-01 16:45:05 +10:00
2022-07-27 21:36:05 +10:00
2022-01-30 21:17:00 -05:00