]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/sev: Move __sev_[get|put]_ghcb() into separate noinstr object
authorArd Biesheuvel <ardb@kernel.org>
Thu, 28 Aug 2025 10:22:16 +0000 (12:22 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 3 Sep 2025 15:59:46 +0000 (17:59 +0200)
commitd4077e6ad35121b97f3233da5d60763de3d23df9
tree937eddf49a4d3672ee4d05420a934fa949033959
parent9723dd0c705eb626bac2cd06b83a2c8514ed697a
x86/sev: Move __sev_[get|put]_ghcb() into separate noinstr object

Rename sev-nmi.c to noinstr.c, and move the get/put GHCB routines into it too,
which are also annotated as 'noinstr' and suffer from the same problem as the
NMI code, i.e., that GCC may ignore the __no_sanitize_address__ function
attribute implied by 'noinstr' and insert KASAN instrumentation anyway.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250828102202.1849035-37-ardb+git@google.com
arch/x86/boot/startup/sev-startup.c
arch/x86/coco/sev/Makefile
arch/x86/coco/sev/noinstr.c [moved from arch/x86/coco/sev/sev-nmi.c with 61% similarity]