Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-29 Thread Sven Joachim
On 2016-10-29 21:21 +0200, Tomas Janousek wrote: > On Sat, Oct 29, 2016 at 07:03:30PM +0200, Sven Joachim wrote: >> I cannot reproduce that, FWIW. Also, arch/x86/entry/vdso/Makefile seems >> to explicitly filter out -mfentry from the compiler flags, but maybe I >> misunderstand something. > >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-29 Thread Sven Joachim
On 2016-10-29 21:21 +0200, Tomas Janousek wrote: > On Sat, Oct 29, 2016 at 07:03:30PM +0200, Sven Joachim wrote: >> I cannot reproduce that, FWIW. Also, arch/x86/entry/vdso/Makefile seems >> to explicitly filter out -mfentry from the compiler flags, but maybe I >> misunderstand something. > >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-29 Thread Tomas Janousek
On Sat, Oct 29, 2016 at 07:03:30PM +0200, Sven Joachim wrote: > I cannot reproduce that, FWIW. Also, arch/x86/entry/vdso/Makefile seems > to explicitly filter out -mfentry from the compiler flags, but maybe I > misunderstand something. Compiler flags, yes; assembler flags, no. Perhaps adding

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-29 Thread Tomas Janousek
On Sat, Oct 29, 2016 at 07:03:30PM +0200, Sven Joachim wrote: > I cannot reproduce that, FWIW. Also, arch/x86/entry/vdso/Makefile seems > to explicitly filter out -mfentry from the compiler flags, but maybe I > misunderstand something. Compiler flags, yes; assembler flags, no. Perhaps adding

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-29 Thread Sven Joachim
On 2016-10-29 12:10 +0200, Tomas Janousek wrote: > On Mon, Oct 24, 2016 at 07:32:30PM +0200, Sven Joachim wrote: >> The attached patch works for me with Debian's gcc-6 package. > > I tried your patch when building 4.8.5 on an up-to-date Debian testing and > still got this: > > AS

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-29 Thread Sven Joachim
On 2016-10-29 12:10 +0200, Tomas Janousek wrote: > On Mon, Oct 24, 2016 at 07:32:30PM +0200, Sven Joachim wrote: >> The attached patch works for me with Debian's gcc-6 package. > > I tried your patch when building 4.8.5 on an up-to-date Debian testing and > still got this: > > AS

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-29 Thread Tomas Janousek
Hi Sven, On Mon, Oct 24, 2016 at 07:32:30PM +0200, Sven Joachim wrote: > The attached patch works for me with Debian's gcc-6 package. I tried your patch when building 4.8.5 on an up-to-date Debian testing and still got this: AS arch/x86/entry/vdso/vdso32/note.o

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-29 Thread Tomas Janousek
Hi Sven, On Mon, Oct 24, 2016 at 07:32:30PM +0200, Sven Joachim wrote: > The attached patch works for me with Debian's gcc-6 package. I tried your patch when building 4.8.5 on an up-to-date Debian testing and still got this: AS arch/x86/entry/vdso/vdso32/note.o

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-28 Thread Andrew Morton
On Thu, 27 Oct 2016 09:28:24 +0200 Sebastian Andrzej Siewior wrote: > > Building with gcc 3.3 is apparently still possible, although it produces > > tons of warnings and a modpost section mismatch. Still, requiring gcc > > 4.1 or newer would not be unreasonable, I think

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-28 Thread Andrew Morton
On Thu, 27 Oct 2016 09:28:24 +0200 Sebastian Andrzej Siewior wrote: > > Building with gcc 3.3 is apparently still possible, although it produces > > tons of warnings and a modpost section mismatch. Still, requiring gcc > > 4.1 or newer would not be unreasonable, I think (still released a few >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-28 Thread Sebastian Andrzej Siewior
On 2016-10-27 11:09:06 [-0600], Shuah Khan wrote: > diff --git a/Makefile b/Makefile > index 82a36ab..0a01ad1 100644 > --- a/Makefile > +++ b/Makefile > @@ -651,6 +651,11 @@ ifneq ($(CONFIG_FRAME_WARN),0) > KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN}) > endif > >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-28 Thread Sebastian Andrzej Siewior
On 2016-10-27 11:09:06 [-0600], Shuah Khan wrote: > diff --git a/Makefile b/Makefile > index 82a36ab..0a01ad1 100644 > --- a/Makefile > +++ b/Makefile > @@ -651,6 +651,11 @@ ifneq ($(CONFIG_FRAME_WARN),0) > KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN}) > endif > >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-27 Thread Shuah Khan
On Fri, Oct 21, 2016 at 5:16 AM, Sebastian Andrzej Siewior wrote: > Debian started to build the gcc with --enable-default-pie by default so the > kernel build ends before it starts properly with: > |kernel/bounds.c:1:0: error: code model kernel does not support PIC mode > >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-27 Thread Shuah Khan
On Fri, Oct 21, 2016 at 5:16 AM, Sebastian Andrzej Siewior wrote: > Debian started to build the gcc with --enable-default-pie by default so the > kernel build ends before it starts properly with: > |kernel/bounds.c:1:0: error: code model kernel does not support PIC mode > > Is this okay or do we

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-27 Thread Sebastian Andrzej Siewior
Hi Andrew, On 2016-10-26 19:51:03 [+0200], Sven Joachim wrote: > On 2016-10-25 09:30 +0200, Sebastian Andrzej Siewior wrote: > > > On 2016-10-24 19:32:30 [+0200], Sven Joachim wrote: > >> On 2016-10-24 09:43 +0200, Sebastian Andrzej Siewior wrote: > >> > >> > On 2016-10-24 09:38:49 [+0200],

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-27 Thread Sebastian Andrzej Siewior
Hi Andrew, On 2016-10-26 19:51:03 [+0200], Sven Joachim wrote: > On 2016-10-25 09:30 +0200, Sebastian Andrzej Siewior wrote: > > > On 2016-10-24 19:32:30 [+0200], Sven Joachim wrote: > >> On 2016-10-24 09:43 +0200, Sebastian Andrzej Siewior wrote: > >> > >> > On 2016-10-24 09:38:49 [+0200],

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-26 Thread Sven Joachim
On 2016-10-25 09:30 +0200, Sebastian Andrzej Siewior wrote: > On 2016-10-24 19:32:30 [+0200], Sven Joachim wrote: >> On 2016-10-24 09:43 +0200, Sebastian Andrzej Siewior wrote: >> >> > On 2016-10-24 09:38:49 [+0200], Sven Joachim wrote: >> >> >> >> But make still fails with it. :-( >> > >> >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-26 Thread Sven Joachim
On 2016-10-25 09:30 +0200, Sebastian Andrzej Siewior wrote: > On 2016-10-24 19:32:30 [+0200], Sven Joachim wrote: >> On 2016-10-24 09:43 +0200, Sebastian Andrzej Siewior wrote: >> >> > On 2016-10-24 09:38:49 [+0200], Sven Joachim wrote: >> >> >> >> But make still fails with it. :-( >> > >> >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-25 Thread Sebastian Andrzej Siewior
On 2016-10-24 19:32:30 [+0200], Sven Joachim wrote: > On 2016-10-24 09:43 +0200, Sebastian Andrzej Siewior wrote: > > > On 2016-10-24 09:38:49 [+0200], Sven Joachim wrote: > >> > >> But make still fails with it. :-( > > > > try setting CONFIG_CC_STACKPROTECTOR_NONE=y and please let me know if >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-25 Thread Sebastian Andrzej Siewior
On 2016-10-24 19:32:30 [+0200], Sven Joachim wrote: > On 2016-10-24 09:43 +0200, Sebastian Andrzej Siewior wrote: > > > On 2016-10-24 09:38:49 [+0200], Sven Joachim wrote: > >> > >> But make still fails with it. :-( > > > > try setting CONFIG_CC_STACKPROTECTOR_NONE=y and please let me know if >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-24 Thread Joe Perches
On Mon, 2016-10-24 at 19:32 +0200, Sven Joachim wrote: (in the attachment) > +KBUILD_CFLAGS += $(call cc-option,-fno-pie,) trivia: The trailing comma is not necessary though the Makefile is a bit inconsistent about this. $ git grep "KBUILD_CFLAGS.*call cc-option" Makefile

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-24 Thread Joe Perches
On Mon, 2016-10-24 at 19:32 +0200, Sven Joachim wrote: (in the attachment) > +KBUILD_CFLAGS += $(call cc-option,-fno-pie,) trivia: The trailing comma is not necessary though the Makefile is a bit inconsistent about this. $ git grep "KBUILD_CFLAGS.*call cc-option" Makefile

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-24 Thread Sven Joachim
On 2016-10-24 09:43 +0200, Sebastian Andrzej Siewior wrote: > On 2016-10-24 09:38:49 [+0200], Sven Joachim wrote: >> >> But make still fails with it. :-( > > try setting CONFIG_CC_STACKPROTECTOR_NONE=y and please let me know if > the resulting kernel built with v3.2 gcc boots & works. Sorry, I

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-24 Thread Sven Joachim
On 2016-10-24 09:43 +0200, Sebastian Andrzej Siewior wrote: > On 2016-10-24 09:38:49 [+0200], Sven Joachim wrote: >> >> But make still fails with it. :-( > > try setting CONFIG_CC_STACKPROTECTOR_NONE=y and please let me know if > the resulting kernel built with v3.2 gcc boots & works. Sorry, I

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-24 Thread Joe Perches
On Mon, 2016-10-24 at 09:38 +0200, Sven Joachim wrote: > On 2016-10-23 12:23 -0700, Joe Perches wrote: > > > On Sun, 2016-10-23 at 18:19 +0200, Sven Joachim wrote: > > > On 2016-10-21 23:21 +0200, Adam Borowski wrote: > > > > On Fri, Oct 21, 2016 at 01:16:00PM +0200, Sebastian Andrzej Siewior >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-24 Thread Joe Perches
On Mon, 2016-10-24 at 09:38 +0200, Sven Joachim wrote: > On 2016-10-23 12:23 -0700, Joe Perches wrote: > > > On Sun, 2016-10-23 at 18:19 +0200, Sven Joachim wrote: > > > On 2016-10-21 23:21 +0200, Adam Borowski wrote: > > > > On Fri, Oct 21, 2016 at 01:16:00PM +0200, Sebastian Andrzej Siewior >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-24 Thread Sebastian Andrzej Siewior
On 2016-10-24 09:38:49 [+0200], Sven Joachim wrote: > > But make still fails with it. :-( try setting CONFIG_CC_STACKPROTECTOR_NONE=y and please let me know if the resulting kernel built with v3.2 gcc boots & works. > > Cheers, >Sven Sebastian

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-24 Thread Sebastian Andrzej Siewior
On 2016-10-24 09:38:49 [+0200], Sven Joachim wrote: > > But make still fails with it. :-( try setting CONFIG_CC_STACKPROTECTOR_NONE=y and please let me know if the resulting kernel built with v3.2 gcc boots & works. > > Cheers, >Sven Sebastian

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-24 Thread Sven Joachim
On 2016-10-23 12:23 -0700, Joe Perches wrote: > On Sun, 2016-10-23 at 18:19 +0200, Sven Joachim wrote: >> On 2016-10-21 23:21 +0200, Adam Borowski wrote: >> > On Fri, Oct 21, 2016 at 01:16:00PM +0200, Sebastian Andrzej Siewior wrote: >> > > Debian started to build the gcc with

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-24 Thread Sven Joachim
On 2016-10-23 12:23 -0700, Joe Perches wrote: > On Sun, 2016-10-23 at 18:19 +0200, Sven Joachim wrote: >> On 2016-10-21 23:21 +0200, Adam Borowski wrote: >> > On Fri, Oct 21, 2016 at 01:16:00PM +0200, Sebastian Andrzej Siewior wrote: >> > > Debian started to build the gcc with

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-23 Thread Joe Perches
On Sun, 2016-10-23 at 18:19 +0200, Sven Joachim wrote: > On 2016-10-21 23:21 +0200, Adam Borowski wrote: > > On Fri, Oct 21, 2016 at 01:16:00PM +0200, Sebastian Andrzej Siewior wrote: > > > Debian started to build the gcc with --enable-default-pie by default [] > > > diff --git a/Makefile

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-23 Thread Joe Perches
On Sun, 2016-10-23 at 18:19 +0200, Sven Joachim wrote: > On 2016-10-21 23:21 +0200, Adam Borowski wrote: > > On Fri, Oct 21, 2016 at 01:16:00PM +0200, Sebastian Andrzej Siewior wrote: > > > Debian started to build the gcc with --enable-default-pie by default [] > > > diff --git a/Makefile

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-23 Thread Sven Joachim
On 2016-10-21 23:21 +0200, Adam Borowski wrote: > On Fri, Oct 21, 2016 at 01:16:00PM +0200, Sebastian Andrzej Siewior wrote: >> Debian started to build the gcc with --enable-default-pie by default > > To be exact: this is since gcc-6 6.2.0-7 dated Tue, 18 Oct 2016 13:53:00 +0200 > on amd64 arm64

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-23 Thread Sven Joachim
On 2016-10-21 23:21 +0200, Adam Borowski wrote: > On Fri, Oct 21, 2016 at 01:16:00PM +0200, Sebastian Andrzej Siewior wrote: >> Debian started to build the gcc with --enable-default-pie by default > > To be exact: this is since gcc-6 6.2.0-7 dated Tue, 18 Oct 2016 13:53:00 +0200 > on amd64 arm64

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-21 Thread Adam Borowski
On Fri, Oct 21, 2016 at 01:16:00PM +0200, Sebastian Andrzej Siewior wrote: > Debian started to build the gcc with --enable-default-pie by default To be exact: this is since gcc-6 6.2.0-7 dated Tue, 18 Oct 2016 13:53:00 +0200 on amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x. >

Re: [RFC PATCH] kbuild: add -fno-PIE

2016-10-21 Thread Adam Borowski
On Fri, Oct 21, 2016 at 01:16:00PM +0200, Sebastian Andrzej Siewior wrote: > Debian started to build the gcc with --enable-default-pie by default To be exact: this is since gcc-6 6.2.0-7 dated Tue, 18 Oct 2016 13:53:00 +0200 on amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x. >

[RFC PATCH] kbuild: add -fno-PIE

2016-10-21 Thread Sebastian Andrzej Siewior
Debian started to build the gcc with --enable-default-pie by default so the kernel build ends before it starts properly with: |kernel/bounds.c:1:0: error: code model kernel does not support PIC mode Is this okay or do we want some kind of check to see if -fno-PIE is supported? It is mentioned in

[RFC PATCH] kbuild: add -fno-PIE

2016-10-21 Thread Sebastian Andrzej Siewior
Debian started to build the gcc with --enable-default-pie by default so the kernel build ends before it starts properly with: |kernel/bounds.c:1:0: error: code model kernel does not support PIC mode Is this okay or do we want some kind of check to see if -fno-PIE is supported? It is mentioned in