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: <alpine.DEB.2.21.1907250856450.2555@hadrien>
Date:   Thu, 25 Jul 2019 08:58:58 -0500 (CDT)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Joe Perches <joe@...ches.com>
cc:     David Laight <David.Laight@...LAB.COM>,
        cocci <cocci@...teme.lip6.fr>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [Fwd: [PATCH 1/2] string: Add stracpy and stracpy_pad
 mechanisms]



On Thu, 25 Jul 2019, Joe Perches wrote:

> On Wed, 2019-07-24 at 20:42 -0500, Julia Lawall wrote:
> > New version.  I check for non-use of the return value of strlcpy and
> > address some issues that affected the matching of the case where the first
> > argument involves a pointer dereference.  Actually, an isomorphism now
> > takes care of that case, so it doesn't show up in the semantic patch
> > explicitly any more.
> >
> > julia
>
> Nice x 2, thanks again.

Not quite nice due to the ignoring of rule 2 noticed by Markus.  There is
actually currently no guarantee that the size is right.  I'm testing a new
version.

>
> More comments:
>
> @@
> identifier f,i2,i1;
> struct i1 e1;
> expression e2;
> local idexpression x;
> position r.p;
> @@
> (
> -x = strlcpy
> +stracpy
>   (e1.f, e2
> -    , i2
>   )@p;
>   ... when != x
>
> Just for completeness and correctness, as I at
> least don't find an existing use:
>
> Perhaps this "x =" should also include += and +
> and the various other operators that are possible
> or does SmPL grammar already do that?

I could do this.  One might though think that if someone went to the
trouble of computing +=, these would be cases that we don't want to
change?  Still, it's not problem to add all assignment operators.

> Also, it might be nice to include the trivial
> conversion with sizeof(e1) and ARRAY_SIZE(e1)
> so a single script could be run over the kernel.

Sure, I'll do that when all this is working.  I didn't want those results
to drown out these ones.

thanks,
julia

>
> I'll see about adding that and try it myself
> so an automated conversion should be possible.
>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ