Re: [PATCH 4/6] riscv: hwprobe: Report Supm only when available
From: Andy Chiu
Date: Fri Oct 16 2026 - 17:29:46 EST
On Tue, Oct 06, 2026 at 09:53:01AM +0200, Radim Krcmár wrote:
> The RISC-V ISA defines Supm as
>
> "An extension that indicates that there is pointer-masking support
> available in user mode, with some facility provided in the application
> execution environment to control pointer masking."
>
> Our facility always returns -EINVAL unless Supm support is configured,
> the pointer masking ISA extension is globally present, and the user-mode
> is running in 64-bit mode.
>
> Hiding Supm in compat tasks would add complexity that doesn't seem
> justified as 32-bit code has no reason to look at Supm anyway.
> Reporting based on the a global sysctl toggle isn't done.
>
> Do not report Supm when some harts lack the extension, because it's not
> available on any hart in that case.
>
> (Reporting Supm when only PMLEN=0 is supported isn't great, but doesn't
> violate the text of the extension and we ought to have Supm7 and Supm16
> extensions if we care about precision.)
>
> Fixes: 3c2e0aff7b4f ("riscv: hwprobe: Export the Supm ISA extension")
> Signed-off-by: Radim Krcmár <radim.krcmar@xxxxxxxxxxxxxxxx>
Reviewed-by: Andy Chiu <tchiu@xxxxxxxxxxxxxxx>
> ---
> The compat hiding and global sysctl toggle better fit in Andy's series.
>
Sorry, I am not aware of any ongoing series that does the compat hiding,
but I will keep an eye on it.
Thanks,
Andy