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]
Message-ID: <1477471663-2628-1-git-send-email-marcin.nowakowski@imgtec.com>
Date:   Wed, 26 Oct 2016 10:47:43 +0200
From:   Marcin Nowakowski <marcin.nowakowski@...tec.com>
To:     <linux-kernel@...r.kernel.org>
CC:     <npiggin@...il.com>, <mmarek@...e.com>,
        Marcin Nowakowski <marcin.nowakowski@...tec.com>
Subject: [PATCH] kbuild: protect compiled-in dtb from dead data elimination

DTBs are compiled into byte arrays that are placed inside
.dtb.init.rodata section. As they are never referenced directly from the
code, they get removed during dead data elimination and we end up with
__dtb_start == __dtb_end.

Signed-off-by: Marcin Nowakowski <marcin.nowakowski@...tec.com>
Fixes: b67067f1176d ("kbuild: allow archs to select link dead code/data elimination"
---
 include/asm-generic/vmlinux.lds.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index abe79e3..ad5d0bb 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -193,7 +193,7 @@
 #define KERNEL_DTB()							\
 	STRUCT_ALIGN();							\
 	VMLINUX_SYMBOL(__dtb_start) = .;				\
-	*(.dtb.init.rodata)						\
+	KEEP(*(.dtb.init.rodata))					\
 	VMLINUX_SYMBOL(__dtb_end) = .;
 
 /*
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ