[an error occurred while processing this directive]
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: <6faae122-fddb-34cb-68fc-5f4b62d7e16@inria.fr>
Date: Thu, 30 Oct 2025 11:32:01 +0100 (CET)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Markus Elfring <Markus.Elfring@....de>
cc: cocci@...ia.fr, LKML <linux-kernel@...r.kernel.org>, 
    kernel-janitors@...r.kernel.org, Miaoqian Lin <linmq006@...il.com>
Subject: Re: [cocci] [RFC] Increasing usage of direct pointer assignments
 from memcpy() calls with SmPL?



On Thu, 30 Oct 2025, Markus Elfring wrote:

> …> I think you would get a more satisfactory result by just removing all of
> > the code and adding it back. Then Coccinelle would take charge of laying
> > out the whole thing.
> …
>
> See also once more:
>
> >> Another SmPL script example might become helpful.
> >>
> >> @replacement2@
> >> expression object, size, source, target;
> >> @@
> >>  target =
> >> -         object; memcpy(target, source, size)
> >> +         memcpy(object, source, size)
> >>  ;

I said to remove everything.  target = also.

julia

> >>
> >>
> >> Markus_Elfring@...ne:…/Projekte/Linux/next-analyses> time /usr/bin/spatch --max-width 100 --no-loops …/Projekte/Coccinelle/janitor/use_memcpy_assignment2.cocci arch/arm64/kvm/arm.c
> …>> real    0m0,626s
> >> user    0m0,588s
> >> sys     0m0,037s
>
>
> Regards,
> Markus
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ