Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1490608

Re: UBSAN: Undefined behaviour in ./arch/arm/include/asm/bitops.h

From Russell King - ARM Linux <linux@armlinux.org.uk>
Newsgroups linux.kernel
Subject Re: UBSAN: Undefined behaviour in ./arch/arm/include/asm/bitops.h
Date 2016-09-24 11:20 +0200
Message-ID <skRhM-7Cx-19@gated-at.bofh.it> (permalink)
References <skN4t-4T8-15@gated-at.bofh.it> <sk47n-1KL-11@gated-at.bofh.it> <skN4t-4T8-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

UBSAN: Undefined behaviour in ./arch/arm/include/asm/bitops.h Seung-Woo Kim <sw0312.kim@samsung.com> - 2016-09-24 06:50 +0200
  Re: UBSAN: Undefined behaviour in ./arch/arm/include/asm/bitops.h Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-09-24 11:20 +0200

csiph-web