[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] misra: address Rule 11.3 for NextMemoryDescriptor macro
- To: Jan Beulich <jbeulich@xxxxxxxx>, Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>
- From: Julien Grall <julien@xxxxxxx>
- Date: Sun, 26 Oct 2025 21:37:43 +0000
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Sun, 26 Oct 2025 21:38:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Jan,
On 24/10/2025 08:43, Jan Beulich wrote:
On 23.10.2025 20:00, Dmytro Prokopchuk1 wrote:
--- a/xen/arch/arm/efi/efi-boot.h
+++ b/xen/arch/arm/efi/efi-boot.h
@@ -227,6 +227,7 @@ static EFI_STATUS __init
efi_process_memory_map_bootinfo(EFI_MEMORY_DESCRIPTOR *
}
}
#endif
+ /* SAF-15-safe casting a pointer */
desc_ptr = NextMemoryDescriptor(desc_ptr, desc_size);
}
While at present we have only one use site, needing per-use-site comments
isn't very nice. Putting it into the imported header isn't nice either.
Could Arm perhaps get away without using the macro, just like x86 manages
to?
IIUC, you mean something like:
EFI_MEMORY_DESCRIPTOR *desc = efi_memmap + i;
If so, this would work for me.
Cheers,
--
Julien Grall
|