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]
Date:   Thu, 19 May 2022 00:03:07 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Vasily Averin <vvs@...nvz.org>
Cc:     Jens Axboe <axboe@...nel.dk>,
        Christoph Hellwig <hch@...radead.org>, kernel@...nvz.org,
        linux-kernel@...r.kernel.org,
        Pavel Begunkov <asml.silence@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>, io-uring@...r.kernel.org
Subject: Re: [PATCH v2] io_uring: fix sparce warnings about __kernel_rwf_t
 casts

On Wed, May 18, 2022 at 12:20:46PM +0300, Vasily Averin wrote:
> __kernel_rwf_t type is bitwise and requires __force attribute for casts.
> 
> To fix the warnings, the patch changes the type of fields in the
> corresponding structures: poll32_events and rw_flags are neighbours
> in the same union.

Jens actually picked up a series from me that picked up most of this,
except for this hunk:

> index cddf5b6fbeb4..34839f30caee 100644
> --- a/include/trace/events/io_uring.h
> +++ b/include/trace/events/io_uring.h
> @@ -520,7 +520,7 @@ TRACE_EVENT(io_uring_req_failed,
>  		__entry->off		= sqe->off;
>  		__entry->addr		= sqe->addr;
>  		__entry->len		= sqe->len;
> -		__entry->op_flags	= sqe->rw_flags;
> +		__entry->op_flags	= sqe->poll32_events;
>  		__entry->buf_index	= sqe->buf_index;
>  		__entry->personality	= sqe->personality;
>  		__entry->file_index	= sqe->file_index;

For which I did not see a warning even if it looks real to me.
But this union with basically a lot of __u32s here looks pretty
strange to start with to me.

Powered by blists - more mailing lists