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] [day] [month] [year] [list]
Date:   Tue, 22 May 2018 23:22:45 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Julia Lawall <Julia.Lawall@...6.fr>
Cc:     kernel-janitors@...r.kernel.org,
        Gilles Muller <Gilles.Muller@...6.fr>,
        Nicolas Palix <nicolas.palix@...g.fr>,
        Michal Marek <michal.lkml@...kovi.net>, cocci@...teme.lip6.fr,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] coccinelle: mini_lock: improve performance

2018-05-21 15:58 GMT+09:00 Julia Lawall <Julia.Lawall@...6.fr>:
> Replace <+... ...+> by ... when any.  <+... ...+> is slow, and in some
> obscure cases involving backward jumps it doesn't force the unlock to
> actually come after the end of the if.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr>
>
> ---

Applied to linux-kbuild. Thanks!

>  scripts/coccinelle/locks/mini_lock.cocci |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/coccinelle/locks/mini_lock.cocci b/scripts/coccinelle/locks/mini_lock.cocci
> index 47f649b..19c6ee5 100644
> --- a/scripts/coccinelle/locks/mini_lock.cocci
> +++ b/scripts/coccinelle/locks/mini_lock.cocci
> @@ -67,12 +67,14 @@ identifier lock,unlock;
>  @@
>
>  *lock(E1@p,...);
> -<+... when != E1
> +... when != E1
> +    when any
>  if (...) {
>    ... when != E1
>  *  return@r ...;
>  }
> -...+>
> +... when != E1
> +    when any
>  *unlock@up(E1,...);
>
>  @script:python depends on org@
>



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ