Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5916430yba; Thu, 11 Apr 2019 08:20:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzHXieJDb/+X2jLyjbqVmq732RHV/RA6o3llVJ1P+1OafhENLmdANXcnfYwms+DpqO3HX1 X-Received: by 2002:a63:6a44:: with SMTP id f65mr14696651pgc.354.1554996046183; Thu, 11 Apr 2019 08:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554996046; cv=none; d=google.com; s=arc-20160816; b=ugiQqOzvg5ySIeZrH/wi5/QjjrtP5zgpp0wxmoK2jFSIBBaC3K+Cd28/tLaAHzNPMp 24EE0m052I/wbROI6NKCD30eAlAfWfSZA6A97GT6wxprizzfymOOshXawne7kOpdYMhf tc3lBaO/7cDefURWEd6Dv7OuiBapvDGtQRqho2X0QUoZqePsaCn5idz+RoYRxHnOp7Ol SwGXQ5hY5/dr1pa2N3TwxgXn6lM7q+BYzucxv/3SHnJI/vZp0YsuEfSA4P7X9hGcDltW qEThgn49idpkerTd2C2YD4KnhPI+YQmw2P54F7ruWNydUzrE2Auheq+ONCwqMV2TsQNu 3pkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=dY+kcDJoDOyBi+TcApasJ6vO3vSsqgYGSFon0rCsi6w=; b=VnsL+1HnpUanmuQJQnJk2ca/Al+fWTIVl53hjN4I7QHTF1TmjJIlX6UDa3XDmzgK5z sBtYq2jhOsENGISapX9O8hWrnuIeUskuKhCZKauoyG0ZBmgKVtt4msjHYaAschu/SKKB 6VViVn7j2OptyLcu8E5WdBLIvWBA8krl8X+27MOhq6jnzF0xqG8mAqXLKofInqz0pI/x tvmFnNmB6/0pdPgl/1kM0s3purgcGMC3pz3DZi2xR0WCd6uWkuqUsMh/qqI6zaW6uWCZ QSgFwBaSt7IvRnikcryQsk8idH0tQtx/NR20Wdt9buSBo6xkKgBX6gjQXgOpgej4Z0NY VA7A== 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 i70si35901593pfj.236.2019.04.11.08.20.29; Thu, 11 Apr 2019 08:20:46 -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 S1726784AbfDKPSf (ORCPT + 99 others); Thu, 11 Apr 2019 11:18:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58548 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726145AbfDKPSf (ORCPT ); Thu, 11 Apr 2019 11:18:35 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD74E70D6B; Thu, 11 Apr 2019 15:18:34 +0000 (UTC) Received: from [10.18.17.208] (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F82C19C58; Thu, 11 Apr 2019 15:18:33 +0000 (UTC) Subject: Re: [PATCH v3 2/9] kbuild: Support for Symbols.list creation To: Artem Savkov 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 References: <20190410155058.9437-1-joe.lawrence@redhat.com> <20190410155058.9437-3-joe.lawrence@redhat.com> <20190411091859.GF4995@shodan.usersys.redhat.com> From: Joe Lawrence Message-ID: Date: Thu, 11 Apr 2019 11:18:32 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190411091859.GF4995@shodan.usersys.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 11 Apr 2019 15:18:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/11/19 5:18 AM, Artem Savkov wrote: > 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. > Both of these make sense, thanks Artem. -- Joe