Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965033AbcJRQCb (ORCPT ); Tue, 18 Oct 2016 12:02:31 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:34715 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964819AbcJRQCZ (ORCPT ); Tue, 18 Oct 2016 12:02:25 -0400 MIME-Version: 1.0 In-Reply-To: <20161018155651.GA13567@kroah.com> References: <20161018153755.GA10386@kroah.com> <20161018155651.GA13567@kroah.com> From: Shuah Khan Date: Tue, 18 Oct 2016 10:02:22 -0600 Message-ID: Subject: Re: Ubuntu 16.10 - Linux Kernel build fails - GCC related To: Greg KH Cc: Linus Torvalds , mmarek@suse.com, LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2913 Lines: 71 On Tue, Oct 18, 2016 at 9:56 AM, Greg KH wrote: > 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. > I ran into this just yesterday and found the patch this morning. I can contact Steve and get more information on this. thanks, -- Shuah