[PATCH] linux: Add mseal syscall support
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Mon Oct 13 20:48:15 GMT 2025
On 10/10/25 16:41, Collin Funk wrote:
> Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
>
>> + if (errno == ENOSYS)
>> + FAIL_UNSUPPORTED
>> + ("kernel does not support memory protection keys");
>> + if (errno == EINVAL)
>> + FAIL_UNSUPPORTED
>> + ("CPU does not support memory protection keys: %m");
>
> Do any other syscalls fail with different errno's depending on if the
> kernel or the CPU do not support them? I feel like it is better to use
> ENOSYS in both cases, but maybe I am missing something.
I am trying to recall why I had to add this on previous version, I had the
impression that was because on 32-bit kernels the syscall might return it
but double checking it does return ENOSYS in this case as well.
I will remove this check.
>
> Also, for formatting long lines like this I think the following looks
> better:
>
> FAIL_UNSUPPORTED ("CPU does not support "
> "memory protection keys: %m");
>
> Collin
Ack, I will double check the size.
More information about the Libc-alpha
mailing list