diff mbox series

[v2] module: add stubs for within_module functions

Message ID 20190415181833.101222-1-trong@android.com (mailing list archive)
State New, archived
Headers show
Series [v2] module: add stubs for within_module functions | expand

Commit Message

Tri Vo April 15, 2019, 6:18 p.m. UTC
Provide stubs for within_module_core(), within_module_init(), and
within_module() to prevent build errors when !CONFIG_MODULES.

v2:
- Generalized commit message, as per Jessica.
- Stubs for within_module_core() and within_module_init(), as per Nick.

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 | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Jessica Yu April 16, 2019, 3:21 p.m. UTC | #1
+++ Tri Vo [15/04/19 11:18 -0700]:
>Provide stubs for within_module_core(), within_module_init(), and
>within_module() to prevent build errors when !CONFIG_MODULES.
>
>v2:
>- Generalized commit message, as per Jessica.
>- Stubs for within_module_core() and within_module_init(), as per Nick.
>
>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>

Applied, thanks!

Jessica
Tri Vo April 16, 2019, 5:55 p.m. UTC | #2
On Tue, Apr 16, 2019 at 8:21 AM Jessica Yu <jeyu@kernel.org> wrote:
>
> +++ Tri Vo [15/04/19 11:18 -0700]:
> >Provide stubs for within_module_core(), within_module_init(), and
> >within_module() to prevent build errors when !CONFIG_MODULES.
> >
> >v2:
> >- Generalized commit message, as per Jessica.
> >- Stubs for within_module_core() and within_module_init(), as per Nick.
> >
> >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>
>
> Applied, thanks!

Thank you!
Tri Vo April 16, 2019, 6:56 p.m. UTC | #3
On Tue, Apr 16, 2019 at 10:55 AM Tri Vo <trong@android.com> wrote:
>
> On Tue, Apr 16, 2019 at 8:21 AM Jessica Yu <jeyu@kernel.org> wrote:
> >
> > +++ Tri Vo [15/04/19 11:18 -0700]:
> > >Provide stubs for within_module_core(), within_module_init(), and
> > >within_module() to prevent build errors when !CONFIG_MODULES.
> > >
> > >v2:
> > >- Generalized commit message, as per Jessica.
> > >- Stubs for within_module_core() and within_module_init(), as per Nick.
> > >
> > >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>
> >
> > Applied, thanks!
>
> Thank you!

Andrew,
this patch fixes 8c3d220cb6b5 ("gcov: clang support"). Could you
re-apply the gcov patch? Sorry, if it's a dumb question. I'm not
familiar with how cross-tree patches are handled in Linux.
Andrew Morton April 16, 2019, 9:38 p.m. UTC | #4
On Tue, 16 Apr 2019 11:56:21 -0700 Tri Vo <trong@android.com> wrote:

> On Tue, Apr 16, 2019 at 10:55 AM Tri Vo <trong@android.com> wrote:
> >
> > On Tue, Apr 16, 2019 at 8:21 AM Jessica Yu <jeyu@kernel.org> wrote:
> > >
> > > +++ Tri Vo [15/04/19 11:18 -0700]:
> > > >Provide stubs for within_module_core(), within_module_init(), and
> > > >within_module() to prevent build errors when !CONFIG_MODULES.
> > > >
> > > >v2:
> > > >- Generalized commit message, as per Jessica.
> > > >- Stubs for within_module_core() and within_module_init(), as per Nick.
> > > >
> > > >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>
> > >
> > > Applied, thanks!
> >
> > Thank you!
> 
> Andrew,
> this patch fixes 8c3d220cb6b5 ("gcov: clang support"). Could you
> re-apply the gcov patch? Sorry, if it's a dumb question. I'm not
> familiar with how cross-tree patches are handled in Linux.

hm, I wonder what Jessica applied this patch to?

Please resend a new version of "gcov: clang support".
Jessica Yu April 17, 2019, 8:59 a.m. UTC | #5
+++ Andrew Morton [16/04/19 14:38 -0700]:
>On Tue, 16 Apr 2019 11:56:21 -0700 Tri Vo <trong@android.com> wrote:
>
>> On Tue, Apr 16, 2019 at 10:55 AM Tri Vo <trong@android.com> wrote:
>> >
>> > On Tue, Apr 16, 2019 at 8:21 AM Jessica Yu <jeyu@kernel.org> wrote:
>> > >
>> > > +++ Tri Vo [15/04/19 11:18 -0700]:
>> > > >Provide stubs for within_module_core(), within_module_init(), and
>> > > >within_module() to prevent build errors when !CONFIG_MODULES.
>> > > >
>> > > >v2:
>> > > >- Generalized commit message, as per Jessica.
>> > > >- Stubs for within_module_core() and within_module_init(), as per Nick.
>> > > >
>> > > >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>
>> > >
>> > > Applied, thanks!
>> >
>> > Thank you!
>>
>> Andrew,
>> this patch fixes 8c3d220cb6b5 ("gcov: clang support"). Could you
>> re-apply the gcov patch? Sorry, if it's a dumb question. I'm not
>> familiar with how cross-tree patches are handled in Linux.
>
>hm, I wonder what Jessica applied this patch to?

I applied the patch that supplies the missing within_module() stubs to
the modules-next branch (a link to the repo is available in
MAINTAINERS), it's landed in linux-next by now, and it should fix the
build error reported by the kbuild test bot.

Thanks,

Jessica
diff mbox series

Patch

diff --git a/include/linux/module.h b/include/linux/module.h
index 5bf5dcd91009..35d83765bfbd 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -709,6 +709,23 @@  static inline bool is_module_text_address(unsigned long addr)
 	return false;
 }
 
+static inline bool within_module_core(unsigned long addr,
+				      const struct module *mod)
+{
+	return false;
+}
+
+static inline bool within_module_init(unsigned long addr,
+				      const struct module *mod)
+{
+	return false;
+}
+
+static inline bool within_module(unsigned long addr, const struct module *mod)
+{
+	return false;
+}
+
 /* 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)