From patchwork Thu Sep 22 04:49:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seung-Woo Kim X-Patchwork-Id: 9344477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 366FF6077A for ; Thu, 22 Sep 2016 04:51:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A43D2A464 for ; Thu, 22 Sep 2016 04:51:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D17E2A4EC; Thu, 22 Sep 2016 04:51:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9E1552A464 for ; Thu, 22 Sep 2016 04:51:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bmvxK-0001gi-A6; Thu, 22 Sep 2016 04:49:54 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bmvxD-0001fE-E0 for linux-arm-kernel@lists.infradead.org; Thu, 22 Sep 2016 04:49:48 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0ODW006WD2PVECC0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 22 Sep 2016 13:49:07 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.112]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 04.97.19061.3C263E75; Thu, 22 Sep 2016 13:49:07 +0900 (KST) X-AuditID: cbfee68d-f790c6d000004a75-58-57e362c3117f Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 75.62.29545.2C263E75; Wed, 21 Sep 2016 21:49:07 -0700 (MST) Received: from localhost.localdomain ([10.113.62.209]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0ODW001SO2PTQE40@mmp2.samsung.com>; Thu, 22 Sep 2016 13:49:06 +0900 (KST) From: Seung-Woo Kim To: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm: ubsan: select ARCH_HAS_UBSAN_SANITIZE_ALL Date: Thu, 22 Sep 2016 13:49:17 +0900 Message-id: <1474519757-10228-1-git-send-email-sw0312.kim@samsung.com> X-Mailer: git-send-email 1.7.4.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMLMWRmVeSWpSXmKPExsWyRsSkQPdw0uNwg/MXeCz+TjrGbvFl0jt2 i02Pr7FaXN41h83i0NS9jBYzJr9kc2DzuHztIrPH71+TGD02L6n36NuyitHj8yY5j9f7DzEG sEVx2aSk5mSWpRbp2yVwZbRe3sFYMJW/YvnfWWwNjNt5uhg5OSQETCRWfDvJDmGLSVy4t56t i5GLQ0hgBaPEiRvnmWCK5i2ZwAqRmMUoce3mUWYI5wejxP2tv9hAqtgEdCT2L/nNCmKLCMRL TOo5zgxiMws4SXRPaWMEsYUF7CV+vVoHNpVFQFViWcdOsF5eATeJM9fnskBsU5BYcO8t2BkS As3sEv2r97FDNAhIfJt8CKiIAygh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+s6PWSu3ub613ybXZCurVvSbRKyQTBBVZ em8vWP16VqDzgitBq75mHX5hWZq8ZHdU+ObPYpe5FW/0ZnLsVVYIqrgVsk6jWcG1UzrjxE+/ 1Kc5Rhr5Jb+lIqeWVO5ancCmxFKckWioxVxUnAgAqsof9qMCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160921_214947_659288_DB1DE9FE X-CRM114-Status: GOOD ( 12.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aryabinin@virtuozzo.com, sw0312.kim@samsung.com, arnd@arndb.de MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To enable UBSAN on arm, this patch enables ARCH_HAS_UBSAN_SANITIZE_ALL from arm confiuration. Basic kernel bootup test is passed on arm with CONFIG_UBSAN_SANITIZE_ALL enabled. Signed-off-by: Seung-Woo Kim --- This is resend of the patch I already sent, [1], without RFC tag. [1] https://patchwork.kernel.org/patch/9189533/ I tested kernel build and basic boot up on Exynos5422, Exynos4412 and Exynos3250 SoC boards. At previous time on [1], there were some build error on other systems, but they were caused by driver bug or gcc bug. So I think UBSAN on ARM can be re-considered. --- arch/arm/Kconfig | 1 + arch/arm/boot/compressed/Makefile | 1 + arch/arm/vdso/Makefile | 1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a9c4e48..a80f9b1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -7,6 +7,7 @@ config ARM select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAVE_CUSTOM_GPIO_H select ARCH_HAS_GCOV_PROFILE_ALL + select ARCH_HAS_UBSAN_SANITIZE_ALL select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_USE_BUILTIN_BSWAP diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index d50430c..883374f 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -23,6 +23,7 @@ OBJS += hyp-stub.o endif GCOV_PROFILE := n +UBSAN_SANITIZE := n # # Architecture dependencies diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile index 59a8fa7..cb90e59 100644 --- a/arch/arm/vdso/Makefile +++ b/arch/arm/vdso/Makefile @@ -28,6 +28,7 @@ CFLAGS_vgettimeofday.o = -O2 # Disable gcov profiling for VDSO code GCOV_PROFILE := n +UBSAN_SANITIZE := n # Force dependency $(obj)/vdso.o : $(obj)/vdso.so