kernel-ark/arch
Matthew Wilcox 3fc2579e6f fls: change parameter to unsigned int
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 architectures (eg ppc) already had it declared as an unsigned int,
so I don't expect too many problems.

Link: http://lkml.kernel.org/r/20181105221117.31828-1-willy@infradead.org
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-01-04 13:13:46 -08:00
..
alpha fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
arc fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
arm kgdb patches for 4.20-rc1 2019-01-01 15:38:14 -08:00
arm64 kgdb patches for 4.20-rc1 2019-01-01 15:38:14 -08:00
c6x fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
csky fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
h8300 kgdb patches for 4.20-rc1 2019-01-01 15:38:14 -08:00
hexagon fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
ia64 fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
m68k fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
microblaze kgdb patches for 4.20-rc1 2019-01-01 15:38:14 -08:00
mips fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
nds32 nds32 patches for 4.21 2018-12-29 09:37:03 -08:00
nios2 kgdb patches for 4.20-rc1 2019-01-01 15:38:14 -08:00
openrisc fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
parisc fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
powerpc IOMMU Updates for Linux v4.21 2019-01-01 15:55:29 -08:00
riscv Kconfig file consolidation for v4.21 2018-12-29 13:40:29 -08:00
s390 fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
sh kgdb patches for 4.20-rc1 2019-01-01 15:38:14 -08:00
sparc kgdb patches for 4.20-rc1 2019-01-01 15:38:14 -08:00
um Merge branch 'for-linus-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2019-01-02 18:39:22 -08:00
unicore32 fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
x86 fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
xtensa Kconfig file consolidation for v4.21 2018-12-29 13:40:29 -08:00
.gitignore
Kconfig New gcc plugin: stackleak 2018-11-01 11:46:27 -07:00