Re: [PATCH 5.10] overflow.h: use new generic division helpers to avoid / operator
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-09-14 18:48:38
Also in:
stable
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-09-14 18:48:38
Also in:
stable
On Tue, Sep 14, 2021 at 11:45 AM Nick Desaulniers [off-list ref] wrote:
Any issues passing an loff_t (aka long long) to __ffs which expects an unsigned long for ilp32 targets?
No. We literally _just_ checked that the value is a power-of-two, and that it's in the range [1024, PAGE_SIZE]. There was never anything "loff_t" about bitmask at any point.
Any issues modifying the sysfs interface? Perhaps something in userspace relies on parsing those strings?
See my comment about how it could use DEFINE_SHOW_ATTRIBUTE() to
always show the bits as a value.
But it's not even sysfs. It's debugfs. So nobody _should_ have relied
on any of this anyway.
Of course, "should have" is just a dream world - but the point is that
if somebody complains, it's very fixable.
Linus