• Kirill A. Shutemov's avatar
    x86/coco: Disable 32-bit emulation by default on TDX and SEV · b82a8dbd
    Kirill A. Shutemov authored
    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.sridhar...
    b82a8dbd
mem_encrypt_amd.c 13.7 KB