linux-stable/arch/powerpc
Benjamin Gray 872f1f33f2 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:12:44 +02:00
..
boot powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage 2023-03-22 13:38:07 +01:00
configs eth: fealnx: bring back this old driver 2023-03-11 13:50:46 +01:00
crypto treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
include powerpc/64s: Fix __pte_needs_flush() false positive warning 2023-04-06 12:12:44 +02:00
kernel powerpc: Don't try to copy PPR for task with NULL pt_regs 2023-04-06 12:12:43 +02:00
kexec powerpc/kexec_file: fix implicit decl error 2023-02-06 22:00:30 +11:00
kvm powerpc/kvm: Fix unannotated intra-function call warning 2023-01-30 16:01:04 +11:00
lib powerpc/code-patching: Fix oops with DEBUG_VM enabled 2022-12-16 23:59:43 +11:00
math-emu powerpc/math-emu: Inhibit W=1 warnings 2022-09-08 11:11:18 +10:00
mm powerpc/mm: Fix false detection of read faults 2023-03-22 13:37:50 +01:00
net powerpc/bpf/32: Only set a stack frame when necessary 2023-03-17 08:58:01 +01:00
perf powerpc/imc-pmu: Revert nest_init_lock to being a mutex 2023-01-31 11:24:17 +11:00
platforms powerpc/pseries/vas: Ignore VAS update for DLPAR if copy/paste is not enabled 2023-04-06 12:12:44 +02:00
purgatory powerpc/purgatory: Omit use of bin2c 2022-07-27 21:36:03 +10:00
sysdev powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
tools
xmon cpumask: fix incorrect cpumask scanning result checks 2023-03-30 12:51:28 +02:00
Kbuild
Kconfig powerpc: Don't select ARCH_WANTS_NO_INSTR 2023-02-02 21:27:35 +11:00
Kconfig.debug powerpc: Add support for early debugging via Serial 16550 console 2022-09-28 19:22:09 +10:00
Makefile powerpc: Pass correct CPU reference to assembler 2023-03-22 13:38:09 +01:00
Makefile.postlink