x86: fix off-by-one in is_xen_fixed_mfn()
authorJan Beulich <jbeulich@suse.com>
Fri, 25 Oct 2019 08:38:58 +0000 (10:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 25 Oct 2019 08:38:58 +0000 (10:38 +0200)
commit9633929824204ca7a6d60d083466de79993d60f1
tree5e7d2b150a3e6d9d028088f50446c6112dc5b2e4
parent333d7412796e8fd485bfbb79180a520f7e08bc27
x86: fix off-by-one in is_xen_fixed_mfn()

__2M_rwdata_end marks the first byte after the Xen image, not its last
byte. Subtract 1 to obtain the upper bound to compare against. (Note
that instead switching from <= to < is less desirable, as in principle
__pa() might return rubbish for addresses outside of the Xen image.)

Since the & needs to be dropped from the line in question, also drop it
from the adjacent one.

Reported-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/include/asm-x86/mm.h