From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751955AbcFULms (ORCPT ); Tue, 21 Jun 2016 07:42:48 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:56702 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751663AbcFULmj (ORCPT ); Tue, 21 Jun 2016 07:42:39 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: aryabinin@virtuozzo.com, Seung-Woo Kim , linux@armlinux.org.uk, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH] arm: ubsan: select ARCH_HAS_UBSAN_SANITIZE_ALL Date: Tue, 21 Jun 2016 13:44:08 +0200 Message-ID: <3804659.HRLf903cuS@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <12441230.VuJWJP4oWR@wuerfel> References: <1466487545-22819-1-git-send-email-sw0312.kim@samsung.com> <12441230.VuJWJP4oWR@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:N+B6ARG9ZQN1m9H2Nu4lWWmWwMFNMygsae2ZwqHpNs37GmxJmty MQyIev66zZ0lZNkwCEvCEgJoEA0sGh+hlfCkY3EQYyVek2IK54BwtBXbM75VCzfZfRgaNPU oc4e6h1MXy2ycexgB/ZRAwV9Nj88njPW+Y8Y7IG1XAwIAufclnYOjb69ijNl2r9wi7LWQ9p NwHpiYBvsK7T55qTnwhsA== X-UI-Out-Filterresults: notjunk:1;V01:K0:TA9ci8eCshY=:6HUDKkTBvBN9jMMfJiYLEO NmN/tg6UVsYzMPlXYff1nQJTQViCdRt4f48HHo+TUohItBOcUeVleS49gtieodyiWLRS3Zm1Y hDC5sXmR3mQDAP7Q6ZNsxErk5Whvba7KJU44rtJQNjA++f5GQdWUQ+wJr4KVsm1EdAcpBfLZQ zLgSU6rM9v9lmz3qIxN3toakVk5fFNOUGWm7r8SCVubZpPsHZmC01HcuMRj6M2WG1wGOJinYI rTWg+CTJ2SG8MTA4+XpPpE2Dc0Oc/TUvrcVdq4tGP46xoJCZDVyWI8hydric5NkZ+0v7Jr6xb /l0IcLw0T3KPZjRaj2z0EJFjvz57iIIUCxzAq5YQ8GP7R/QrKmwwN7zg/yhCgezPcnCi97S5f EVWPje+6UAna8/2U9Jim9utwIE0r02tN18S6ha/1qQ3NRSnzNj2xJzKha5Adsg2YkjVhoX4nb BC6Kp78diOhbrNdCsL7SgobtGVurZxZo12gjilzOI+kUAEIMhdJvcRTGCBNfDh//20NwlnQ9U beLZLfUtAL+dP1/fsejATa2Takc7TjlaBMgv2ZNV5u2Mgjea4J0+BAx/ooX4EZubu3kewcOAt ze+8M832IKYkE2M8TVIC0czA4Uemhy72Co4y5eHzwCMNVzr/UJQ4uxxafb3NpbHzi03wi+Pk/ C243606zpLyFDMxqQdvW/m2zJcRt6JqBciAqDU13DZ1MiHxKfH0Kw0D6qHBWEC0+UqMbumnAs rOdVTNqHSAgtz1H4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, June 21, 2016 10:43:19 AM CEST Arnd Bergmann wrote: > On Tuesday, June 21, 2016 2:39:05 PM CEST Seung-Woo Kim wrote: > > To enable UBSAN on arm, this patch enables ARCH_HAS_UBSAN_SANITIZE_ALL > > from arm confiuration. Basic kernel booting is tested on arm kernel > > enabled CONFIG_UBSAN_SANITIZE_ALL from Exynos5422 based Odroid-XU3 > > board. > > > > Signed-off-by: Seung-Woo Kim > > --- > > Because I tested only with specific soc board, so I am not sure the ubsan is > > fine for all other cases. So, I send this patch as a RFC. > > > > I've tried this out on my build test box in the past, but ran into > some problems. In particular I ended up disabling > -fsanitize=signed-integer-overflow and -fsanitize=object-size > and later reverting the whole thing, but don't remember exactly > why (possibly I was hitting internal compiler errors?).' > > Let me re-enable it with your patch locally and report back > with whatever build problems I run into. This is what I have run into so far, during a few dozen randconfig builds, this is with "arm-linux-gnueabi-gcc (GCC) 6.0.0 20160323 (experimental)" and I can try building a newer version if you think that helps. I left the duplicates in to show what happens how often: ../crypto/serpent_generic.c: In function '__serpent_setkey': ../crypto/serpent_generic.c:436:1: error: the frame size of 1080 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] ../drivers/media/dvb-frontends/mb86a16.c: In function 'mb86a16_set_fe': ../drivers/media/dvb-frontends/mb86a16.c:1522:1: error: the frame size of 1096 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] ../drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c: In function '_rtl8723be_read_adapter_info.constprop': ../drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c:2243:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] ../drivers/gpu/drm/radeon/si_dpm.c: In function 'si_init_dte_leakage_table.constprop': ../drivers/gpu/drm/radeon/si_dpm.c:2614:1: error: the frame size of 1096 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] ../crypto/serpent_generic.c: In function '__serpent_setkey': ../crypto/serpent_generic.c:436:1: error: the frame size of 1072 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] ../crypto/serpent_generic.c: In function '__serpent_setkey': ../crypto/serpent_generic.c:436:1: error: the frame size of 1072 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] ../crypto/serpent_generic.c: In function '__serpent_setkey': ../crypto/serpent_generic.c:436:1: error: the frame size of 1072 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] drivers/media/built-in.o: In function `zl10353_calc_nominal_rate': tea575x.c:(.text+0x1caa94): undefined reference to `____ilog2_NaN' tea575x.c:(.text+0x1cafc8): undefined reference to `__aeabi_uldivmod' tea575x.c:(.text+0x1cb02c): undefined reference to `__aeabi_uldivmod' tea575x.c:(.text+0x1cb09c): undefined reference to `__aeabi_uldivmod' tea575x.c:(.text+0x1cb2d4): undefined reference to `__aeabi_uldivmod' tea575x.c:(.text+0x1cb3a8): undefined reference to `__aeabi_uldivmod' drivers/media/built-in.o:tea575x.c:(.text+0x1cb410): more undefined references to `__aeabi_uldivmod' follow ../drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_bl_update_status': ../drivers/video/fbdev/aty/atyfb_base.c:167:33: error: array subscript is above array bounds [-Werror=array-bounds] return aty_ld_le32(lt_lcd_regs[index], par); ~~~~~~~~~~~^~~~~~~ ../drivers/video/fbdev/aty/atyfb_base.c:152:26: error: array subscript is above array bounds [-Werror=array-bounds] aty_st_le32(lt_lcd_regs[index], val, par); ../drivers/gpu/drm/radeon/si_dpm.c: In function 'si_init_dte_leakage_table.constprop': ../drivers/gpu/drm/radeon/si_dpm.c:2614:1: error: the frame size of 1096 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] ../crypto/serpent_generic.c: In function '__serpent_setkey': ../crypto/serpent_generic.c:436:1: error: the frame size of 1072 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] ../drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_bl_update_status': ../drivers/video/fbdev/aty/atyfb_base.c:167:33: error: array subscript is above array bounds [-Werror=array-bounds] return aty_ld_le32(lt_lcd_regs[index], par); ~~~~~~~~~~~^~~~~~~ ../drivers/video/fbdev/aty/atyfb_base.c:152:26: error: array subscript is above array bounds [-Werror=array-bounds] aty_st_le32(lt_lcd_regs[index], val, par); ../crypto/serpent_generic.c: In function '__serpent_setkey': ../crypto/serpent_generic.c:436:1: error: the frame size of 1080 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Some warnings go away after I turn off -fsanitize=signed-integer-overflow and -fsanitize=object-size, but the one in crypto/serpent_generic.c remains unchanged. Arnd