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] [day] [month] [year] [list]
Date:	Sat, 23 Jun 2007 18:57:14 +0530
From:	"Satyam Sharma" <satyam.sharma@...il.com>
To:	"Adrian McMenamin" <adrian@...golddream.dyndns.info>
Cc:	linux-sh <linuxsh-dev@...ts.sourceforge.net>,
	LKML <linux-kernel@...r.kernel.org>,
	"Paul Mundt" <lethal@...ux-sh.org>,
	"Sam Ravnborg" <sam@...nborg.org>
Subject: Re: Problems with -rc5 afterall on Dreamcast

Hi Adrian,

On 6/23/07, Adrian McMenamin <adrian@...golddream.dyndns.info> wrote:
> Previously it had compiled and built cleanly, but when I added in the
> sound driver I got this:
>
>   MODPOST vmlinux
> WARNING: arch/sh/boards/dreamcast/built-in.o(.data+0x0): Section
> mismatch: reference to .init.text: (between 'mv_dreamcast' and
> 'systemasic_int')

Ok, this one looks to have come from
2c7834a6f15fe6c50ed4766f1bb6f9183b9e2740

Basically, when !SH_GENERIC && !SH_UNKNOWN,
__initmv == (nothing), so the machine vectors will go to .data section.

But all the corresponding .mv_setup members of the sh_machine_vector
are setup to point to functions that are marked __init unconditionally,
which causes these reference warnings. Marking  the corresponding
.mv_setup functions as __initmv too would silence these (bogus)
warnings, but Paul must confirm if this is desirable and correct
(basically can it make sense to put *functions* into the .machvec.init
section too)?

Similar cases in:
-> arch/sh/boards/dreamcast/setup.c:dreamcast_setup()
-> arch/sh/boards/hp6xx/setup.c:hp6xx_setup()
-> arch/sh/boards/landisk/setup.c:landisk_setup()
-> arch/sh/boards/mpc1211/setup.c:mpc1211_setup()
-> arch/sh/boards/renesas/hs7751rvoip/setup.c:hs7751rvoip_setup()
-> arch/sh/boards/renesas/r7780rp/setup.c:highlander_setup()
-> arch/sh/boards/renesas/rts7751r2d/setup.c:rts7751r2d_setup()
-> arch/sh/boards/se/7343/setup.c:sh7343se_setup()
-> arch/sh/boards/se/770x/setup.c:smsc_setup()
-> arch/sh/boards/se/7722/setup.c:se7722_setup()
-> arch/sh/boards/se/7780/setup.c:se7780_setup()
-> arch/sh/boards/sh03/setup.c:sh03_setup()
-> arch/sh/boards/snapgear/setup.c:snapgear_setup()
-> arch/sh/boards/superh/microdev/setup.c:microdev_setup()

[ I didn't find these changes in Paul's latest sh-2.6(.22) tree,
but looks like the 2.6.23 dev tree is getting rid of ALIAS_MV.
But I suspect the (__initmv when !GENERIC && !UNKNOWN) .data ->
.init.text (__init) references being warned about here would still exist
there. ]

Janitorial patch attached resolves these bogus warnings by marking
the functions as __initmv too, but if this is wrong, feel free to NAK
it (and also suggest the correct solution :-)

---

sh_machine_vector structs in arch/sh/boards/ are marked __initmv
so that they go to the .machvec.init section (during setup_arch, all
but one would be discarded away) when SH_GENERIC || SH_UNKNOWN.

However, when !SH_GENERIC && !SH_UNKNOWN, __initmv is not
defined so these machine vector structures go to the .data section.

The .mv_setup member points to the setup function that is only ever
called during boot time, and hence the corresponding functions are
marked __init. But this causes modpost to (bogusly) warn about the
.data -> .init.text references during kernel build, thusly:

MODPOST vmlinux
WARNING: arch/sh/boards/dreamcast/built-in.o(.data+0x0): Section
mismatch: reference to .init.text: (between 'mv_dreamcast' and
'systemasic_int')

So, mark the setup functions as __initmv too, to get rid of these
bogus warnings.

Signed-off-by: Satyam Sharma <satyam.sharma@...il.com>

---

 arch/sh/boards/dreamcast/setup.c           |    2 +-
 arch/sh/boards/hp6xx/setup.c               |    2 +-
 arch/sh/boards/landisk/setup.c             |    2 +-
 arch/sh/boards/mpc1211/setup.c             |    2 +-
 arch/sh/boards/renesas/hs7751rvoip/setup.c |    2 +-
 arch/sh/boards/renesas/r7780rp/setup.c     |    2 +-
 arch/sh/boards/renesas/rts7751r2d/setup.c  |    2 +-
 arch/sh/boards/se/7343/setup.c             |    2 +-
 arch/sh/boards/se/770x/setup.c             |    4 ++--
 arch/sh/boards/se/7722/setup.c             |    2 +-
 arch/sh/boards/se/7780/setup.c             |    2 +-
 arch/sh/boards/sh03/setup.c                |    2 +-
 arch/sh/boards/snapgear/setup.c            |    2 +-
 arch/sh/boards/superh/microdev/setup.c     |    2 +-
 14 files changed, 15 insertions(+), 15 deletions(-)

View attachment "sh-__init-to-__initmv.patch" of type "text/x-patch" (7351 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ