Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5633174yba; Thu, 11 Apr 2019 02:19:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4bYOt+RrDBprAmKcXQHyc+69/ogaFtlPZu6NiMkENfCgWjh9ncYRNWvxtOMGZLmhGSvsW X-Received: by 2002:a63:c046:: with SMTP id z6mr43257311pgi.81.1554974397812; Thu, 11 Apr 2019 02:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554974397; cv=none; d=google.com; s=arc-20160816; b=skBfD5BWZ1sw4L9USihgNNoiME0yxCxQeeFfY+/7zCUTLKSf5taYwUVuQHqRq5uMID ExaiJBiyaAp/eVFye23iP0GOwbDURM5VqGP2lcgKltbDJ8UIvm9Wf7L2CCWHRzs83ClA sFbsvN/RLgpvoxqLRE/+IavKxoo+ipw6Jld8fWX4vbPybNhB6/Fv3e3GvuKFHKoLKtXS qFpEvvXky15jt0dtcG8alayEdOqMjXNQU22FS0HyzOgYy1OT9LEbsmPCE2rUYFTL2r+l RnK5SLHltIfOKLdqwF/jiRlhOFua3WUMeFZRGMDcayuNas/obXYakkaOQfkisUQ7WILC v20Q== 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=uip1FwrubEgkcY+dvLPlP2H6pjC4cbQdFSIOohFbbkU=; b=HL0MUMBGiB6zZ4yNTfn9Dq1YZZxka3BWWpFWcRrYEZDtGQ3OligYxqzuY9FEjFxywd N9/jCTN/nnzS8jXS24/QNMyY25vTfrH0ep6+GadTutNr6Jz94tYZZ1gL9Rg347udRw3k nOaMfFGjRcLRBImW7/rx+zIkkwiy3vva3n0Vx9c367Uej6BRoj28COwPrGQ5IkkDJgRp +ZMz0Pdk64xguuHN0+/ZbQEO1NzfZ7fIN0XO3hCUBNHEfYMVcklQSaeYlRIsUewCaWG1 WB+TL7oaTb3zOxxcdRJcChquFZ4SmhSsCuuw4PrdZ3ay26/k5iEw9ILOUQzQtaOJts/u V8Ow== 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 q6si33892114pls.105.2019.04.11.02.19.41; Thu, 11 Apr 2019 02:19:57 -0700 (PDT) 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 S1726786AbfDKJTE (ORCPT + 99 others); Thu, 11 Apr 2019 05:19:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36012 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbfDKJTD (ORCPT ); Thu, 11 Apr 2019 05:19:03 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6796A80F98; Thu, 11 Apr 2019 09:19:03 +0000 (UTC) Received: from shodan.usersys.redhat.com (unknown [10.43.17.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C2FF1001E89; Thu, 11 Apr 2019 09:19:00 +0000 (UTC) Received: by shodan.usersys.redhat.com (Postfix, from userid 1000) id EFA072C1729; Thu, 11 Apr 2019 11:18:59 +0200 (CEST) Date: Thu, 11 Apr 2019 11:18:59 +0200 From: Artem Savkov To: Joe Lawrence Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, linux-kbuild@vger.kernel.org, Jessica Yu , Jiri Kosina , Joao Moreira , Josh Poimboeuf , Konstantin Khlebnikov , Masahiro Yamada , Michael Matz , Miroslav Benes , Nicolai Stange , Petr Mladek Subject: Re: [PATCH v3 2/9] kbuild: Support for Symbols.list creation Message-ID: <20190411091859.GF4995@shodan.usersys.redhat.com> References: <20190410155058.9437-1-joe.lawrence@redhat.com> <20190410155058.9437-3-joe.lawrence@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190410155058.9437-3-joe.lawrence@redhat.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 11 Apr 2019 09:19:03 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 10, 2019 at 11:50:51AM -0400, Joe Lawrence wrote: > -clean: archclean vmlinuxclean > +klpclean: > + $(Q) rm -f $(objtree)/Symbols.list nit: $(SLIST) can be used here. > +clean: archclean vmlinuxclean klpclean > > # mrproper - Delete all generated files, including .config > # > diff --git a/samples/livepatch/Makefile b/samples/livepatch/Makefile > index 2472ce39a18d..8b9b42a258ad 100644 > --- a/samples/livepatch/Makefile > +++ b/samples/livepatch/Makefile > @@ -1,3 +1,4 @@ > +LIVEPATCH_livepatch-sample := y > obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-sample.o > obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-shadow-mod.o > obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-shadow-fix1.o > diff --git a/scripts/Makefile.build b/scripts/Makefile.build > index 76ca30cc4791..ca76bd2080f0 100644 > --- a/scripts/Makefile.build > +++ b/scripts/Makefile.build > @@ -246,6 +246,11 @@ cmd_gen_ksymdeps = \ > $(CONFIG_SHELL) $(srctree)/scripts/gen_ksymdeps.sh $@ >> $(dot-target).cmd > endif > > +ifdef CONFIG_LIVEPATCH > +cmd_livepatch = $(if $(LIVEPATCH_$(basetarget)), \ > + $(shell touch $(MODVERDIR)/$(basetarget).livepatch)) > +endif > + > define rule_cc_o_c > $(call cmd,checksrc) > $(call cmd_and_fixdep,cc_o_c) > @@ -280,6 +285,7 @@ $(obj)/%.o: $(src)/%.c $(recordmcount_source) $(objtool_dep) FORCE > $(single-used-m): $(obj)/%.o: $(src)/%.c $(recordmcount_source) $(objtool_dep) FORCE > $(call cmd,force_checksrc) > $(call if_changed_rule,cc_o_c) > + $(call cmd_livepatch) nit: maybe use "cmd,livepatch" to be consistent with the other call of this function. > @{ echo $(@:.o=.ko); echo $@; \ > $(cmd_undef_syms); } > $(MODVERDIR)/$(@F:.o=.mod) > > @@ -456,6 +462,7 @@ cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^) $(cmd_secanalysis > > $(multi-used-m): FORCE > $(call if_changed,link_multi-m) > + $(call cmd,livepatch) > @{ echo $(@:.o=.ko); echo $(filter %.o,$^); \ > $(cmd_undef_syms); } > $(MODVERDIR)/$(@F:.o=.mod) > $(call multi_depend, $(multi-used-m), .o, -objs -y -m) > -- > 2.20.1 > -- Artem