public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "mingo@elte.hu" <mingo@elte.hu>,
	"a.p.zijlstra@chello.nl" <a.p.zijlstra@chello.nl>,
	Pavel Emelianov <xemul@parallels.com>,
	"drosenberg@vsecurity.com" <drosenberg@vsecurity.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"eparis@redhat.com" <eparis@redhat.com>,
	"bfields@fieldses.org" <bfields@fieldses.org>,
	James Bottomley <jbottomley@parallels.com>,
	"devel@openvz.org" <devel@openvz.org>
Subject: Re: [PATCH 1/2] SYSCTL: root unregister routine introduced
Date: Tue, 13 Dec 2011 13:02:52 +0400	[thread overview]
Message-ID: <4EE714BC.5040408@parallels.com> (raw)
In-Reply-To: <20111212145208.75490b41.akpm@linux-foundation.org>

13.12.2011 02:52, Andrew Morton пишет:
> On Mon, 12 Dec 2011 21:50:00 +0300
> Stanislav Kinsbursky<skinsbursky@parallels.com>  wrote:
>
>> This routine is required for SUNRPC sysctl's, which are going to be allocated,
>> processed and destroyed per network namespace context.
>> IOW, new sysctl root will be registered on network namespace creation and
>> thus have to unregistered before network namespace destruction.
>>
>
> It's a bit suspicious that such a mature subsystem as sysctl newly
> needs its internals exported like this.  Either a) the net namespaces
> work is doing something which hasn't been done before or b) it is doing
> something wrong.
>
> So, please explain further so we can confirm that it is a) and not b).
>

Hello, Andrew.
The goal is to provide an ability to control and modify data by sysctl's in 
network namespace context. This is done by "net" sysctl's.
But there are two more issues to solve:
1) Sysctl's have to be in /proc/sys/sunrpc
2) Sysctl's content should be accessible from creator's network context (not 
current user ones's).

>> --- a/kernel/sysctl.c
>> +++ b/kernel/sysctl.c
>> @@ -1701,6 +1701,13 @@ void register_sysctl_root(struct ctl_table_root *root)
>>   	spin_unlock(&sysctl_lock);
>>   }
>>
>> +void unregister_sysctl_root(struct ctl_table_root *root)
>> +{
>> +	spin_lock(&sysctl_lock);
>> +	list_del(&root->root_list);
>> +	spin_unlock(&sysctl_lock);
>> +}
>> +
>
> This requires the addition of a declaration to include/linux/sysctl.h.
>
> Once that is done and review is complete, I'd suggest that these two
> patches be joined into a single patch, and that patch become part of
> whatever patch series it is which needs them.
>

Ok, I'll do so.

-- 
Best regards,
Stanislav Kinsbursky

  reply	other threads:[~2011-12-13  9:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 18:49 [PATCH 0/2] SYSCTL: export root handling routines Stanislav Kinsbursky
2011-12-12 18:50 ` [PATCH 1/2] SYSCTL: root unregister routine introduced Stanislav Kinsbursky
2011-12-12 22:52   ` Andrew Morton
2011-12-13  9:02     ` Stanislav Kinsbursky [this message]
2011-12-17 22:30       ` Eric W. Biederman
2011-12-12 18:50 ` [PATCH 2/2] SYSCTL: export root register and unregister routines Stanislav Kinsbursky

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=4EE714BC.5040408@parallels.com \
    --to=skinsbursky@parallels.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=bfields@fieldses.org \
    --cc=devel@openvz.org \
    --cc=drosenberg@vsecurity.com \
    --cc=eparis@redhat.com \
    --cc=jbottomley@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=xemul@parallels.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