lkml.org 
[lkml]   [2016]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: UBSAN: Undefined behaviour in ./arch/arm/include/asm/bitops.h
On Sat, Sep 24, 2016 at 01:45:33PM +0900, Seung-Woo Kim wrote:
> With the patch "arm: ubsan: select ARCH_HAS_UBSAN_SANITIZE_ALL", I got
> following UBSAN warning on Exynos5422 SoC board.

Well, the simple solution is to have fls() and ffs() take unsigned int
arguments rather than ints - but the question that brings up is: why
do both of these take signed ints? It seems at least to me that it
would be more sensible for these to take unsigned int, or even
unsigned long like the other bitops do.

--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

\
 
 \ /
  Last update: 2016-09-24 11:15    [W:0.037 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site