x86/kasan: Populate shadow for read-only IDT mapping
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | x86/kasan: Rename local CPU_ENTRY_AREA variables to shorten namesarch/ | +11 | 0 replies | |
| 2/3 | x86/kasan: Add helpers to align shadow addresses up and downarch/ | +22 | 0 replies | |
| 3/3 | x86/kasan: Populate shadow for shared chunk of the CPU entry areaarch/ | +11 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] x86/kasan: Populate shadow for read-only IDT mapping
Fix a regression introduced by mapping shadows for the per-cpu portions of the CPU entry area on-demand. The read-only IDT mapping is also shoved into the CPU entry area, but since it's shared, no CPU creates a shadow for it. KVM on Intel does an IDT lookup in software when handling host IRQs that arrived in the guest, which results in KASAN dereferencing an unmapped shadow.
The first two patches are cleanups to make the fix (and code in general) less ugly.
Side topic, KASAN should really decide whether it wants to use "void *" or "unsigned long", e.g. kasan_populate_shadow() takes "unsigned long" but kasan_populate_early_shadow() takes "void *". And the amount of casting throughout the code is bonkers.
Sean Christopherson (3):
x86/kasan: Rename local CPU_ENTRY_AREA variables to shorten names x86/kasan: Add helpers to align shadow addresses up and down x86/kasan: Populate shadow for shared chunk of the CPU entry area
arch/x86/mm/kasan_init_64.c | 50 ++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 18 deletions(-)
base-commit: 3301badde43dee7c2a013fbd6479c258366519da
Signature · 1 line
2.38.1.431.g37b22c650d-goog