From patchwork Tue Jun 21 05:39:05 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: 9189533 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 2FBE9601C0 for ; Tue, 21 Jun 2016 05:41:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A92327F8E for ; Tue, 21 Jun 2016 05:41:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AE3F27F94; Tue, 21 Jun 2016 05:41:14 +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 4BF9E27F8E for ; Tue, 21 Jun 2016 05:41:13 +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 1bFEPN-0006XD-7h; Tue, 21 Jun 2016 05:39:33 +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 1bFEPJ-0006Sg-MV for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2016 05:39:30 +0000 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O9300YOMX15G1B0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2016 14:39:05 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.112]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 9F.53.05160.9F2D8675; Tue, 21 Jun 2016 14:39:05 +0900 (KST) X-AuditID: cbfee68e-f79266d000001428-7c-5768d2f921b7 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 05.2F.02101.9F2D8675; Tue, 21 Jun 2016 14:39:05 +0900 (KST) 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 <0O93009T8X13WT00@mmp2.samsung.com>; Tue, 21 Jun 2016 14:39:05 +0900 (KST) From: Seung-Woo Kim To: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFC][PATCH] arm: ubsan: select ARCH_HAS_UBSAN_SANITIZE_ALL Date: Tue, 21 Jun 2016 14:39:05 +0900 Message-id: <1466487545-22819-1-git-send-email-sw0312.kim@samsung.com> X-Mailer: git-send-email 1.7.4.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCLMWRmVeSWpSXmKPExsWyRsSkQPfnpYxwg709MhZfJr1jt9j0+Bqr xeVdc9gsDk3dy2gxY/JLNgdWj8vXLjJ7bF5S79G3ZRWjx+dNch6v9x9iDGCN4rJJSc3JLEst 0rdL4MpYc7iwYBtvxa+19g2M/7m6GDk5JARMJF4/vMcCYYtJXLi3ng3EFhJYwSgx87V9FyMH WM2OCzVdjFxA4VmMEvOvfmSGcH4wStyY3AfWzCagI7F/yW9WEFtEIF5iUs9xZhCbWcBY4nLz OjBbWMBFYmnDREaQoSwCqhLvD4GFeQXcJL5v2ssIcYOCxIJ7b9lA5ksIfGaTuHj3L9h8FgEB iW+TD7FA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aslnNpi1X4Lvjv3qqO5Svq9T+P3dxl3HrHc6vkzUdeu5uvZWwuZ PONbStQy2Z5M1JAK7Nh649DeN3b39onWJ4jnrBEOMz2n8Gab7PmpXxWXMSr8UZmpFVUT3f5c R5tr6jslluKMREMt5qLiRAC17OfglQIAAA== 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-20160620_223929_888537_61F3C7C8 X-CRM114-Status: GOOD ( 10.13 ) 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 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 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. --- arch/arm/Kconfig | 1 + arch/arm/boot/compressed/Makefile | 1 + arch/arm/vdso/Makefile | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 90542db..3a9af80 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