|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/arm: Fix under-mapping in map_range_to_domain()
Hi Michal, On 07/10/2026 15:58, Michal Orzel wrote: If the memory region to be mapped does not start at the page boundary and its end spans over the page boundary, map_range_to_domain() passes a number of pages that is short by one to map_regions_p2mt(). Domain's attempt to access memory within that page will fail. Fix it by calculating the number of pages to be mapped taking into account the start offset. Can you provide an example where the caller doesn't suitably align? The fix LGTM in the current context. However given map_range_to_domain() is now used in more places (e.g. overlay), I wonder whether this is the right decision to allow map_range_to_domain() with non-aligned region. Imagine a user say "I want to map 0x400 - 0x1000 to domain A and map domain B "0x0 - 0x400". This could result to interesting behavior if the user is not aware of the alignment (this would become even more problematic if we decide to ever support different page granularity on Arm). Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |