Re: [PATCH] fls: Change parameter to unsigned int

2018-11-06 Thread Geert Uytterhoeven
On Mon, Nov 5, 2018 at 11:11 PM Matthew Wilcox wrote: > When testing in userspace, UBSAN pointed out that shifting into the sign > bit is undefined behaviour. It doesn't really make sense to ask for the > highest set bit of a negative value, so just turn the argument type into > an unsigned int.

Re: [PATCH] fls: Change parameter to unsigned int

2018-11-05 Thread Thomas Gleixner
On Mon, 5 Nov 2018, Matthew Wilcox wrote: > When testing in userspace, UBSAN pointed out that shifting into the sign > bit is undefined behaviour. It doesn't really make sense to ask for the > highest set bit of a negative value, so just turn the argument type into > an unsigned int. > > Some ar