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-next>] [day] [month] [year] [list]
Date:	Sat, 9 May 2009 18:13:13 +0200 (CEST)
From:	Guennadi Liakhovetski <g.liakhovetski@....de>
To:	Mauro Carvalho Chehab <mchehab@...radead.org>
cc:	Linux Media Mailing List <linux-media@...r.kernel.org>,
	linux-kernel@...r.kernel.org, sam@...nborg.org,
	linux-kbuild@...r.kernel.org
Subject: dubious section mismatch test (was Re: [PULL] soc-camera: one commit
 as v4l2-dev preparation)

On Sat, 9 May 2009, Mauro Carvalho Chehab wrote:

> WARNING: /home/v4l/master/v4l/soc_camera.o(.data+0x0): Section mismatch in reference from the variable soc_camera_pdrv to the function .devinit.text:soc_camera_pdrv_probe()
> The variable soc_camera_pdrv references
> the function __devinit soc_camera_pdrv_probe()
> If the reference is valid then annotate the
> variable with __init* (see linux/init.h) or name the variable:
> *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, 
> 
> WARNING: /home/v4l/master/v4l/soc_camera.o(.data+0x8): Section mismatch in reference from the variable soc_camera_pdrv to the function .devexit.text:soc_camera_pdrv_remove()
> The variable soc_camera_pdrv references
> the function __devexit soc_camera_pdrv_remove()
> If the reference is valid then annotate the
> variable with __exit* (see linux/init.h) or name the variable:
> *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, 

FWIW, I find this test dubious. Matching on symbol names doesn't seem like 
a good idea to me. Can we introduce a new marker instead something like

static struct whatever_driver __driver driver = {
	.probe	= my_probe,
	.remove	= __exit_p(my_remove),
};

to put them in a new special section? Or is there a better solution?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
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