All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: 0x7f454c46@gmail.com
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shuah Khan <shuah@kernel.org>,
	Mohammad Nassiri <mnassiri@ciena.com>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 4/8] selftests/net: Open /proc/thread-self in open_netns()
Date: Wed, 21 Aug 2024 20:11:33 +0100	[thread overview]
Message-ID: <20240821191133.GG2164@kernel.org> (raw)
In-Reply-To: <20240815-tcp-ao-selftests-upd-6-12-v3-4-7bd2e22bb81c@gmail.com>

On Thu, Aug 15, 2024 at 10:32:29PM +0100, Dmitry Safonov via B4 Relay wrote:
> From: Dmitry Safonov <0x7f454c46@gmail.com>
> 
> It turns to be that open_netns() is called rarely from the child-thread
> and more often from parent-thread. Yet, on initialization of kconfig
> checks, either of threads may reach kconfig_lock mutex first.
> VRF-related checks do create a temprary ksft-check VRF in

nit: temporary

     Flagged by checkpatch.pl --codespell

> an unshare()'d namespace and than setns() back to the original.
> As original was opened from "/proc/self/ns/net", it's valid for
> thread-leader (parent), but it's invalid for the child, resulting
> in the following failure on tests that check has_vrfs() support:
> > # ok 54 TCP-AO required on socket + TCP-MD5 key: prefailed as expected: Key was rejected by service
> > # not ok 55 # error 381[unsigned-md5.c:24] Failed to add a VRF: -17
> > # not ok 56 # error 383[unsigned-md5.c:33] Failed to add a route to VRF: -22: Key was rejected by service
> > not ok 1 selftests: net/tcp_ao: unsigned-md5_ipv6 # exit=1
> 
> Use "/proc/thread-self/ns/net" which is valid for any thread.
> 
> Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>

...

  reply	other threads:[~2024-08-21 19:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-15 21:32 [PATCH net-next v3 0/8] net/selftests: TCP-AO selftests updates Dmitry Safonov
2024-08-15 21:32 ` Dmitry Safonov via B4 Relay
2024-08-15 21:32 ` [PATCH net-next v3 1/8] selftests/net: Clean-up double assignment Dmitry Safonov
2024-08-15 21:32   ` Dmitry Safonov via B4 Relay
2024-08-15 21:32 ` [PATCH net-next v3 2/8] selftests/net: Provide test_snprintf() helper Dmitry Safonov
2024-08-15 21:32   ` Dmitry Safonov via B4 Relay
2024-08-21 19:10   ` Simon Horman
2024-08-21 21:35     ` Dmitry Safonov
2024-08-22 10:13       ` Simon Horman
2024-08-23 14:27         ` Dmitry Safonov
2024-08-15 21:32 ` [PATCH net-next v3 3/8] selftests/net: Be consistent in kconfig checks Dmitry Safonov
2024-08-15 21:32   ` Dmitry Safonov via B4 Relay
2024-08-15 21:32 ` [PATCH net-next v3 4/8] selftests/net: Open /proc/thread-self in open_netns() Dmitry Safonov
2024-08-15 21:32   ` Dmitry Safonov via B4 Relay
2024-08-21 19:11   ` Simon Horman [this message]
2024-08-21 21:44     ` Dmitry Safonov
2024-08-22 10:14       ` Simon Horman
2024-08-15 21:32 ` [PATCH net-next v3 5/8] selftests/net: Don't forget to close nsfd after switch_save_ns() Dmitry Safonov
2024-08-15 21:32   ` Dmitry Safonov via B4 Relay
2024-08-15 21:32 ` [PATCH net-next v3 6/8] selftests/tcp_ao: Fix printing format for uint64_t Dmitry Safonov
2024-08-15 21:32   ` Dmitry Safonov via B4 Relay
2024-08-15 21:32 ` [PATCH net-next v3 7/8] selftests/net: Synchronize client/server before counters checks Dmitry Safonov
2024-08-15 21:32   ` Dmitry Safonov via B4 Relay
2024-08-15 21:32 ` [PATCH net-next v3 8/8] selftests/net: Add trace events matching to tcp_ao Dmitry Safonov
2024-08-15 21:32   ` Dmitry Safonov via B4 Relay
2024-08-19 17:19 ` [PATCH net-next v3 0/8] net/selftests: TCP-AO selftests updates Dmitry Safonov

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=20240821191133.GG2164@kernel.org \
    --to=horms@kernel.org \
    --cc=0x7f454c46@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mnassiri@ciena.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --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 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.