netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Damato <jdamato@fastly.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, stable@vger.kernel.org,
	almasrymina@google.com, amritha.nambiar@intel.com,
	sridhar.samudrala@intel.com
Subject: Re: [PATCH net] netdev: prevent accessing NAPI instances from another namespace
Date: Wed, 8 Jan 2025 09:24:10 -0800	[thread overview]
Message-ID: <Z360uoTfHrl5VwSB@LQ3V64L9R2> (raw)
In-Reply-To: <20250106180137.1861472-1-kuba@kernel.org>

On Mon, Jan 06, 2025 at 10:01:36AM -0800, Jakub Kicinski wrote:
> The NAPI IDs were not fully exposed to user space prior to the netlink
> API, so they were never namespaced. The netlink API must ensure that
> at the very least NAPI instance belongs to the same netns as the owner
> of the genl sock.
> 
> napi_by_id() can become static now, but it needs to move because of
> dev_get_by_napi_id().
> 
> Cc: stable@vger.kernel.org
> Fixes: 1287c1ae0fc2 ("netdev-genl: Support setting per-NAPI config values")
> Fixes: 27f91aaf49b3 ("netdev-genl: Add netlink framework functions for napi")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> Splitting this into fix per-version is a bit tricky, because we need
> to replace the napi_by_id() helper with a better one. I'll send the
> stable versions manually.
> 
> CC: jdamato@fastly.com
> CC: almasrymina@google.com
> CC: amritha.nambiar@intel.com
> CC: sridhar.samudrala@intel.com
> ---
>  net/core/dev.c         | 43 +++++++++++++++++++++++++++++-------------
>  net/core/dev.h         |  3 ++-
>  net/core/netdev-genl.c |  6 ++----
>  3 files changed, 34 insertions(+), 18 deletions(-)

Thanks.

Reviewed-by: Joe Damato <jdamato@fastly.com>

  parent reply	other threads:[~2025-01-08 17:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06 18:01 [PATCH net] netdev: prevent accessing NAPI instances from another namespace Jakub Kicinski
2025-01-07  5:30 ` Samudrala, Sridhar
2025-01-07 13:10 ` Willem de Bruijn
2025-01-07 16:36   ` Jakub Kicinski
2025-01-07 20:31     ` Willem de Bruijn
2025-01-08 17:24 ` Joe Damato [this message]
2025-01-08 19:20 ` patchwork-bot+netdevbpf

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=Z360uoTfHrl5VwSB@LQ3V64L9R2 \
    --to=jdamato@fastly.com \
    --cc=almasrymina@google.com \
    --cc=amritha.nambiar@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).