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: <20080110111918.42e4fa0b.randy.dunlap@oracle.com>
Date:	Thu, 10 Jan 2008 11:19:18 -0800
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	lkml <linux-kernel@...r.kernel.org>
Cc:	Sam Ravnborg <sam@...nborg.org>
Subject: Re: Help needed to fix section mismatch warnings

On Wed, 9 Jan 2008 22:25:42 -0800 Randy Dunlap wrote:

> On Sun, 6 Jan 2008 15:07:28 +0100 Sam Ravnborg wrote:
> 
> 
> > This is the current list of warnings
> 
> Sam,
> 
> Several of these are due to driver variable names not matching
> the whitelisted names in modpost.  I have patches for the ones
> that I have identified so far.  And I have patches for a few of
> the others that are true section mismatch problems (total of 8
> patches ready for now).
> 
> The whitelisted names will always be a (small) problem.
> Can __init_refok be used in these cases.. or some other new
> attribute, instead of forever adding to the whitelist or
> modifying variable names?

Sam (or anyone :),

I guess that I'm a little confused.  Instead of changing
variable names to match the modpost whitelist, I tested adding
__init_refok or __initdata_refok to these (driver) structs that
generated the modpost warnings.

Example:  drivers/char/tpm/tpm_infineon.c

--- linux-2.6.24-rc7-git1.orig/drivers/char/tpm/tpm_infineon.c
+++ linux-2.6.24-rc7-git1/drivers/char/tpm/tpm_infineon.c
@@ -611,7 +611,7 @@ static __devexit void tpm_inf_pnp_remove
 	}
 }
 
-static struct pnp_driver tpm_inf_pnp = {
+static struct pnp_driver __init_refok tpm_inf_pnp = {
 	.name = "tpm_inf_pnp",
 	.driver = {
 		.owner = THIS_MODULE,

This has a build warning with my toolchain:

  CC      drivers/char/tpm/tpm_infineon.o
linux-2.6.24-rc7-git1/drivers/char/tpm/tpm_infineon.c:614: warning: 'noinline' attribute ignored
{standard input}: Assembler messages:
{standard input}:2315: Warning: setting incorrect section attributes for .text.init.refok

but otherwise no section mismatch warning.

OTOH, using __initdata_refok has no build warning and no section
mismatch warning... but it (__initdata_refok) doesn't make sense
to me.  Should it (make sense/be used)?
Is there a __refok that should be used here, instead of having
to modify variable names?


> > WARNING: vmlinux.o(.data+0x7e9b8): Section mismatch: reference to .init.text:tpm_inf_pnp_probe (between 'tpm_inf_pnp' and 'cn_idx')

Thanks,
---
~Randy
--
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