From: ebiederm@xmission.com (Eric W. Biederman)
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [git pull] mount API series
Date: Wed, 31 Oct 2018 11:18:24 -0500 [thread overview]
Message-ID: <87d0rqqecv.fsf@xmission.com> (raw)
In-Reply-To: <87a7mut9cm.fsf@xmission.com> (Eric W. Biederman's message of "Wed, 31 Oct 2018 10:38:17 -0500")
ebiederm@xmission.com (Eric W. Biederman) writes:
> I am going to stop there. I believe there are more issues in the code.
> I am relieved that I am not seeing the loss of some of the security
> hooks that I thought I saw last time I looked at the code.
Bah. Now I see the missing security hook.
There are a set of security hooks that allow security modules to parse
mount options.
On a good day they look like:
security_mnt_opts opts;
char *secdata;
secdata = alloc_secdata();
security_sb_copy_data("a,mount,options,string", secdata);
security_init_mnt_opts(&opts);
security_parse_opts_str(secdata, &opts);
security_set_mnt_opts(sb, &opts, 0, NULL);
security_free_mnt_opts(&opts);
In practice however things are not that explicit. With
security_sb_kern_mount performing all of the mnt_opts work.
However after the rewrite in the patchset.
The function sb_kern_mount no longer exists and it's replacement
sb_get_tree out of necessity does not call parse_opts_str. This is
because the mount options can no longer be passed as a string.
The legacy compatibility code also does not call sb_parse_opts_str.
The result is using the existing apis all of the security module command
line parsing except for (btrfs and nfs) no longer works.
The changes are not structured in a way that makes any of this easy to
find. Which is why I have been saying I wouldn't do it that way. It
also is the case that this pattern repeats through out the patches.
Replacing code with something brand new, instead of evolving what is
there. That makes it easy for this kind of thing to slip through.
Eric
next prev parent reply other threads:[~2018-10-31 16:19 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-31 5:33 [git pull] mount API series Al Viro
2018-10-31 15:38 ` Eric W. Biederman
2018-10-31 16:18 ` Eric W. Biederman [this message]
2018-10-31 16:36 ` Al Viro
2018-11-01 16:51 ` Al Viro
2018-10-31 18:39 ` David Howells
2018-10-31 18:45 ` [PATCH] vfs: Fix incorrect user_ns assignment in proc and mqueue David Howells
2018-10-31 20:49 ` [git pull] mount API series Miklos Szeredi
2018-11-10 14:19 ` Steven Whitehouse
2018-11-12 2:07 ` Eric W. Biederman
2018-11-12 20:54 ` Al Viro
2018-12-17 23:10 ` Al Viro
2018-12-21 16:25 ` Eric W. Biederman
2018-10-31 16:18 ` Linus Torvalds
2018-11-01 10:53 ` Steven Whitehouse
2018-11-01 15:57 ` Linus Torvalds
2018-11-01 17:18 ` David Howells
2018-11-01 18:33 ` Linus Torvalds
2018-11-01 22:05 ` Al Viro
2018-11-01 22:07 ` Linus Torvalds
2018-11-01 23:59 ` David Howells
2018-11-02 4:07 ` Al Viro
2018-11-02 19:42 ` Al Viro
2018-11-03 6:14 ` Gao Xiang
2018-11-03 6:30 ` Gao Xiang
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=87d0rqqecv.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox