Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3134684yba; Mon, 8 Apr 2019 11:55:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxlVUViiUWxswSW3cCNDJdWlhLTAXBcVqTmvoNNIph5J3hm11LK51/iYE7AVS6/dD2rxEe5 X-Received: by 2002:a62:b61a:: with SMTP id j26mr31790597pff.203.1554749725263; Mon, 08 Apr 2019 11:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554749725; cv=none; d=google.com; s=arc-20160816; b=YaH7rVZw0M44AA6cwqcChj0Vox99O50ukM8anSb8peEICtJ0G4hFS3nn2/hHpQFOga ckVKMSV7Io1a2mXM+ZbqWSVM7sDP8CsG91RwUXRoIBo/rQAzhVN9gEd8Pzx24IG0x6ro vahS8J/9EAAMnkkqSIWhsXwZU0tmX5V6jbs94R7h2r6QRAVK+0WaNxN/m+LH5mXUTqO7 SJtf1lnhC8e3nJOB6392BCchJQubNf3Qtfwd3OJhQOh1hdV7gL5E6xjyo4tH05BAlk3A pDcG19Y6UmuLUlxDADNAb2nb/Pt4HIbiNBZDVIGoVRYvKXAdaDOhF9dFlJCLJh3TBFE5 3nVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6rooXMDx733C5jOZV0HDJGU0vPGbQdWxeSk9HuXBbx4=; b=SzW33/PfRkpxgGC+rO5SGy7slwYY2W3kmtj6pi76krZxOZSGJjHFRn1gL5UODWxf5J 7lQxc2xz9CyOgW4oMvdgEzkzNPopuwF4VpoR+Q8xES1sESBiWj8QWLhKPpJkdtdGn+Sw na2degEGVJb7MbgUxo5amF4CEXCnBTDLTaLMh6+SlJAPXbxkVufThd7ZhBQ935E0cXMV EpssqzZXc1SgbSrF1riJXjYUA1HKVPt0PiJcgCYHaUyjEVMJP67RWX/nQlJm/KciuQ2t zQCphHtrukyP194bdG8DhOuOdURbV82d2W/Fbk4jXr3y1KmatG1S9dh4ddm9oMzABrWL Hq/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HRZYZDKD; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4si9362537pls.76.2019.04.08.11.55.09; Mon, 08 Apr 2019 11:55:25 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=HRZYZDKD; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728953AbfDHSI2 (ORCPT + 99 others); Mon, 8 Apr 2019 14:08:28 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42284 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725983AbfDHSI2 (ORCPT ); Mon, 8 Apr 2019 14:08:28 -0400 Received: by mail-pl1-f196.google.com with SMTP id cv12so7770981plb.9 for ; Mon, 08 Apr 2019 11:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6rooXMDx733C5jOZV0HDJGU0vPGbQdWxeSk9HuXBbx4=; b=HRZYZDKDfXK5tUiWAX/wWOVIZxw1yj3uaOhsMKPNlAYpnNEsZF0Ig+kBhxnHzgSOW8 vrsb8nkhq7HOd9Af/7DgR0F6e+Hlvq/qpLyNpLoG5PRnCLMpJyvG8SOHMrGzO8ozTSfz sbVSsk6WaoDPdf8Svi0kFukrWICk6bTEfKGjAvmlol//D3EuYmJ8UjSOakz2WDpHtsDw avxV0aAbT6s+9VvWICs3H4S7QEf9Xv36+d8Paa0Eo3rCOZ9pzZw6bbUQvuhloAFIs+uc ippaOtK9gz33mFuyz+xayvv91ZFzY5B+ct3UjuOXERl7LgCVp8SM75PAL174g08XGn0w Kn+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6rooXMDx733C5jOZV0HDJGU0vPGbQdWxeSk9HuXBbx4=; b=b37uewHM7rnr/9/Xe+J3BBpkWJNO6s+ic6LabcGjE0CzPLF7GZwlyw71/QGIiy6YE+ bf5VHRsj+fOOVBuDdMbtCWWKkaAreGXEPeEDAU37xwQ4JCnK0bOFZMp80dAYlzLxCzpT pLCOcRS7npxOwF8Qrr+k7EOOFKH5mngxDkXfSVcCmyg53vrGpuCFuGZ2G28MHUCxbwUz G3KofnX+fMDN+4BMsPCUT9tfiBYI87mqy4CcLafdTwq3UFZ+DnY/G3Yn34aE0HlQPbzn olMCrqNGXUbPYCcva5cbAjArkNbHKPgKjs/mz75DeiuzjxRPkMLmuQeH1L6/Nl4FiKBA GB6Q== X-Gm-Message-State: APjAAAWc/1ulUHOrYgHboHJvx+JADWEJDfKWtN963chlF/hCUEUfxPsN evfcgjf9215Uk3may2bNXjP32bbpf198/WJjcx5cbA== X-Received: by 2002:a17:902:7044:: with SMTP id h4mr31818040plt.274.1554746907239; Mon, 08 Apr 2019 11:08:27 -0700 (PDT) MIME-Version: 1.0 References: <20190407022558.65489-1-trong@android.com> In-Reply-To: <20190407022558.65489-1-trong@android.com> From: Nick Desaulniers Date: Mon, 8 Apr 2019 11:08:16 -0700 Message-ID: Subject: Re: [PATCH] module: add stub for within_module To: Tri Vo , Jessica Yu , Matthew Wilcox , Randy Dunlap Cc: Peter Oberparleiter , Andrew Morton , Greg Hackmann , Linux Memory Management List , kbuild-all@01.org, kbuild test robot , LKML , Petri Gynther Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 6, 2019 at 7:26 PM Tri Vo wrote: > > Provide a stub for within_module() when CONFIG_MODULES is not set. This > is needed to build CONFIG_GCOV_KERNEL. > > Fixes: 8c3d220cb6b5 ("gcov: clang support") The above commit got backed out of the -mm tree, due to the issue this patch addresses, so not sure it provides the correct context for the patch. Maybe that line in the commit message should be dropped? > Suggested-by: Matthew Wilcox > Reported-by: Randy Dunlap > Reported-by: kbuild test robot > Link: https://marc.info/?l=linux-mm&m=155384681109231&w=2 > Signed-off-by: Tri Vo > --- > include/linux/module.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/linux/module.h b/include/linux/module.h > index 5bf5dcd91009..47190ebb70bf 100644 > --- a/include/linux/module.h > +++ b/include/linux/module.h > @@ -709,6 +709,11 @@ static inline bool is_module_text_address(unsigned long addr) > return false; > } > > +static inline bool within_module(unsigned long addr, const struct module *mod) > +{ > + return false; > +} > + Do folks think that similar stubs for within_module_core and within_module_init should be added, while we're here? It looks like kernel/trace/ftrace.c uses them, but has proper CONFIG_MODULE guards. > /* Get/put a kernel symbol (calls should be symmetric) */ > #define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); }) > #define symbol_put(x) do { } while (0) > -- > 2.21.0.392.gf8f6787159e-goog > -- Thanks, ~Nick Desaulniers