Thread (15 messages) flat view 15 messages, 3 authors, 2021-02-03
STALE2036d

Revision v9 of 10 in this series.

Revisions (10)
  1. v3 [diff vs current]
  2. v4 [diff vs current]
  3. v5 [diff vs current]
  4. v6 [diff vs current]
  5. v7 [diff vs current]
  6. v8 [diff vs current]
  7. v8 [diff vs current]
  8. v9 current
  9. v10 [diff vs current]
  10. v11 [diff vs current]

[PATCH v9 1/6] kasan: allow an architecture to disable inline instrumentation

From: Daniel Axtens <hidden>
Date: 2020-12-01 16:17:42
Also in: linux-mm, lkml
Subsystem: kasan, library code, the rest · Maintainers: Andrey Ryabinin, Andrew Morton, Linus Torvalds

For annoying architectural reasons, it's very difficult to support inline
instrumentation on powerpc64.

Add a Kconfig flag to allow an arch to disable inline. (It's a bit
annoying to be 'backwards', but I'm not aware of any way to have
an arch force a symbol to be 'n', rather than 'y'.)

Signed-off-by: Daniel Axtens <redacted>
---
 lib/Kconfig.kasan | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
index 542a9c18398e..31a0b28f6c2b 100644
--- a/lib/Kconfig.kasan
+++ b/lib/Kconfig.kasan
@@ -9,6 +9,9 @@ config HAVE_ARCH_KASAN_SW_TAGS
 config	HAVE_ARCH_KASAN_VMALLOC
 	bool
 
+config HAVE_ARCH_NO_KASAN_INLINE
+	def_bool n
+
 config CC_HAS_KASAN_GENERIC
 	def_bool $(cc-option, -fsanitize=kernel-address)
 
@@ -108,6 +111,7 @@ config KASAN_OUTLINE
 
 config KASAN_INLINE
 	bool "Inline instrumentation"
+	depends on !HAVE_ARCH_NO_KASAN_INLINE
 	help
 	  Compiler directly inserts code checking shadow memory before
 	  memory accesses. This is faster than outline (in some workloads
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help