From: Simon Horman <horms@verge.net.au>
To: Mike Frysinger <vapier@gentoo.org>
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH v2] purgatory: force PIC/PIE/SSP off
Date: Thu, 30 Apr 2015 14:05:37 +0900 [thread overview]
Message-ID: <20150430050537.GH15511@verge.net.au> (raw)
In-Reply-To: <1429169966-1340-1-git-send-email-vapier@gentoo.org>
On Thu, Apr 16, 2015 at 03:39:26AM -0400, Mike Frysinger wrote:
> From: Mike Frysinger <vapier@chromium.org>
>
> If the toolchain has these things turned on automatically, then the
> purgatory code might be miscompiled leading to runtime errors like:
> Unhandled rela relocation: R_X86_64_GOTPC64
>
> It might look like the problem is with the kernel when in reality,
> kexec is complaining about the purgatory module. Force off harden
> features that don't make sense in kernel space.
>
> Signed-off-by: Mike Frysinger <vapier@chromium.org>
thanks, applied.
> ---
> Note: I suspect this patch fixes a semi-recent report:
> http://lists.infradead.org/pipermail/kexec/2015-February/013305.html
>
> v2:
> - clean up ssp flags in arch subdirs
>
> purgatory/Makefile | 3 ++-
> purgatory/arch/ppc64/Makefile | 2 +-
> purgatory/arch/s390/Makefile | 1 -
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/purgatory/Makefile b/purgatory/Makefile
> index 2d6b2c0..2b5c061 100644
> --- a/purgatory/Makefile
> +++ b/purgatory/Makefile
> @@ -49,7 +49,8 @@ $(PURGATORY): CC=$(TARGET_CC)
> $(PURGATORY): CFLAGS+=$(PURGATORY_EXTRA_CFLAGS) \
> $($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
> -Os -fno-builtin -ffreestanding \
> - -fno-zero-initialized-in-bss
> + -fno-zero-initialized-in-bss \
> + -fno-PIC -fno-PIE -fno-stack-protector
>
> $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
> -I$(srcdir)/purgatory/include \
> diff --git a/purgatory/arch/ppc64/Makefile b/purgatory/arch/ppc64/Makefile
> index 6c58fa2..8ca2719 100644
> --- a/purgatory/arch/ppc64/Makefile
> +++ b/purgatory/arch/ppc64/Makefile
> @@ -9,7 +9,7 @@ ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/console-ppc64.c
> ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/crashdump_backup.c
> ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/misc.S
>
> -ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float -fno-stack-protector \
> +ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float \
> -fno-exceptions
> ppc64_PURGATORY_EXTRA_ASFLAGS += -m64
> ifeq ($(SUBARCH),BE)
> diff --git a/purgatory/arch/s390/Makefile b/purgatory/arch/s390/Makefile
> index 09749bd..c94cc3c 100644
> --- a/purgatory/arch/s390/Makefile
> +++ b/purgatory/arch/s390/Makefile
> @@ -2,7 +2,6 @@
> # Purgatory s390
> #
>
> -s390_PURGATORY_EXTRA_CFLAGS += -fno-stack-protector
> s390_PURGATORY_SRCS += purgatory/arch/s390/console-s390.c
> s390_PURGATORY_SRCS += purgatory/arch/s390/setup-s390.S
> s390_PURGATORY_SRCS += purgatory/arch/s390/purgatory-s390.c
> --
> 2.3.5
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
prev parent reply other threads:[~2015-04-30 5:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 5:15 [PATCH] purgatory: force PIC/PIE/SSP off Mike Frysinger
2015-04-16 7:30 ` Laurent Dufour
2015-04-16 7:39 ` [PATCH v2] " Mike Frysinger
2015-04-30 5:05 ` Simon Horman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150430050537.GH15511@verge.net.au \
--to=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox