Thread (17 messages) 17 messages, 4 authors, 2019-12-07

Re: [PATCH] net/tls: Fix return values for setsockopt

flat view

From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: 2019-12-04 19:23:37
Also in: lkml

On Tue, Dec 3, 2019 at 6:08 PM Jakub Kicinski
[off-list ref] wrote:
On Tue,  3 Dec 2019 23:44:58 +0100, Valentin Vidic wrote:
quoted
ENOTSUPP is not available in userspace:

  setsockopt failed, 524, Unknown error 524

Signed-off-by: Valentin Vidic <redacted>
I'm not 100% clear on whether we can change the return codes after they
had been exposed to user space for numerous releases..
This has also come up in the context of SO_ZEROCOPY in the past. In my
opinion the answer is no. A quick grep | wc -l in net/ shows 99
matches for this error code. Only a fraction of those probably make it
to userspace, but definitely more than this single case.

If anything, it may be time to define it in uapi?

But if we can - please fix the tools/testing/selftests/net/tls.c test
as well, because it expects ENOTSUPP.
Even if changing the error code, EOPNOTSUPP is arguably a better
replacement. The request itself is valid. Also considering forward
compatibility.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help