x86: fix off-by-one in is_xen_fixed_mfn()
authorJan Beulich <jbeulich@suse.com>
Mon, 25 Nov 2019 15:17:14 +0000 (16:17 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 25 Nov 2019 15:17:14 +0000 (16:17 +0100)
commit0b1e97d77f3003ad1775eb0e4fae4350941f962a
tree02092e81229d86a075dc22fabbd10cd22c1dbec3
parent41d85cbeaff2bcb6ba1a28fcc322f91c4930b98b
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>
master commit: 9633929824204ca7a6d60d083466de79993d60f1
master date: 2019-10-25 10:38:58 +0200
xen/include/asm-x86/mm.h