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-next>] [day] [month] [year] [list]
Message-ID: <178b9f2dbb3c56fcfef46a97ea395bdd13ebfb59.camel@redhat.com>
Date: Thu, 15 Feb 2024 18:41:17 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Jon Maloy <jmaloy@...hat.com>, Eric Dumazet <edumazet@...gle.com>
Cc: kuba@...nel.org, passt-dev@...st.top, sbrivio@...hat.com,
 lvivier@...hat.com,  dgibson@...hat.com, netdev@...r.kernel.org,
 davem@...emloft.net
Subject: Re: [PATCH v3] tcp: add support for SO_PEEK_OFF

Note: please send text-only email to netdev.

On Thu, 2024-02-15 at 10:11 -0500, Jon Maloy wrote:
> I wonder if the following could be acceptable:
> 
>  if (flags & MSG_PEEK)
>         sk_peek_offset_fwd(sk, used);
>  else if (peek_offset > 0)
>        sk_peek_offset_bwd(sk, used);
> 
>  peek_offset is already present in the data cache, and if it has the value
>  zero it means either that that sk->sk_peek_off is unused (-1) or actually is zero.
>  Either way, no rewind is needed in that case.

I agree the above should avoid touching cold cachelines in the
fastpath, and looks functionally correct to me.

The last word is up to Eric :)

Cheers,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ