OSDN Git Service

x86/xen/32: Make xen_iret_crit_fixup() independent of frame layout
authorJan Beulich <jbeulich@suse.com>
Mon, 11 Nov 2019 14:32:12 +0000 (15:32 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 19 Nov 2019 20:58:28 +0000 (21:58 +0100)
commit29b810f5a5ec127d3143770098e05981baa3eb77
treeda09a8c8e9d7ad026bcb3d99222464a91aa16dd0
parent81ff2c37f9e5d77593928df0536d86443195fd64
x86/xen/32: Make xen_iret_crit_fixup() independent of frame layout

Now that SS:ESP always get saved by SAVE_ALL, this also needs to be
accounted for in xen_iret_crit_fixup(). Otherwise the old_ax value gets
interpreted as EFLAGS, and hence VM86 mode appears to be active all the
time, leading to random "vm86_32: no user_vm86: BAD" log messages alongside
processes randomly crashing.

Since following the previous model (sitting after SAVE_ALL) would further
complicate the code _and_ retain the dependency of xen_iret_crit_fixup() on
frame manipulations done by entry_32.S, switch things around and do the
adjustment ahead of SAVE_ALL.

Fixes: 3c88c692c287 ("x86/stackframe/32: Provide consistent pt_regs")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: Stable Team <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/32d8713d-25a7-84ab-b74b-aa3e88abce6b@suse.com
arch/x86/entry/entry_32.S
arch/x86/xen/xen-asm_32.S