public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* missing .data.shared_align placement in vmlinux
@ 2010-05-21 20:58 Mike Frysinger
  2010-08-04 11:56 ` Sam Ravnborg
  2010-10-18  6:27 ` [PATCH] vmlinux.lds.h: gather .data..shared_aligned sections in DATA_DATA Mike Frysinger
  0 siblings, 2 replies; 11+ messages in thread
From: Mike Frysinger @ 2010-05-21 20:58 UTC (permalink / raw)
  To: Linux kernel mailing list, Rusty Russell, Alan Jenkins

am i missing something or does the .data.shared_align section lack
definition in vmlinux.lds.h and all arch vmlinux.lds.S files ?

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:
  [ 8] .data             PROGBITS        ffffffff810ec000 2ec000
0303a8 00  WA  0   0 4096
  [ 9] .data.shared_alig PROGBITS        ffffffff8111c3c0 31c3c0
0000c8 00  WA  0   0 64

the ifdef forest in asm-generic/percpu.h is beyond a quick glance &
fix, so i leave it up to someone else ;)
-mike

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-10-18 15:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-21 20:58 missing .data.shared_align placement in vmlinux Mike Frysinger
2010-08-04 11:56 ` Sam Ravnborg
2010-08-04 18:12   ` Mike Frysinger
2010-08-04 20:28     ` Sam Ravnborg
2010-08-04 20:40       ` Sam Ravnborg
2010-08-05  5:14         ` Jeremy Fitzhardinge
2010-08-26  7:19           ` Mike Frysinger
2010-08-28  6:00         ` Mike Frysinger
2010-10-18  6:27 ` [PATCH] vmlinux.lds.h: gather .data..shared_aligned sections in DATA_DATA Mike Frysinger
2010-10-18  6:30   ` Mike Frysinger
2010-10-18 15:32     ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox