> On 24 May 2026, at 22:28, Paulo Fernando Barbosa Duarte > <[email protected]> wrote: > >> On 24 May 2026, at 21:55, Jessica Clarke <[email protected]> wrote: >> >> Would it not be more appropriate to fix MIG to respect alignment >> requirements rather than hack around it by ignoring the unaligned data? > > That’s definitely the right way of doing it, will look at that, but am afraid > I will be going > down a rabbit hole.
Jessica, I investigated it and unfortunately this alignment issue cannot be solved by MIG alone, the current used RPC pass the data to the kernel in a byte array and the alignment is incorrect. I managed to add support to int __128 locally, but I would still need create a new RPC to ensure the alignment, the main issue is this would require to many ports in a lot of userspace, so I decided not to go in that direction. But I found a better way of fixing the issue without needing to workaround with memcpy, just by redefining the struct to not have the register array v as __int128 and use another smaller type that has natural alignment with the arch, 8, 16, 32 and 64 would all work fine. As there’s no public userspace consuming aarch64 ABI at the moment, I think breaking the current ABI should be acceptable. Let me know your thoughts. Sergey your input here would also be appreciated. Paulo
