[PATCH 1/2] riscv: Use pointer masking to limit uaccess speculation
Lukas Gerlach
lukas.gerlach at cispa.de
Tue Jan 6 02:30:10 PST 2026
Thanks for the feedback.
> I would suggest to fix VA_BITS definition instead of defining a new macro here.
I can make VA_BITS branchfree at the cost of readability. Let me know
if that's preferred over a separate macro.
I agree that the guard page approach is more robust than clearing the sign
bit. Is Smnpm currently used or planned for the kernel? If not, clearing
the sign bit should be sufficient since it creates a non-canonical address
that always faults.
Thanks,
Lukas
More information about the linux-riscv
mailing list