Skip to content

Commit

Permalink
kasan: remove mentions of unsupported Clang versions
Browse files Browse the repository at this point in the history
Since the kernel now requires at least Clang 10.0.1, remove any mention of
old Clang versions and simplify the documentation.

Signed-off-by: Marco Elver <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Andrey Konovalov <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Cc: Fangrui Song <[email protected]>
Cc: Miguel Ojeda <[email protected]>
Cc: Sedat Dilek <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Vincenzo Frascino <[email protected]>
Cc: Will Deacon <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
melver authored and torvalds committed Oct 14, 2020
1 parent 3511af0 commit 527f675
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Documentation/dev-tools/kasan.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ KASAN uses compile-time instrumentation to insert validity checks before every
memory access, and therefore requires a compiler version that supports that.

Generic KASAN is supported in both GCC and Clang. With GCC it requires version
8.3.0 or later. With Clang it requires version 7.0.0 or later, but detection of
8.3.0 or later. Any supported Clang version is compatible, but detection of
out-of-bounds accesses for global variables is only supported since Clang 11.

Tag-based KASAN is only supported in Clang and requires version 7.0.0 or later.
Tag-based KASAN is only supported in Clang.

Currently generic KASAN is supported for the x86_64, arm64, xtensa, s390 and
riscv architectures, and tag-based KASAN is supported only for arm64.
Expand Down
9 changes: 4 additions & 5 deletions lib/Kconfig.kasan
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ config KASAN_GENERIC
Enables generic KASAN mode.

This mode is supported in both GCC and Clang. With GCC it requires
version 8.3.0 or later. With Clang it requires version 7.0.0 or
later, but detection of out-of-bounds accesses for global variables
is supported only since Clang 11.
version 8.3.0 or later. Any supported Clang version is compatible,
but detection of out-of-bounds accesses for global variables is
supported only since Clang 11.

This mode consumes about 1/8th of available memory at kernel start
and introduces an overhead of ~x1.5 for the rest of the allocations.
Expand All @@ -78,8 +78,7 @@ config KASAN_SW_TAGS
Enables software tag-based KASAN mode.

This mode requires Top Byte Ignore support by the CPU and therefore
is only supported for arm64. This mode requires Clang version 7.0.0
or later.
is only supported for arm64. This mode requires Clang.

This mode consumes about 1/16th of available memory at kernel start
and introduces an overhead of ~20% for the rest of the allocations.
Expand Down

0 comments on commit 527f675

Please sign in to comment.