|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2] arm/xen: zero init memory region before returning to the heap
Hi Dmytro, On 31/10/2025 16:02, Dmytro Prokopchuk1 wrote: The current implementation of 'free_init_memory()' fills the freed '__init' and '__initdata' memory regions with a faulting instruction before unmapping and returning them to the heap. However, after unmapping, any access to this region will result in a page fault, making the instruction fill redundant. Replace the instruction fill with a call to 'memset()', zeroing the entire region before it is unmapped and returned to the allocator. Additionally, this change resolves a violation of MISRA C:2012 Rule 11.3 (cast between pointer to object type and pointer to a different object type), caused by performing a cast from a 'char *' to a 'uint32_t *' pointer to write instructions directly into memory, which is not compliant with MISRA guidelines. No functional changes. Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@xxxxxxxx> Acked-by: Julien Grall <jgrall@xxxxxxxxxx> Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |