Re: [RFC/PATCH] revokeat/frevoke system calls V5

2007-01-31 Thread Serge E. Hallyn
). With the attached patch, this passes all your revoke tests on s390, as well as ltp runalltests.sh. thanks, -serge From: Serge E. Hallyn [EMAIL PROTECTED] Subject: [PATCH] revoke: do s390 syscalls revoke: do s390 syscalls Signed-off-by: Serge E. Hallyn [EMAIL PROTECTED] (cherry picked from

Re: [patch 0/8] unprivileged mount syscall

2007-04-09 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): One thing that is missing from this series is the ability to restrict user mounts to private namespaces. The reason is that private namespaces have still not gained the momentum and support needed for painless user experience. So

Re: [patch 0/8] unprivileged mount syscall

2007-04-09 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): One thing that is missing from this series is the ability to restrict user mounts to private namespaces. The reason is that private namespaces have still not gained the momentum and support needed for painless user experience. So such a

Re: [patch 0/8] unprivileged mount syscall

2007-04-09 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): This patchset adds support for keeping mount ownership information in the kernel, and allow unprivileged mount(2) and umount(2) in certain cases. Well, I'd like to feel all smart and point out some bugs, but the code all reads very nicely, seems to

Re: [patch 0/8] unprivileged mount syscall

2007-04-11 Thread Serge E. Hallyn
Quoting Ian Kent ([EMAIL PROTECTED]): On Wed, 2007-04-11 at 12:48 +0200, Miklos Szeredi wrote: - users can use bind mounts without having to pre-configure them in /etc/fstab This is by far the biggest concern I see. I think the security implication of allowing

Re: [patch 0/8] unprivileged mount syscall

2007-04-11 Thread Serge E. Hallyn
Quoting Ian Kent ([EMAIL PROTECTED]): On Wed, 2007-04-11 at 09:26 -0500, Serge E. Hallyn wrote: Quoting Ian Kent ([EMAIL PROTECTED]): On Wed, 2007-04-11 at 12:48 +0200, Miklos Szeredi wrote: - users can use bind mounts without having to pre-configure them

Re: [patch 0/8] unprivileged mount syscall

2007-04-11 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): It would be nice in general if we could avoid any sort of checks for (mnt-mnt_ns == init_nsproxy.mnt_ns). Maybe that won't be possible, but, taking the two listed examples: [snip] It's probably worthwile going after these problematic cases,

Re: [patch 0/8] unprivileged mount syscall

2007-04-11 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): Not objecting to prctl(), but two other options would be 1. add a CLONE_NEW_NS_USERMNT flag - kind of ugly, but that is the time at which the ns is created, so in that sense it makes sense. Yes, I thought about this, but

Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-12 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] If CLONE_NEWNS and CLONE_NEWNS_USERMNT are given to clone(2) or unshare(2), then allow user mounts within the new namespace. This is not flexible enough, because user mounts can't be enabled for the initial

Re: [patch 0/8] unprivileged mount syscall

2007-04-13 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): On Wed, 2007-04-11 at 12:44 +0200, Miklos Szeredi wrote: 1. clone the master namespace. 2. in the new namespace move the tree under /share/$me to / for each ($user, $what, $how) { move

Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-13 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): Given the existence of shared subtrees allowing/denying this at the mount namespace level is silly and wrong. If we need more than just the filesystem permission checks can we make it a mount flag settable with mount and remount that allows

Re: [patch 0/8] unprivileged mount syscall

2007-04-13 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): Thinking a bit more about this, I'm quite sure most users wouldn't even want private namespaces. It would be enough to chroot /share/$USER and be done with it. Private namespaces are only good for keeping a bunch of mounts

Re: [patch 05/10] Add permit user submounts flag to vfsmount

2007-04-16 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] If MNT_USERMNT flag is not set in the target vfsmount, then MNT_USER and MNT_USERMNT? I claim no way will people keep those straight. How about MNT_ALLOWUSER and MNT_USER? -serge unprivileged mounts will

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-16 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): Miklos Szeredi [EMAIL PROTECTED] writes: That depends. Current patches check the unprivileged submounts allowed under this mount flag only on the requested mount and not on the propagated mounts. Do you see a problem with this? I

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): Serge E. Hallyn [EMAIL PROTECTED] writes: Why are directory permissions not sufficient to allow/deny non-priveleged mounts? I don't understand that contention yet. The same scenarios laid out previously in this thread. I.e. 1. user

Re: [patch 05/10] Add permit user submounts flag to vfsmount

2007-04-17 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): MNT_USER and MNT_USERMNT? I claim no way will people keep those straight. How about MNT_ALLOWUSER and MNT_USER? Umm, is allowuser more clear than usermnt? What is allowed to the I think so, yes. One makes it clear that we're

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): Serge E. Hallyn [EMAIL PROTECTED] writes: Why are directory permissions not sufficient to allow/deny non-priveleged mounts? I don't understand that contention yet. The same scenarios laid out previously in this thread. I.e. 1. user

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): I'm a bit lost about what is currently done and who advocates for what. It seems to me the MNT_ALLOWUSERMNT (or whatever :) flag should be propagated. In the /share rbind+chroot example, I assume the admin would start by doing mount

Re: [RFC][PATCH 5/15] Introduce union stack

2007-04-17 Thread Serge E. Hallyn
Quoting Bharata B Rao ([EMAIL PROTECTED]): From: Jan Blunck [EMAIL PROTECTED] Subject: Introduce union stack. Adds union stack infrastructure to the dentry structure and provides locking routines to walk the union stack. Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Bharata

Re: [patch 0/8] mount ownership and unprivileged mount syscall (v4)

2007-04-20 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): This patchset has now been bared to the lowest common denominator that everybody can agree on. Or at least there weren't any objections to this proposal. Andrew, please consider it for -mm. Thanks, Miklos v3 - v4: - simplify

Re: [patch] unprivileged mounts update

2007-04-25 Thread Serge E. Hallyn
Quoting H. Peter Anvin ([EMAIL PROTECTED]): Miklos Szeredi wrote: Andrew, please skip this patch, for now. Serge found a problem with the fsuid approach: setfsuid(nonzero) will remove filesystem related capabilities. So even if root is trying to set the user=UID flag on a mount,

Re: [patch] unprivileged mounts update

2007-04-25 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): Miklos Szeredi [EMAIL PROTECTED] writes: From: Miklos Szeredi [EMAIL PROTECTED] - refine adding nosuid and nodev flags for unprivileged mounts: o add nosuid, only if mounter doesn't have CAP_SETUID capability o add nodev, only if

Re: [patch] unprivileged mounts update

2007-04-25 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): Serge E. Hallyn [EMAIL PROTECTED] writes: Quoting H. Peter Anvin ([EMAIL PROTECTED]): Miklos Szeredi wrote: Andrew, please skip this patch, for now. Serge found a problem with the fsuid approach: setfsuid(nonzero) will remove

Re: [patch] unprivileged mounts update

2007-04-25 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): Serge E. Hallyn [EMAIL PROTECTED] writes: Quoting Eric W. Biederman ([EMAIL PROTECTED]): Are there other permission checks that mount is doing that we care about. Not mount itself, but in looking up /share/fa/root/home/fa, user fa

Re: [patch] unprivileged mounts update

2007-04-26 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): Right, I figure if the normal action is to always do mnt-user = current-fsuid, then for the special case we pass a uid in someplace. Of course... do we not have a place to do that? Would it be a no-no to use 'data' for a non-fs-specific arg?

Re: [patch] unprivileged mounts update

2007-04-26 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): Quoting Miklos Szeredi ([EMAIL PROTECTED]): Right, I figure if the normal action is to always do mnt-user = current-fsuid, then for the special case we pass a uid in someplace. Of course... do we not have a place to do that? Would it

Re: [patch] unprivileged mounts update

2007-04-26 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): So then as far as you're concerned, the patches which were in -mm will remain unchanged? Basically yes. I've merged the update patch, which was not yet added to -mm, did some cosmetic code changes, and updated the patch headers. There's one

Re: [patch] unprivileged mounts update

2007-04-26 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): Quoting Miklos Szeredi ([EMAIL PROTECTED]): So then as far as you're concerned, the patches which were in -mm will remain unchanged? Basically yes. I've merged the update patch, which was not yet added to -mm, did some cosmetic code

Re: [PATCH 2/2] file capabilities: accomodate 32 bit capabilities

2007-05-08 Thread Serge E. Hallyn
Quoting Andreas Dilger ([EMAIL PROTECTED]): On May 08, 2007 14:17 -0500, Serge E. Hallyn wrote: As the capability set changes and distributions start tagging binaries with capabilities, we would like for running an older kernel to not necessarily make those binaries unusable. (0

Re: [PATCH 2/2] file capabilities: accomodate 32 bit capabilities

2007-05-14 Thread Serge E. Hallyn
Quoting Suparna Bhattacharya ([EMAIL PROTECTED]): On Thu, May 10, 2007 at 01:01:27PM -0700, Andreas Dilger wrote: On May 08, 2007 16:49 -0500, Serge E. Hallyn wrote: Quoting Andreas Dilger ([EMAIL PROTECTED]): One of the important use cases I can see today is the ability to split

Re: [RFC][PATCH 8/14] Union-mount lookup

2007-05-16 Thread Serge E. Hallyn
Quoting Jan Engelhardt ([EMAIL PROTECTED]): On May 16 2007 10:38, Bharata B Rao wrote: +lookup_union: + do { + struct vfsmount *mnt = find_mnt(topmost); + UM_DEBUG_DCACHE(name=\%s\, inode=%p, device=%s\n, + topmost-d_name.name,

Re: [PATCH 0/2] file capabilities: Introduction

2007-05-17 Thread Serge E. Hallyn
Quoting Suparna Bhattacharya ([EMAIL PROTECTED]): On Mon, May 14, 2007 at 08:00:11PM +, Pavel Machek wrote: Hi! Serge E. Hallyn [EMAIL PROTECTED] wrote: Following are two patches which have been sitting for some time in -mm. Where some time == nearly six months

Re: [RFC][PATCH 5/14] Introduce union stack

2007-05-23 Thread Serge E. Hallyn
Quoting Paul Dickson ([EMAIL PROTECTED]): On Mon, 14 May 2007 13:23:06 -0700, Badari Pulavarty wrote: + while (fs) { + locked = union_trylock(fs-root); + if (!locked) + goto loop1; + locked = union_trylock(fs-altroot); + if

Re: [AppArmor 38/45] AppArmor: Module and LSM hooks

2007-06-11 Thread Serge E. Hallyn
Quoting Andreas Gruenbacher ([EMAIL PROTECTED]): On Monday 11 June 2007 16:33, Stephen Smalley wrote: On Mon, 2007-06-11 at 01:10 +0200, Andreas Gruenbacher wrote: On Wednesday 06 June 2007 15:09, Stephen Smalley wrote: On Mon, 2007-06-04 at 16:30 +0200, Andreas Gruenbacher wrote:

Re: [AppArmor 38/45] AppArmor: Module and LSM hooks

2007-06-12 Thread Serge E. Hallyn
Quoting Stephen Smalley ([EMAIL PROTECTED]): On Mon, 2007-06-11 at 14:02 -0500, Serge E. Hallyn wrote: Quoting Andreas Gruenbacher ([EMAIL PROTECTED]): On Monday 11 June 2007 16:33, Stephen Smalley wrote: On Mon, 2007-06-11 at 01:10 +0200, Andreas Gruenbacher wrote: On Wednesday 06

Re: [AppArmor 38/45] AppArmor: Module and LSM hooks

2007-06-12 Thread Serge E. Hallyn
Quoting Karl MacMillan ([EMAIL PROTECTED]): On Tue, 2007-06-12 at 10:34 -0500, Serge E. Hallyn wrote: Quoting Stephen Smalley ([EMAIL PROTECTED]): [...] If we added support for named type transitions to SELinux, as proposed earlier by Kyle Moffett during this discussion, wouldn't

Re: Adding subroot information to /proc/mounts, or obtaining that through other means

2007-06-21 Thread Serge E. Hallyn
Quoting H. Peter Anvin ([EMAIL PROTECTED]): Al Viro wrote: On Wed, Jun 20, 2007 at 01:57:33PM -0700, H. Peter Anvin wrote: ... or, alternatively, add a subfield to the first field (which would entail escaping whatever separator we choose): /dev/md6 /export ext3 rw,data=ordered 0 0

Re: [RFC PATCH 4/4] VFS: allow filesystem to override mknod capability checks

2007-08-09 Thread Serge E. Hallyn
Quoting [EMAIL PROTECTED] ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] Add a new filesystem flag, that results in the VFS not checking if the current process has enough privileges to do an mknod(). This is needed on filesystems, where an unprivileged user may be able to

Re: [PATCH 2/2] VFS: Reorder vfs_getxattr to avoid unnecessary calls to the LSM

2007-10-25 Thread Serge E. Hallyn
Quoting James Morris ([EMAIL PROTECTED]): On Mon, 22 Oct 2007, David P. Quigley wrote: Originally vfs_getxattr would pull the security xattr variable using the inode getxattr handle and then proceed to clobber it with a subsequent call to the LSM. This patch reorders the two operations

Re: [PATCH 1/2] VFS/Security: Rework inode_getsecurity and callers to return resulting buffer

2007-10-25 Thread Serge E. Hallyn
Quoting David P. Quigley ([EMAIL PROTECTED]): This patch modifies the interface to inode_getsecurity to have the function return a buffer containing the security blob and its length via parameters instead of relying on the calling function to give it an appropriately sized buffer.

Re: [PATCH 1/2] VFS/Security: Rework inode_getsecurity and callers to return resulting buffer

2007-10-26 Thread Serge E. Hallyn
Quoting David P. Quigley ([EMAIL PROTECTED]): On Thu, 2007-10-25 at 19:02 -0500, Serge E. Hallyn wrote: Quoting David P. Quigley ([EMAIL PROTECTED]): This patch modifies the interface to inode_getsecurity to have the function return a buffer containing the security blob and its length

Re: [PATCH 1/2] VFS/Security: Rework inode_getsecurity and callers to return resulting buffer

2007-10-26 Thread Serge E. Hallyn
Quoting David P. Quigley ([EMAIL PROTECTED]): On Thu, 2007-10-25 at 19:02 -0500, Serge E. Hallyn wrote: Quoting David P. Quigley ([EMAIL PROTECTED]): static int task_alloc_security(struct task_struct *task) @@ -2423,14 +2397,22 @@ static const char *selinux_inode_xattr_getsuffix(void

Re: [PATCH 1/2] VFS/Security: Rework inode_getsecurity and callers to return resulting buffer

2007-10-26 Thread Serge E. Hallyn
Quoting Stephen Smalley ([EMAIL PROTECTED]): On Fri, 2007-10-26 at 10:02 -0500, Serge E. Hallyn wrote: Quoting David P. Quigley ([EMAIL PROTECTED]): On Thu, 2007-10-25 at 19:02 -0500, Serge E. Hallyn wrote: Quoting David P. Quigley ([EMAIL PROTECTED]): static int

Re: [PATCH 1/2] VFS/Security: Rework inode_getsecurity and callers to return resulting buffer

2007-10-26 Thread Serge E. Hallyn
Quoting David P. Quigley ([EMAIL PROTECTED]): On Fri, 2007-10-26 at 10:02 -0500, Serge E. Hallyn wrote: Quoting David P. Quigley ([EMAIL PROTECTED]): On Thu, 2007-10-25 at 19:02 -0500, Serge E. Hallyn wrote: Quoting David P. Quigley ([EMAIL PROTECTED]): static int

Re: [PATCH 1/2] VFS/Security: Rework inode_getsecurity and callers to return resulting buffer

2007-11-01 Thread Serge E. Hallyn
Quoting David P. Quigley ([EMAIL PROTECTED]): This patch modifies the interface to inode_getsecurity to have the function return a buffer containing the security blob and its length via parameters instead of relying on the calling function to give it an appropriately sized buffer. Security

Re: [PATCH 2/2] VFS: Reorder vfs_getxattr to avoid unnecessary calls to the LSM

2007-11-01 Thread Serge E. Hallyn
Quoting David P. Quigley ([EMAIL PROTECTED]): Originally vfs_getxattr would pull the security xattr variable using the inode getxattr handle and then proceed to clobber it with a subsequent call to the LSM. This patch reorders the two operations such that when the xattr requested is in the

Re: [RFC][PATCH] Pid namespaces vs locks interaction

2007-12-06 Thread Serge E. Hallyn
Quoting Vitaliy Gusev ([EMAIL PROTECTED]): Hello! I am working on pid namespaces vs locks interaction and want to evaluate the idea. fcntl(F_GETLK,..) can return pid of process for not current pid namespace (if process is belonged to the several namespaces). It is true also for pids in

Re: [RFC][PATCH] Pid namespaces vs locks interaction

2007-12-06 Thread Serge E. Hallyn
Quoting Vitaliy Gusev ([EMAIL PROTECTED]): On 6 December 2007 17:53:40 Serge E. Hallyn wrote: Quoting Vitaliy Gusev ([EMAIL PROTECTED]): Hello! I am working on pid namespaces vs locks interaction and want to evaluate the idea. fcntl(F_GETLK,..) can return pid of process

Re: [RFC][PATCH] Pid namespaces vs locks interaction

2007-12-07 Thread Serge E. Hallyn
Quoting J. Bruce Fields ([EMAIL PROTECTED]): On Thu, Dec 06, 2007 at 03:57:29PM +0300, Vitaliy Gusev wrote: I am working on pid namespaces vs locks interaction and want to evaluate the idea. fcntl(F_GETLK,..) can return pid of process for not current pid namespace (if process is

Re: [RFC][PATCH] Pid namespaces vs locks interaction

2007-12-12 Thread Serge E. Hallyn
Quoting Vitaliy Gusev ([EMAIL PROTECTED]): Hello On 6 December 2007 18:51:30 Serge E. Hallyn wrote: fl_pid is used by nfs, fuse and gfs2. For instance nfs keeps in fl_pid some unique id to identify locking process between hosts - it is not a process pid. Ok, but so the struct

Re: [RFC][PATCH] Pid namespaces vs locks interaction

2007-12-12 Thread Serge E. Hallyn
Quoting Vitaliy Gusev ([EMAIL PROTECTED]): On 12 December 2007 20:31:15 Serge E. Hallyn wrote: Quoting Vitaliy Gusev ([EMAIL PROTECTED]): Hello On 6 December 2007 18:51:30 Serge E. Hallyn wrote: fl_pid is used by nfs, fuse and gfs2. For instance nfs keeps in fl_pid some

Re: [RFC][PATCH] Pid namespaces vs locks interaction

2007-12-13 Thread Serge E. Hallyn
Quoting Vitaliy Gusev ([EMAIL PROTECTED]): On 12 December 2007 21:42:25 Serge E. Hallyn wrote: Ok sorry - by letting this thread sit a few days I lost track of where we were. I see now, so you're saying fl_pid for nfs is not in fact a task pid. It's a magically derived unique id

Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.

2007-12-17 Thread Serge E. Hallyn
Quoting Tetsuo Handa ([EMAIL PROTECTED]): A brief description about SYAORAN: SYAORAN stands for Simple Yet All-important Object Realizing Abiding Nexus. SYAORAN is a filesystem for /dev with Mandatory Access Control. /dev needs to be writable, but this means that files on /dev might be

Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.

2007-12-17 Thread Serge E. Hallyn
Quoting Tetsuo Handa ([EMAIL PROTECTED]): Hello. Serge E. Hallyn wrote: CAP_MKNOD will be removed from its capability I think it is not enough because the root can rename/unlink device files (mv /dev/sda1 /dev/tmp; mv /dev/sda2 /dev/sda1; mv /dev/tmp /dev/sda2). Sure but that doesn't

Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.

2007-12-17 Thread Serge E. Hallyn
Quoting Serge E. Hallyn ([EMAIL PROTECTED]): Quoting Tetsuo Handa ([EMAIL PROTECTED]): Hello. Serge E. Hallyn wrote: CAP_MKNOD will be removed from its capability I think it is not enough because the root can rename/unlink device files (mv /dev/sda1 /dev/tmp; mv /dev/sda2 /dev/sda1

Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.

2007-12-17 Thread Serge E. Hallyn
Quoting Oren Laadan ([EMAIL PROTECTED]): I hate to bring this again, but what if the admin in the container mounts an external file system (eg. nfs, usb, loop mount from a file, or via fuse), and that file system already has a device that we would like to ban inside that container ? Miklos'

Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.

2007-12-19 Thread Serge E. Hallyn
Quoting Pavel Emelyanov ([EMAIL PROTECTED]): Oren Laadan wrote: Serge E. Hallyn wrote: Quoting Oren Laadan ([EMAIL PROTECTED]): I hate to bring this again, but what if the admin in the container mounts an external file system (eg. nfs, usb, loop mount from a file, or via fuse

Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.

2007-12-19 Thread Serge E. Hallyn
Quoting Oren Laadan ([EMAIL PROTECTED]): Serge E. Hallyn wrote: Quoting Oren Laadan ([EMAIL PROTECTED]): I hate to bring this again, but what if the admin in the container mounts an external file system (eg. nfs, usb, loop mount from a file, or via fuse), and that file system already

Re: [RFC/PATCH 2/8] revoke: inode revoke lock V7

2007-12-19 Thread Serge E. Hallyn
Quoting Pekka J Enberg ([EMAIL PROTECTED]): Hi Serge, (Thanks for looking at this. I appreciate the review!) On Mon, 17 Dec 2007, [EMAIL PROTECTED] wrote: struct vfsmount *mnt = nd-mnt; - struct dentry *dentry = __d_lookup(nd-dentry, name); + struct dentry *dentry;

Re: [RFC/PATCH 2/8] revoke: inode revoke lock V7

2007-12-19 Thread Serge E. Hallyn
Quoting Pekka J Enberg ([EMAIL PROTECTED]): Hi, On Wed, 19 Dec 2007, Serge E. Hallyn wrote: I assume you mean S_REVOKE_LOCK and not -i_mutex, right? No I did mean the i_mutex since you take the i_mutex when you set S_REVOKE_LOCK. So between that and the comment above do_lookup

Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.

2007-12-19 Thread Serge E. Hallyn
Quoting Tetsuo Handa ([EMAIL PROTECTED]): A brief description about SYAORAN: SYAORAN stands for Simple Yet All-important Object Realizing Abiding Nexus. SYAORAN is a filesystem for /dev with Mandatory Access Control. I apologize if I'm commiting a faux pas by asking this, but any chance of

Re: [patch 1/2] [RFC] Simple tamper-proof device filesystem.

2007-12-20 Thread Serge E. Hallyn
Quoting Pavel Emelyanov ([EMAIL PROTECTED]): Oren Laadan wrote: Serge E. Hallyn wrote: Quoting Pavel Emelyanov ([EMAIL PROTECTED]): Oren Laadan wrote: Serge E. Hallyn wrote: Quoting Oren Laadan ([EMAIL PROTECTED]): I hate to bring this again, but what if the admin in the container

Re: [PATCH] Pid namespaces vs locks interaction

2007-12-21 Thread Serge E. Hallyn
Quoting Vitaliy Gusev ([EMAIL PROTECTED]): fcntl(F_GETLK,..) can return pid of process for not current pid namespace (if process is belonged to the several namespaces). It is true also for pids in /proc/locks. So correct behavior is saving pointer to the struct pid of the process lock

Re: [PATCH][RFC] Simple tamper-proof device filesystem.

2007-12-31 Thread Serge E. Hallyn
Quoting Tetsuo Handa ([EMAIL PROTECTED]): Hello. Thank you for attending discussion for previous posting (starting from http://lkml.org/lkml/2007/12/16/23 ). The previous posting was for feasibility test to know whether this kind of trivial filesystem is acceptable for mainline. Now,

Re: [PATCH][RFC] Simple tamper-proof device filesystem.

2008-01-09 Thread Serge E. Hallyn
Quoting Indan Zupancic ([EMAIL PROTECTED]): Hello, On Wed, January 9, 2008 05:39, Tetsuo Handa wrote: Hello. Indan Zupancic wrote: I think you focus too much on your way of enforcing filename/attributes pairs. So? So that you miss alternatives and don't see the bigger picture.

Re: [patch 5/9] unprivileged mounts: allow unprivileged bind mounts

2008-01-09 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] Allow bind mounts to unprivileged users if the following conditions are met: - mountpoint is not a symlink - parent mount is owned by the user - the number of user mounts is below the maximum

Re: [patch 1/9] unprivileged mounts: add user mounts to the kernel

2008-01-14 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] This patchset adds support for keeping mount ownership information in the kernel, and allow unprivileged mount(2) and umount(2) in certain cases. The mount owner has the following privileges: - unmount

Re: [patch 3/9] unprivileged mounts: account user mounts

2008-01-14 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] Add sysctl variables for accounting and limiting the number of user mounts. The maximum number of user mounts is set to 1024 by default. This won't in itself enable user mounts, setting a mount to be owned

Re: [patch 4/9] unprivileged mounts: propagate error values from clone_mnt

2008-01-14 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] Allow clone_mnt() to return errors other than ENOMEM. This will be used for returning a different error value when the number of user mounts goes over the limit. Fix copy_tree() to return EPERM for

Re: [patch 5/9] unprivileged mounts: allow unprivileged bind mounts

2008-01-14 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] Allow bind mounts to unprivileged users if the following conditions are met: - mountpoint is not a symlink - parent mount is owned by the user - the number of user mounts is below the maximum

Re: [patch 7/9] unprivileged mounts: allow unprivileged fuse mounts

2008-01-14 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] Use FS_SAFE for fuse fs type, but not for fuseblk. FUSE was designed from the beginning to be safe for unprivileged users. This has also been verified in practice over many years. In addition unprivileged

Re: [patch 8/9] unprivileged mounts: propagation: inherit owner from parent

2008-01-14 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] On mount propagation, let the owner of the clone be inherited from the parent into which it has been propagated. Also if the parent has the nosuid flag, set this flag for the child as well. What about nodev?

Re: [patch 6/9] unprivileged mounts: allow unprivileged mounts

2008-01-14 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] Define a new fs flag FS_SAFE, which denotes, that unprivileged mounting of this filesystem may not constitute a security problem. Since most filesystems haven't been designed with unprivileged mounting in

Re: [patch 9/9] unprivileged mounts: add no submounts flag

2008-01-14 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] Add a new mount flag nomnt, which denies submounts for the owner. This would be useful, if we want to support traditional /etc/fstab based user mounts. In this case mount(8) would still have to be

Re: [patch 7/9] unprivileged mounts: allow unprivileged fuse mounts

2008-01-15 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): Sounds like a sysctl to enable FS_SAFE for fuse will make this patch acceptable to everyone? I think the most generic approach, is to be able to set safeness for any fs type, not just fuse (Karel's suggestion). E.g: echo 1

Re: [patch 8/9] unprivileged mounts: propagation: inherit owner from parent

2008-01-15 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] On mount propagation, let the owner of the clone be inherited from the parent into which it has been propagated. Also if the parent has the nosuid flag,

Re: [patch 8/9] unprivileged mounts: propagation: inherit owner from parent

2008-01-15 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): On mount propagation, let the owner of the clone be inherited from the parent into which it has been propagated. Also if the parent has the nosuid flag, set this flag for the child as well. What about nodev? Hmm, I think

Re: [TOMOYO #6 retry 02/21] Add struct vfsmount to struct task_struct.

2008-01-16 Thread Serge E. Hallyn
Quoting Kentaro Takeda ([EMAIL PROTECTED]): Hello. Serge E. Hallyn wrote: I must say I personally prefer the apparmor approach. No problem. But I'd recommend you get together and get this piece pushed on its own, whichever version you can agree on. TOMOYO can use AppArmor's patch

Re: [patch 08/10] unprivileged mounts: make fuse safe

2008-01-21 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] Don't require the user_id= and group_id= options for unprivileged mounts, but if they are present, verify them for sanity. Disallow the allow_other option for unprivileged mounts. FUSE was designed from

Re: [patch 09/10] unprivileged mounts: propagation: inherit owner from parent

2008-01-21 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] On mount propagation, let the owner of the clone be inherited from the parent into which it has been propagated. If the parent has the nosuid flag, set this flag for the child as well. This is needed for

Re: [patch 07/10] unprivileged mounts: add sysctl tunable for safe property

2008-01-22 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): What do you think about doing this only if FS_SAFE is also set, so for instance at first only FUSE would allow itself to be made user-mountable? A safe thing to do, or overly intrusive? It goes somewhat against the no policy

Re: [patch 07/10] unprivileged mounts: add sysctl tunable for safe property

2008-02-06 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] Add the following: /proc/sys/fs/types/${FS_TYPE}/usermount_safe Signed-off-by: Miklos Szeredi [EMAIL PROTECTED] Thanks, Miklos, good explanations in the docs. Acked-by: Serge Hallyn [EMAIL PROTECTED]

Re: [patch 07/10] unprivileged mounts: add sysctl tunable for safe property

2008-02-06 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): + t-table[0].mode = 0644; Yikes, this could be a problem for containers, as it's simply tied to uid 0, whereas tying it to a capability would let us solve it with capability bounds. This might mean more urgency to get user namespaces

Re: [patch 07/10] unprivileged mounts: add sysctl tunable for safe property

2008-02-07 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): Maybe sysctls just need to check capabilities, instead of uids. I think that would make a lot of sense anyway. Would it be as simple as tagging the inodes with capability sets? One set for writing, or one each for reading and writing?

Re: [patch 07/10] unprivileged mounts: add sysctl tunable for safe property

2008-02-07 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): Maybe sysctls just need to check capabilities, instead of uids. I think that would make a lot of sense anyway. Would it be as simple as tagging the inodes with capability sets? One set for writing, or one each for reading and

Re: [PATCH 00/37] Permit filesystem local caching

2008-02-20 Thread Serge E. Hallyn
Quoting David Howells ([EMAIL PROTECTED]): These patches add local caching for network filesystems such as NFS. The patches can roughly be broken down into a number of sets: (*) 01-keys-inc-payload.diff (*) 02-keys-search-keyring.diff (*) 03-keys-callout-blob.diff Three