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: <e54a6e57-6bde-f489-f06f-fed9537688df@inria.fr>
Date: Wed, 29 Oct 2025 22:24: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 Wed, 29 Oct 2025, Markus Elfring wrote:

> Hello,
>
> I got into the mood to try another simple source code transformation out which
> can be achieved also by the means of the semantic patch language.
>
> @replacement@
> expression object, size, source, target;
> @@
>  target =
> -         object;
>  memcpy(
> -       target
> +       object
>         , source,
>         size);
>
>
> Test result (according to the software combination “Coccinelle 1.3.0”):
> Markus_Elfring@...ne:…/Projekte/Linux/next-analyses> time /usr/bin/spatch --max-width 100 --timeout 23 -j4 --chunksize 1 --no-loops -dir . …/Projekte/Coccinelle/janitor/use_memcpy_assignment.cocci > …/Projekte/Bau/Linux/scripts/Coccinelle/use_memcpy_assignment-no_loops-20251029.diff 2> …/Projekte/Bau/Linux/scripts/Coccinelle/use_memcpy_assignment-no_loops-errors-20251029.txt
> real    5m35,579s
> user    20m20,037s
> sys     0m14,467s
>
>
> It can be determined then from the generated diff file that mentioned
> implementation details can be transformed in 304 source files at the moment.
> Thus I became curious if it would be supported to adjust any places there
> according to (Linux) coding style preferences.

If you have a concern, you have to say what it is.  It doesn't seem it is
about the running time, so why do you include that information?

I should not have to repeat your experiment to figure out what you are
asking about.

julia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ