anthraxx / linux-hardened

Minimal supplement to upstream Kernel Self Protection Project changes. Features already provided by SELinux + Yama and archs other than multiarch arm64 / x86_64 aren't in scope. Only tags have stable history. Shared IRC channel with KSPP: irc.libera.chat #linux-hardening
Other
567 stars 56 forks source link

Section mismatch with extra_latent_entropy in v5.1 #7

Closed tsautereau-anssi closed 5 years ago

tsautereau-anssi commented 5 years ago

extra_latent_entropy is marked __meminitdata. Following commit a9cd410a3d29 ("mm/page_alloc.c: memory hotplug: free pages as higher order") in v5.1, static void __init __free_pages_boot_core() was changed into void __free_pages_core(), causing the following section mismatch warning at compile time:

WARNING: vmlinux.o(.text+0x180fe4): Section mismatch in reference from the function __free_pages_core() to the variable .meminit.data:extra_latent_entropy
The function __free_pages_core() references
the variable __meminitdata extra_latent_entropy.
This is often because __free_pages_core lacks a __meminitdata
annotation or the annotation of extra_latent_entropy is wrong.
anthraxx commented 5 years ago

Fixed by bcea61f1ed691c9ab26ce9f73e047ac18c38e4a4