From 01997497f915e8f79871f3f2acb55ac465051d24 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:49:59 +0200 Subject: Adding debian version 6.1.76-1. Signed-off-by: Daniel Baumann --- ...ckprotector-work-around-stack-guard-init-.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 debian/patches-rt/0048-powerpc-stackprotector-work-around-stack-guard-init-.patch (limited to 'debian/patches-rt/0048-powerpc-stackprotector-work-around-stack-guard-init-.patch') diff --git a/debian/patches-rt/0048-powerpc-stackprotector-work-around-stack-guard-init-.patch b/debian/patches-rt/0048-powerpc-stackprotector-work-around-stack-guard-init-.patch new file mode 100644 index 000000000..df6dbe080 --- /dev/null +++ b/debian/patches-rt/0048-powerpc-stackprotector-work-around-stack-guard-init-.patch @@ -0,0 +1,37 @@ +From d2e9a96e5570459dd886f87bf81c7714fb0a2108 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Tue, 26 Mar 2019 18:31:29 +0100 +Subject: [PATCH 48/62] powerpc/stackprotector: work around stack-guard init + from atomic +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.1/older/patches-6.1.69-rt21.tar.xz + +This is invoked from the secondary CPU in atomic context. On x86 we use +tsc instead. On Power we XOR it against mftb() so lets use stack address +as the initial value. + +Cc: stable-rt@vger.kernel.org +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Thomas Gleixner +--- + arch/powerpc/include/asm/stackprotector.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/powerpc/include/asm/stackprotector.h b/arch/powerpc/include/asm/stackprotector.h +index 1c8460e23583..b1653c160bab 100644 +--- a/arch/powerpc/include/asm/stackprotector.h ++++ b/arch/powerpc/include/asm/stackprotector.h +@@ -24,7 +24,11 @@ static __always_inline void boot_init_stack_canary(void) + unsigned long canary; + + /* Try to get a semi random initial value. */ ++#ifdef CONFIG_PREEMPT_RT ++ canary = (unsigned long)&canary; ++#else + canary = get_random_canary(); ++#endif + canary ^= mftb(); + canary ^= LINUX_VERSION_CODE; + canary &= CANARY_MASK; +-- +2.43.0 + -- cgit v1.2.3