Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4711986rwe; Tue, 30 Aug 2022 15:43:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR49axksfFXYr6exmU+2d2Rn3m1F91+Xy2OHyvfUhb3MbWgwiQIfLxh1yaN+qqjXU2M+edvN X-Received: by 2002:a05:6402:14c6:b0:448:e27:5974 with SMTP id f6-20020a05640214c600b004480e275974mr15787463edx.53.1661899388597; Tue, 30 Aug 2022 15:43:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661899388; cv=none; d=google.com; s=arc-20160816; b=jV31k2nagnxUaC4zhWtiSivFLHIx3mm51HoEGR6+MrALq/d1yMvw0mkbxda9+0JF0N 28qn1o83hN9a3znLqL2hccPaa/Q92pzi0tAQUxoS57CzZBVUesD6KyG+habrikuG1qgm MlFewzMse/9N35A8qHOREFQtyTRtQa5VbXswT53JTToq/MrCDa40/BxCe38iBBpfrdTZ WsuPaT/o2KcAWCjdLZZvqQFumYS0V9jH6SGgfOGgHgyPlAYfEnMAKBG0zKSOUZLhf3w+ WBWKFmgUieSUE+35tnHiKMOubPvTNEpG5ZryF6MdEwGkMBqzAP3/6WVN+V1mYKrH2Ted o45Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=b8cpW+nrR3APd+B9XZ294x5uN/r70qZMashrRw3GaA8=; b=aCCb+Ypt039fehFM86VJtpgsj+C3limbi4WxeHvGrwD+WTAr8Fzp+hz5OCLpthhIx+ SxvGk+vYsQxI+XtelhPmeehqtE48BwSeg1PpNKnqvYAJEKyJY6PDSvWQwG6qq97K+xLo pQLDBEyhvPJy8UEWQ6asoSuPUSEpJKfg2NNvfxLBgF5lh8bqb4JudpRfEs4H+Qn8hj7p LUQXZcc/+On9pAGPwJVgZ6xA9n3cYHhW9qBWu+eSVzWgyz0aVC62wb4BmAV+drOL1kV/ UacqKMMz40LKjkJm4fn7aruj5mQu+btGFDmkjxewY86PLR+miKTYaOoIWkrM6KKIjCdV 8ECA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=B8JrbzRl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r4-20020a170906364400b0073d67160cb5si2061210ejb.922.2022.08.30.15.42.43; Tue, 30 Aug 2022 15:43:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=B8JrbzRl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231811AbiH3Vti (ORCPT + 99 others); Tue, 30 Aug 2022 17:49:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231751AbiH3Vta (ORCPT ); Tue, 30 Aug 2022 17:49:30 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE23F8E9B5 for ; Tue, 30 Aug 2022 14:49:27 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-31f5960500bso188554747b3.14 for ; Tue, 30 Aug 2022 14:49:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc; bh=b8cpW+nrR3APd+B9XZ294x5uN/r70qZMashrRw3GaA8=; b=B8JrbzRleZqubdBWO9KwQObWYBUFN1DEZsbcRMc0ufm/mVUktKeZg8X1kQOqUZzy93 ncNLrZU8nPu7KazqAMAyKJcikXtJLfl/reW5WBaXn80mOydYU5Xs8aKPQyLo7ErwCgSR 6vTq/fkGb/bg91DRTJvbM/ZhewoDhk6Fzi5TAqWRXDZK39lE+mcUdSuOiAqs+pSJsWjQ 9uZPxBCGuZMakiTU63KXQhu+wIJ9wLTXQN/A1wLZlo6tR7q0gp+RObUZBUjYJR6H/wFq J6OY9ufTA18je5eH0c2mEH8FL4dZmNwHh7WEfnbxz8VCQJOnaA1LbLkW+QDP3I4yxqae dF5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc; bh=b8cpW+nrR3APd+B9XZ294x5uN/r70qZMashrRw3GaA8=; b=y61YFZqMPBDKSSaInM3dORzwLw3OaPVYf0wL6WittDlSgIH1AYyWw7BhaCe45z1rPC /0OprL10Mna/cljPawGqw0KnSITUsX0Uxk8X7pqEjabvwEFNYIDMyzqh6wa/LvAd0MTj 5B3uJCOmiOCz/QVrf7IehC4r2uhH99W3ZXQEDKO9mr1wdy3/Xu7gnGHNJaNPn1006OGr KhW3bIa9LmzekxoSfP2TMJyFmYPlvb4TYI9KGb4BXNlxQA2b/aXL+t5v02Dffg3Iune9 YVx8le7pmnDjU2bcujWd5xokBGFbANC0QepItsk3o0M1+KmdUN7AfdlVJsUDjzuTfRR3 SLyw== X-Gm-Message-State: ACgBeo3B5Cd7GnenUJLDge2SowI5uI4cPlAr1uJbJ0SgDSFdSICQcv9x 3c8lUkeefrSfhm6OsvXIXOnfz+gXByU= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:200:a005:55b3:6c26:b3e4]) (user=surenb job=sendgmr) by 2002:a0d:e650:0:b0:341:85d:f480 with SMTP id p77-20020a0de650000000b00341085df480mr9713169ywe.161.1661896166926; Tue, 30 Aug 2022 14:49:26 -0700 (PDT) Date: Tue, 30 Aug 2022 14:48:50 -0700 In-Reply-To: <20220830214919.53220-1-surenb@google.com> Mime-Version: 1.0 References: <20220830214919.53220-1-surenb@google.com> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog Message-ID: <20220830214919.53220-2-surenb@google.com> Subject: [RFC PATCH 01/30] kernel/module: move find_kallsyms_symbol_value declaration From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, ldufour@linux.ibm.com, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, changbin.du@intel.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, arnd@arndb.de, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, surenb@google.com, kernel-team@android.com, linux-mm@kvack.org, iommu@lists.linux.dev, kasan-dev@googlegroups.com, io-uring@vger.kernel.org, linux-arch@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allow find_kallsyms_symbol_value to be called by code outside of kernel/module. It will be used for code tagging module support. Signed-off-by: Suren Baghdasaryan --- include/linux/module.h | 1 + kernel/module/internal.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/module.h b/include/linux/module.h index 518296ea7f73..563d38ad84ed 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -605,6 +605,7 @@ struct module *find_module(const char *name); int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type, char *name, char *module_name, int *exported); +unsigned long find_kallsyms_symbol_value(struct module *mod, const char *name); /* Look for this name: can be of form module:name. */ unsigned long module_kallsyms_lookup_name(const char *name); diff --git a/kernel/module/internal.h b/kernel/module/internal.h index 680d980a4fb2..f1b6c477bd93 100644 --- a/kernel/module/internal.h +++ b/kernel/module/internal.h @@ -246,7 +246,6 @@ static inline void kmemleak_load_module(const struct module *mod, void init_build_id(struct module *mod, const struct load_info *info); void layout_symtab(struct module *mod, struct load_info *info); void add_kallsyms(struct module *mod, const struct load_info *info); -unsigned long find_kallsyms_symbol_value(struct module *mod, const char *name); static inline bool sect_empty(const Elf_Shdr *sect) { -- 2.37.2.672.g94769d06f0-goog