On Sun, Dec 01, 2024 at 05:47:13AM +0800, Celeste Liu wrote: > The orig_a0 is missing in struct user_regs_struct of riscv, and there is > no way to add it without breaking UAPI. (See Link tag below) We have had a patch sitting on the lists for a very long time to do this which I guess didn't get enough attention. I am glad that we have more eyes on this problem now so it can actually be fixed :) [1]. However that patch has the problem that it modifies the user_regs_struct. It is super unfortunate that riscv didn't have the foresight of loongarch to add padding. There is a nice test case in there that would be great to get added alongside this commit with the appropriate changes. [2] [1] https://lore.kernel.org/linux-riscv/cover.1719408040.git.zhouquan@xxxxxxxxxxx/ [2] https://lore.kernel.org/linux-riscv/1e9cbab1b0badc05592fce46717418930076a6ae.1719408040.git.zhouquan@xxxxxxxxxxx/ Since I am familiar with the code I have gone ahead and made the appropriate changes. Here is the diff: