Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp705738img; Mon, 18 Mar 2019 12:21:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqx++FMbFclyzU6tj2xFHF8beWFdqg9HJUIo+aP+fwAqWwuNBlbBV25TrHyPR1X4qC7ZYAVZ X-Received: by 2002:a17:902:e68e:: with SMTP id cn14mr21271900plb.67.1552936916286; Mon, 18 Mar 2019 12:21:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552936916; cv=none; d=google.com; s=arc-20160816; b=zj9Y7+2IfyR2S1RbwKCZMyzB0KoHGxH17qsuRHu2A2koPsxfiDJIndVHiujBnFjQPO jnR+JBmKiaUotmauTW9l4uDyDyj+9F0OhBOhNLH1bXzk+hqBs+5qG5rBN1bvOZEmLMAd Ucfbhp/VxqKQqhI7GLkbeYKNxrqhadhVWEgRUaO3T3jVot2K6PQ4w89+ViY0VXuShOHA 7V7pasNL8j2LZcidtzinlDgGh31wvsjNvK9hfVUy+j9UVbjihNxsI+0PL3/hK3wq5oI9 KPNdLVWj7nfTNHQUGXm2GDghYg8XgxcC/LUlRGvy4beA6BPAmbXY3itr907fwQiEdDjv xl7w== 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=ptckxfhyvJ30PdUZI94zOlGhvT5vIIE/B24Yx6xsgyU=; b=FsDOH/8o6rNYSEtOq8yU4YKz4fzfq+vhArUoLHxF+FYL16tLNz9W1CRQoWjld/QHfN /MDFcxe3qal5X7ZCJD2eGPgVCtZJv9UHYa86IAx2h5wdY8me8oK5kNj41k9Nl6VpeC/O Uk/uEjEM/OzcicgeMHknRF22eljQF2Dr2F4weg8ntyEz6QjuG8sor74cwEliFItexrLe c82/uFjTWEKvU/0ubTRN0KQmAWQyCN6Q4gVxasQWwCqWzK6KdGTZbHqtbeaCXngBk/ns XMeBzXGy4Wv2F5eb3OOK7tI1WeVHwJVBGHki2yqR46rBYcLsVnE8JSB+IyJIFViDBoo8 mGvQ== 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 g19si9671206pgg.235.2019.03.18.12.21.41; Mon, 18 Mar 2019 12:21:56 -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 S1726728AbfCRTU6 (ORCPT + 99 others); Mon, 18 Mar 2019 15:20:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59100 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726777AbfCRTU6 (ORCPT ); Mon, 18 Mar 2019 15:20:58 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0471C3082E58; Mon, 18 Mar 2019 19:20:58 +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 A3EC05D9C6; Mon, 18 Mar 2019 19:20:56 +0000 (UTC) Date: Mon, 18 Mar 2019 15:20:54 -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 6/8] modpost: Add modinfo flag to livepatch modules Message-ID: <20190318192054.GA23203@redhat.com> References: <20190301141313.15057-1-jmoreira@suse.de> <20190301141313.15057-7-jmoreira@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190301141313.15057-7-jmoreira@suse.de> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 18 Mar 2019 19:20:58 +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:11AM -0300, Joao Moreira wrote: > From: Miroslav Benes > > Currently, livepatch infrastructure in the kernel relies on > MODULE_INFO(livepatch, "Y") statement in a livepatch module. Then the > kernel module loader knows a module is indeed livepatch module and can > behave accordingly. > > klp-convert, on the other hand relies on LIVEPATCH_* statement in the > module's Makefile for exactly the same reason. > > Remove dependency on modinfo and generate MODULE_INFO flag > automatically in modpost when LIVEPATCH_* is defined in the module's > Makefile. Generate a list of all built livepatch modules based on > the .livepatch file and store it in (MODVERDIR)/livepatchmods. Give > this list as an argument for modpost which will use it to identify > livepatch modules. > > As MODULE_INFO is no longer needed, remove it. > > [jmoreira: > * fix modpost.c (add_livepatch_flag) to update module structure with > livepatch flag and prevent modpost from breaking due to unresolved > symbols] > > Signed-off-by: Miroslav Benes > Signed-off-by: Joao Moreira > --- > samples/livepatch/livepatch-sample.c | 1 - > scripts/Makefile.modpost | 8 +++- > scripts/mod/modpost.c | 84 +++++++++++++++++++++++++++++++++--- > 3 files changed, 85 insertions(+), 8 deletions(-) > > [ ... snip ... ] While we're here, we can make the same changes to all the other in-tree livepatch self-test and sample modules: [squash] modpost/livepatch: apply modinfo flag to all in-tree livepatch modules https://github.com/torvalds/linux/commit/22c59f05c9618903a946d5f8f79bfa345d31de3c -- Joe