• Juergen Gross's avatar
    x86/entry: Fix entry_INT80_compat for Xen PV guests · 5b9f0c4d
    Juergen Gross authored
    Commit
    
      c89191ce ("x86/entry: Convert SWAPGS to swapgs and remove the definition of SWAPGS")
    
    missed one use case of SWAPGS in entry_INT80_compat(). Removing of
    the SWAPGS macro led to asm just using "swapgs", as it is accepting
    instructions in capital letters, too.
    
    This in turn leads to splats in Xen PV guests like:
    
      [   36.145223] general protection fault, maybe for address 0x2d: 0000 [#1] PREEMPT SMP NOPTI
      [   36.145794] CPU: 2 PID: 1847 Comm: ld-linux.so.2 Not tainted 5.19.1-1-default #1 \
    	  openSUSE Tumbleweed f3b44bfb672cdb9f235aff53b57724eba8b9411b
      [   36.146608] Hardware name: HP ProLiant ML350p Gen8, BIOS P72 11/14/2013
      [   36.148126] RIP: e030:entry_INT80_compat+0x3/0xa3
    
    Fix that by open coding this single instance of the SWAPGS macro.
    
    Fixes: c89191ce ("x86/entry: Convert SWAPGS to swapgs and remove the definition of SWAPGS")
    Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Reviewed-by: default avatarJan Beulich <jbeulich@suse.com>
    Cc: <stable@vger.kernel.org> # 5.19
    Link: https://lore.kernel.org/r/20220816071137.4893-1-jgross@suse.com
    5b9f0c4d
entry_64_compat.S 10.9 KB