public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* strerror for 524
@ 2019-11-30 13:29 Jeffrey Walton
  2019-11-30 14:41 ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffrey Walton @ 2019-11-30 13:29 UTC (permalink / raw)
  To: libc-help

Hi Everyone,

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.

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1778348
[1] https://patchwork.ozlabs.org/patch/309627/
[2] https://lkml.org/lkml/2019/5/16/883
[3] https://duckduckgo.com/?q="Unknown+error+524"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: strerror for 524
  2019-11-30 13:29 strerror for 524 Jeffrey Walton
@ 2019-11-30 14:41 ` Florian Weimer
  2019-12-01 18:30   ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2019-11-30 14:41 UTC (permalink / raw)
  To: Jeffrey Walton; +Cc: libc-help

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: strerror for 524
  2019-11-30 14:41 ` Florian Weimer
@ 2019-12-01 18:30   ` Florian Weimer
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2019-12-01 18:30 UTC (permalink / raw)
  To: libc-help

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-01 18:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-30 13:29 strerror for 524 Jeffrey Walton
2019-11-30 14:41 ` Florian Weimer
2019-12-01 18:30   ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).