Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3819600pxb; Mon, 1 Feb 2021 05:41:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOf/ah5K4AYsLPN3AMyDbR8QD12/qtGhfQZV6QWymM+0830vcF2M98/9gaDHwrK4UOWmd/ X-Received: by 2002:a17:907:7815:: with SMTP id la21mr15684802ejc.12.1612186896885; Mon, 01 Feb 2021 05:41:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612186896; cv=none; d=google.com; s=arc-20160816; b=wav2Ed4I/H9nEkYikQgHl3AXjy7ym746n9NE4SaWeyN2EzvtWLFEbZwZxrXCSX+Ooq PdO0yyJT82h1/efmVd8cQ2Xu8Ha/vBaBt+EDevqrHN55h8F3wbAFRVf3lYQO5Gz7Wlmi xOFu5uym0aWDNUhimVde2wIjbRnffLzIyqwzbq5AImNF2OivfJ7H3sY+zy8UkWHyupA1 GuyboaOs5JfatZDThICuLU2NqaG3o6ZexiJ+gz8hx6r3Os5XQaX6G2mvvOOjXGy4sZim am1yLsLpLzW6ukQKZIeAhhsVQtfj3i41NKUjaoKaH3O2//36q5JYqbUl+30cCykKNkIi 3GBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=9/X60gNIUroR4vQUfuwQWsIJUEVAkrIoCjJdg4lp6cc=; b=ACN8hTY7LMYL97o5DOueC0t77jTerry+TD3PmyMGYnzNPj9181RRXkZWfOVeiEfzUT mJCHCXSf+LChqP2BGcADT9LyMcOgD0USlijqkcnMTEe16zaOg6H9utSOR7mD4AOB2Prk Dq9K9F7fK14a89JnqmLWr09dFEboaVtZjFIN2vvX4TGMDElwMSbSvzLwT99Lw2lW9KE9 2FZ1aA7cQZbdXobdIlTozAwp3uucqMA6anoygTvOaMbGGTvZZ5Hx0oAKxKq3sBHa4Bnz HdqC6Z2kfLcB2HDu8tWe+3QgPR4AaUuSJm49TuyEDONiI3lBiutucK/FYbnxna7CzsKo Xqbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si11603432ejx.382.2021.02.01.05.41.11; Mon, 01 Feb 2021 05:41:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231187AbhBANh5 (ORCPT + 99 others); Mon, 1 Feb 2021 08:37:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:33488 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232290AbhBANhy (ORCPT ); Mon, 1 Feb 2021 08:37:54 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id AA6FBABD5; Mon, 1 Feb 2021 13:37:12 +0000 (UTC) Date: Mon, 1 Feb 2021 14:37:12 +0100 (CET) From: Miroslav Benes To: Christoph Hellwig cc: Petr Mladek , Frederic Barrat , Andrew Donnellan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jessica Yu , Josh Poimboeuf , Jiri Kosina , Joe Lawrence , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, dri-devel@lists.freedesktop.org, live-patching@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH 05/13] kallsyms: refactor {,module_}kallsyms_on_each_symbol In-Reply-To: <20210201114749.GB19696@lst.de> Message-ID: References: <20210128181421.2279-1-hch@lst.de> <20210128181421.2279-6-hch@lst.de> <20210201114749.GB19696@lst.de> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Feb 2021, Christoph Hellwig wrote: > On Fri, Jan 29, 2021 at 10:43:36AM +0100, Petr Mladek wrote: > > > --- a/kernel/livepatch/core.c > > > +++ b/kernel/livepatch/core.c > > > @@ -164,12 +164,8 @@ static int klp_find_object_symbol(const char *objname, const char *name, > > > .pos = sympos, > > > }; > > > > > > - mutex_lock(&module_mutex); > > > - if (objname) > > > + if (objname || !kallsyms_on_each_symbol(klp_find_callback, &args)) > > > module_kallsyms_on_each_symbol(klp_find_callback, &args); > > > - else > > > - kallsyms_on_each_symbol(klp_find_callback, &args); > > > - mutex_unlock(&module_mutex); > > > > This change is not needed. (objname == NULL) means that we are > > interested only in symbols in "vmlinux". > > > > module_kallsyms_on_each_symbol(klp_find_callback, &args) > > will always fail when objname == NULL. > > I just tried to keep the old behavior. I can respin it with your > recommended change noting the change in behavior, though. Yes, please. It would be cleaner that way. Miroslav