linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jinb.park@samsung.com (Jinbum Park)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: ubsan: select ARCH_HAS_UBSAN_SANITIZE_ALL
Date: Tue, 13 Mar 2018 13:53:57 +0900	[thread overview]
Message-ID: <20180313045357epcms1p34fb1e2ad09a8288017058c414c21ce26@epcms1p3> (raw)
In-Reply-To: CGME20180313045357epcms1p34fb1e2ad09a8288017058c414c21ce26@epcms1p3

To enable UBSAN on arm, ARCH_HAS_UBSAN_SANITIZE_ALL is needed to be selected.

Basic test has passed on Raspberry Pi2, Raspbian jessi lite with
CONFIG_UBSAN_SANITIZE_ALL, CONFIG_UBSAN_NULL.

Signed-off-by: Jinbum Park <jinb.park@samsung.com>
---
 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 1878083..bdd1561 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -7,6 +7,7 @@ config ARM
 	select ARCH_HAS_DEBUG_VIRTUAL if MMU
 	select ARCH_HAS_DEVMEM_IS_ALLOWED
 	select ARCH_HAS_ELF_RANDOMIZE
+	select ARCH_HAS_UBSAN_SANITIZE_ALL
 	select ARCH_HAS_SET_MEMORY
 	select ARCH_HAS_PHYS_TO_DMA
 	select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 45a6b9b..1b374ba 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -24,6 +24,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 bb411821..05597f7 100644
--- a/arch/arm/vdso/Makefile
+++ b/arch/arm/vdso/Makefile
@@ -29,6 +29,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
-- 
1.9.1

       reply	other threads:[~2018-03-13  4:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180313045357epcms1p34fb1e2ad09a8288017058c414c21ce26@epcms1p3>
2018-03-13  4:53 ` Jinbum Park [this message]
2018-03-13  5:13   ` [PATCH] arm: ubsan: select ARCH_HAS_UBSAN_SANITIZE_ALL Jaehoon Chung
2018-03-13  5:18   ` Jaehoon Chung
2022-09-28 17:47 [PATCH] ARM: " Florian Fainelli
2022-09-28 18:01 ` Kees Cook
2022-09-28 23:06   ` Florian Fainelli
2022-09-29  0:33     ` William Zhang
2022-09-29  8:10       ` Kees Cook
2022-09-30 21:34         ` Florian Fainelli
2022-10-04  8:51 ` Linus Walleij
2022-10-12 19:46   ` Florian Fainelli
     [not found] <CGME20171024055601epcas2p34a22b2b1fb3f1f71ed875125d87a47c4@epcas2p3.samsung.com>
2017-10-24  5:55 ` [PATCH] arm: " Seung-Woo Kim
  -- strict thread matches above, loose matches on Subject: below --
2016-09-22  4:49 Seung-Woo Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180313045357epcms1p34fb1e2ad09a8288017058c414c21ce26@epcms1p3 \
    --to=jinb.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).