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: <3aa0c96c-d42e-631b-5b4e-a5f67f0fc3e0@fb.com>
Date:   Thu, 14 Jul 2022 13:28:25 -0700
From:   Yonghong Song <yhs@...com>
To:     Ben Dooks <ben.dooks@...ive.com>, linux-kernel@...r.kernel.org,
        bpf@...r.kernel.org
Cc:     Sudip Mukherjee <sudip.mukherjee@...ive.com>,
        Jude Onyenegecha <jude.onyenegecha@...ive.com>
Subject: Re: [PATCH] bpf: fix check against plain integer v 'NULL'



On 7/14/22 3:03 AM, Ben Dooks wrote:
> When checking with sparse, btf_show_type_value() is causing a
> warning about checking integer vs NULL when the macro is passed
> a pointer, due to the 'value != 0' check. Stop sparse complaining
> about any type-casting by adding a cast to the typeof(value).
> 
> This fixes the following sparse warnings:
> 
> kernel/bpf/btf.c:2579:17: warning: Using plain integer as NULL pointer
> kernel/bpf/btf.c:2581:17: warning: Using plain integer as NULL pointer
> kernel/bpf/btf.c:3407:17: warning: Using plain integer as NULL pointer
> kernel/bpf/btf.c:3758:9: warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Ben Dooks <ben.dooks@...ive.com>

Acked-by: Yonghong Song <yhs@...com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ