1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* |
3 | * x86-specific bits of KMSAN shadow implementation. |
4 | * |
5 | * Copyright (C) 2022 Google LLC |
6 | * Author: Alexander Potapenko <glider@google.com> |
7 | */ |
8 | |
9 | #include <asm/cpu_entry_area.h> |
10 | #include <linux/percpu-defs.h> |
11 | |
12 | /* |
13 | * Addresses within the CPU entry area (including e.g. exception stacks) do not |
14 | * have struct page entries corresponding to them, so they need separate |
15 | * handling. |
16 | * arch_kmsan_get_meta_or_null() (declared in the header) maps the addresses in |
17 | * CPU entry area to addresses in cpu_entry_area_shadow/cpu_entry_area_origin. |
18 | */ |
19 | DEFINE_PER_CPU(char[CPU_ENTRY_AREA_SIZE], cpu_entry_area_shadow); |
20 | DEFINE_PER_CPU(char[CPU_ENTRY_AREA_SIZE], cpu_entry_area_origin); |
21 | |