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: <27eed02c-fd92-6f99-b213-1be70193b37d@opensource.wdc.com>
Date:   Wed, 10 Aug 2022 12:14:15 -0700
From:   Damien Le Moal <damien.lemoal@...nsource.wdc.com>
To:     Bart Van Assche <bvanassche@....org>
Cc:     linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
        Johannes Thumshirn <jth@...nel.org>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: fs/zonefs/./trace.h:22:1: sparse: sparse: cast to restricted
 blk_opf_t

On 2022/08/10 11:08, Bart Van Assche wrote:
> On 8/10/22 07:36, Damien Le Moal wrote:
>> On 2022/08/08 8:37, Bart Van Assche wrote:
>>> Thanks for having taken a look. Please help with verifying whether the
>>> following patch is sufficient to fix the reported warning: "[PATCH]
>>> tracing: Suppress sparse warnings triggered by is_signed_type()"
>>> (https://lore.kernel.org/all/20220717151047.19220-1-bvanassche@acm.org/).
>>
>> With the current Linus tree, I do not see this sparse warning. However, applying
>> the above patch, "make M=fs/zonefs C=1" generates a lot of warnings:
> 
> That doesn't make sense to me. My patch reduces the number of sparse 
> warnings that are reported.
> 
>> make -j64 M=fs/zonefs C=1
>>    CC [M]  fs/zonefs/super.o
>>    CC [M]  fs/zonefs/sysfs.o
>>    CHECK   fs/zonefs/sysfs.c
>>    CHECK   fs/zonefs/super.c
>> fs/zonefs/sysfs.c: note: in included file (through include/linux/bitops.h,
>> include/linux/kernel.h, arch/x86/include/asm/percpu.h,
>> arch/x86/include/asm/preempt.h, include/linux/preempt.h,
>> include/linux/spinlock.h, ...):
>> ./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
> 
> I think that you are hitting a bug in sparse. See also 
> https://lore.kernel.org/all/e91d351c-3c16-e48d-7e9d-9f096c4acbc9@debian.org/T/. 
> I also see the above warnings if I use the sparse binary from Debian 
> testing. I do not see these sparse warnings if I download the sparse 
> source code and compile that source code myself.

Good point. I was using Fedora 36 sparse package. Using sparse compiled from
source, I now see again the warnings without the patch and no warnings with the
patch applied. So the patch looks good. Are you going to send it as a fix for
6.0-rc1 ?

Cheers.


-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ