powerpc/8xx: Fix clearing of bits 20-23 in ITLB miss
authorChristophe Leroy <christophe.leroy@c-s.fr>
Sun, 9 Feb 2020 18:14:42 +0000 (18:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Feb 2020 16:22:17 +0000 (17:22 +0100)
commit9e1fab44502c55da348b38af527db14222b9d6f6
treed00f64642e56eb018359ffd5f2dfe1c76ada0339
parent2558e71bbfc5e90eeb1821eaeef8b9ae5704feb8
powerpc/8xx: Fix clearing of bits 20-23 in ITLB miss

commit a4031afb9d10d97f4d0285844abbc0ab04245304 upstream.

In ITLB miss handled the line supposed to clear bits 20-23 on the L2
ITLB entry is buggy and does indeed nothing, leading to undefined
value which could allow execution when it shouldn't.

Properly do the clearing with the relevant instruction.

Fixes: 74fabcadfd43 ("powerpc/8xx: don't use r12/SPRN_SPRG_SCRATCH2 in TLB Miss handlers")
Cc: stable@vger.kernel.org # v5.0+
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Leonardo Bras <leonardo@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/4f70c2778163affce8508a210f65d140e84524b4.1581272050.git.christophe.leroy@c-s.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/head_8xx.S