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: <C3CD0DF8AD11A84CB25A1426DE537C61E594BFF6@dggeml524-mbx.china.huawei.com>
Date:   Thu, 16 Apr 2020 10:45:12 +0000
From:   "Zouwei (Samuel)" <zou_wei@...wei.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
CC:     "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: 答复: [PATCH -next] mm/usercopy: fix warning Comparison to bool

Hi Andrew,

Thanks for your reply.
Perhaps this is a detection rule of Coccinelle (coccicheck) software for programming specifications,
and it's no wrong with the code, just a coding style.

Best Regards
Zou Wei
-----邮件原件-----
发件人: Andrew Morton [mailto:akpm@...ux-foundation.org] 
发送时间: 2020年4月16日 7:05
收件人: Zouwei (Samuel) <zou_wei@...wei.com>
抄送: linux-mm@...ck.org; linux-kernel@...r.kernel.org
主题: Re: [PATCH -next] mm/usercopy: fix warning Comparison to bool

On Tue, 14 Apr 2020 11:42:04 +0800 Zou Wei <zou_wei@...wei.com> wrote:

> fix below warnings reported by coccicheck
> 
> mm/usercopy.c:304:5-18: WARNING: Comparison to bool
>
> ...
>
> --- a/mm/usercopy.c
> +++ b/mm/usercopy.c
> @@ -301,7 +301,7 @@ __setup("hardened_usercopy=", 
> parse_hardened_usercopy);
>  
>  static int __init set_hardened_usercopy(void)  {
> -	if (enable_checks == false)
> +	if (!enable_checks)
>  		static_branch_enable(&bypass_usercopy_checks);
>  	return 1;
>  }

My initial reaction is "fix coccicheck".  There's nothing wrong with that code?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ