All of lore.kernel.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Christophe LEROY <christophe.leroy@c-s.fr>
Cc: Russell Currey <ruscur@russell.cc>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Andrew Donnellan <andrew.donnellan@au1.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] powerpc/64: add stack protector support
Date: Wed, 26 Sep 2018 12:37:44 -0500	[thread overview]
Message-ID: <20180926173744.GN23155@gate.crashing.org> (raw)
In-Reply-To: <284752d1-6c32-bdca-72d3-4d8616b26fbf@c-s.fr>

On Wed, Sep 26, 2018 at 11:41:26AM +0200, Christophe LEROY wrote:
> Le 26/09/2018 à 11:28, Segher Boessenkool a écrit :
> >On Wed, Sep 26, 2018 at 09:58:30AM +0200, Christophe LEROY wrote:
> >>Segher, any idea about this problem ?
> >
> >>>>arch/powerpc/platforms/powermac/bootx_init.o: In function 
> >>>>`bootx_printf':
> >>>>/var/lib/jenkins-slave/workspace/snowpatch/snowpatch-linux-
> >>>>sparse/linux/arch/powerpc/platforms/powermac/bootx_init.c:88:
> >>>>undefined reference to `__stack_chk_fail_local'
> >
> >Are you building as PIC?  Are you linking libssp_nonshared.a?  Why not?
> 
> Spotted, thanks.
> 
> arch/powerpc/platforms/powermac/Makefile contains:
> 
> CFLAGS_bootx_init.o  		+= -fPIC
> 
> Does it mean we should add -lssp_nonshared to LDFLAGS_vmlinux ?

Something like that.

> Or maybe stack protection on bootx_init doesn't make much sense and we 
> could just do the following ?
> 
> CFLAGS_bootx_init.o  		+= -fPIC $(call cc-option, 
> -fno-stack-protector)

But more likely this.  Why does it use -fPIC?

If it is only boot-time init (which the name suggests) then disabling
ssp makes a lot of sense.


Segher

  parent reply	other threads:[~2018-09-26 18:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24 15:15 [PATCH v3 1/2] powerpc/32: add stack protector support Christophe Leroy
2018-09-24 15:15 ` [PATCH v3 2/2] powerpc/64: " Christophe Leroy
2018-09-25 15:56   ` Christophe LEROY
2018-09-26  7:05     ` Russell Currey
2018-09-26  7:58       ` Christophe LEROY
2018-09-26  9:28         ` Segher Boessenkool
2018-09-26  9:41           ` Christophe LEROY
2018-09-26 11:50             ` Michael Ellerman
2018-09-26 11:50               ` Michael Ellerman
2018-09-26 11:53               ` Christophe LEROY
2018-09-26 17:37             ` Segher Boessenkool [this message]
2018-09-30  2:16 ` [PATCH v3 1/2] powerpc/32: " kbuild test robot
2018-09-30  2:16   ` kbuild test robot

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=20180926173744.GN23155@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@c-s.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=ruscur@russell.cc \
    /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 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.