]> xenbits.xensource.com Git - xen.git/commit
compat/memory: avoid UB shifts in XENMEM_exchange handling
authorJan Beulich <jbeulich@suse.com>
Tue, 22 Apr 2025 09:25:23 +0000 (11:25 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 22 Apr 2025 09:25:23 +0000 (11:25 +0200)
commit560c51be8f6a88cde43c0a7c8be60158b5725982
tree377c8f710b3d6b8c58611652de9887a5c8d48de8
parent142f0a43a15af0a2f527c7cffe145eb587f14ff0
compat/memory: avoid UB shifts in XENMEM_exchange handling

Add an early basic check, yielding the same error code as the more
thorough one the main handler would produce.

Fixes: b8a7efe8528a ("Enable compatibility mode operation for HYPERVISOR_memory_op")
Reported-by: Manuel Andreas <manuel.andreas@tum.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/compat/memory.c