]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/kasan: Fix shadow area set up for modules.
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 9 Aug 2019 14:58:10 +0000 (14:58 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 20 Aug 2019 11:22:11 +0000 (21:22 +1000)
commitde67082a267d6e1a5bfff65c5d0fd7d48cc3198e
treea4170ddc459fbe33b88eba4b7d46438a43a706de
parentf138cb886ce33e8697660187b852f090a847699b
powerpc/kasan: Fix shadow area set up for modules.

When loading modules, from time to time an Oops is encountered during
the init of shadow area for globals. This is due to the last page not
always being mapped depending on the exact distance between the start
and the end of the shadow area and the alignment with the page
addresses.

Fix this by aligning the starting address with the page address.

Fixes: d54d8e0d3af0 ("powerpc/32: Add KASAN support")
Cc: stable@vger.kernel.org # v5.2+
Reported-by: Erhard F. <erhard_f@mailbox.org>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/4f887e9b77d0d725cbb52035c7ece485c1c5fc14.1565361881.git.christophe.leroy@c-s.fr
arch/powerpc/mm/kasan/kasan_init_32.c