mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ahmad AG <ahmadag1001@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	kuba@kernel.org, davem@davemloft.net, edumazet@kernel.org,
	pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v4] net/packet: account user-triggered allocations to memcg
Date: Mon,  2 Nov 2026 16:18:36 +0300	[thread overview]
Message-ID: <20261102131836.1074942-1-ahmadag1001@gmail.com> (raw)
In-Reply-To: <179361314688.3131.15505744143383263524@kernel.org>

> Does this fully close the PACKET_ADD_MEMBERSHIP bypass described in the
> commit message?

It covers the packet_mclist entries, which is what the commit message
claims, and the PACKET_MR_PROMISC numbers measure exactly that path.

The struct netdev_hw_addr entries are a separate case. They are device
state in net/core, shared and refcounted across every dev_uc_add() and
dev_mc_add() caller, and allocated with GFP_ATOMIC under
netif_addr_lock_bh(). Accounting them changes behaviour for all of
those callers, not just AF_PACKET, so I would rather keep it out of
this fix and look at it as a separate net/core patch if that is wanted.

      reply	other threads:[~2026-11-02 13:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01  9:48 Ahmad AG
2026-11-02  9:52 ` netdev-bot+sashiko
2026-11-02 13:18   ` Ahmad AG [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261102131836.1074942-1-ahmadag1001@gmail.com \
    --to=ahmadag1001@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®