Kernel TLS

Valdis Kl=?utf-8?Q?=c4=93?=tnieks valdis.kletnieks at vt.edu
Sat Nov 30 05:34:54 EST 2019


On Sat, 30 Nov 2019 11:10:50 +0100, Bjørn Mork said:

> My version of setsockopt(2) says
(...)
> ERRORS
>        EBADF     The  argument sockfd is not a valid file descrip‐
>                  tor.
>

Note that there is no general *guarantee* that a syscall cannot
return any values other than the ones in the manpage.

> If you look at e.g. udp_lib_setsockopt() you'll see that it conforms
> strictly to this.  I don't know why do_tcp_setsockopt() doesn't.

Probably because those are the only errors that the UDP version
can hit, but the TCP case can hit cases like "socket must be in
a connected state" and possibly other error codes.  Now, I admit
wondering why it uses ENOTSUPP rather than ENOTCONN for this
particular case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20191130/a46bff8a/attachment-0001.sig>


More information about the Kernelnewbies mailing list