Bug#841500: gcc-6: Unable to compile upstream kernel with previous .config
On Mon, 31 Oct 2016 07:19:56 +0100 Klaus Ethgenwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Am Do den 27. Okt 2016 um 9:20 schrieb Eric Valette: > I have reverted to 6.2.0-6 anyway using testing as a source for the gcc > package. But that will work as long as the "broken for kernel" gcc does not > enter testing. So please find a way to prevent this compiler entering > testing until this is resolved. Too late. It went already to testing as inbetween the severity was set to normal and now we have the broken package in testing. Regards Klaus - -- Klaus Ethgen It is fixed for vanilla kernel.org kernel as of 4.8.11, builds on Sid without modification. External modules I could test build fine too (including Nvidia via dkms). Do not apply any previously suggested workarounds on top or the resulting kernel will not boot. Cheers.
Bug#841500: gcc-6: Unable to compile upstream kernel with previous .config
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Am Do den 27. Okt 2016 um 9:20 schrieb Eric Valette: > I have reverted to 6.2.0-6 anyway using testing as a source for the gcc > package. But that will work as long as the "broken for kernel" gcc does not > enter testing. So please find a way to prevent this compiler entering > testing until this is resolved. Too late. It went already to testing as inbetween the severity was set to normal and now we have the broken package in testing. Had to add the following line to my apt sources: deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20161010T164513Z sid main Regards Klaus - -- Klaus Ethgen http://www.ethgen.ch/ pub 4096R/4E20AF1C 2011-05-16Klaus EthgenFingerprint: 85D4 CA42 952C 949B 1753 62B3 79D0 B06F 4E20 AF1C -BEGIN PGP SIGNATURE- Comment: Charset: ISO-8859-1 iQGcBAEBCgAGBQJYFuKFAAoJEKZ8CrGAGfasAC8L/16Q2Styl7n0Oq1PozIFi7YX SuFam+KpDvlPxNqm4nlsRYvlBwRLEdUhuSe/EocCwCeA22MVZPPClqHFcvfF1vzu KuT5KQLreQbBTTe07hi6xvJqfgYsZEg9tOz+EEaJB+Y4IgCnidgHzTOwRLCr1rNj ChHjxBkbyAYCzkMDJ8tAgiGptmj+K4FscexozefCJjCEdsIyunx31koW+xvxn1n3 luREHi8SeQvKoXZErt9QDCqiyUsWdz/ZAsBriBrfdsL4A9HvNLq1bSk4s5+RkW7g NltvN9gB7mHx8MgFycdwuBa8qBxSdXZlxvUWWwDjZOjWRMC0ZgEhIfsJqWycJOvT 58dhDAGbMIBWlISu1kRraULKvsSF0t/cUIXKDiFyzDsBC5gLX2OzRq2V7W2s4dIQ HVCgJ23i02IwZ4TwaXtU1a4rFxwOV9Kj4ytVqKxzSN9oyy2vPhUwMQumu9V8djYa y/o5BLaLWYMQbsd/ZxjwJWeWIpJxImKlJLlMjJMK+w== =fkP5 -END PGP SIGNATURE-
Bug#841500: gcc-6: Unable to compile upstream kernel with previous .config
On Thu, 27 Oct 2016 01:23:14 -0700 Andres Freundwrote: On 2016-10-27 06:25:00 +, Niels Thykier wrote: > I believe it is possible to compile the kernel with gcc-5. I hope you > will consider that an acceptable workaround for you in the interim while > we solve #841419. It's quite possible to compile the kernel with a newer gcc as well, you just need to add the necessary CFLAGs. In my build script I've adjusted things to: time make -j8 KCPPFLAGS="-fno-pic -Wno-pointer-sign" and the kernel compiles and runs normally again. Thanks. Does this patch solve also the stack-protector compilation issue? And why is -Wno-pointer-sign needed? Attached is the upstream currently proposed patch (borrowed from LKML). WFM ! --eric --- linux/Makefile~ 2016-10-27 21:59:02.777575151 +0200 +++ linux/Makefile 2016-10-27 22:00:46.014577729 +0200 @@ -615,6 +615,7 @@ ARCH_CFLAGS := include arch/$(SRCARCH)/Makefile +KBUILD_CFLAGS += $(call cc-option,-fno-pie,) KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) --- linux/scripts/gcc-x86_64-has-stack-protector.sh~2016-06-24 19:18:38.0 +0200 +++ linux/scripts/gcc-x86_64-has-stack-protector.sh 2016-10-27 22:01:36.685581816 +0200 @@ -1,6 +1,6 @@ #!/bin/sh -echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs" +echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fno-pie -fstack-protector - -o - 2> /dev/null | grep -q "%gs" if [ "$?" -eq "0" ] ; then echo y else
Bug#841500: gcc-6: Unable to compile upstream kernel with previous .config
On 2016-10-27 06:25:00 +, Niels Thykier wrote: > I believe it is possible to compile the kernel with gcc-5. I hope you > will consider that an acceptable workaround for you in the interim while > we solve #841419. It's quite possible to compile the kernel with a newer gcc as well, you just need to add the necessary CFLAGs. In my build script I've adjusted things to: time make -j8 KCPPFLAGS="-fno-pic -Wno-pointer-sign" and the kernel compiles and runs normally again.
Bug#841500: gcc-6: Unable to compile upstream kernel with previous .config
On Thu, 27 Oct 2016 06:25:00 + Niels Thykierwrote: Control: forcemerge 841438 841500 Hi Eric, Sorry to hear you ran into issues with gcc-6. On Fri, 21 Oct 2016 10:40:47 +0200 Eric Valette wrote: > [...] > > Entering directory '/usr/src/linux-dell' > GEN ./Makefile > scripts/kconfig/conf --oldconfig Kconfig > # > # configuration written to .config > # > [...] > /usr/src/linux-4.4/scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode This error suggests that your issue is a duplicate of #841419, which is that the compiler enables PIE by default (which is basically a variant of PIC). I have merged your bug into #841419 accordingly. I believe it is possible to compile the kernel with gcc-5. I hope you will consider that an acceptable workaround for you in the interim while we solve #841419. I have reverted to 6.2.0-6 anyway using testing as a source for the gcc package. But that will work as long as the "broken for kernel" gcc does not enter testing. So please find a way to prevent this compiler entering testing until this is resolved. Downloading from shapshots is way more painfull. And I wuld also like to know if various stacprotector options are broken for other user space or not because many people use this for hardening critical apps. If it is a problem, grave for security reason should stay. Ther are indeed two bugs (stackprotector and pie) to solve. But as fixing thsi properly requires upstream fixes, that could have been done for long if other distro have already switched, I'm dubious this will be fixed anytime soon, especially because the same flaw of bugs have already happened for Ubuntu and nothing changed. -- eric
Bug#841500: gcc-6: Unable to compile upstream kernel with previous .config
Control: forcemerge 841438 841500 Hi Eric, Sorry to hear you ran into issues with gcc-6. On Fri, 21 Oct 2016 10:40:47 +0200 Eric Valettewrote: > [...] > > Entering directory '/usr/src/linux-dell' > GEN ./Makefile > scripts/kconfig/conf --oldconfig Kconfig > # > # configuration written to .config > # > [...] > /usr/src/linux-4.4/scripts/mod/empty.c:1:0: error: code model kernel does not > support PIC mode This error suggests that your issue is a duplicate of #841419, which is that the compiler enables PIE by default (which is basically a variant of PIC). I have merged your bug into #841419 accordingly. I believe it is possible to compile the kernel with gcc-5. I hope you will consider that an acceptable workaround for you in the interim while we solve #841419. Thanks, ~Niels
Bug#841500: gcc-6: Unable to compile upstream kernel with previous .config
control: reassign -1 src:linux control: forcemerge -1 841438 sigh signature.asc Description: OpenPGP digital signature
Bug#841500: gcc-6: Unable to compile upstream kernel with previous .config
Package: gcc-6 Version: 6.2.0-9 Severity: grave Justification: renders package unusable Wanted to patch my upstream kernel for the COW vulenraibilty. Applied incremental patch, started the rebuild with same .config: Entering directory '/usr/src/linux-dell' GEN ./Makefile scripts/kconfig/conf --oldconfig Kconfig # # configuration written to .config # make[1]: Leaving directory '/usr/src/linux-dell' make[1]: Entering directory '/usr/src/linux-dell' arch/x86/Makefile:133: stack-protector enabled but compiler support broken /usr/src/linux-4.4/Makefile:668: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler GEN ./Makefile scripts/kconfig/conf --silentoldconfig Kconfig arch/x86/Makefile:133: stack-protector enabled but compiler support broken /usr/src/linux-4.4/Makefile:668: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler CHK include/config/kernel.release GEN ./Makefile CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CC scripts/mod/empty.o /usr/src/linux-4.4/scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode /* empty file to figure out endianness / word size */ /usr/src/linux-4.4/scripts/Makefile.build:258: recipe for target 'scripts/mod/empty.o' failed make[3]: *** [scripts/mod/empty.o] Error 1 /usr/src/linux-4.4/scripts/Makefile.build:403: recipe for target 'scripts/mod' failed make[2]: *** [scripts/mod] Error 2 /usr/src/linux-4.4/Makefile:555: recipe for target 'scripts' failed make[1]: *** [scripts] Error 2 make[1]: Leaving directory '/usr/src/linux-dell' Makefile:150: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.4.25 (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.UTF8, LC_CTYPE=en_US.UTF8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF8) Shell: /bin/sh linked to /bin/bash Init: systemd (via /run/systemd/system) Versions of packages gcc-6 depends on: ii binutils 2.27-9 ii cpp-6 6.2.0-9 ii gcc-6-base6.2.0-9 ii libc6 2.24-5 ii libcc1-0 6.2.0-9 ii libgcc-6-dev 6.2.0-9 ii libgcc1 1:6.2.0-9 ii libgmp10 2:6.1.1+dfsg-1 ii libisl15 0.17.1-1 ii libmpc3 1.0.3-1 ii libmpfr4 3.1.5-1 ii libstdc++66.2.0-9 ii zlib1g1:1.2.8.dfsg-2+b1 Versions of packages gcc-6 recommends: ii libc6-dev 2.24-5 Versions of packages gcc-6 suggests: pn gcc-6-doc pn gcc-6-locales pn gcc-6-multilib pn libasan3-dbg pn libatomic1-dbg pn libcilkrts5-dbg pn libgcc1-dbg pn libgomp1-dbg pn libitm1-dbg pn liblsan0-dbg pn libmpx2-dbg pn libquadmath0-dbg pn libtsan0-dbg pn libubsan0-dbg -- no debconf information