xen/arm: mm: Check start is always before end in {destroy, modify}_xen_mappings
authorJulien Grall <julien.grall@arm.com>
Wed, 3 Apr 2019 10:14:10 +0000 (11:14 +0100)
committerJulien Grall <julien.grall@arm.com>
Thu, 6 Jun 2019 17:44:33 +0000 (18:44 +0100)
commit7e80a539e2805cb63c432caf7d0acafdfa1802d5
tree6a1b935055c741ecfc77acd4ee36ea89332ed61d
parent3a5d341681af650825bbe3bee9be5d187da35080
xen/arm: mm: Check start is always before end in {destroy, modify}_xen_mappings

The two helpers {destroy, modify}_xen_mappings don't check that the
start is always before the end. This should never happen but if it
happens, it will result to unexpected behavior.

Catch such issues earlier on by adding an ASSERT in destroy_xen_mappings
and modify_xen_mappings.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/mm.c