All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "Serge E. Hallyn" <serge@hallyn.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, Gao feng <gaofeng@cn.fujitsu.com>,
	pablo@netfilter.org, Stephen Hemminger <shemminger@vyatta.com>,
	Pavel Emelyanov <xemul@openvz.org>
Subject: Re: [PATCH net-next 04/19] net: Kill register_sysctl_rotable
Date: Fri, 20 Apr 2012 07:42:07 -0700	[thread overview]
Message-ID: <m1hawe79ds.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20120420135323.GA4877@mail.hallyn.com> (Serge E. Hallyn's message of "Fri, 20 Apr 2012 13:53:23 +0000")

"Serge E. Hallyn" <serge@hallyn.com> writes:

> Quoting Eric W. Biederman (ebiederm@xmission.com):
>> 
>> register_sysctl_rotable never caught on as an interesting way to
>> register sysctls.  My take on the situation is that what we want are
>> sysctls that we can only see in the initial network namespace.  What we
>> have implemented with register_sysctl_rotable are sysctls that we can
>> see in all of the network namespaces and can only change in the initial
>> network namespace.
>> 
>> That is a very silly way to go.  Just register the network sysctls
>> in the initial network namespace and we don't have any weird special
>> cases to deal with.
>> 
>> The sysctls affected are:
>> /proc/sys/net/ipv4/ipfrag_secret_interval
>> /proc/sys/net/ipv4/ipfrag_max_dist
>> /proc/sys/net/ipv6/ip6frag_secret_interval
>> /proc/sys/net/ipv6/mld_max_msf
>> 
>> I really don't expect anyone will miss them if they can't read them in a
>> child user namespace.
>
> If there was something userspace could do to work around certain values
> of these settings then I'd say keeping the readonly values is worthwhile,
> but AFAICS if a bad network context requires ipfrag_max_dist 0, there's
> nothing userspace can do about it...
>
>
> So from a container pov view at least, I'm happy with this.  I'm far from
> qualified on the netns code itself, but taking a look in the unlikely case
> I can spot something :)

In this case I figured I would copy you and a few others who have been
talking about similar things recently, and also because you might care
that a whole bunch of networking sysctls that aren't per network
namespace will stop showing up in containers.

It is my hope that we use some of these same mechanisms that allow per
network namespace sysctls will be used to allow per pid and uts
namespace sysctls as well.  It isn't as important as the files don't
change, but we can do it cleanly and one of these days I will get around
to making /proc/sys a symlink to /proc/<pid>/sys so that I can remove
the very unorthodox d_compare tricks that we use today.

The sysctl internal data structures are now a hair cleaner than what
sysfs uses for the same class of problem so I might someday go back and
fix sysfs to use the same idea of internal links, so I can get the sysfs
dirent size down some more, and be able to more cleanly isolate the
namespace handling from the rest of the sysfs code.  It isn't bad today
but it is the source of most of the surprises and bugs when people tweak
the sysfs code.

Anyway I ramble.  Now I need to get back to your review comments on my
user namespace patchset.

Thanks for taking a glance here,
Eric

  reply	other threads:[~2012-04-20 14:38 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 23:17 [PATCH net-next 00/19] net: Sysctl simplifications and enhancements Eric W. Biederman
2012-04-19 23:18 ` [PATCH net-next 01/19] net: Implement register_net_sysctl Eric W. Biederman
2012-04-20  5:27   ` Pavel Emelyanov
2012-04-20  8:11     ` Eric W. Biederman
2012-04-20  8:45       ` Pavel Emelyanov
2012-04-19 23:19 ` [PATCH net-next 02/19] net sysctl: Register an empty /proc/sys/net Eric W. Biederman
2012-04-19 23:20 ` [PATCH net-next 03/19] net sysctl: Initialize the network sysctls sooner to avoid problems Eric W. Biederman
2012-04-19 23:22 ` [PATCH net-next 04/19] net: Kill register_sysctl_rotable Eric W. Biederman
2012-04-20 13:53   ` Serge E. Hallyn
2012-04-20 14:42     ` Eric W. Biederman [this message]
2012-04-19 23:24 ` [PATCH net-next 05/19] net: Move all of the network sysctls without a namespace into init_net Eric W. Biederman
2012-04-23  0:38   ` Gao feng
2012-04-23  1:50     ` Eric W. Biederman
2012-04-23  2:29       ` Gao feng
2012-04-19 23:25 ` [PATCH net-next 06/19] net core: Remove unneded creation of an empty net/core sysctl directory Eric W. Biederman
2012-04-19 23:26 ` [PATCH net-next 07/19] net ipv6: Remove unneded registration of an empty net/ipv6/neigh Eric W. Biederman
2012-04-19 23:32 ` [PATCH net-next 08/19] net ipv4: Remove the unneeded registration of an empty net/ipv4/neigh Eric W. Biederman
2012-04-19 23:34 ` [PATCH net-next 09/19] net ax25: Simplify and cleanup the ax25 sysctl handling Eric W. Biederman
2012-04-19 23:35 ` [PATCH net-next 10/19] net llc: Don't use sysctl tables with .child entries Eric W. Biederman
2012-04-19 23:37 ` [PATCH net-next 11/19] net ipv6: " Eric W. Biederman
2012-04-19 23:38 ` [PATCH net-next 12/19] net neighbour: Convert to use register_net_sysctl Eric W. Biederman
2012-04-20  5:21   ` Pavel Emelyanov
2012-04-20  7:25     ` Eric W. Biederman
2012-04-22  2:36       ` Ben Hutchings
2012-04-19 23:40 ` [PATCH net-next 13/19] net decnet: " Eric W. Biederman
2012-04-19 23:41 ` [PATCH net-next 14/19] net ipv6: Convert addrconf " Eric W. Biederman
2012-04-19 23:42 ` [PATCH net-next 15/19] net ipv4: Convert devinet " Eric W. Biederman
2012-04-19 23:43 ` [PATCH net-next 16/19] net: Convert nf_conntrack_proto " Eric W. Biederman
2012-04-19 23:44 ` [PATCH net-next 17/19] net: Convert all sysctl registrations to register_net_sysctl Eric W. Biederman
2012-04-19 23:45 ` [PATCH net-next 18/19] net: Delete all remaining instances of ctl_path Eric W. Biederman
2012-04-19 23:46 ` [PATCH net-next 19/19] net: Remove register_net_sysctl_table Eric W. Biederman
2012-04-20  8:45 ` [PATCH net-next 00/19] net: Sysctl simplifications and enhancements Pavel Emelyanov
2012-04-21  1:24   ` David Miller

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=m1hawe79ds.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=davem@davemloft.net \
    --cc=gaofeng@cn.fujitsu.com \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=serge@hallyn.com \
    --cc=shemminger@vyatta.com \
    --cc=xemul@openvz.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.