x86/shadow: fix refcount overflow check
authorJan Beulich <jbeulich@suse.com>
Tue, 12 Dec 2017 13:29:13 +0000 (14:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Dec 2017 13:29:13 +0000 (14:29 +0100)
commit54e2292e8df7a1a7b041192be9d6d797b6d00869
treea41e1c971fe5ecdf859aaf1ed3769bf746e9b4a2
parentff2a793e15bb0b6254bc849ef8e83e1c284c3583
x86/shadow: fix refcount overflow check

Commit c385d27079 ("x86 shadow: for multi-page shadows, explicitly track
the first page") reduced the refcount width to 25, without adjusting the
overflow check. Eliminate the disconnect by using a manifest constant.

Interestingly, up to commit 047782fa01 ("Out-of-sync L1 shadows: OOS
snapshot") the refcount was 27 bits wide, yet the check was already
using 26.

This is XSA-249.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/shadow/private.h
xen/include/asm-x86/mm.h