]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
s390/kexec: Disable stack protector in s390_reset_system()
authorVasily Gorbik <gor@linux.ibm.com>
Mon, 23 Feb 2026 22:33:52 +0000 (23:33 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 25 Feb 2026 16:00:25 +0000 (17:00 +0100)
s390_reset_system() calls set_prefix(0), which switches back to the
absolute lowcore. At that point the stack protector canary no longer
matches the canary from the lowcore the function was entered with, so
the stack check fails.

Mark s390_reset_system() __no_stack_protector. This is safe here since
its callers (__do_machine_kdump() and __do_machine_kexec()) are
effectively no-return and fall back to disabled_wait() on failure.

Fixes: f5730d44e05e ("s390: Add stackprotector support")
Reported-by: Nikita Dubrovskii <nikita@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/ipl.c

index dcdc7e27484867c4a2ed5de1d50d4c55c27b2747..049c557c452ff96cf0aa49a19c3ad3067ecce296 100644 (file)
@@ -2377,7 +2377,7 @@ void __init setup_ipl(void)
        atomic_notifier_chain_register(&panic_notifier_list, &on_panic_nb);
 }
 
-void s390_reset_system(void)
+void __no_stack_protector s390_reset_system(void)
 {
        /* Disable prefixing */
        set_prefix(0);