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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Feb 2016 15:01:55 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Russell King <linux@....linux.org.uk>
Cc:	linux-arm-kernel@...ts.infradead.org,
	Arnd Bergmann <arnd@...db.de>,
	Ard Biesheuvel <ard.biesheuvel@...aro.org>,
	Nicolas Pitre <nico@...aro.org>,
	Jon Medhurst <tixy@...aro.org>,
	Marc Zyngier <marc.zyngier@....com>,
	Kees Cook <keescook@...omium.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Laura Abbott <labbott@...hat.com>, linux-kernel@...r.kernel.org
Subject: [PATCH 3/9] ARM: make free_memmap as __init

free_memmap is an inline function, but gcc may choose to ignore that
when CONFIG_OPTIMIZE_INLINING is set. In that case it is put in the
.text section, causing a kbuild warning:

WARNING: vmlinux.o(.text.unlikely+0x1a0): Section mismatch in reference from the function free_memmap() to the function .init.text:__memblock_free_early()
The function free_memmap() references
the function __init __memblock_free_early().
This is often because free_memmap lacks a __init
annotation or the annotation of __memblock_free_early is wrong.

FATAL: modpost: Section mismatches detected.
Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.

This marks the function both inline and __init, which is a
correct annotation and avoids the problem.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 arch/arm/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 370581aeb871..a4db267c35b2 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -330,7 +330,7 @@ static inline void poison_init_mem(void *s, size_t count)
 		*p++ = 0xe7fddef0;
 }
 
-static inline void
+static inline void __init
 free_memmap(unsigned long start_pfn, unsigned long end_pfn)
 {
 	struct page *start_pg, *end_pg;
-- 
2.7.0

Powered by blists - more mailing lists