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:   Thu, 14 Jul 2022 19:39:43 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...ia.fr>
To:     Steven Rostedt <rostedt@...dmis.org>
cc:     LKML <linux-kernel@...r.kernel.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Michal Marek <mmarek@...e.cz>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] coccinelle: Remove script that checks replacing 0/1 with
 false/true in functions returning bool



On Mon, 11 Jul 2022, Steven Rostedt wrote:

> From: "Steven Rostedt (Google)" <rostedt@...dmis.org>
>
> There is nothing wrong with current code that returns 0 or 1 for a
> function returning bool. It is perfectly acceptable by the C standard.
>
> To avoid churn of unwanted patches that are constantly sent to maintainers
> who do not care about this change, remove the script that flags it as an
> issue. This issue is not worth the burden on maintainers to accept
> useless patches.

Applied.

julia

>
> Link: https://lore.kernel.org/all/20220705073822.7276-1-jiapeng.chong@linux.alibaba.com/
> Link: https://lore.kernel.org/all/20220429075201.68581-1-jiapeng.chong@linux.alibaba.com/
> Link: https://lore.kernel.org/all/1649236467-29390-1-git-send-email-baihaowen@meizu.com/
> Link: https://lore.kernel.org/all/20220317014740.3138-1-jiapeng.chong@linux.alibaba.com/
> Link: https://lore.kernel.org/all/190b5c2f2f2fb9cc775fce8daed72bf893be48a4.1642065293.git.davidcomponentone@gmail.com/
> Link: https://lore.kernel.org/all/20211214113845.439392-1-deng.changcheng@zte.com.cn/
> Link: https://lore.kernel.org/all/20210824065735.60660-1-deng.changcheng@zte.com.cn/
> Link: https://lore.kernel.org/all/20210824064305.60081-1-deng.changcheng@zte.com.cn/
> Link: https://lore.kernel.org/all/20210824062359.59474-1-deng.changcheng@zte.com.cn/
>
> Cc: Rasmus Villemoes <linux@...musvillemoes.dk>
> Cc: Julia Lawall <Julia.Lawall@...6.fr>
> Cc: Michal Marek <mmarek@...e.cz>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> ---
>  scripts/coccinelle/misc/boolreturn.cocci | 59 ------------------------
>  1 file changed, 59 deletions(-)
>  delete mode 100644 scripts/coccinelle/misc/boolreturn.cocci
>
> diff --git a/scripts/coccinelle/misc/boolreturn.cocci b/scripts/coccinelle/misc/boolreturn.cocci
> deleted file mode 100644
> index 29d2bf41e95d..000000000000
> --- a/scripts/coccinelle/misc/boolreturn.cocci
> +++ /dev/null
> @@ -1,59 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0
> -/// Return statements in functions returning bool should use
> -/// true/false instead of 1/0.
> -//
> -// Confidence: High
> -// Options: --no-includes --include-headers
> -
> -virtual patch
> -virtual report
> -virtual context
> -
> -@r1 depends on patch@
> -identifier fn;
> -typedef bool;
> -symbol false;
> -symbol true;
> -@@
> -
> -bool fn ( ... )
> -{
> -<...
> -return
> -(
> -- 0
> -+ false
> -|
> -- 1
> -+ true
> -)
> -  ;
> -...>
> -}
> -
> -@r2 depends on report || context@
> -identifier fn;
> -position p;
> -@@
> -
> -bool fn ( ... )
> -{
> -<...
> -return
> -(
> -* 0@p
> -|
> -* 1@p
> -)
> -  ;
> -...>
> -}
> -
> -
> -@...ipt:python depends on report@
> -p << r2.p;
> -fn << r2.fn;
> -@@
> -
> -msg = "WARNING: return of 0/1 in function '%s' with return type bool" % fn
> -coccilib.report.print_report(p[0], msg)
> --
> 2.35.1
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ