diff options
Diffstat (limited to 'Documentation/kasan.txt')
-rw-r--r-- | Documentation/kasan.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Documentation/kasan.txt b/Documentation/kasan.txt index 092fc10961fe..0d32355a4c34 100644 --- a/Documentation/kasan.txt +++ b/Documentation/kasan.txt | |||
@@ -9,7 +9,9 @@ a fast and comprehensive solution for finding use-after-free and out-of-bounds | |||
9 | bugs. | 9 | bugs. |
10 | 10 | ||
11 | KASan uses compile-time instrumentation for checking every memory access, | 11 | KASan uses compile-time instrumentation for checking every memory access, |
12 | therefore you will need a certain version of GCC > 4.9.2 | 12 | therefore you will need a gcc version of 4.9.2 or later. KASan could detect out |
13 | of bounds accesses to stack or global variables, but only if gcc 5.0 or later was | ||
14 | used to built the kernel. | ||
13 | 15 | ||
14 | Currently KASan is supported only for x86_64 architecture and requires that the | 16 | Currently KASan is supported only for x86_64 architecture and requires that the |
15 | kernel be built with the SLUB allocator. | 17 | kernel be built with the SLUB allocator. |
@@ -23,8 +25,8 @@ To enable KASAN configure kernel with: | |||
23 | 25 | ||
24 | and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. Outline/inline | 26 | and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. Outline/inline |
25 | is compiler instrumentation types. The former produces smaller binary the | 27 | is compiler instrumentation types. The former produces smaller binary the |
26 | latter is 1.1 - 2 times faster. Inline instrumentation requires GCC 5.0 or | 28 | latter is 1.1 - 2 times faster. Inline instrumentation requires a gcc version |
27 | latter. | 29 | of 5.0 or later. |
28 | 30 | ||
29 | Currently KASAN works only with the SLUB memory allocator. | 31 | Currently KASAN works only with the SLUB memory allocator. |
30 | For better bug detection and nicer report, enable CONFIG_STACKTRACE and put | 32 | For better bug detection and nicer report, enable CONFIG_STACKTRACE and put |
@@ -148,7 +150,7 @@ AddressSanitizer dedicates 1/8 of kernel memory to its shadow memory | |||
148 | (e.g. 16TB to cover 128TB on x86_64) and uses direct mapping with a scale and | 150 | (e.g. 16TB to cover 128TB on x86_64) and uses direct mapping with a scale and |
149 | offset to translate a memory address to its corresponding shadow address. | 151 | offset to translate a memory address to its corresponding shadow address. |
150 | 152 | ||
151 | Here is the function witch translate an address to its corresponding shadow | 153 | Here is the function which translates an address to its corresponding shadow |
152 | address: | 154 | address: |
153 | 155 | ||
154 | static inline void *kasan_mem_to_shadow(const void *addr) | 156 | static inline void *kasan_mem_to_shadow(const void *addr) |