kmsan_shadow.c 712 B

1234567891011121314151617181920
  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 <[email protected]>
  7. */
  8. #include <asm/cpu_entry_area.h>
  9. #include <linux/percpu-defs.h>
  10. /*
  11. * Addresses within the CPU entry area (including e.g. exception stacks) do not
  12. * have struct page entries corresponding to them, so they need separate
  13. * handling.
  14. * arch_kmsan_get_meta_or_null() (declared in the header) maps the addresses in
  15. * CPU entry area to addresses in cpu_entry_area_shadow/cpu_entry_area_origin.
  16. */
  17. DEFINE_PER_CPU(char[CPU_ENTRY_AREA_SIZE], cpu_entry_area_shadow);
  18. DEFINE_PER_CPU(char[CPU_ENTRY_AREA_SIZE], cpu_entry_area_origin);