lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 6 Jan 2016 08:57:56 +0800 From: Chen Gang <chengang@...ndsoft.com.cn> To: Andrew Morton <akpm@...ux-foundation.org> Cc: will.deacon@....com, tangchen@...fujitsu.com, kuleshovmail@...il.com, tony.luck@...el.com, vladimir.murzin@....com, baiyaowei@...s.chinamobile.com, holt@....com, ard.biesheuvel@...aro.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH] include/linux/memblock.h: Use __init_memblock for movable_node_is_enabled OK, thanks. And I shall try to send another patches for mm within this month. On 2016年01月06日 06:35, Andrew Morton wrote: > On Wed, 6 Jan 2016 06:25:56 +0800 chengang@...ndsoft.com.cn wrote: > >> The related warning: >> >> LD mm/built-in.o >> WARNING: mm/built-in.o(.text.unlikely+0x155d): Section mismatch in reference from the function movable_node_is_enabled() to the variable .meminit.data:movable_node_enabled >> The function movable_node_is_enabled() references >> the variable __meminitdata movable_node_enabled. >> This is often because movable_node_is_enabled lacks a __meminitdata >> annotation or the annotation of movable_node_enabled is wrong. > > Thanks. Kirill just sent (almost) the same patch: > > > > From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com> > Subject: memblock: fix section mismatch > > allmodconfig produces following warning for me: > > WARNING: vmlinux.o(.text.unlikely+0x10314): Section mismatch in reference from the function movable_node_is_enabled() to the variable .meminit.data:movable_node_enabled > The function movable_node_is_enabled() references > the variable __meminitdata movable_node_enabled. > This is often because movable_node_is_enabled lacks a __meminitdata > annotation or the annotation of movable_node_enabled is wrong. > > Let's mark the function with __meminit. It fixes the warning. > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com> > Signed-off-by: Andrew Morton <akpm@...ux-foundation.org> > --- > > include/linux/memblock.h | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff -puN include/linux/memblock.h~memblock-fix-section-mismatch include/linux/memblock.h > --- a/include/linux/memblock.h~memblock-fix-section-mismatch > +++ a/include/linux/memblock.h > @@ -60,6 +60,14 @@ extern int memblock_debug; > extern bool movable_node_enabled; > #endif /* CONFIG_MOVABLE_NODE */ > > +#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK > +#define __init_memblock __meminit > +#define __initdata_memblock __meminitdata > +#else > +#define __init_memblock > +#define __initdata_memblock > +#endif > + > #define memblock_dbg(fmt, ...) \ > if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) > > @@ -164,7 +172,7 @@ static inline bool memblock_is_hotplugga > return m->flags & MEMBLOCK_HOTPLUG; > } > > -static inline bool movable_node_is_enabled(void) > +static inline bool __init_memblock movable_node_is_enabled(void) > { > return movable_node_enabled; > } > @@ -397,14 +405,6 @@ static inline unsigned long memblock_reg > for (idx = 0; idx < memblock_type->cnt; \ > idx++,rgn = &memblock_type->regions[idx]) > > -#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK > -#define __init_memblock __meminit > -#define __initdata_memblock __meminitdata > -#else > -#define __init_memblock > -#define __initdata_memblock > -#endif > - > #ifdef CONFIG_MEMTEST > extern void early_memtest(phys_addr_t start, phys_addr_t end); > #else > _ > > -- Chen Gang (陈刚) Open, share, and attitude like air, water, and life which God blessed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists