]> git.ipfire.org Git - people/arne_f/kernel.git/commit
x86/xen/32: Simplify ring check in xen_iret_crit_fixup()
authorJan Beulich <jbeulich@suse.com>
Mon, 11 Nov 2019 14:32:59 +0000 (15:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2019 09:08:03 +0000 (10:08 +0100)
commit238e5e0984c53e759d1cd908f94113e175db0aca
tree5d5af9b623fdfaaf1ce6ff9c81feb617c8a0225d
parent5be31d632d75c4c81c5d9fef0c5c3fde42e74715
x86/xen/32: Simplify ring check in xen_iret_crit_fixup()

commit 922eea2ce5c799228d9ff1be9890e6873ce8fff6 upstream.

This can be had with two instead of six insns, by just checking the high
CS.RPL bit.

Also adjust the comment - there would be no #GP in the mentioned cases, as
there's no segment limit violation or alike. Instead there'd be #PF, but
that one reports the target EIP of said branch, not the address of the
branch insn itself.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lkml.kernel.org/r/a5986837-01eb-7bf8-bf42-4d3084d6a1f5@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/xen/xen-asm_32.S