From: Jakub Kicinski <kuba@kernel.org>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>,
netdev@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH net-next] net: dummy: add phony ndo_setup_tc stub
Date: Tue, 9 Jun 2026 16:03:06 -0700 [thread overview]
Message-ID: <20260609160306.79be97b5@kernel.org> (raw)
In-Reply-To: <aiiaGPj0XQ0mx-cp@chamomile>
On Wed, 10 Jun 2026 00:56:24 +0200 Pablo Neira Ayuso wrote:
> On Tue, Jun 09, 2026 at 04:28:09PM +0200, Florian Westphal wrote:
> > diff --git a/net/netfilter/nf_tables_offload.c b/net/netfilter/nf_tables_offload.c
> > index 9101b1703b52..26e7ed5a8575 100644
> > --- a/net/netfilter/nf_tables_offload.c
> > +++ b/net/netfilter/nf_tables_offload.c
> > @@ -234,6 +234,9 @@ bool nft_chain_offload_support(const struct nft_base_chain *basechain)
> > return false;
> >
> > dev = ops->dev;
> > + if (dev_net(dev)->user_ns != &init_user_ns)
> > + return false;
>
> I have no idea how hardware offload can be used away from init_net_ns
> (not even init_user_ns). For most drivers, this exposes the same
> hardware offload capabilities for all netns, so they can interfer
> each?
>
> @Jakub: Did you mention any driver that already support netns?
> Otherwise, maybe it is worth to restrict driver which do not explicit
> opt-in to netns support?
IDK if any SW driver can do it, I guess that's the risk here.
For HW drivers it doesn't matter which netns they are in, offload
should just work. But of course malicious users can't conjure up HW
devices, admin has to explicitly move the device into a netns.
Which is an explicit "permission grant".
The offload itself should be inherently netns aware since it should
not cross netns boundaries?
prev parent reply other threads:[~2026-06-09 23:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 14:28 [PATCH net-next] net: dummy: add phony ndo_setup_tc stub Florian Westphal
2026-06-09 22:15 ` Jakub Kicinski
2026-06-09 22:25 ` Florian Westphal
2026-06-09 22:52 ` Jakub Kicinski
2026-06-09 22:56 ` Pablo Neira Ayuso
2026-06-09 23:03 ` Jakub Kicinski [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=20260609160306.79be97b5@kernel.org \
--to=kuba@kernel.org \
--cc=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.