]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/4xx: Fix setup_kuep() on SMP
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 29 Jun 2021 12:24:21 +0000 (12:24 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 30 Jun 2021 12:21:02 +0000 (22:21 +1000)
commit5e910c07d5d9be9ee9b91e3ba629b54599350073
tree171c9c12dbe85d4557c468fbe5a527089402c8b6
parentf1551e7818fa37a1c7ada520b707ad07f196fed7
powerpc/4xx: Fix setup_kuep() on SMP

On SMP, setup_kuep() is also called from start_secondary() since
commit 73af60b73373 ("powerpc/32s: Initialise KUAP and KUEP in C").

start_secondary() is not an __init function.

Remove the __init marker from setup_kuep() and bail out when
not caller on the first CPU as the work is already done.

Fixes: d69c7722237d ("powerpc/44x: Implement Kernel Userspace Exec Protection (KUEP)")
Fixes: 73af60b73373 ("powerpc/32s: Initialise KUAP and KUEP in C")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/8ee05934288994a65743a987acb1558f12c0c8c1.1624969450.git.christophe.leroy@csgroup.eu
arch/powerpc/mm/nohash/44x.c