Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp705593img; Mon, 18 Mar 2019 12:21:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9049oE8BZsaUIEfsSLNc2z6AwsuvZdGDQTq4eWthqEr1uOyNUhzPVi6AjUIa2hhh2yb4L X-Received: by 2002:a65:4306:: with SMTP id j6mr10018611pgq.304.1552936902531; Mon, 18 Mar 2019 12:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552936902; cv=none; d=google.com; s=arc-20160816; b=ylELP4yHXzdNCjpTY2ZxfrvCsjTUnPrpuYh7U5+M0Lh9CqY+eYhoqkLqpWkWNClKPF 7EQY6a0SwvI1T+94TPjW1ee0tun1XWpIjMBg64RuU8Kmhg0dD8NpIKbsNhHlpf0Cx4tn 7wGatYCL+BkPCgzgmI5Q+fhSP5rWyUv5vtN0ywtv5UyLyx42tGbgy4/rPtkeuJi6URnT fnfTpE7t+berpLPWjikWT8EfeGDI1rbsEmaTo1NUqyUObbslJ/Nk8hyBk1B6LK2LQ2I8 8JIR3nMMDAMcb69tfnnUwuQdEAZ/g2PAwU1IyFVViakOW8OSyw2gwgvWK8VA8DewoYZ0 SIFw== 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=brc+8wJu4B0n7imQZ5O5MjpOtYFjpbuAoSa3DaU14O4=; b=EsJ21W4/Kmwx0eURr8YoxmKZ4VXJsQfXsxW6TTl3dbX2u1LeVj6WpeCvbQc0lncQjh M3lJRK3eubO1K0CUwxFE135tg9m63JSHaTalNpyfPBYKi8e1MrjSLhyajTugF/NXFUrk IUvqQhWRvOBrPKM0j5BqjWioTlUE+NZZXlw66uChhdMtUixw2toQHMr70Iua3AI+BXMw 2A27308pOYrjtK/5MFqxLPlc8EVeb/DIHdCuPUBqFAxSRGqrhmTUHNjMKABbBLmpuLiF p5PfEw7NVpwiTG3BXKTUBIDAA+CMnYsQIXWNt1sj4RToI9q0n9z04wxVdLSCyPc5XjvP lEzw== 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 i10si9964911pfj.186.2019.03.18.12.21.27; Mon, 18 Mar 2019 12:21:42 -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 S1727531AbfCRTUl (ORCPT + 99 others); Mon, 18 Mar 2019 15:20:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42552 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726728AbfCRTUk (ORCPT ); Mon, 18 Mar 2019 15:20:40 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 89C29356E9; Mon, 18 Mar 2019 19:20:40 +0000 (UTC) Received: from redhat.com (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2ED90601A4; Mon, 18 Mar 2019 19:20:39 +0000 (UTC) Date: Mon, 18 Mar 2019 15:20:37 -0400 From: Joe Lawrence To: Joao Moreira Cc: live-patching@vger.kernel.org, mbenes@suse.cz, pmladek@suse.cz, jikos@suse.cz, nstange@suse.de, jpoimboe@redhat.com, khlebnikov@yandex-team.ru, jeyu@kernel.org, matz@suse.de, linux-kernel@vger.kernel.org, yamada.masahiro@socionext.com, linux-kbuild@vger.kernel.org, michal.lkml@markovi.net Subject: Re: [PATCH v2 5/8] modpost: Integrate klp-convert Message-ID: <20190318192037.GA23186@redhat.com> References: <20190301141313.15057-1-jmoreira@suse.de> <20190301141313.15057-6-jmoreira@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190301141313.15057-6-jmoreira@suse.de> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 18 Mar 2019 19:20:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 01, 2019 at 11:13:10AM -0300, Joao Moreira wrote: > From: Josh Poimboeuf > > Create cmd_klp_convert and hook it into scripts/Makefile.modpost. > cmd_klp_convert invokes klp-convert with the right arguments for the > conversion of unresolved symbols inside a livepatch. > > [khlebnikov: > * save cmd_ld_ko_o into .module.cmd, if_changed_rule doesn't do that > * fix bashisms for debian where /bin/sh is a symlink to /bin/dash > * rename rule_link_module to rule_ld_ko_o, otherwise arg-check inside > if_changed_rule compares cmd_link_module and cmd_ld_ko_o > * check modinfo -F livepatch only if CONFIG_LIVEPATCH is true > ] > > [mbenes: > * remove modinfo call. LIVEPATCH_ in Makefiled > ] > > [jmoreira: > * split up: move the .livepatch file-based scheme for identifying > livepatches to a previous patch, as it was required for correctly > building Symbols.list there. > ] > > Signed-off-by: Josh Poimboeuf > Signed-off-by: Konstantin Khlebnikov > Signed-off-by: Miroslav Benes > Signed-off-by: Joao Moreira > --- > scripts/Kbuild.include | 4 +++- > scripts/Makefile.modpost | 16 +++++++++++++++- > scripts/mod/modpost.c | 6 +++++- > scripts/mod/modpost.h | 1 + > 4 files changed, 24 insertions(+), 3 deletions(-) > > [ ... snip ... ] > > diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost > index 7d4af0d0accb..da779a185218 100644 > --- a/scripts/Makefile.modpost > +++ b/scripts/Makefile.modpost > @@ -125,8 +125,22 @@ quiet_cmd_ld_ko_o = LD [M] $@ > -o $@ $(filter-out FORCE,$^) ; \ > $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) > > +SLIST = $(objtree)/Symbols.list > +KLP_CONVERT = scripts/livepatch/klp-convert > +quiet_cmd_klp_convert = KLP $@ Minor nit, but a little more whitespace after "KLP" will more neatly align the build output: [squash] modpost: align KLP prefix https://github.com/torvalds/linux/commit/543aa6bc390b778a2e5a6706960c1414404d409e > [ ... snip ... ] > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index 26bf886bd168..1dfc34d8b668 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -1979,6 +1979,10 @@ static void read_symbols(const char *modname) > license = get_next_modinfo(&info, "license", license); > } > > + /* Livepatch modules have unresolved symbols resolved by klp-convert */ > + if (get_modinfo(info.modinfo, info.modinfo_len, "livepatch")) > + mod->livepatch = 1; > + > [ ... snip ... ] To bisect/build post v5.0 merge, I needed to update the get_modinfo() call. h/t to the 0-day bot for flagging this: [squash] modpost: rebase for v5.0 https://github.com/torvalds/linux/commit/ab82f725dbc8d6366ca4912a4d05372e24e92e8b -- Joe