Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938647AbcJRP5H (ORCPT ); Tue, 18 Oct 2016 11:57:07 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48035 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937225AbcJRP4p (ORCPT ); Tue, 18 Oct 2016 11:56:45 -0400 Date: Tue, 18 Oct 2016 17:56:51 +0200 From: Greg KH To: Shuah Khan Cc: Linus Torvalds , mmarek@suse.com, LKML Subject: Re: Ubuntu 16.10 - Linux Kernel build fails - GCC related Message-ID: <20161018155651.GA13567@kroah.com> References: <20161018153755.GA10386@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2658 Lines: 67 On Tue, Oct 18, 2016 at 09:48:17AM -0600, Shuah Khan wrote: > On Tue, Oct 18, 2016 at 9:37 AM, Greg KH wrote: > > On Tue, Oct 18, 2016 at 09:24:20AM -0600, Shuah Khan wrote: > >> After upgrading to Ubuntu 16.10, I can't build kernels anymore unless > >> the following patch is applied to the kernel Makefile. A word of > >> caution for anybody that is planning to update their development > >> systems. > >> > >> https://patchwork.ozlabs.org/patch/616621/ > >> > >> Please refer to the Ubuntu 16.10 release notes for more details. > >> > >> https://wiki.ubuntu.com/YakketyYak/ReleaseNotes#GCC > >> > >> Ubuntu is recommended applying this patch for building Linux kernels. > >> I am not sure this is the right way to go. I am hoping this is > >> work-around and patching the kernel Makefile will not be the solution > >> going forward. > >> > >> I haven't seen any patch sent upstream to make this change, so I still > >> hope this is a temporary work-around. Maybe be there is patch that > >> came through and you are aware of this problem? > > > > Does commit 6d92bc9d483a solve this issue for you? That should have > > resolved a -pie issue, back in 4.6, or is this something else? > > > > This is a new problem because of a change Ubuntu made in their gcc > version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) it appears. > > The Ubuntu 16.10 release notes says: > > "We have modified GCC to by-default compile programs with position > independent executable support to improve the security benefits > provided by > Address Space Layout Randomization. > > This may cause difficulty when trying to compile Linux kernels that > still need this patch applied. > Other programs may experience other problems; some debugging > guidelines are at https://wiki.ubuntu.com/SecurityTeam/PIE" > > The above clearly states a patch needs to applied to the Linux Kernel > makefile. This patch forces no-pie for distro compilers that enable > pie by default > > The error I am seeing on 4.9-rc1 is: > > CHK include/config/kernel.release > Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong > not supported by compiler > Makefile:1058: recipe for target 'prepare-compiler-check' failed > make: *** [prepare-compiler-check] Error 1 > > I think CONFIG_CC_STACKPROTECTOR_STRONG is enabled in most distro > configs. So I am not why this should fail now. > > Here is the Ubuntu recommended patch for easy reference: (note cut and > paste - probably won't apply) - > https://patchwork.ozlabs.org/patch/616621/ Did you follow up with Steve about this? Seems odd that no one ever followed up on it. thanks, greg k-h