diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 19:10:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 19:10:49 -0500 |
commit | cbfe0de303a55ed96d8831c2d5f56f8131cd6612 (patch) | |
tree | b327762303c6a015421e4077e7c713b8a47a5e0e /security | |
parent | 8322b6fddfd2cee41a7732284e5f04750511f4b2 (diff) | |
parent | ba00410b8131b23edfb0e09f8b6dd26c8eb621fb (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS changes from Al Viro:
"First pile out of several (there _definitely_ will be more). Stuff in
this one:
- unification of d_splice_alias()/d_materialize_unique()
- iov_iter rewrite
- killing a bunch of ->f_path.dentry users (and f_dentry macro).
Getting that completed will make life much simpler for
unionmount/overlayfs, since then we'll be able to limit the places
sensitive to file _dentry_ to reasonably few. Which allows to have
file_inode(file) pointing to inode in a covered layer, with dentry
pointing to (negative) dentry in union one.
Still not complete, but much closer now.
- crapectomy in lustre (dead code removal, mostly)
- "let's make seq_printf return nothing" preparations
- assorted cleanups and fixes
There _definitely_ will be more piles"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits)
copy_from_iter_nocache()
new helper: iov_iter_kvec()
csum_and_copy_..._iter()
iov_iter.c: handle ITER_KVEC directly
iov_iter.c: convert copy_to_iter() to iterate_and_advance
iov_iter.c: convert copy_from_iter() to iterate_and_advance
iov_iter.c: get rid of bvec_copy_page_{to,from}_iter()
iov_iter.c: convert iov_iter_zero() to iterate_and_advance
iov_iter.c: convert iov_iter_get_pages_alloc() to iterate_all_kinds
iov_iter.c: convert iov_iter_get_pages() to iterate_all_kinds
iov_iter.c: convert iov_iter_npages() to iterate_all_kinds
iov_iter.c: iterate_and_advance
iov_iter.c: macros for iterating over iov_iter
kill f_dentry macro
dcache: fix kmemcheck warning in switch_names
new helper: audit_file()
nfsd_vfs_write(): use file_inode()
ncpfs: use file_inode()
kill f_dentry uses
lockd: get rid of ->f_path.dentry->d_sb
...
Diffstat (limited to 'security')
-rw-r--r-- | security/commoncap.c | 2 | ||||
-rw-r--r-- | security/integrity/ima/ima_api.c | 4 | ||||
-rw-r--r-- | security/integrity/ima/ima_appraise.c | 4 | ||||
-rw-r--r-- | security/integrity/ima/ima_template_lib.c | 2 | ||||
-rw-r--r-- | security/selinux/selinuxfs.c | 6 | ||||
-rw-r--r-- | security/smack/smack_lsm.c | 8 |
6 files changed, 13 insertions, 13 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index bab0611afc1e..2915d8503054 100644 --- a/security/commoncap.c +++ b/security/commoncap.c | |||
@@ -446,7 +446,7 @@ static int get_file_caps(struct linux_binprm *bprm, bool *effective, bool *has_c | |||
446 | if (bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID) | 446 | if (bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID) |
447 | return 0; | 447 | return 0; |
448 | 448 | ||
449 | dentry = dget(bprm->file->f_dentry); | 449 | dentry = dget(bprm->file->f_path.dentry); |
450 | 450 | ||
451 | rc = get_vfs_caps_from_disk(dentry, &vcaps); | 451 | rc = get_vfs_caps_from_disk(dentry, &vcaps); |
452 | if (rc < 0) { | 452 | if (rc < 0) { |
diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c index 86885979918c..f92be1b14089 100644 --- a/security/integrity/ima/ima_api.c +++ b/security/integrity/ima/ima_api.c | |||
@@ -196,7 +196,7 @@ int ima_collect_measurement(struct integrity_iint_cache *iint, | |||
196 | { | 196 | { |
197 | const char *audit_cause = "failed"; | 197 | const char *audit_cause = "failed"; |
198 | struct inode *inode = file_inode(file); | 198 | struct inode *inode = file_inode(file); |
199 | const char *filename = file->f_dentry->d_name.name; | 199 | const char *filename = file->f_path.dentry->d_name.name; |
200 | int result = 0; | 200 | int result = 0; |
201 | struct { | 201 | struct { |
202 | struct ima_digest_data hdr; | 202 | struct ima_digest_data hdr; |
@@ -204,7 +204,7 @@ int ima_collect_measurement(struct integrity_iint_cache *iint, | |||
204 | } hash; | 204 | } hash; |
205 | 205 | ||
206 | if (xattr_value) | 206 | if (xattr_value) |
207 | *xattr_len = ima_read_xattr(file->f_dentry, xattr_value); | 207 | *xattr_len = ima_read_xattr(file->f_path.dentry, xattr_value); |
208 | 208 | ||
209 | if (!(iint->flags & IMA_COLLECTED)) { | 209 | if (!(iint->flags & IMA_COLLECTED)) { |
210 | u64 i_version = file_inode(file)->i_version; | 210 | u64 i_version = file_inode(file)->i_version; |
diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c index 7c8f41e618b6..fffcdb0b31f0 100644 --- a/security/integrity/ima/ima_appraise.c +++ b/security/integrity/ima/ima_appraise.c | |||
@@ -189,7 +189,7 @@ int ima_appraise_measurement(int func, struct integrity_iint_cache *iint, | |||
189 | { | 189 | { |
190 | static const char op[] = "appraise_data"; | 190 | static const char op[] = "appraise_data"; |
191 | char *cause = "unknown"; | 191 | char *cause = "unknown"; |
192 | struct dentry *dentry = file->f_dentry; | 192 | struct dentry *dentry = file->f_path.dentry; |
193 | struct inode *inode = dentry->d_inode; | 193 | struct inode *inode = dentry->d_inode; |
194 | enum integrity_status status = INTEGRITY_UNKNOWN; | 194 | enum integrity_status status = INTEGRITY_UNKNOWN; |
195 | int rc = xattr_len, hash_start = 0; | 195 | int rc = xattr_len, hash_start = 0; |
@@ -289,7 +289,7 @@ out: | |||
289 | */ | 289 | */ |
290 | void ima_update_xattr(struct integrity_iint_cache *iint, struct file *file) | 290 | void ima_update_xattr(struct integrity_iint_cache *iint, struct file *file) |
291 | { | 291 | { |
292 | struct dentry *dentry = file->f_dentry; | 292 | struct dentry *dentry = file->f_path.dentry; |
293 | int rc = 0; | 293 | int rc = 0; |
294 | 294 | ||
295 | /* do not collect and update hash for digital signatures */ | 295 | /* do not collect and update hash for digital signatures */ |
diff --git a/security/integrity/ima/ima_template_lib.c b/security/integrity/ima/ima_template_lib.c index 1506f0248572..bcfc36cbde6a 100644 --- a/security/integrity/ima/ima_template_lib.c +++ b/security/integrity/ima/ima_template_lib.c | |||
@@ -284,7 +284,7 @@ static int ima_eventname_init_common(struct integrity_iint_cache *iint, | |||
284 | } | 284 | } |
285 | 285 | ||
286 | if (file) { | 286 | if (file) { |
287 | cur_filename = file->f_dentry->d_name.name; | 287 | cur_filename = file->f_path.dentry->d_name.name; |
288 | cur_filename_len = strlen(cur_filename); | 288 | cur_filename_len = strlen(cur_filename); |
289 | } else | 289 | } else |
290 | /* | 290 | /* |
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index c71737f6d1cc..33db1ad4fd10 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c | |||
@@ -1200,7 +1200,7 @@ static void sel_remove_entries(struct dentry *de) | |||
1200 | spin_lock(&de->d_lock); | 1200 | spin_lock(&de->d_lock); |
1201 | node = de->d_subdirs.next; | 1201 | node = de->d_subdirs.next; |
1202 | while (node != &de->d_subdirs) { | 1202 | while (node != &de->d_subdirs) { |
1203 | struct dentry *d = list_entry(node, struct dentry, d_u.d_child); | 1203 | struct dentry *d = list_entry(node, struct dentry, d_child); |
1204 | 1204 | ||
1205 | spin_lock_nested(&d->d_lock, DENTRY_D_LOCK_NESTED); | 1205 | spin_lock_nested(&d->d_lock, DENTRY_D_LOCK_NESTED); |
1206 | list_del_init(node); | 1206 | list_del_init(node); |
@@ -1674,12 +1674,12 @@ static void sel_remove_classes(void) | |||
1674 | 1674 | ||
1675 | list_for_each(class_node, &class_dir->d_subdirs) { | 1675 | list_for_each(class_node, &class_dir->d_subdirs) { |
1676 | struct dentry *class_subdir = list_entry(class_node, | 1676 | struct dentry *class_subdir = list_entry(class_node, |
1677 | struct dentry, d_u.d_child); | 1677 | struct dentry, d_child); |
1678 | struct list_head *class_subdir_node; | 1678 | struct list_head *class_subdir_node; |
1679 | 1679 | ||
1680 | list_for_each(class_subdir_node, &class_subdir->d_subdirs) { | 1680 | list_for_each(class_subdir_node, &class_subdir->d_subdirs) { |
1681 | struct dentry *d = list_entry(class_subdir_node, | 1681 | struct dentry *d = list_entry(class_subdir_node, |
1682 | struct dentry, d_u.d_child); | 1682 | struct dentry, d_child); |
1683 | 1683 | ||
1684 | if (d->d_inode) | 1684 | if (d->d_inode) |
1685 | if (d->d_inode->i_mode & S_IFDIR) | 1685 | if (d->d_inode->i_mode & S_IFDIR) |
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index d515ec25ae9f..433ae61e7f42 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -166,9 +166,9 @@ static int smk_bu_file(struct file *file, int mode, int rc) | |||
166 | return rc; | 166 | return rc; |
167 | 167 | ||
168 | smk_bu_mode(mode, acc); | 168 | smk_bu_mode(mode, acc); |
169 | pr_info("Smack Bringup: (%s %s %s) file=(%s %ld %s) %s\n", | 169 | pr_info("Smack Bringup: (%s %s %s) file=(%s %ld %pD) %s\n", |
170 | sskp->smk_known, (char *)file->f_security, acc, | 170 | sskp->smk_known, (char *)file->f_security, acc, |
171 | inode->i_sb->s_id, inode->i_ino, file->f_dentry->d_name.name, | 171 | inode->i_sb->s_id, inode->i_ino, file, |
172 | current->comm); | 172 | current->comm); |
173 | return 0; | 173 | return 0; |
174 | } | 174 | } |
@@ -189,9 +189,9 @@ static int smk_bu_credfile(const struct cred *cred, struct file *file, | |||
189 | return rc; | 189 | return rc; |
190 | 190 | ||
191 | smk_bu_mode(mode, acc); | 191 | smk_bu_mode(mode, acc); |
192 | pr_info("Smack Bringup: (%s %s %s) file=(%s %ld %s) %s\n", | 192 | pr_info("Smack Bringup: (%s %s %s) file=(%s %ld %pD) %s\n", |
193 | sskp->smk_known, smk_of_inode(inode)->smk_known, acc, | 193 | sskp->smk_known, smk_of_inode(inode)->smk_known, acc, |
194 | inode->i_sb->s_id, inode->i_ino, file->f_dentry->d_name.name, | 194 | inode->i_sb->s_id, inode->i_ino, file, |
195 | current->comm); | 195 | current->comm); |
196 | return 0; | 196 | return 0; |
197 | } | 197 | } |