Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5410142imu; Wed, 19 Dec 2018 10:35:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/WyCmd8/Lx/TpN6L0IQlggPCfO52dCPZ1LL2dAdtVNHxQ2smEKnLHemy0LyUbNVz6IJ4qYN X-Received: by 2002:a63:40c6:: with SMTP id n189mr19854760pga.355.1545244559226; Wed, 19 Dec 2018 10:35:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545244559; cv=none; d=google.com; s=arc-20160816; b=htCTXXDXoDiqdi1fAAqdgSDBxXw2FNAAtrj75mcbPe9FDR4rf0wYsLyMaZq8hGAJtt ipRRtul25zIemrLEI8sVnuygE1RRrOJX1j0+TloZeADzELcT7N4vI047WOu5cWFbErxA A8W+TlFzfBs27jWACTsif+kk18wdoVZkcfdg2tYFjcDG1DOlIT+9ovPy5KPeEPXPJorE DEU9thUqfaQidhYRaIoqEBiEj9Fmbo/cHQPJrjqCoE27lpvLeyK7KXoiVAjbCy80tG1w hTtBj3HaPCONfyysJHgscCyygppHZN3aDWBddt3nSK3gg5pb7QgXsTtvLe+Jbzh8fXuo Zdsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=47Pl5zqwI2b1jKqSEERdbW5p5H3UfJ6LQmcwqec6V+E=; b=RMUGxDHyLkTvzGYZx77uQwN7nUJ0Scen5OEzBX1tDRs09afbsMGIFJf/JWZiRa/w6D OsuflM2Tpnq0lF83uyi/LGu01DoesExYub0EoImfUdmegeie6gRyinSO/zUPXAulV6aQ MldTrqqUgUsa26TFPGqVOcxct96Tk33dbyUBO8r0wtNxL2smZFmNyiwFQEnMuMKuPxD+ xriS98zW86uliVdoiNRrNaG/R8L46cmsDRL2Sd6H3dWbEUZeNMvJDNPHc2/LG8vCNRcZ TuJP3cfZE9Vqdfs0pVxv4ZXn3NhBPufsze3LzMU17StFprWJ5RnjoYuvhk2rzgRSeXh2 mcbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si7594079pgi.152.2018.12.19.10.35.43; Wed, 19 Dec 2018 10:35:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729668AbeLSQyf (ORCPT + 99 others); Wed, 19 Dec 2018 11:54:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43276 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727589AbeLSQye (ORCPT ); Wed, 19 Dec 2018 11:54:34 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AC2A8C070E19; Wed, 19 Dec 2018 16:54:33 +0000 (UTC) Received: from treble (ovpn-120-179.rdu2.redhat.com [10.10.120.179]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2EBD55D6A9; Wed, 19 Dec 2018 16:54:30 +0000 (UTC) Date: Wed, 19 Dec 2018 10:54:28 -0600 From: Josh Poimboeuf To: Miroslav Benes Cc: yamada.masahiro@socionext.com, michal.lkml@markovi.net, jeyu@kernel.org, jikos@kernel.org, pmladek@suse.com, linux-kbuild@vger.kernel.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kbuild: use -flive-patching when CONFIG_LIVEPATCH is enabled Message-ID: <20181219165428.5udrppedpdvf2u7k@treble> References: <20181219141744.32392-1-mbenes@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181219141744.32392-1-mbenes@suse.cz> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 19 Dec 2018 16:54:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 19, 2018 at 03:17:44PM +0100, Miroslav Benes wrote: > GCC 9 introduces a new option, -flive-patching. It disables certain > optimizations which could make a compilation unsafe for later live > patching of the running kernel. > > The option is used only if CONFIG_LIVEPATCH is enabled and $(CC) > supports it. > > Signed-off-by: Miroslav Benes > --- > Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Makefile b/Makefile > index a0650bf79606..53f5ab810efe 100644 > --- a/Makefile > +++ b/Makefile > @@ -778,6 +778,10 @@ KBUILD_CFLAGS_KERNEL += $(call cc-option,-ffunction-sections,) > KBUILD_CFLAGS_KERNEL += $(call cc-option,-fdata-sections,) > endif > > +ifdef CONFIG_LIVEPATCH > +KBUILD_CFLAGS += $(call cc-option, -flive-patching=inline-clone) > +endif > + > # arch Makefile may override CC so keep this after arch Makefile is included > NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) This option only makes sense for source-based patch generation, so isn't it a bit premature to make this change without proper source-based patch tooling? Also the commit message needs an analysis of the performance impacts. -- Josh