lkml.org 
[lkml]   [2022]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 23/31] net/tcp: Add getsockopt(TCP_AO_GET)
From
On 8/18/22 19:59, Dmitry Safonov wrote:
> Introduce getsockopt() that let user get TCP-AO keys and their
> properties from a socket. A user can provide a filter to match
> a specific key to be dumped or TCP_AO_GET_ALL flag may be used to dump
> all keys in one syscall.

No equivalent for this exists for TCP_MD5SIG or my TCP_AUTHOPT series. I
do however have a proc file to dump all keys in the system.

The list of keys is normally fully controlled by a single application so
it shouldn't need to read back the keys that it wrote itself. The real
reason this exists is because on the server side keys are copied on
"synack" rather than "accept" and userspace can't know if a newly
accepted socket has all the latest keychain updates.

This effectively dumps responsibility for a kernel implementation race
onto userspace. At least you should mention how it's meant to be used in
the commit message, and that it's not really optional.

I think making keys global is easier for userspace to use, despite the
difference versus TCP_MD5.

--
Regards,
Leonard

\
 
 \ /
  Last update: 2022-08-23 18:38    [W:0.331 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site