strerror for 524

Florian Weimer fw@deneb.enyo.de
Sun Dec 1 18:30:00 GMT 2019


* Florian Weimer:

> * Jeffrey Walton:
>
>> I was testing the code at
>> https://www.kernel.org/doc/html/latest/networking/tls.html#kernel-tls.
>> The code returns error 524 for setsockopt. Calling strerror(errno)
>> results in "Unknown error 524".
>>
>> Error code 524 seems to be pretty prevalent. [0,1,2,3]] (and friends)
>>
>> I think the error string for code 524 could be improved. There is a
>> small list of similar error codes at
>> https://bugzilla.redhat.com/show_bug.cgi?id=1778348#c1 .
>>
>> Would glibc mind providing a useful error string.
>
> The error code is not listed in a UAPI header.  Isn't it a kernel bug
> that it leaks to userspace?
>
> The internal kernel name for 524 appears to be ENOTSUPP, but the UAPI
> headers currently define ENOTSUPP as EOPNOTSUPP, which is 95.  If the
> intent is to expose the error code to user space, that would have to
> be changed, too.

Correction: The UAPI headers do not define ENOTSUPP.  The glibc
headers define ENOTSUP (sic) as an alias for EOPNOTSUPP.

This has already been posted to the kernelnewbies list:

<http://lists.kernelnewbies.org/pipermail/kernelnewbies/2019-November/020483.html>

It should eventually go to linux-crypto and netdev, I assume.



More information about the Libc-help mailing list