From: Pavel Emelyanov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
To: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
oleg-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org
Subject: Re: [PATCH 3/20] Introduce MS_KERNMOUNT flag
Date: Mon, 13 Aug 2007 11:12:06 +0400 [thread overview]
Message-ID: <46C00446.7030703@openvz.org> (raw)
In-Reply-To: <20070811034721.GB22216-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Christoph Hellwig wrote:
> On Fri, Aug 10, 2007 at 03:47:55PM +0400, xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org wrote:
>> This flag tells the .get_sb callback that this is a kern_mount() call
>> so that it can trust *data pointer to be valid in-kernel one. If this
>> flag is passed from the user process, it is cleared since the *data
>> pointer is not a valid kernel object.
>>
>> Running a few steps forward - this will be needed for proc to create the
>> superblock and store a valid pid namespace on it during the namespace
>> creation. The reason, why the namespace cannot live without proc mount
>> is described in the appropriate patch.
>
> I don't like this at all. We should never pass kernel and userspace
> addresses through the same pointer. Maybe add an additional argument
> to the get_sb prototype instead. But this whole idea of mounting /proc
> from kernelspace sounds like a really bad idea to me. /proc should
> never be mounted from the kernel but always normally from userspace.
Why then is it mounted in proc_root_init()?
Thanks,
Pavel
WARNING: multiple messages have this Message-ID (diff)
From: Pavel Emelyanov <xemul@openvz.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: akpm@osdl.org, devel@openvz.org, linux-kernel@vger.kernel.org,
containers@lists.osdl.org, oleg@tv-sign.ru, sukadev@us.ibm.com
Subject: Re: [PATCH 3/20] Introduce MS_KERNMOUNT flag
Date: Mon, 13 Aug 2007 11:12:06 +0400 [thread overview]
Message-ID: <46C00446.7030703@openvz.org> (raw)
In-Reply-To: <20070811034721.GB22216@infradead.org>
Christoph Hellwig wrote:
> On Fri, Aug 10, 2007 at 03:47:55PM +0400, xemul@openvz.org wrote:
>> This flag tells the .get_sb callback that this is a kern_mount() call
>> so that it can trust *data pointer to be valid in-kernel one. If this
>> flag is passed from the user process, it is cleared since the *data
>> pointer is not a valid kernel object.
>>
>> Running a few steps forward - this will be needed for proc to create the
>> superblock and store a valid pid namespace on it during the namespace
>> creation. The reason, why the namespace cannot live without proc mount
>> is described in the appropriate patch.
>
> I don't like this at all. We should never pass kernel and userspace
> addresses through the same pointer. Maybe add an additional argument
> to the get_sb prototype instead. But this whole idea of mounting /proc
> from kernelspace sounds like a really bad idea to me. /proc should
> never be mounted from the kernel but always normally from userspace.
Why then is it mounted in proc_root_init()?
Thanks,
Pavel
next prev parent reply other threads:[~2007-08-13 7:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-10 11:47 [PATCH 3/20] Introduce MS_KERNMOUNT flag xemul-GEFAQzZX7r8dnm+yROfE0A
2007-08-10 11:47 ` xemul
2007-08-11 3:47 ` Christoph Hellwig
2007-08-11 11:22 ` Oleg Nesterov
[not found] ` <20070811034721.GB22216-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2007-08-13 7:12 ` Pavel Emelyanov [this message]
2007-08-13 7:12 ` Pavel Emelyanov
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=46C00446.7030703@openvz.org \
--to=xemul-gefaqzzx7r8dnm+yrofe0a@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=oleg-6lXkIZvqkOAvJsYlp49lxw@public.gmane.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.