Re: [PATCH] iov_iter: Use __bitwise with the extraction_flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux