From: Seunghun Lee <waydi1@gmail.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfs: remove redundant sanity check in do_mount
Date: Sat, 13 Sep 2014 13:11:32 +0900 [thread overview]
Message-ID: <5413C3F4.2070009@gmail.com> (raw)
In-Reply-To: <20140912162834.GE7996@ZenIV.linux.org.uk>
On 09/13/2014 01:28 AM, Al Viro wrote:
> On Sat, Sep 13, 2014 at 12:53:32AM +0900, Seunghun Lee wrote:
>> In sys_mount, getname() checks dir_name.
>> So do_mount needn't check dir_name again.
> ... and simple grep shows four more call sites. At the very least, the
> commit message needs to cover those as well, *if* the check is, indeed,
> redundant. From the look through those guys it looks like it is, but...
> I wonder if it would make more sense to pass char __user * instead of
> char * here. And do getname() inside do_mount(). As it is, we do
> getname() in all callers *and* never look into the result of said getname()
> until passing it to do_mount(). So how about just passing userland pointer
> all the way down to do_mount() (grep for callers and watch out for ones
> in arch/alpha/kernel/osf_sys.c) and doing getname() in do_mount() itself?
Ok, I will rework the patch.
Thanks.
next prev parent reply other threads:[~2014-09-13 4:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 15:53 [PATCH] vfs: remove redundant sanity check in do_mount Seunghun Lee
2014-09-12 16:28 ` Al Viro
2014-09-13 4:11 ` Seunghun Lee [this message]
2014-09-14 13:15 ` [PATCH] vfs: move getname() from callers to do_mount() Seunghun Lee
2014-09-14 13:36 ` Jeff Layton
2014-09-14 18:12 ` Al Viro
[not found] ` <CA+LGb9aaMpiotK7-NUv4hKcJHbuWQE=DC=p=90ZguWqn44qcTQ@mail.gmail.com>
2014-09-15 5:18 ` Al Viro
2014-09-15 5:26 ` Seunghun Lee
2014-09-15 5:26 ` Seunghun Lee
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=5413C3F4.2070009@gmail.com \
--to=waydi1@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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.