We write to a data structure in assembly. Because of this we need to
annotate the function manually for KMSAN to know the contents have been
written otherwise it picks up later reads as loading uninitialised data.
Sponsored by: Arm Ltd
Differential D47317
psci: Teach the arm SMCCC code about KMSAN andrew on Oct 28 2024, 5:12 PM. Authored by Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions This feels over-engineered: why not just make always-on C wrappers for the assembly routines and handle marking there? I don't see a need for a separate file and the extra indirection.
Comment Actions Why can't this be done in C? e.g., have asm _arm_smccc_1_2_hvc() which is called by the C function arm_smccc_1_2_hvc(). Comment Actions It seems like an unneeded level of indirection in the non-KMSAN case
Comment Actions These aren't performance-critical in any way, so I'm not sure why it matters. I don't object to handling everything in asm, but it really seems like it'd be simpler and cleaner to handle KMSAN marking in C.
|