Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Bobby Eshleman <bobbyeshleman@gmail.com>
Cc: Donald Hunter <donald.hunter@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Shuah Khan <shuah@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	Stanislav Fomichev <sdf@fomichev.me>,
	Mina Almasry <almasrymina@google.com>,
	Bobby Eshleman <bobbyeshleman@meta.com>
Subject: Re: [PATCH net-next 2/2] selftests: drv-net: add userns devmem RX test
Date: Mon, 1 Jun 2026 16:36:49 -0700	[thread overview]
Message-ID: <20260601163649.50510141@kernel.org> (raw)
In-Reply-To: <20260601-nl-prov-v1-2-9bc57d6ca3f3@meta.com>

On Mon, 01 Jun 2026 12:24:28 -0700 Bobby Eshleman wrote:
> From: Bobby Eshleman <bobbyeshleman@meta.com>
> 
> Add userns_devmem.py, which mirrors nk_devmem.py but places the netkit
> guest in a netns whose owning user_ns is non-init. ncdevmem is ran there
> via nsenter so the bind-rx call is issued with creds that hold
> CAP_NET_ADMIN only in the child user_ns.
> 
> Without the preceding GENL_UNS_ADMIN_PERM patch the test fails at
> bind-rx with EPERM, but with the patch the transfer completes and tests
> pass.

# Traceback (most recent call last):
#   File "/srv/vmksft/testing/wt-17/tools/testing/selftests/drivers/net/./hds.py", line 8, in <module>
#     from lib.py import ksft_run, ksft_exit, ksft_eq, ksft_raises, KsftSkipEx
#   File "/srv/vmksft/testing/wt-17/tools/testing/selftests/drivers/net/lib/py/__init__.py", line 50, in <module>
#     from .env import NetDrvEnv, NetDrvEpEnv, NetDrvContEnv
#   File "/srv/vmksft/testing/wt-17/tools/testing/selftests/drivers/net/lib/py/env.py", line 12, in <module>
#     from lib.py import NetNS, NetdevSimDev, UserNetNS
# ImportError: cannot import name 'UserNetNS' from partially initialized module 'lib.py' (most likely due to a circular import) (/srv/vmksft/testing/wt-17/tools/testing/selftests/drivers/net/lib/py/__init__.py)

      reply	other threads:[~2026-06-01 23:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 19:24 [PATCH net-next 0/2] net: devmem: allow bind-rx from non-init user namespaces Bobby Eshleman
2026-06-01 19:24 ` [PATCH net-next 1/2] " Bobby Eshleman
2026-06-01 19:24 ` [PATCH net-next 2/2] selftests: drv-net: add userns devmem RX test Bobby Eshleman
2026-06-01 23:36   ` 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=20260601163649.50510141@kernel.org \
    --to=kuba@kernel.org \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bobbyeshleman@gmail.com \
    --cc=bobbyeshleman@meta.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@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