From: Jakub Kicinski <kuba@kernel.org>
To: Danny Lin <danny@orbstack.dev>
Cc: Matteo Croce <teknoraver@meta.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
David Ahern <dsahern@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] net: fully namespace net.core.{r,w}mem_{default,max} sysctls
Date: Tue, 25 Mar 2025 07:13:28 -0700 [thread overview]
Message-ID: <20250325071328.1d8e4d6a@kernel.org> (raw)
In-Reply-To: <20250325121745.8061-1-danny@orbstack.dev>
On Tue, 25 Mar 2025 05:17:33 -0700 Danny Lin wrote:
> This builds on commit 19249c0724f2 ("net: make net.core.{r,w}mem_{default,max} namespaced")
> by adding support for writing the sysctls from within net namespaces,
> rather than only reading the values that were set in init_net. These are
> relatively commonly-used sysctls, so programs may try to set them without
> knowing that they're in a container. It can be surprising for such attempts
> to fail with EACCES.
>
> Unlike other net sysctls that were converted to namespaced ones, many
> systems have a sysctl.conf (or other configs) that globally write to
> net.core.rmem_default on boot and expect the value to propagate to
> containers, and programs running in containers may depend on the increased
> buffer sizes in order to work properly. This means that namespacing the
> sysctls and using the kernel default values in each new netns would break
> existing workloads.
>
> As a compromise, inherit the initial net.core.*mem_* values from the
> current process' netns when creating a new netns. This is not standard
> behavior for most netns sysctls, but it avoids breaking existing workloads.
You'll need to repost after the merge window:
https://lore.kernel.org/all/20250324075539.2b60eb42@kernel.org/
--
pw-bot: defer
next prev parent reply other threads:[~2025-03-25 14:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 12:17 [PATCH v4] net: fully namespace net.core.{r,w}mem_{default,max} sysctls Danny Lin
2025-03-25 14:13 ` Jakub Kicinski [this message]
2025-04-18 10:10 ` Matteo Croce
2025-04-18 12:34 ` Danny Lin
-- strict thread matches above, loose matches on Subject: below --
2025-04-18 7:00 Danny Lin
2025-04-24 11:04 ` Paolo Abeni
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=20250325071328.1d8e4d6a@kernel.org \
--to=kuba@kernel.org \
--cc=danny@orbstack.dev \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=teknoraver@meta.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;
as well as URLs for NNTP newsgroup(s).