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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1287383251-28427-1-git-send-email-vapier@gentoo.org>
Date:	Mon, 18 Oct 2010 02:27:31 -0400
From:	Mike Frysinger <vapier@...too.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, Sam Ravnborg <sam@...nborg.org>,
	Jeremy Fitzhardinge <jeremy@...source.com>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Alan Jenkins <alan-jenkins@...fmail.co.uk>
Subject: [PATCH] vmlinux.lds.h: gather .data..shared_aligned sections in DATA_DATA

With the recent change "net: remove time limit in process_backlog()",
the softnet_data variable changed from "DEFINE_PER_CPU()" to
"DEFINE_PER_CPU_ALIGNED()" which moved it from the .data section to
the .data.shared_align section.  I'm not saying this patch is wrong,
just that is what caused me to notice this larger problem.  No one
else in the kernel is using this aligned macro variant, so I imagine
that's why no one has noticed yet.

Since .data.shared_align isnt declared in any vmlinux files that I can
see, the linker just places it last.  This "just works" for most
people, but when building a ROM kernel on Blackfin systems, it causes
section overlap errors:
bfin-uclinux-ld.real:
	section .init.data [00000000202e06b8 -> 00000000202e48b7] overlaps
	section .data.shared_aligned [00000000202e06b8 -> 00000000202e0723]
I imagine other arches which support the ROM config option and thus do
funky placement would see similar issues ...

On x86, it is stuck in a dedicated section at the end:
 [8] .data             PROGBITS ffffffff810ec000 2ec0000303a8 00 WA 0 0 4096
 [9] .data.shared_alig PROGBITS ffffffff8111c3c0 31c3c00000c8 00 WA 0 0 64

So mark sure we include this section in the DATA_DATA macro so that
it is placed in the right location.

Signed-off-by: Mike Frysinger <vapier@...too.org>
---
note: this was reported back in May, patch posted in Aug, and no feedback since

 include/asm-generic/vmlinux.lds.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 7657a3b..75b6b58 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -150,6 +150,7 @@
 #define DATA_DATA							\
 	*(.data)							\
 	*(.ref.data)							\
+	*(.data..shared_aligned) /* percpu related */			\
 	DEV_KEEP(init.data)						\
 	DEV_KEEP(exit.data)						\
 	CPU_KEEP(init.data)						\
-- 
1.7.3.1

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ