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]
Date:	Fri, 10 Oct 2014 09:54:16 +0200 (CEST)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Wolfram Sang <wsa@...-dreams.de>
cc:	linux-kernel@...r.kernel.org, Greg KH <gregkh@...uxfoundation.org>,
	kernel-janitors@...r.kernel.org, cocci@...teme.lip6.fr,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [Cocci] [RFC] drop owner assignment from platform_drivers

> @match1@
> declarer name module_platform_driver;
> declarer name module_platform_driver_probe;
> identifier __driver;
> @@
> (
> 	module_platform_driver(__driver);
> |
> 	module_platform_driver_probe(__driver, ...);
> )
>
> @fix1 depends on match1@
> identifier match1.__driver;
> @@
> 	static struct platform_driver __driver = {
> 		.driver = {
> -			.owner = THIS_MODULE,
> 		}
> 	};
>
> @match2@
> identifier __driver;
> @@
> (
> 	platform_driver_register(&__driver)
> |
> 	platform_driver_probe(&__driver, ...)
> |
> 	platform_create_bundle(&__driver, ...)
> )
>
> @fix2 depends on match2@
> identifier match2.__driver;
> @@
> 	static struct platform_driver __driver = {
> 		.driver = {
> -			.owner = THIS_MODULE,
> 		}
> 	};

The semantic patch looks fine.  I'm a little surprised that it doesn't
complain about the lack of a comma after

.driver = { .owner = THIS_MODULE, }

but it seems that it does not.

If you think that it would be useful to have this in the Linux kernel, so
people don't add the owner initializer back in the future, you can try

coccinelle/tools/sgen/sgen

(run make in the coccinelle/tools/sgen directory).  That will guide you
through the process of making a Linux-ready semantic patch.  Feedback
would be appreciated.

julia
--
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