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] [day] [month] [year] [list]
Message-ID: <CANn89iJ7DDA4gM2vDAwhOyc5KGXPmOBGATMQfXD8FHUAFbVDvQ@mail.gmail.com>
Date: Thu, 28 Aug 2025 00:09:24 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Qingfang Deng <dqfext@...il.com>
Cc: Michal Ostrowski <mostrows@...thlink.net>, Andrew Lunn <andrew+netdev@...n.ch>, 
	"David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3 2/2] pppoe: drop sock reference counting on
 fast path

On Wed, Aug 27, 2025 at 6:20 PM Qingfang Deng <dqfext@...il.com> wrote:
>
> Now that PPPoE sockets are freed via RCU (SOCK_RCU_FREE), it is no longer
> necessary to take a reference count when looking up sockets on the receive
> path. Readers are protected by RCU, so the socket memory remains valid
> until after a grace period.
>
> Convert fast-path lookups to avoid refcounting:
>  - Replace get_item() and sk_receive_skb() in pppoe_rcv() with
>    __get_item() and __sk_receive_skb().
>  - Rework get_item_by_addr() into __get_item_by_addr() (no refcount and
>    move RCU lock into pppoe_ioctl)
>  - Remove unnecessary sock_put() calls.
>
> This avoids cacheline bouncing from atomic reference counting and improves
> performance on the receive fast path.
>
> Signed-off-by: Qingfang Deng <dqfext@...il.com>

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ