lkml.org 
[lkml]   [2019]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net/tls: Fix return values for setsockopt
(there is a v2, in case you missed)

On Wed, 4 Dec 2019 14:22:55 -0500, Willem de Bruijn wrote:
> On Tue, Dec 3, 2019 at 6:08 PM Jakub Kicinski wrote:
> > On Tue, 3 Dec 2019 23:44:58 +0100, Valentin Vidic wrote:
> > > ENOTSUPP is not available in userspace:
> > >
> > > setsockopt failed, 524, Unknown error 524
> > >
> > > Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
> >
> > 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?

No opinion but FWIW I'm toying with some CI for netdev, I've added a
check for use of ENOTSUPP, apparently checkpatch already sniffs out
uses of ENOSYS, so seems appropriate to add this one.

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

For the case TLS version case?

\
 
 \ /
  Last update: 2019-12-04 20:37    [W:0.117 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site