|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 1/3] xen/arm: Add memory overlap check for bootinfo.reserved_mem
On 31/01/2023 02:25, Henry Wang wrote: Hi Julien,-----Original Message----- From: Julien Grall <julien@xxxxxxx> Subject: Re: [PATCH v3 1/3] xen/arm: Add memory overlap check for bootinfo.reserved_mem Hi Henry, Yes. That said, unless we rework 'bank', we would not properly solve the problem. But that's likely a bigger piece of work and not something I would request. So for now, I would suggest to add a comment. Stefano, what do you think?...I am not really sure if simply adding a comment here would help, because when the overflow happens, we are already doomed because of the messed-up device tree. Not necessarily. This could happen if the region is right at the top of the address (e.g. finishing at 2^64 - 1). As the 'end' is exclusive, then it would be equal to 0. I think this is less likely for arm64, but this could happen for 32-bit Arm as we will allow the admin to reduce paddr_t from 64-bit to 32-bit. Would adding a `BUG_ON(region_end < region_start)` make sense to you? No for the reason I stated above.
No worries. That might be only me using [ and ) interchangeably :). To keep consistency, may I use ')' here? Because I think this is the current way in the code base, for example see: xen/include/xen/numa.h L99: [*start, *end) xen/drivers/passthrough/amd/iommu_acpi.c L177: overlap [%lx,%lx) I am fine with that. BTW, the same comments applies for the second patch.I will fix this patch and #2 in v4. I am happy to deal with it on commit if you want. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |