All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/s390: disable SSP when needed
@ 2021-05-10  5:31 Fabrice Fontaine
  2021-05-25  8:08 ` Alexander Egorenkov
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2021-05-10  5:31 UTC (permalink / raw)
  To: linux-s390; +Cc: Fabrice Fontaine

Though -nostdlib is passed in PURGATORY_LDFLAGS and -ffreestanding in
KBUILD_CFLAGS_DECOMPRESSOR, -fno-stack-protector must also be passed to
avoid linking errors related to undefined references to
'__stack_chk_guard' and '__stack_chk_fail' if toolchain enforces
-fstack-protector.

Fixes:
 - https://gitlab.com/kubu93/buildroot/-/jobs/1247043361

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 arch/s390/Makefile           | 1 +
 arch/s390/purgatory/Makefile | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index e443ed9947bd..098abe3a56f3 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -28,6 +28,7 @@ KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY
 KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float -mbackchain
 KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables
 KBUILD_CFLAGS_DECOMPRESSOR += -ffreestanding
+KBUILD_CFLAGS_DECOMPRESSOR += -fno-stack-protector
 KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-member)
 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g)
 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,))
diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
index c57f8c40e992..21c4ebe29b9a 100644
--- a/arch/s390/purgatory/Makefile
+++ b/arch/s390/purgatory/Makefile
@@ -24,6 +24,7 @@ KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes
 KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
 KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
 KBUILD_CFLAGS += -c -MD -Os -m64 -msoft-float -fno-common
+KBUILD_CFLAGS += -fno-stack-protector
 KBUILD_CFLAGS += $(CLANG_FLAGS)
 KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
 KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arch/s390: disable SSP when needed
  2021-05-10  5:31 [PATCH] arch/s390: disable SSP when needed Fabrice Fontaine
@ 2021-05-25  8:08 ` Alexander Egorenkov
  2021-05-25 12:12   ` Vasily Gorbik
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Egorenkov @ 2021-05-25  8:08 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: linux-s390, fontaine.fabrice

Hi Fabrice,

the patch looks good to me.
Thank you.

Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Tested-by: Alexander Egorenkov <egorenar@linux.ibm.com>

Regards
Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arch/s390: disable SSP when needed
  2021-05-25  8:08 ` Alexander Egorenkov
@ 2021-05-25 12:12   ` Vasily Gorbik
  0 siblings, 0 replies; 3+ messages in thread
From: Vasily Gorbik @ 2021-05-25 12:12 UTC (permalink / raw)
  To: Alexander Egorenkov; +Cc: Fabrice Fontaine, linux-s390

On Tue, May 25, 2021 at 10:08:49AM +0200, Alexander Egorenkov wrote:
> Hi Fabrice,
> 
> the patch looks good to me.
> Thank you.
> 
> Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com>
> Tested-by: Alexander Egorenkov <egorenar@linux.ibm.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-25 12:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10  5:31 [PATCH] arch/s390: disable SSP when needed Fabrice Fontaine
2021-05-25  8:08 ` Alexander Egorenkov
2021-05-25 12:12   ` Vasily Gorbik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.