LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Arvind Sankar <nivedita@alum.mit.edu>
To: Gabriel C <nix.or.die@googlemail.com>
Cc: Arvind Sankar <nivedita@alum.mit.edu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Hans de Goede <hdegoede@redhat.com>,
	Borislav Petkov <bp@alien8.de>
Subject: Re: Linux 5.8-rc1
Date: Tue, 16 Jun 2020 17:25:36 -0400
Message-ID: <20200616212536.GA1934393@rani.riverdale.lan> (raw)
In-Reply-To: <CAEJqkghzD_6F2N=M65uYHzpOOJ8bvMw18JCfwsiQoH-kToPKLQ@mail.gmail.com>

On Tue, Jun 16, 2020 at 11:17:08PM +0200, Gabriel C wrote:
> Am Di., 16. Juni 2020 um 22:33 Uhr schrieb Arvind Sankar
> <nivedita@alum.mit.edu>:
> >
> > Can you attach the output of gcc -dumpspecs and gcc -v? I suspect your
> > compiler enables stack protector by default. My distro compiler does
> > that too, but not if -ffreestanding is enabled (which it is for the
> > purgatory).
> >
> 
> Files including config uploaded to there:
> 
> http://crazy.dev.frugalware.org/kernel/
> 

Yeah, your gcc doesn't have the -ffreestanding handling. Mine (from
gentoo) has this in the -dumpspecs output:

*cc1_options:
... %{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} ...

to switch off the default ssp when the standard libraries aren't available.

> > Does this patch help?
> >
> 
> I'll test in a bit and let you know.
> 
> > diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
> > index b04e6e72a592..088bd764e0b7 100644
> > --- a/arch/x86/purgatory/Makefile
> > +++ b/arch/x86/purgatory/Makefile
> > @@ -34,6 +34,7 @@ KCOV_INSTRUMENT := n
> >  PURGATORY_CFLAGS_REMOVE := -mcmodel=kernel
> >  PURGATORY_CFLAGS := -mcmodel=large -ffreestanding -fno-zero-initialized-in-bss
> >  PURGATORY_CFLAGS += $(DISABLE_STACKLEAK_PLUGIN) -DDISABLE_BRANCH_PROFILING
> > +PURGATORY_CFLAGS += $(call cc-option,-fno-stack-protector)
> >
> >  # Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That
> >  # in turn leaves some undefined symbols like __fentry__ in purgatory and not
> 
> Thx.

  reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14 20:44 Linus Torvalds
2020-06-15  1:59 ` linux-next: stats (Was: Linux 5.8-rc1) Stephen Rothwell
2020-06-16 20:11 ` Linux 5.8-rc1 Gabriel C
2020-06-16 20:33   ` Arvind Sankar
2020-06-16 21:17     ` Gabriel C
2020-06-16 21:25       ` Arvind Sankar [this message]
2020-06-16 22:00         ` Gabriel C
2020-06-16 22:28           ` Arvind Sankar
2020-06-16 21:35       ` Gabriel C
2020-06-16 22:25         ` [PATCH] x86/purgatory: Add -fno-stack-protector Arvind Sankar
2020-06-17  0:06           ` Linus Torvalds
2020-06-16 20:37   ` Linux 5.8-rc1 Borislav Petkov
2020-06-16 21:19     ` Gabriel C

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=20200616212536.GA1934393@rani.riverdale.lan \
    --to=nivedita@alum.mit.edu \
    --cc=bp@alien8.de \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nix.or.die@googlemail.com \
    --cc=torvalds@linux-foundation.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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git