strerror for 524

Florian Weimer fw@deneb.enyo.de
Sat Nov 30 14:41:00 GMT 2019


* 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.



More information about the Libc-help mailing list