Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp193772pxb; Tue, 2 Feb 2021 02:48:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAluB0Oayhiztl3aTTgdzQcpMuTUvpkQpqYsDZmYSfU3Rn6ZzIsO4pMh9HnQloFMYy6FTO X-Received: by 2002:a17:906:7cb:: with SMTP id m11mr10968010ejc.332.1612262931213; Tue, 02 Feb 2021 02:48:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612262931; cv=none; d=google.com; s=arc-20160816; b=VZ9WkHwqwMi1NydCtRP4HOPydQYJ/8CgyTWOAHFRjYoTTqW7e4I+qUVT5+ySez9ePX D6qWxm1WQkKklGeSJ3USajyIJaoWP/tEdhRiTzxUmEtVZpHLe4FmE2LM7ziLtVx9MATw aEnuwwP156TSXf21N36bvNo/TOw5ysjw2Hmi6gdJkGI/mpaY51zpWqhuzs/tev/f7e0H dZZARUhwu26+MZLVqx+Sx6LRThS4jfVJKLInwCOD46c9MK+8lVmbb1jM0G3hfz2B8SIx 4LpRSWdoJlgq665jKykWbHVNSpaLHV1HSkEgJhNCrsHMn/fSBwaKOKTo7ZncSJKystGQ lBpg== 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=o0Y++EfZiZ/cH4MSl356Ou4IVosY0QxgQbrtZSKVqx8=; b=qorhWdw/JhTzQbiU0puB45KO6YsIAT6SvrzyiJxwhTT1At5vqnl+lBmQq3vtzElcu4 gn4zLbtNwydwZKKYq2TGarzXdEttbpdU5h8KTtKDpfx2KVUXhOlqaXoL3fEqJpTgJDyU B3Re0gjMIRz+3adB/6AFz8qZg9E6qTFUR0jcsDZRxJrHIQCVI1G+rc0EdztW650TpDpc v2rWmORxFlZ8axAVLqjQQ2kbEZsUVu20x/AcTdICd3V/D2ISeZFvBHCUsZ4x0oZD9PQ4 tsc/rLPRS6iQOyUB9YfZCPiZ0AlRp+iFK8slZBsRxjwrl8xKeRWlFhXCzB3QiWaWsuJs MylQ== 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 r21si13474616ejo.123.2021.02.02.02.48.25; Tue, 02 Feb 2021 02:48:51 -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 S230022AbhBBKqb (ORCPT + 99 others); Tue, 2 Feb 2021 05:46:31 -0500 Received: from mx2.suse.de ([195.135.220.15]:33980 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbhBBKqa (ORCPT ); Tue, 2 Feb 2021 05:46:30 -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 27FC9AE8D; Tue, 2 Feb 2021 10:45:48 +0000 (UTC) Date: Tue, 2 Feb 2021 11:45:47 +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: <20210201162842.GB7276@lst.de> Message-ID: References: <20210128181421.2279-1-hch@lst.de> <20210128181421.2279-6-hch@lst.de> <20210201114749.GB19696@lst.de> <20210201162842.GB7276@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 Mon, Feb 01, 2021 at 02:37:12PM +0100, Miroslav Benes wrote: > > > > 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. > > Let me know if this works for you: > > --- > >From 18af41e88d088cfb8680d1669fcae2bc2ede5328 Mon Sep 17 00:00:00 2001 > From: Christoph Hellwig > Date: Wed, 20 Jan 2021 16:23:16 +0100 > Subject: kallsyms: refactor {,module_}kallsyms_on_each_symbol > > Require an explicit call to module_kallsyms_on_each_symbol to look > for symbols in modules instead of the call from kallsyms_on_each_symbol, > and acquire module_mutex inside of module_kallsyms_on_each_symbol instead > of leaving that up to the caller. Note that this slightly changes the > behavior for the livepatch code in that the symbols from vmlinux are not > iterated anymore if objname is set, but that actually is the desired > behavior in this case. > > Signed-off-by: Christoph Hellwig Acked-by: Miroslav Benes Thanks Christoph M