linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jessica Yu <jeyu@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Tri Vo <trong@android.com>, Matthew Wilcox <willy@infradead.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Peter Oberparleiter <oberpar@linux.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Greg Hackmann <ghackmann@android.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	kbuild-all@01.org, kbuild test robot <lkp@intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Petri Gynther <pgynther@google.com>
Subject: Re: [PATCH] module: add stub for within_module
Date: Mon, 15 Apr 2019 16:22:29 +0200	[thread overview]
Message-ID: <20190415142229.GA14330@linux-8ccs> (raw)
In-Reply-To: <CAKwvOdmBa-Ckk4wnp4OEPNdxeYSxEhzddykuWWGG1Wi6JEGDwA@mail.gmail.com>

+++ Nick Desaulniers [08/04/19 11:08 -0700]:
>On Sat, Apr 6, 2019 at 7:26 PM Tri Vo <trong@android.com> 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?

Yeah, if the commit is no longer valid, then we should drop this line
and perhaps generalize the commit message more, maybe something like
"provide a stub for within_module() to prevent build errors when 
!CONFIG_MODULES".

>> Suggested-by: Matthew Wilcox <willy@infradead.org>
>> Reported-by: Randy Dunlap <rdunlap@infradead.org>
>> Reported-by: kbuild test robot <lkp@intel.com>
>> Link: https://marc.info/?l=linux-mm&m=155384681109231&w=2
>> Signed-off-by: Tri Vo <trong@android.com>
>> ---
>>  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.

Tri, if you plan on sending a v2, could you add Nick's suggestion
above? Would probably be good to prevent future build errors if a user
omits CONFIG_MODULE guards.

Thanks,

Jessica


  parent reply	other threads:[~2019-04-15 14:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-07  2:25 [PATCH] module: add stub for within_module Tri Vo
2019-04-08 18:08 ` Nick Desaulniers
2019-04-08 18:11   ` Nick Desaulniers
2019-04-15 14:22   ` Jessica Yu [this message]
2019-04-15 18:18     ` [PATCH v2] module: add stubs for within_module functions Tri Vo
2019-04-16 15:21       ` Jessica Yu
2019-04-16 17:55         ` Tri Vo
2019-04-16 18:56           ` Tri Vo
2019-04-16 21:38             ` Andrew Morton
2019-04-17  8:59               ` Jessica Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190415142229.GA14330@linux-8ccs \
    --to=jeyu@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ghackmann@android.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=ndesaulniers@google.com \
    --cc=oberpar@linux.ibm.com \
    --cc=pgynther@google.com \
    --cc=rdunlap@infradead.org \
    --cc=trong@android.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).