Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1246946ybg; Wed, 29 Jul 2020 09:15:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygiPMl1iCexqXfF+6KM/z1RW5mKApO3oNamT+C1qGu2TvNhFfzMXyJZj54ZVfDQ+2CXFWr X-Received: by 2002:aa7:db11:: with SMTP id t17mr30535997eds.365.1596039310254; Wed, 29 Jul 2020 09:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596039310; cv=none; d=google.com; s=arc-20160816; b=waaYoWvlO7K6d28+f00M0uelPAxHKD539dvFU7CoW05Bu4z7tN7poFW7OMvcEmryQ5 5QBjjlEkhrfI2eUomMdALdAieuHcUKsF+nqumCxxx+Bxyh/+A5GbEex87ngSeeUweWlC RaYBRdl53i8j2BTZnH7vPdEPqJLtSfdxNt/NYOV8SrzlPc9NPDSSSItpWohXprH+Gm4d 1DEw+/Xnj3zWpJH1+Ch7i+0ulpPTRWbDEti98shvfG5taTWdc/Esrm2/wT8wWyl8PKlq lFgECsMM+ydp774O5Mn+jo6+RnZ53R81ScYVbkicu1mDOwU0BiQO6KD4PiJlozvIoYEp q+uQ== 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:dkim-signature; bh=wc4LsEUB8f3Zv0/qX+dOF6p/3yMYxqz1fGWm3ilcWZw=; b=Qd3nsDzya0VdjDWFujELMXQxmdiSrbxNtaKB7vEdMHSidrxJrsBABM8A+Oi+mKXb1n h06oO3H8aq2/SrJyodKJZmrqbsq/ZXtouJsv/GUgtZQ4R27SnZpEPMpOh8wv8qDfOqYK TMs/UL/3aFJMy+X99r2lKnLMk1SSDdEv7GIgpALceq1llbiiRGovm70etcx6zvJBAGlQ 9sOSJg6PuGmVfifAP1KHgmz36VExUeR76OTQfbrZn1x69bhxo9sLpXd36ApkCtke3vxw eGCs66FScVTX6y26Nx/diwEvt6kSWk6JD8u3++mdXLMTuaWpxFZix5fzPEINR+JDGRX8 4gKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VbFyGvQa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t15si1546813edy.289.2020.07.29.09.14.32; Wed, 29 Jul 2020 09:15:10 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=VbFyGvQa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726581AbgG2QNX (ORCPT + 99 others); Wed, 29 Jul 2020 12:13:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:50582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726341AbgG2QNX (ORCPT ); Wed, 29 Jul 2020 12:13:23 -0400 Received: from linux-8ccs (p57a236d4.dip0.t-ipconnect.de [87.162.54.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A5FA920FC3; Wed, 29 Jul 2020 16:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596039202; bh=Dr2f1rnIAwAbgJYQlSq8HsSXozp4VHgRlAMcB3TsJwI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VbFyGvQaGLh/SJN5nvdnlpgMswUCpssnC9Nl7UBme2OYXtALrCxRXizttfSXu0hB/ o/qDT0CWgK2s5/EKiaxIsxqNpPFYUsgZb1dMsgY4B4uivr3KQfMr54qT33UYvdO/uH lRY6C1kcYcdHG4PvvkTlrguh+GS7BLCg6RendzIw= Date: Wed, 29 Jul 2020 18:13:18 +0200 From: Jessica Yu To: Christoph Hellwig Cc: Greg Kroah-Hartman , open list , live-patching@vger.kernel.org Subject: Re: [PATCH 2/7] modules: mark find_symbol static Message-ID: <20200729161318.GA30898@linux-8ccs> References: <20200729062711.13016-1-hch@lst.de> <20200729062711.13016-3-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200729062711.13016-3-hch@lst.de> X-OS: Linux linux-8ccs 5.5.0-lp150.12.61-default x86_64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Christoph Hellwig [29/07/20 08:27 +0200]: >find_symbol is only used in module.c. > >Signed-off-by: Christoph Hellwig CCing the livepatching ML, as this may or may not impact its users. AFAIK, the out-of-tree kpatch module had used find_symbol() in the past, I am not sure what its current status is. I suspect all of its functionality has been migrated to upstream livepatch already. >--- > include/linux/module.h | 11 ----------- > kernel/module.c | 3 +-- > 2 files changed, 1 insertion(+), 13 deletions(-) > >diff --git a/include/linux/module.h b/include/linux/module.h >index f1fdbeef2153a8..90bdc362be3681 100644 >--- a/include/linux/module.h >+++ b/include/linux/module.h >@@ -590,17 +590,6 @@ struct symsearch { > bool unused; > }; > >-/* >- * Search for an exported symbol by name. >- * >- * Must be called with module_mutex held or preemption disabled. >- */ >-const struct kernel_symbol *find_symbol(const char *name, >- struct module **owner, >- const s32 **crc, >- bool gplok, >- bool warn); >- > /* > * Walk the exported symbol table > * >diff --git a/kernel/module.c b/kernel/module.c >index 17d64dae756c80..84da96a6d8241c 100644 >--- a/kernel/module.c >+++ b/kernel/module.c >@@ -585,7 +585,7 @@ static bool find_exported_symbol_in_section(const struct symsearch *syms, > > /* Find an exported symbol and return it, along with, (optional) crc and > * (optional) module which owns it. Needs preempt disabled or module_mutex. */ >-const struct kernel_symbol *find_symbol(const char *name, >+static const struct kernel_symbol *find_symbol(const char *name, > struct module **owner, > const s32 **crc, > bool gplok, >@@ -608,7 +608,6 @@ const struct kernel_symbol *find_symbol(const char *name, > pr_debug("Failed to find symbol %s\n", name); > return NULL; > } >-EXPORT_SYMBOL_GPL(find_symbol); > > /* > * Search for module by name: must hold module_mutex (or preempt disabled >-- >2.27.0 >