acrn-kernel/arch/x86/mm
Kirill A. Shutemov b8ec27ae22 x86/coco: Disable 32-bit emulation by default on TDX and SEV
[ upstream commit b82a8dbd3d2f4563156f7150c6f2ecab6e960b30 ]

The INT 0x80 instruction is used for 32-bit x86 Linux syscalls. The
kernel expects to receive a software interrupt as a result of the INT
0x80 instruction. However, an external interrupt on the same vector
triggers the same handler.

The kernel interprets an external interrupt on vector 0x80 as a 32-bit
system call that came from userspace.

A VMM can inject external interrupts on any arbitrary vector at any
time.  This remains true even for TDX and SEV guests where the VMM is
untrusted.

Put together, this allows an untrusted VMM to trigger int80 syscall
handling at any given point. The content of the guest register file at
that moment defines what syscall is triggered and its arguments. It
opens the guest OS to manipulation from the VMM side.

Disable 32-bit emulation by default for TDX and SEV. User can override
it with the ia32_emulation=y command line option.

[ dhansen: reword the changelog ]

Reported-by: Supraja Sridhara <supraja.sridhara@inf.ethz.ch>
Reported-by: Benedict Schlüter <benedict.schlueter@inf.ethz.ch>
Reported-by: Mark Kuhne <mark.kuhne@inf.ethz.ch>
Reported-by: Andrin Bertschi <andrin.bertschi@inf.ethz.ch>
Reported-by: Shweta Shinde <shweta.shinde@inf.ethz.ch>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@vger.kernel.org> # 6.0+: 1da5c9b x86: Introduce ia32_enabled()
Cc: <stable@vger.kernel.org> # 6.0+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-13 18:39:04 +01:00
..
pat
Makefile
amdtopology.c
cpu_entry_area.c
debug_pagetables.c
dump_pagetables.c
extable.c
fault.c
highmem_32.c
hugetlbpage.c
ident_map.c
init.c
init_32.c
init_64.c
iomap_32.c
ioremap.c
kasan_init_64.c
kaslr.c
kmmio.c
kmsan_shadow.c
maccess.c
mem_encrypt.c
mem_encrypt_amd.c x86/coco: Disable 32-bit emulation by default on TDX and SEV 2023-12-13 18:39:04 +01:00
mem_encrypt_boot.S
mem_encrypt_identity.c
mm_internal.h
mmap.c
mmio-mod.c
numa.c x86/mm: Drop the 4 MB restriction on minimal NUMA node memory size 2023-11-28 17:06:55 +00:00
numa_32.c
numa_64.c
numa_emulation.c
numa_internal.h
pf_in.c
pf_in.h
pgprot.c
pgtable.c
pgtable_32.c
physaddr.c
physaddr.h
pkeys.c
pti.c
srat.c
testmmiotrace.c
tlb.c