This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. The new mode won't be using shadow memory. Rename external annotation kasan_unpoison_shadow() to kasan_unpoison_range(), and introduce internal functions (un)poison_range() (without kasan_ prefix).
Showing the changes to kernel (1 of 7 files). Show all
Unified · Split
| @@ -225,8 +225,8 @@ static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node) · 224 unmodified lines | ||
| 225 | 225 | if (!s) |
| 226 | 226 | continue; |
| 227 | 227 | |
| 228 | − /* Clear the KASAN shadow of the stack. */ | |
| 229 | − kasan_unpoison_shadow(s->addr, THREAD_SIZE); | |
| 228 | + /* Mark stack accessible for KASAN. */ | |
| 229 | + kasan_unpoison_range(s->addr, THREAD_SIZE); | |
| 230 | 230 | |
| 231 | 231 | /* Clear stale pointers from reused stack. */ |
| 232 | 232 | memset(s->addr, 0, THREAD_SIZE); |