2009-12-16 18:52:24

by Al Viro

[permalink] [raw]
Subject: [git pull] VFS stuff, part 1

This ought to get rid of the bulk of namei.c patches affecting the
areas where my and Nick's series step on the same code. There's
also some struct file work, plus a bunch of fixes all over the place
(in particular, Eric's series dealing with IMA horrors, partially
modified to merge), but most of that stuff is fighting the call
graph in fs/namei.c and massaging things into more or less sane shape
there.

Please, pull from
git.kernel.org//pub/scm/linux/kernel/git/viro/vfs-2.6.git/

Shortlog:
Al Viro (25):
sanitize do_pipe_flags() callers in arch
switch shmem_file_setup() to alloc_file()
switched inotify_init1() to alloc_file()
unexport get_empty_filp()
reorder alloc_fd/attach_fd in socketpair()
merge sock_alloc_fd/sock_attach_fd into a new helper
9p connect fixes
switch sock_alloc_file() to alloc_file()
get rid of init_file()
switch nilfs2 to deactivate_locked_super()
switch alloc_file() to passing struct path
switch create_read_pipe() to alloc_file()
lift path_put(path) to callers of __do_follow_link()
kill __link_path_walk()/link_path_walk() distinction
fix the crap in dst/dcore
switch cachefiles to kern_path()
fix mismerge with Trond's stuff (create_mnt_ns() export is gone now)
Take hash recalculation into do_lookup()
Kill path_lookup_open()
Kill cached_lookup() and real_lookup()
Sanitize exec_permission_lite()
O_TRUNC open shouldn't fail after file truncation
Untangling ima mess, part 1: alloc_file()
Untangling ima mess, part 2: deal with counters
Untangling ima mess, part 3: kill dead code in ima

Christoph Hellwig (5):
sanitize xattr handler prototypes
make generic_acl slightly more generic
cleanup blockdev_direct_IO locking
ocfs: stop using do_sync_mapping_range
direct I/O fallback sync simplification

Eric Paris (5):
fs: move get_empty_filp() deffinition to internal.h
ima: valid return code from ima_inode_alloc
ima: only insert at inode creation time
IMA: clean up the IMA counts updating code
ima: call ima_inode_free ima_inode_free

H Hartley Sweeten (1):
libfs: move EXPORT_SYMBOL for d_alloc_name

Jeff Layton (1):
vfs: force reval of target when following LAST_BIND symlinks (try #7)

Mimi Zohar (1):
ima: limit imbalance msg

Diffstat:
arch/ia64/kernel/perfmon.c | 15 +-
arch/parisc/hpux/sys_hpux.c | 7 +-
arch/x86/include/asm/sys_ia32.h | 1 -
arch/xtensa/include/asm/syscall.h | 1 -
arch/xtensa/include/asm/unistd.h | 2 +-
arch/xtensa/kernel/syscall.c | 18 --
drivers/infiniband/core/uverbs_main.c | 9 +-
drivers/staging/dst/dcore.c | 46 +---
fs/anon_inodes.c | 18 +-
fs/btrfs/acl.c | 47 +---
fs/cachefiles/bind.c | 11 +-
fs/cachefiles/rdwr.c | 2 -
fs/dcache.c | 1 +
fs/direct-io.c | 129 ++++------
fs/ecryptfs/main.c | 7 +-
fs/ext2/acl.c | 79 ++----
fs/ext2/xattr.c | 11 +-
fs/ext2/xattr_security.c | 16 +-
fs/ext2/xattr_trusted.c | 16 +-
fs/ext2/xattr_user.c | 25 +-
fs/ext3/acl.c | 74 ++----
fs/ext3/xattr.c | 31 ++-
fs/ext3/xattr_security.c | 20 +-
fs/ext3/xattr_trusted.c | 18 +-
fs/ext3/xattr_user.c | 25 +-
fs/ext4/acl.c | 74 ++----
fs/ext4/xattr.c | 31 ++-
fs/ext4/xattr_security.c | 20 +-
fs/ext4/xattr_trusted.c | 20 +-
fs/ext4/xattr_user.c | 25 +-
fs/file_table.c | 49 +---
fs/generic_acl.c | 158 +++++++-----
fs/gfs2/acl.c | 16 +-
fs/gfs2/inode.c | 3 +-
fs/gfs2/xattr.c | 69 ++---
fs/gfs2/xattr.h | 7 +-
fs/hugetlbfs/inode.c | 17 +-
fs/internal.h | 1 +
fs/jffs2/acl.c | 65 ++---
fs/jffs2/security.c | 18 +-
fs/jffs2/xattr.c | 6 +-
fs/jffs2/xattr_trusted.c | 18 +-
fs/jffs2/xattr_user.c | 18 +-
fs/libfs.c | 1 -
fs/namei.c | 466 ++++++++++++++++----------------
fs/namespace.c | 3 +-
fs/nfs/super.c | 8 -
fs/nfsd/vfs.c | 5 +-
fs/nilfs2/super.c | 3 +-
fs/notify/inotify/inotify_user.c | 29 +-
fs/ocfs2/acl.c | 87 ++-----
fs/ocfs2/alloc.c | 4 +-
fs/ocfs2/aops.c | 34 +--
fs/ocfs2/xattr.c | 72 +++---
fs/open.c | 4 +
fs/pipe.c | 29 +--
fs/reiserfs/xattr.c | 36 ++--
fs/reiserfs/xattr_acl.c | 69 ++----
fs/reiserfs/xattr_security.c | 21 +-
fs/reiserfs/xattr_trusted.c | 21 +-
fs/reiserfs/xattr_user.c | 21 +-
fs/xattr.c | 28 +-
fs/xfs/linux-2.6/xfs_acl.c | 57 ++---
fs/xfs/linux-2.6/xfs_aops.c | 20 +-
fs/xfs/linux-2.6/xfs_xattr.c | 71 +----
fs/xfs/xfs_acl.h | 3 +-
include/linux/file.h | 8 +-
include/linux/fs.h | 23 +-
include/linux/generic_acl.h | 41 +---
include/linux/ima.h | 12 +-
include/linux/mnt_namespace.h | 1 -
include/linux/shmem_fs.h | 16 --
include/linux/xattr.h | 13 +-
ipc/mqueue.c | 2 -
ipc/shm.c | 12 +-
mm/Makefile | 1 -
mm/filemap.c | 15 +-
mm/shmem.c | 71 +++---
mm/shmem_acl.c | 171 ------------
net/9p/trans_fd.c | 112 ++++-----
net/socket.c | 108 +++-----
security/integrity/ima/ima.h | 3 -
security/integrity/ima/ima_iint.c | 79 +-----
security/integrity/ima/ima_main.c | 184 ++++++++------
84 files changed, 1243 insertions(+), 1965 deletions(-)


2009-12-16 18:53:22

by Al Viro

[permalink] [raw]
Subject: Re: [git pull] VFS stuff, part 1

On Wed, Dec 16, 2009 at 06:51:57PM +0000, Al Viro wrote:
> This ought to get rid of the bulk of namei.c patches affecting the
> areas where my and Nick's series step on the same code. There's
> also some struct file work, plus a bunch of fixes all over the place
> (in particular, Eric's series dealing with IMA horrors, partially
> modified to merge), but most of that stuff is fighting the call
> graph in fs/namei.c and massaging things into more or less sane shape
> there.
>
> Please, pull from
> git.kernel.org//pub/scm/linux/kernel/git/viro/vfs-2.6.git/

gyah...

git.kernel.org//pub/scm/linux/kernel/git/viro/vfs-2.6.git/ master

2009-12-16 22:42:22

by Alexander Beregalov

[permalink] [raw]
Subject: Re: [git pull] VFS stuff, part 1

2009/12/16 Al Viro <[email protected]>:
> This ought to get rid of the bulk of namei.c patches affecting the
> areas where my and Nick's series step on the same code.  There's
> also some struct file work, plus a bunch of fixes all over the place
> (in particular, Eric's series dealing with IMA horrors, partially
> modified to merge), but most of that stuff is fighting the call
> graph in fs/namei.c and massaging things into more or less sane shape
> there.
>
> Please, pull from
> git.kernel.org//pub/scm/linux/kernel/git/viro/vfs-2.6.git/

Hi

Here is a regression between
5ac4d63 (Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block)
and
bac5e54 (Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6)


[ 17.462212] REISERFS (device sda1): found reiserfs format "3.6"
with standard journal
[ 17.470199] REISERFS (device sda1): using ordered data mode
[ 17.480645] REISERFS (device sda1): journal params: device sda1,
size 8192, journal first block 18, max trans len 1024, max batch 900,
max commit age 30, max trans age 30
[ 17.497079] REISERFS (device sda1): checking transaction log (sda1)
[ 17.503457] REISERFS debug (device sda1): journal-1153: found in
header: first_unflushed_offset 6839, last_flushed_trans_id 2074215
[ 17.521242] REISERFS debug (device sda1): journal-1206: Starting
replay from offset 8908689884846775, trans_id 4161904640
[ 17.532296] REISERFS debug (device sda1): journal-1299: Setting
newest_mount_id to 315
[ 17.573874] REISERFS (device sda1): Using r5 hash to sort names
[ 17.603715] VFS: Mounted root (reiserfs filesystem) readonly on device 8:1.
[ 17.610972] Freeing unused kernel memory: 280k freed
[ 17.790027] ohci_hcd 0000:00:02.0: auto-stop root hub
INIT: version 2.87 booting
[ 18.290029] ohci_hcd 0000:00:02.1: auto-stop root hub
[ 18.595537] kbd_mode used greatest stack depth: 6028 bytes left
Loading /lib/rc/console/keymap
[ 18.648845] loadkeys used greatest stack depth: 5764 bytes left
[ 18.655619] init-early.sh used greatest stack depth: 5276 bytes left

OpenRC 0.5.3 is starting up Gentoo Linux (i686)

* Mounting /proc...
[ 18.819236] mount used greatest stack depth: 5260 bytes left
[ ok ]
mkdir `/lib/rc/init.d/starting': Operation not supported
mkdir `/lib/rc/init.d/started': Operation not supported
mkdir `/lib/rc/init.d/stopping': Operation not supported
mkdir `/lib/rc/init.d/inactive': Operation not supported
mkdir `/lib/rc/init.d/wasinactive': Operation not supported
mkdir `/lib/rc/init.d/failed': Operation not supported
mkdir `/lib/rc/init.d/hotplugged': Operation not supported
mkdir `/lib/rc/init.d/daemons': Operation not supported
mkdir `/lib/rc/init.d/options': Operation not supported
mkdir `/lib/rc/init.d/exclusive': Operation not supported
mkdir `/lib/rc/init.d/scheduled': Operation not supported
mkdir `/lib/rc/init.d/tmp': Operation not supported
* Caching service dependencies...
[ 20.203989] gendepends.sh used greatest stack depth: 5176 bytes left
[ ok ]
* rc: failed to cr* rc: failed to crINIT: Entering runlevel: 3
* rc: failed to create stopping dir `/lib/rc/init.d/rc.stopping':
Operation not supported
[ 21.075265] device: 'vcs6': device_add
[ 21.078101] device: 'vcsa6': device_add
[ 21.086896] device: 'vcs4': device_add
[ 21.087221] device: 'vcsa4': device_add
[ 21.095348] device: 'vcs2': device_add
[ 21.095696] device: 'vcsa2': device_add
[ 21.103825] device: 'vcs3': device_add
[ 21.104151] device: 'vcsa3': device_add
[ 21.112285] device: 'vcs5': device_add
[ 21.112604] device: 'vcsa5': device_add
INIT: Id "s0" respawni
INIT: Id "s0" respawni


Is it obvious for you or do I need to bisect ?

2009-12-16 22:48:29

by Linus Torvalds

[permalink] [raw]
Subject: Re: [git pull] VFS stuff, part 1



On Thu, 17 Dec 2009, Alexander Beregalov wrote:
>
> Is it obvious for you or do I need to bisect ?

It might be obvious to Al, but it would be good to bisect it anyway, just
in case. Since you now have a fairly tight range of commits, it shouldn't
be _too_ bad.

[ My main desktop is running that bac5e54 kernel that you have as bad
right noe, so it's not something totally obviously broken. Maybe it
needs btrfs or something else specific to trigger. ]

Linus

2009-12-16 23:00:58

by Tony Vroon

[permalink] [raw]
Subject: Re: [git pull] VFS stuff, part 1

On Thu, 2009-12-17 at 01:41 +0300, Alexander Beregalov wrote:
> mkdir `/lib/rc/init.d/starting': Operation not supported

Confirmed, mkdir fails for any tmpfs filesystem. I can still create
files using touch and remove them again with rm.

Regards,
Tony V.


Attachments:
signature.asc (198.00 B)
This is a digitally signed message part

2009-12-16 23:07:25

by Al Viro

[permalink] [raw]
Subject: Re: [git pull] VFS stuff, part 1

On Wed, Dec 16, 2009 at 10:54:08PM +0000, Tony Vroon wrote:
> On Thu, 2009-12-17 at 01:41 +0300, Alexander Beregalov wrote:
> > mkdir `/lib/rc/init.d/starting': Operation not supported
>
> Confirmed, mkdir fails for any tmpfs filesystem. I can still create
> files using touch and remove them again with rm.

Hrm... What about your CONFIG_TMPFS_POSIX_ACL? And see if the breakage
starts at 1c7c474c31aea6d5cb2fb35f31d9e9e91ae466b1 (make generic_acl slightly
more generic).

2009-12-16 23:22:39

by Tony Vroon

[permalink] [raw]
Subject: Re: [git pull] VFS stuff, part 1

On Wed, 2009-12-16 at 23:07 +0000, Al Viro wrote:
> Hrm... What about your CONFIG_TMPFS_POSIX_ACL?

That is off:
chainsaw@prometheus /cvs/linux-2.6 $ zgrep -i tmpfs /proc/config.gz
# CONFIG_DEVTMPFS is not set
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set

> And see if the breakage
> starts at 1c7c474c31aea6d5cb2fb35f31d9e9e91ae466b1 (make generic_acl slightly
> more generic).

Do you want me to revert 1c7c474c31aea6d5cb2fb35f31d9e9e91ae466b1
locally or try linux-2.6 old enough not to have this?

Regards,
Tony V.


Attachments:
signature.asc (198.00 B)
This is a digitally signed message part

2009-12-16 23:27:41

by Al Viro

[permalink] [raw]
Subject: Re: [git pull] VFS stuff, part 1

On Wed, Dec 16, 2009 at 11:13:14PM +0000, Tony Vroon wrote:
> On Wed, 2009-12-16 at 23:07 +0000, Al Viro wrote:
> > Hrm... What about your CONFIG_TMPFS_POSIX_ACL?
>
> That is off:
> chainsaw@prometheus /cvs/linux-2.6 $ zgrep -i tmpfs /proc/config.gz
> # CONFIG_DEVTMPFS is not set
> CONFIG_TMPFS=y
> # CONFIG_TMPFS_POSIX_ACL is not set
>
> > And see if the breakage
> > starts at 1c7c474c31aea6d5cb2fb35f31d9e9e91ae466b1 (make generic_acl slightly
> > more generic).
>
> Do you want me to revert 1c7c474c31aea6d5cb2fb35f31d9e9e91ae466b1
> locally or try linux-2.6 old enough not to have this?

The former. Or try that kernel and compare with grandparent commit
(ef26ca97e83052790940cbc444b01b0d17a813c1)

2009-12-17 00:01:39

by Tony Vroon

[permalink] [raw]
Subject: Re: [git pull] VFS stuff, part 1

On Wed, 2009-12-16 at 23:27 +0000, Al Viro wrote:
> > Do you want me to revert 1c7c474c31aea6d5cb2fb35f31d9e9e91ae466b1
> > locally or try linux-2.6 old enough not to have this?
> The former.

That resolves the issue completely. I am now able to boot.

Regards,
Tony V.


Attachments:
signature.asc (198.00 B)
This is a digitally signed message part

2009-12-17 00:40:09

by Al Viro

[permalink] [raw]
Subject: Re: [git pull] VFS stuff, part 1

On Thu, Dec 17, 2009 at 12:02:11AM +0000, Tony Vroon wrote:
> On Wed, 2009-12-16 at 23:27 +0000, Al Viro wrote:
> > > Do you want me to revert 1c7c474c31aea6d5cb2fb35f31d9e9e91ae466b1
> > > locally or try linux-2.6 old enough not to have this?
> > The former.
>
> That resolves the issue completely. I am now able to boot.

Oh, fsck... I see. Linus, the fix is added to the same branch (and
I'll throw the fix for removed alloc_file export there in a few minutes).
In the meanwhile, see if this fixes it

8f4cb3a4252a053d2c7299d7d251389bddf0bcd4
diff --git a/mm/shmem.c b/mm/shmem.c
index f848506..eef4ebe 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1830,6 +1830,8 @@ shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
iput(inode);
return error;
}
+#else
+ error = 0;
#endif
if (dir->i_mode & S_ISGID) {
inode->i_gid = dir->i_gid;

2009-12-17 01:00:45

by Al Viro

[permalink] [raw]
Subject: Re: [git pull] VFS stuff, part 1

On Thu, Dec 17, 2009 at 12:40:03AM +0000, Al Viro wrote:
> On Thu, Dec 17, 2009 at 12:02:11AM +0000, Tony Vroon wrote:
> > On Wed, 2009-12-16 at 23:27 +0000, Al Viro wrote:
> > > > Do you want me to revert 1c7c474c31aea6d5cb2fb35f31d9e9e91ae466b1
> > > > locally or try linux-2.6 old enough not to have this?
> > > The former.
> >
> > That resolves the issue completely. I am now able to boot.
>
> Oh, fsck... I see. Linus, the fix is added to the same branch (and
> I'll throw the fix for removed alloc_file export there in a few minutes).

Nevermind, alloc_file export had been restored in mainline already.
So just pull from the same place, same branch (
git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6.git/ master
), there's just that one commit on top of mainline.

What happened: in absence of CONFIG_TPMFS_POSIX_ACL, shmem_mknod() had
code that boiled down to
error = 0; /* shmem_acl_init(...), actually */
if (error)
cleanup
and Christoph's patch had put all that chunk under ifdef. Which was not
an equivalent transformation, since we could arrive there with non-zero
error. Old code used to set it to 0, new one left as-is.

2009-12-17 01:04:36

by Tony Vroon

[permalink] [raw]
Subject: Re: [git pull] VFS stuff, part 1

On Thu, 2009-12-17 at 00:40 +0000, Al Viro wrote:
> In the meanwhile, see if this fixes it
> 8f4cb3a4252a053d2c7299d7d251389bddf0bcd4
> diff --git a/mm/shmem.c b/mm/shmem.c

I can confirm that this fixes the problem. (When applied to a virgin
linux-2.6 checkout, without reverting anything)

Thank you :)

> index f848506..eef4ebe 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -1830,6 +1830,8 @@ shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
> iput(inode);
> return error;
> }
> +#else
> + error = 0;
> #endif
> if (dir->i_mode & S_ISGID) {
> inode->i_gid = dir->i_gid;

Regards,
Tony V.


Attachments:
signature.asc (198.00 B)
This is a digitally signed message part