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:	Tue, 14 Oct 2008 04:22:48 +0800
From:	sniper <s3c24xx@...il.com>
To:	"Neshama Parhoti" <pneshama@...il.com>
Cc:	"Randy Dunlap" <randy.dunlap@...cle.com>,
	"Adrian Bunk" <bunk@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: section mismatch with a platform driver

There are some examples in kernel as following:

static struct platform_driver my_platform_driver = {
       .probe          = my_probe_func,
       .remove         = __devexit_p(my_remove),
       .suspend        = my_suspend,
       .resume         = my_resume,
       .driver         = {
               .name = DRIVER_NAME,
       },
};


static int __devinit my_probe_func(struct platform_device *pdev)
{
       return 0;
}

note that my_platform_*driver*, it let this variable can refer to
init/exit sections.
You can find the explanation in /scripts/mod/modpost.c:

/* symbols in .data that may refer to init/exit sections */
static const char *symbol_white_list[] =
{
	"*driver",
	"*_template", /* scsi uses *_template a lot */
	"*_timer",    /* arm uses ops structures named _timer a lot */
	"*_sht",      /* scsi also used *_sht to some extent */
	"*_ops",
	"*_probe",
	"*_probe_one",
	"*_console",
	NULL
};


On Tue, Oct 14, 2008 at 2:58 AM, Neshama Parhoti <pneshama@...il.com> wrote:
> On Mon, Oct 13, 2008 at 6:31 PM, Randy Dunlap <randy.dunlap@...cle.com> wrote:
>>> Does that mean that all drivers with __init in their probe functions are bogus ?
>>
>> It depends.  If your platform doesn't support hotplug, then it's possible
>> that the probe function is only called during system init, so it would be OK.
>
> Hmm any idea then why did it give me a section mismatch warning ?
>
> Thanks!!
> --
> 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/
>
--
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