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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160901113522.GC18255@ulmo.ba.sec>
Date:   Thu, 1 Sep 2016 13:35:22 +0200
From:   Thierry Reding <thierry.reding@...il.com>
To:     Julia Lawall <Julia.Lawall@...6.fr>
Cc:     Alessandro Zummo <a.zummo@...ertech.it>,
        kernel-janitors@...r.kernel.org, linux-tegra@...r.kernel.org,
        Alexandre Courbot <gnurou@...il.com>,
        Stephen Warren <swarren@...dotorg.org>,
        Hans Ulli Kroll <ulli.kroll@...glemail.com>,
        Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
        linux-arm-kernel@...ts.infradead.org, rtc-linux@...glegroups.com,
        linux-kernel@...r.kernel.org, Wan ZongShun <mcuos.com@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Eddie Huang <eddie.huang@...iatek.com>,
        linux-mediatek@...ts.infradead.org,
        Baruch Siach <baruch@...s.co.il>
Subject: Re: [PATCH] rtc: constify rtc_class_ops structures

On Wed, Aug 31, 2016 at 10:05:25AM +0200, Julia Lawall wrote:
> Check for rtc_class_ops structures that are only passed to
> devm_rtc_device_register, rtc_device_register,
> platform_device_register_data, all of which declare the corresponding
> parameter as const.  Declare rtc_class_ops structures that have these
> properties as const.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct rtc_class_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> expression e1,e2,e3,e4;
> position p;
> @@
> (
> devm_rtc_device_register(e1,e2,&i@p,e3)
> |
> rtc_device_register(e1,e2,&i@p,e3)
> |
> platform_device_register_data(e1,e2,e3,&i@p,e4)
> )
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> @@
> i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct rtc_class_ops i = { ... };
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr>
[...]
>  drivers/rtc/rtc-tegra.c      |    2 +-
[...]

Acked-by: Thierry Reding <treding@...dia.com>

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ