From aa686e5b5d6816a6dea01b89cb24c620e7e048e3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 1 Jul 2023 17:12:26 +0200 Subject: [PATCH] 6.4-stable patches added patches: tools-nolibc-x86_64-disable-stack-protector-for-_start.patch --- queue-6.4/series | 1 + ...4-disable-stack-protector-for-_start.patch | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 queue-6.4/series create mode 100644 queue-6.4/tools-nolibc-x86_64-disable-stack-protector-for-_start.patch diff --git a/queue-6.4/series b/queue-6.4/series new file mode 100644 index 00000000000..d986c4aed47 --- /dev/null +++ b/queue-6.4/series @@ -0,0 +1 @@ +tools-nolibc-x86_64-disable-stack-protector-for-_start.patch diff --git a/queue-6.4/tools-nolibc-x86_64-disable-stack-protector-for-_start.patch b/queue-6.4/tools-nolibc-x86_64-disable-stack-protector-for-_start.patch new file mode 100644 index 00000000000..7d7b1e5fc5a --- /dev/null +++ b/queue-6.4/tools-nolibc-x86_64-disable-stack-protector-for-_start.patch @@ -0,0 +1,44 @@ +From 7a9b2345202a14dfec9081994486156f7a691513 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sun, 21 May 2023 11:36:30 +0200 +Subject: tools/nolibc: x86_64: disable stack protector for _start +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Thomas Weißschuh + +commit 7a9b2345202a14dfec9081994486156f7a691513 upstream. + +This was forgotten in the original submission. + +It is unknown why it worked for x86_64 on some compiler without this +attribute. + +Reported-by: Willy Tarreau +Closes: https://lore.kernel.org/lkml/20230520133237.GA27501@1wt.eu/ +Fixes: 0d8c461adbc4 ("tools/nolibc: x86_64: add stackprotector support") +Signed-off-by: Thomas Weißschuh +Signed-off-by: Willy Tarreau +Signed-off-by: Paul E. McKenney +Signed-off-by: Greg Kroah-Hartman +--- + tools/include/nolibc/arch-x86_64.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/include/nolibc/arch-x86_64.h b/tools/include/nolibc/arch-x86_64.h +index d98f6c89d143..e201af15e142 100644 +--- a/tools/include/nolibc/arch-x86_64.h ++++ b/tools/include/nolibc/arch-x86_64.h +@@ -190,7 +190,7 @@ const unsigned long *_auxv __attribute__((weak)); + * 2) The deepest stack frame should be zero (the %rbp). + * + */ +-void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) _start(void) ++void __attribute__((weak,noreturn,optimize("omit-frame-pointer"),no_stack_protector)) _start(void) + { + __asm__ volatile ( + #ifdef NOLIBC_STACKPROTECTOR +-- +2.41.0 + -- 2.47.3