[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8082dcd-632b-bf75-061c-143cca6fa70d@redhat.com>
Date: Thu, 26 Jan 2023 11:41:40 +0100
From: David Hildenbrand <david@...hat.com>
To: David Howells <dhowells@...hat.com>
Cc: Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Matthew Wilcox <willy@...radead.org>,
Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.cz>,
Jeff Layton <jlayton@...nel.org>,
Jason Gunthorpe <jgg@...dia.com>,
Logan Gunthorpe <logang@...tatee.com>,
linux-fsdevel@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Christoph Hellwig <hch@....de>,
John Hubbard <jhubbard@...dia.com>
Subject: Re: [PATCH] iov_iter: Use __bitwise with the extraction_flags
On 26.01.23 11:33, David Howells wrote:
> Interestingly, things like __be32 are __bitwise. I wonder if that actually
> makes sense or if it was just convenient so stop people doing arithmetic on
> them. I guess doing AND/OR/XOR on them isn't a problem provided both
> arguments are appropriately byte-swapped.
I recall that __be32 and friends were one of the early users of
__bitwise in the kernel. And the reason IIRC was exactly that: detect
when no proper conversion was performed using static code analysis
(Sparse). While some operations might make sense, the abuse is much more
likely.
LGTM, thanks!
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists