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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 08 Aug 2018 23:16:16 +1000
From:   Michael Ellerman <>
To:     Andrew Morton <>,
        Geert Uytterhoeven <>
Cc:     Linux Kernel Mailing List <>,
        Dan Williams <>,
        linuxppc-dev <>,
        "npiggin\" <>
Subject: Re: Build regressions/improvements in v4.17-rc1

Michael Ellerman <> writes:
> Andrew Morton <> writes:
>> On Mon, 6 Aug 2018 12:39:21 +0200 Geert Uytterhoeven <> wrote:
>>> CC Dan, Michael, AKPM, powerpc
>>> On Mon, Apr 16, 2018 at 3:10 PM Geert Uytterhoeven <> wrote:
>>> > Below is the list of build error/warning regressions/improvements in
>>> > v4.17-rc1[1] compared to v4.16[2].
>>> I'd like to point your attention to:
>>> >   + warning: vmlinux.o(.text+0x376518): Section mismatch in reference from the function .devm_memremap_pages() to the function .meminit.text:.arch_add_memory():  => N/A
>>> >   + warning: vmlinux.o(.text+0x376d64): Section mismatch in reference from the function .devm_memremap_pages_release() to the function .meminit.text:.arch_remove_memory():  => N/A
>> hm.  Dan isn't around at present so we're on our own with this one.
>> x86 doesn't put arch_add_memory and arch_remove_memory into __meminit. 
>> x86 does
>> int arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap,
>> 		bool want_memblock)
>> {
>> 	...
>> So I guess powerpc should do that as well?
> But we only recently added it to fix a section mismatch warning:
>   WARNING: vmlinux.o(.text+0x6da88): Section mismatch in reference from the function .arch_add_memory() to the function .meminit.text:.create_section_mapping()
>   The function .arch_add_memory() references
>   the function __meminit .create_section_mapping().
>   This is often because .arch_add_memory lacks a __meminit 
>   annotation or the annotation of .create_section_mapping is wrong.
> I think the problem is that the section mismatch logic isn't able to
> cope with __meminit's changing semantics.
> When CONFIG_MEMORY_HOTPLUG=y references from .text to .meminit.text
> should be allowed, because they're just folded in together in the linker
> script.
> When CONFIG_MEMORY_HOTPLUG=n references from .text to .meminit.text
> should NOT be allowed, because .meminit.text becomes .init.text and will
> be freed.
> I don't see anything in the section mismatch logic to cope with that
> difference.
> It looks like __meminit is saving us about 1K on powerpc, so I'm
> strongly inclined to just remove it entirely from arch/powerpc.

Gah that doesn't work.

Our arch routines call things in mm/ that are __meminit, so we have to
mark our code __meminit too, otherwise we get a section mismatch


Powered by blists - more mailing lists