lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66d0856b4234a_38c94929436@willemb.c.googlers.com.notmuch>
Date: Thu, 29 Aug 2024 10:27:55 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>, 
 Vadim Fedorenko <vadfed@...a.com>, 
 Jakub Kicinski <kuba@...nel.org>, 
 Willem de Bruijn <willemb@...gle.com>, 
 Paolo Abeni <pabeni@...hat.com>, 
 David Ahern <dsahern@...nel.org>
Cc: netdev@...r.kernel.org
Subject: Re: [RFC PATCH] net_tstamp: add SCM_TS_OPT_ID to provide OPT_ID in
 control message

Vadim Fedorenko wrote:
> On 29/08/2024 14:31, Willem de Bruijn wrote:
> > Vadim Fedorenko wrote:
> >> SOF_TIMESTAMPING_OPT_ID socket option flag gives a way to correlate TX
> >> timestamps
> > 
> > +1 on the feature. Few minor points only.
> > 
> > Not a hard requirement, but would be nice if there was a test,
> > e.g., as a tools/testing/../txtimestamp.c extension.
> 
> Sure, I'll add some tests in the next version.
> 
> 
> >> and packets sent via socket. Unfortunately, there is no way
> >> to reliably predict socket timestamp ID value in case of error returned
> >> by sendmsg [1].
> > 
> > Might be good to copy more context from the discussion to explain why
> > reliable OPT_ID is infeasible. For UDP, it is as simple as lockless
> > transmit. For RAW, things like MSG_MORE come into play.
> 
> Ok, I'll add it, thanks!
> 
> >> This patch adds new control message type to give user-space
> >> software an opportunity to control the mapping between packets and
> >> values by providing ID with each sendmsg. This works fine for UDP
> >> sockets only, and explicit check is added to control message parser.
> >> Also, there is no easy way to use 0 as provided ID, so this is value
> >> treated as invalid.
> > 
> > This is because the code branches on non-zero value in the cookie,
> > else uses ts_key. Please make this explicit. Or perhaps better, add a
> > bit in the cookie so that the full 32-bit space can be used.
> 
> Adding a bit in the cookie is not enough, I have to add another flag to
> inet_cork. And we are running out of space for tx flags, 
> inet_cork::tx_flags is u8 and we have only 1 bit left for SKBTX* enum.
> Do you think it's OK to use this last bit for OPT_ID feature?

No, that space is particularly constrained in skb_shinfo.

Either a separate bit in inet_cork, or just keep as is.
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ