Re: [PATCH 1/7] shared subtree

2005-07-31 Thread Miklos Szeredi
> agree, that the end result is simpler. Also you can still use the pnode concept in naming functions and explanations. For example empty_pnode() is a good function name even if there's no 'struct pnode'. Pnodes still exist, they just don't have a corresponding object. Mi

Re: Obsolete files in 2.6 tree

2005-08-03 Thread Miklos Szeredi
already been done: http://prdownloads.sourceforge.net/fuse/mountlo-i386-0.1.tar.gz All is needed is a working FUSE installation, and the above binary, to be able to mount any filesystem image/partition. Miklos - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body o

open("foo", 3)

2005-08-20 Thread Miklos Szeredi
open such file? Or is there some security concern with that? Thanks, Miklos - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] FUSE: follow_link() fix

2005-08-23 Thread Miklos Szeredi
Fix up fuse_follow_link() and fuse_put_link() to conform to the new API. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> Index: linux/fs/fuse/dir.c === --- linux.orig/fs/fuse/dir.c2005-08-23 21:16:52.0 +0200 +++

[PATCH 0/8] filesystem related cleanups and fixes

2005-08-23 Thread Miklos Szeredi
Hi Andrew! The following patches are small cleanups and fixes, I hope none of them are too controversial. It's probably safe to apply ;) Miklos - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordom

[PATCH 1/8] remove ia_attr_flags

2005-08-23 Thread Miklos Szeredi
Remove unused ia_attr_flags from struct iattr, and related defines. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> Index: linux/fs/hostfs/hostfs.h === --- linux.orig/fs/hostfs/hostfs.h 2005-08-19 14:13:47.0

[PATCH 2/8] namei cleanup

2005-08-23 Thread Miklos Szeredi
Extract common code into inline functions to make reading easier. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> Index: linux/fs/namei.c === --- linux.orig/fs/namei.c 2005-08-23 20:25:53.0 +0200 +++ linux/fs/n

[PATCH 3/8] use get_fs_struct() in proc

2005-08-23 Thread Miklos Szeredi
This patch cleans up proc_cwd_link() and proc_root_link() by factoring out common code into get_fs_struct(). Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> Index: linux/fs/proc/base.c === --- linux.orig/fs/proc/base.c 2

[PATCH 4/8] fix enum pid_directory_inos in proc/base.c

2005-08-23 Thread Miklos Szeredi
This patch fixes wrongly placed elements in the pid_directory_inos enum. Also add comment so this mistake is not repeated. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> Index: linux/fs/proc/base.c === --- linux.orig/f

[PATCH 5/8] remove duplicated code from proc and ptrace

2005-08-23 Thread Miklos Szeredi
Extract common code used by ptrace_attach() and may_ptrace_attach() into a separate function. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> Index: linux/kernel/ptrace.c === --- linux.orig/kernel/ptrace.c 2005-08-19

[PATCH 6/8] remove duplicated sys_open32() code from 64bit archs

2005-08-23 Thread Miklos Szeredi
64 bit architectures all implement their own compatibility sys_open(), when in fact the difference is simply not forcing the O_LARGEFILE flag. So use the a common function instead. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> Index: linux/include/linu

[PATCH 8/8] deprecate open("foo", 3)

2005-08-23 Thread Miklos Szeredi
Deprecate access mode of '3' in open() as suggested by Linus. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> Index: linux/fs/open.c === --- linux.orig/fs/open.c2005-08-23 13:15:49.0 +0200 +++

[PATCH 7/8] cifs_create() fix

2005-08-23 Thread Miklos Szeredi
cifs_create() did totally the wrong thing with nd->intent.open.flags: it interpreted nd->intent.open.flags as the original open flags, not the one transformed for open_namei(). Also it used the intent data even if it was not filled in (if called from sys_mknod()). Signed-off-by: Miklos S

Re: [PATCH 2/8] namei cleanup

2005-08-23 Thread Miklos Szeredi
> Bad names, IMO. > You're probably right. Can you suggest better ones? Thanks, Miklos > > +static inline void dput_path(struct path *path, struct nameidata *nd) > > +{ > > + dput(path->dentry); > > + if (path->mnt != nd->mnt) > > +

Re: [PATCH 6/8] remove duplicated sys_open32() code from 64bit archs

2005-08-24 Thread Miklos Szeredi
> On Tue, Aug 23, 2005 at 10:43:35PM +0200, Miklos Szeredi wrote: > > 64 bit architectures all implement their own compatibility sys_open(), > > when in fact the difference is simply not forcing the O_LARGEFILE > > flag. So use the a common function instead. > > Tradi

Re: [PATCH 6/8] remove duplicated sys_open32() code from 64bit archs

2005-08-24 Thread Miklos Szeredi
it is. > I'm also not sure wether s390, mips and/or parisc need to use the > same function instead of the standard sys_open(). I have no idea. Andrew, could you please apply this one? Thanks, Miklos --- 64 bit architectures all implement their own compatibility sys_open(), when

Re: [PATCH] ia_attr_flags - time to die

2005-09-02 Thread Miklos Szeredi
Already dead ;) 2.6.13-mm1: remove-ia_attr_flags.patch Miklos - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] fuse: more flexible caching

2005-09-02 Thread Miklos Szeredi
Make data caching behavior selectable on a per-open basis instead of per-mount. Compatibility for the old mount options 'kernel_cache' and 'direct_io' is retained in the userspace library (version 2.4.0-pre1 or later). Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]>

FUSE merging?

2005-09-02 Thread Miklos Szeredi
commercial user: ~110TB exported, total bandwidth: 1.5TB/s - mailing list traffic 100-200 messages/month - have been in -mm since 2005 january Miklos - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordo

Re: FUSE merging?

2005-09-02 Thread Miklos Szeredi
ed to merge the thing. Do you promise? I can do a resplit and submit to Linus, if that takes some load off you. Thanks, Miklos - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kern

Re: FUSE merging?

2005-09-03 Thread Miklos Szeredi
t; some load off you. > > Nah, then I'd just have to check that everything is the same. OK. Thanks, Miklos - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: FUSE merging?

2005-09-03 Thread Miklos Szeredi
ense to abstract it out. FUSE doesn't need it since it can happily do the mapping in userspace. Miklos (*) I think the correct behavior would be if checking sticky permissions could also be delegated to the filesystem, like checking normal permissions can be. - To unsubscribe from this list: send

Re: FUSE merging?

2005-09-03 Thread Miklos Szeredi
ic uid/gid, and hence there's simply no info to base any transformation on. It could transfer /etc/passwd from the remote server, and use that to do mapping, but that is getting more complex than the problem actually warrants IMO. Miklos - To unsubscribe from this list: send the line "u

Re: [uml-devel] UML woes in 2.6.24-rc6-mm1

2008-01-03 Thread Miklos Szeredi
-of-host-vmsplit-on-i386.patch The relevant log line (both for successful and failed boots): Locating the top of the address space ... 0xffc0 Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo

Re: [uml-devel] UML woes in 2.6.24-rc6-mm1

2008-01-04 Thread Miklos Szeredi
reproduce it with a > defconfig, but it reproduces much more easily with your config for > some reason. > > Anyhow, try the patch below. Thanks, works for me. Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL

util-linux-ng: unprivileged mounts support

2008-01-08 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> This is an experimental patch for supporing unprivileged mounts and umounts. The following features are added: 1) If mount/umount are suid, first try without privileges. This is done by forking, dropping privileges in child, and redirecting std

[patch 0/9] mount ownership and unprivileged mount syscall (v6)

2008-01-08 Thread Miklos Szeredi
his series) Thanks, Miklos -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

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

2008-01-08 Thread Miklos Szeredi
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 Unprivileged mounts imply MS_SETUSER, and will als

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

2008-01-08 Thread Miklos Szeredi
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 the owned mount - create a submount und

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

2008-01-08 Thread Miklos Szeredi
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 mounts require th

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

2008-01-08 Thread Miklos Szeredi
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 by a user is first needed [akpm]

[patch 2/9] unprivileged mounts: allow unprivileged umount

2008-01-08 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> The owner doesn't need sysadmin capabilities to call umount(). Similar behavior as umount(8) on mounts having "user=UID" option in /etc/mtab. The difference is that umount also checks /etc/fstab, presumably to exclude another mount o

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

2008-01-08 Thread Miklos Szeredi
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. This makes sense for example, when propagatio

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

2008-01-08 Thread Miklos Szeredi
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 unbindable mounts. Don't propagate f

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

2008-01-08 Thread Miklos Szeredi
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 mind, a thorough audit is needed bef

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

2008-01-08 Thread Miklos Szeredi
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 suid-root, to check the mountpoint

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

2008-01-08 Thread Miklos Szeredi
tion further down in > clone_mnt() and never actually instantiates the mount. > > Do you think this is a problem? For similar reasons as stated in the previous mail, I don't think this matters. If nr_user_mounts is getting remotely close to max_user_mounts, then something is wrong

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

2008-01-08 Thread Miklos Szeredi
> On Tue, 2008-01-08 at 12:35 +0100, Miklos Szeredi wrote: > > +static int reserve_user_mount(void) > > +{ > > + int err = 0; > > + > > + spin_lock(&vfsmount_lock); > > + if (nr_user_mounts >= max_user_mounts && !ca

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

2008-01-08 Thread Miklos Szeredi
> On Tue, 2008-01-08 at 12:35 +0100, Miklos Szeredi wrote: > > plain text document attachment > > (unprivileged-mounts-account-user-mounts.patch) > > From: Miklos Szeredi <[EMAIL PROTECTED]> > > > > Add sysctl variables for accounting and limiting the nu

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

2008-01-08 Thread Miklos Szeredi
> On Tue 2008-01-08 12:35:09, Miklos Szeredi wrote: > > 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 us

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

2008-01-09 Thread Miklos Szeredi
> >> On Tue 2008-01-08 12:35:09, Miklos Szeredi wrote: > >>> From: Miklos Szeredi <[EMAIL PROTECTED]> > >>> > >>> Use FS_SAFE for "fuse" fs type, but not for "fuseblk". > >>> > >>> FUSE was designed fro

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

2008-01-09 Thread Miklos Szeredi
mounts expose in other > parts of system. I'm worried too, and I'm not saying that enabling unprivileged fuse mounts is completely risk free. Nothing is, and nobody is forced to do it. Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

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

2008-01-09 Thread Miklos Szeredi
> On Tue, Jan 08, 2008 at 12:35:08PM +0100, Miklos Szeredi wrote: > > 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 u

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

2008-01-09 Thread Miklos Szeredi
ars), which means, that they don't seem to matter to people in practice. You seem to be implying that fuse is worthless if these issues are not fixed, but that is very far from the truth, I think. Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

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

2008-01-09 Thread Miklos Szeredi
> case EMFILE: > error ("mount table full"); break; OK, we could go with EMFILE, but the message should be changed to something like "maximum unprivileged mount count exceeded". Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-k

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

2008-01-09 Thread Miklos Szeredi
ty easy to do: just don't set /dev/fuse to be world read-writable (which is the default BTW). So your reasons just don't warrant a big effort involving VFS hacking, etc. Patches are of course welcome. Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&qu

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

2008-01-09 Thread Miklos Szeredi
x27;t change anything about that, except to not require another suid-root utility. Many distributions enabling unprivileged mounting by default _now_, so it's not as if there's some great danger in doing this slightly differently. > Anyway, I believe it would be fair to mention ki

uml and -regparm=3

2008-01-09 Thread Miklos Szeredi
x27;s up? Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: uml and -regparm=3

2008-01-09 Thread Miklos Szeredi
> Miklos Szeredi <[EMAIL PROTECTED]> writes: > > > FASTCALL is defined empty in -mm, but UML is not compiled with > > -mregparm=3 and so this breaks things (I noticed problems with > > rwsem_down_write_failed). > > > > Tried recompiling UML with -

Re: uml and -regparm=3

2008-01-09 Thread Miklos Szeredi
te_failed(), so regparm does make a difference there. There's also some intervening magic in arch/x86/lib/semaphore_32.S, that I don't quite understand, but which doesn't seem to make a difference. Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel

Re: uml and -regparm=3

2008-01-10 Thread Miklos Szeredi
> * Miklos Szeredi <[EMAIL PROTECTED]> wrote: > > > FASTCALL is defined empty in -mm, but UML is not compiled with > > -mregparm=3 and so this breaks things (I noticed problems with > > rwsem_down_write_failed). > > > > Tried recompiling UML with -

Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files

2008-01-18 Thread Miklos Szeredi
; > + struct vm_area_struct *vma_iter; > + > + if (!(vma->vm_flags & VM_SHARED)) > + return 0; > + > + mapping = vma->vm_file->f_mapping; > + > + if (!mapping_cap_account_dirty(mapping)) > + return 0; > + > + spin_lock(&map

Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files

2008-01-18 Thread Miklos Szeredi
> Updating file times at write references to memory-mapped files and > forcing file times update at the next write reference after > calling the msync() system call with the MS_ASYNC flag. > > Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]> > --- > mm/memory.c |6 ++ > mm/msync.c |

Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files

2008-01-18 Thread Miklos Szeredi
> On Fri, 2008-01-18 at 10:51 +0100, Miklos Szeredi wrote: > > > > diff --git a/mm/msync.c b/mm/msync.c > > > index a4de868..a49af28 100644 > > > --- a/mm/msync.c > > > +++ b/mm/msync.c > > > @@ -13,11 +13,33 @@ > > > #include > >

Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files

2008-01-18 Thread Miklos Szeredi
an on them, even if in some cases that would be slower. But I have a strong feeling of deja vu, and last time it ended with Andrew not liking the whole thing... Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Mo

UML is leaking memory in arch_dup_mmap

2008-01-18 Thread Miklos Szeredi
On 2.6.24-rc8-mm1: uml:~# grep arch_dup_mmap /proc/slab_allocators size-32: 10861 arch_dup_mmap+0x9f/0x130 Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org

Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files

2008-01-18 Thread Miklos Szeredi
r a write on a non-present pte. > we should update the file time when it is marked > clean, and "msync(MS_SYNC)" should update it as part of *that*. That would need a new page flag (PG_mmap_dirty?). Do we have one available? Miklos -- To unsubscribe from this list: send the line

Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files

2008-01-18 Thread Miklos Szeredi
need a new page flag (PG_mmap_dirty?). Do we have one > > available? > > I thought the page writing stuff looked at (and cleared) the pte > dirty bit, too? Yeah, it does. Hmm... What happens on munmap? The times _could_ get updated from there as well, but it's getting co

Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files

2008-01-18 Thread Miklos Szeredi
and be done with it? But then background writeout, sync(2), etc, wouldn't update the times. Dunno. I don't think actual _physical_ writeout matters much, so it's not worse to be 30s early with the timestamp, than to be 30s or more late. Miklos -- To unsubscribe from this list: send

Re: UML is leaking memory in arch_dup_mmap

2008-01-18 Thread Miklos Szeredi
> On Fri, Jan 18, 2008 at 03:42:54PM +0100, Miklos Szeredi wrote: > > uml:~# grep arch_dup_mmap /proc/slab_allocators > > size-32: 10861 arch_dup_mmap+0x9f/0x130 > > Whoops - try the patch below. Yup, that seems to have solved it. Thanks. Miklos -- To unsubscribe from thi

Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files

2008-01-18 Thread Miklos Szeredi
Maybe this doesn't matter, I'm just saying this is a disadvantage compared to the "update on first dirtying" approach, which would ensure, that times are updated at least once per 30s. Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-ker

Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files

2008-01-19 Thread Miklos Szeredi
> Reminds me, I've got a patch here for addressing that problem with loop > mounts: > > Writes to loop should update the mtime of the underlying file. > > Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> > > Index: l/drivers/block/loop.c >

Re: [PATCH -v6 0/2] Fixing the issue with memory-mapped file times

2008-01-19 Thread Miklos Szeredi
> 2008/1/18, Miklos Szeredi <[EMAIL PROTECTED]>: > > > 4. Performance test was done using the program available from the > > > following link: > > > > > > http://bugzilla.kernel.org/attachment.cgi?id=14493 > > > > > > Resu

[RFC][PATCH] VFS: create /proc//mountinfo

2008-01-19 Thread Miklos Szeredi
Seems, most people would be happier with a new file, instead of extending /proc/mounts. This patch is the first attempt at doing that, as well as fixing the issues found in the previous submission. Thanks, Miklos --- From: Ram Pai <[EMAIL PROTECTED]> /proc/mounts in its current state f

Re: [patch] util-linux-ng: unprivileged mounts support

2008-01-19 Thread Miklos Szeredi
mount: /tmp/test: must be superuser to umount But 'fusermount -u /tmp/test' does work, doesn't it? Yes, this should probably be fixed in umount(8), but it's an (almost) completely separate issue. Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kern

Re: [RFC][PATCH] VFS: create /proc//mountinfo

2008-01-20 Thread Miklos Szeredi
> Miklos Szeredi wrote: > > - for mount ID's use IDA (from the IDR library) instead of a 32bit > > counter, which could overflow > > IDAs tend to get reused quickly, which can cause race conditions. Any > reason not to just use a 64-bit counter? They tend to bec

Re: [RFC][PATCH] VFS: create /proc//mountinfo

2008-01-20 Thread Miklos Szeredi
> On Jan 19 2008 12:05, Miklos Szeredi wrote: > >+ > >+/* > >+ * Write full pathname from the root of the filesystem into the buffer. > >+ */ > >+char *dentry_path(struct dentry *dentry, char *buf, int buflen) > > Hm, this functions looks very much like __

Re: [RFC][PATCH] VFS: create /proc//mountinfo

2008-01-21 Thread Miklos Szeredi
distinguished from > mount -t cifs //server/share/subdirectory /mnt > > when you run the mount command (ie the cifs "prefixpath" in this case > "/subdirectory" is not displayed)" Why cifs not displaying '//server/share/subdirectory&

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

2008-01-21 Thread Miklos Szeredi
; and 'sysfs' should also be safe, although the only use for them being marked safe is if the users are allowed to umount them from their private namespace (otherwise a 'mount --bind' has the same effect as a new mount). Thanks, Miklos -- To unsubscribe from this list: sen

Re: [RFC][PATCH] VFS: create /proc//mountinfo

2008-01-21 Thread Miklos Szeredi
> On Mon, 2008-01-21 at 22:25 +0100, Miklos Szeredi wrote: > > > You have removed the code that checked if the peer or > > > master mount was in the same namespace before reporting their > > > corresponding mount-ids. One downside of that approach is the > &

Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-22 Thread Miklos Szeredi
erformed on. This might get even more expensive, if the file is mapped lots of times. The old version, that Linus was referring to, needs some modification as well, because it doesn't write protect the ptes, just marks them clean. Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

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

2008-01-22 Thread Miklos Szeredi
t; + > > -- > Do you think this is enough? Or do we need something more, to prevent sysadmin inadvertently setting this for an unsafe filesystem? Thanks, Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH -v8 4/4] The design document for memory-mapped file times update

2008-01-23 Thread Miklos Szeredi
accounted for from the view point of file times. > + > +The only problem which remains is to force refreshing file times at the write > +reference following a call to msync() with MS_ASYNC. As mentioned above, all > +that is needed here is to force a pagefault. > + > +The vma_wrp

Re: [PATCH -v8 3/4] Enable the MS_ASYNC functionality in sys_msync()

2008-01-23 Thread Miklos Szeredi
address b) sync _memory_region_ defined by start/end-address b) is a perfectly fine definition, and it's consistent with what this code does. The fact that POSIX probably implies a) (in a rather poorly defined way) doesn't make much difference, I think. Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH -v8 3/4] Enable the MS_ASYNC functionality in sys_msync()

2008-01-23 Thread Miklos Szeredi
> Force file times update at the next write reference after > calling the msync() system call with the MS_ASYNC flag. > > Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]> > --- > mm/msync.c | 92 +-- > 1 files changed, 82 insertions(+)

Re: [PATCH -v8 3/4] Enable the MS_ASYNC functionality in sys_msync()

2008-01-23 Thread Miklos Szeredi
efined by this mmap/start/end-address > b) sync _memory_region_ defined by start/end-address My mmap/msync tester program can acually check this as well, with the '-f' flag. Anton, can you try that on the reference platforms? Miklos -- To unsubscribe from this list: send the line

Re: [PATCH -v8 4/4] The design document for memory-mapped file times update

2008-01-23 Thread Miklos Szeredi
084494 1201084495 > b 1201084496 1201084496 1201084495 Ah, OK, this is becuase mmap doesn't actually set up the page tables by default. Try adding MAP_POPULATE to the flags. Please also try ./times /mnt/file -s Thanks, Miklos -- To unsubscribe from this list: send the

Re: [PATCH -v8 4/4] The design document for memory-mapped file times update

2008-01-23 Thread Miklos Szeredi
e (basically equivalent to MAP_POPULATE, but portable). Please try this on a tmpfs file. Thanks, Miklos --- #include #include #include #include #include #include #include #include static const char *filename; static int msync_flag = MS_ASYNC; static int msync_fork = 0; static int msync_read = 0

Re: [PATCH -v8 4/4] The design document for memory-mapped file times update

2008-01-23 Thread Miklos Szeredi
> > Miklos, thanks for your program. Its output is given below. > > debian:~/miklos# mount | grep mnt > tmpfs on /mnt type tmpfs (rw) > debian:~/miklos# ./miklos /mnt/file > begin 1201089989 1201089989 1201085868 > write 1201089990 120108999

Re: [RFC][PATCH] VFS: create /proc//mountinfo

2008-01-23 Thread Miklos Szeredi
> Pavel Machek wrote: > > On Sun 2008-01-20 09:23:00, Miklos Szeredi wrote: > >>> Miklos Szeredi wrote: > >>>> - for mount ID's use IDA (from the IDR library) instead of a 32bit > >>>> counter, which could overflow > >>> ID

Re: [PATCH -v8 3/4] Enable the MS_ASYNC functionality in sys_msync()

2008-01-23 Thread Miklos Szeredi
in that case. What would be perfect, is if we had a sync mode, that on encountering a page currently under writeback, would just do a page_mkclean() on it, so we still receive a page fault next time one of the mappings is dirtied, so the times can be updated. Would there be any difficulties with tha

Re: [PATCH -v8 3/4] Enable the MS_ASYNC functionality in sys_msync()

2008-01-23 Thread Miklos Szeredi
lly willing to commit my > suggested patch in 2.6.24, I think this needs more thinking about) Sure, I would have though all of this stuff is 2.6.25, but it's your kernel... :) Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body o

Re: [PATCH -v8 3/4] Enable the MS_ASYNC functionality in sys_msync()

2008-01-23 Thread Miklos Szeredi
eally easy to get wrong (usually in ways that are hard to even > notice: things still work 99% of the time, and you might just be leaking > memory slowly, and fsync/msync() might not write back memory mapped data > to disk at all etc). OK. But I still

[patch 00/26] mount options: fix filesystem's ->show_options

2008-01-24 Thread Miklos Szeredi
Andrew, Would you please consider these patches for -mm? They should be relatively uncontroversial and straightforward fixes. They touch a lot of filesystems though, so not sure about the logistics... For the description, see first patch's header. Thanks, Miklos -- -- To unsubscribe

[patch 03/26] mount options: fix adfs

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a .show_options super operation to adfs. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> --- Index: linux/fs/adfs/super.c === --- linux.orig/fs/adfs/super.c 2008

[patch 04/26] mount options: fix affs

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a .show_options super operation to affs. Use generic_show_options() and save the complete option string in affs_fill_super() and affs_remount(). Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> --- Index: linux/fs/

[patch 07/26] mount options: fix autofs

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a .show_options super operation to autofs. Use generic_show_options() and save the complete option string in autofs_fill_super(). Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> --- Index: linux/fs/au

[patch 06/26] mount options: fix autofs4

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add uid= and gid= options to /proc/mounts for autofs4 filesystems. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> --- Index: linux/fs/autofs4/inode.c === --- linux.orig/fs/aut

[patch 09/26] mount options: fix capifs

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a .show_options super operation to capifs. Use generic_show_options() and save the complete option string in capifs_remount(). Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> --- Index: linux/drivers/isdn/c

[patch 08/26] mount options: fix befs

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a .show_options super operation to befs. Use generic_show_options() and save the complete option string in befs_fill_super(). Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> --- Index: linux/fs/bef

[patch 11/26] mount options: fix ext2

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add noreservation option to /proc/mounts for ext2 filesystems. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> --- Index: linux/fs/ext2/super.c === --- linux.orig/fs/ext2/supe

[patch 10/26] mount options: fix devpts

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a .show_options super operation to devpts. Also add minor fix: when parsing the "mode" option, mask with S_IALLUGO instead of ~S_IFMT, which could leave unsed bits in the mask. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]>

[patch 12/26] mount options: fix ext4

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add stripe= option to /proc/mounts for ext4 filesystems. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> --- Index: linux/fs/ext4/super.c === --- linux.orig/fs/ext4/super.c 2

[patch 01/26] mount options: add documentation

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> This series addresses the problem of showing mount options in /proc/mounts. Several filesystems which use mount options, have not implemented a .show_options superblock operation. Several others have implemented this callback, but have not kept it

[patch 13/26] mount options: fix fat

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add flush option to /proc/mounts for msdos and vfat filesystems. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> --- Index: linux/fs/fat/inode.c === --- linux.orig/fs/fat/inode

[patch 14/26] mount options: fix fuse

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add blksize= option to /proc/mounts for fuseblk filesystems. Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> --- Index: linux/fs/fuse/inode.c === --- linux.orig/fs/fuse/inode.c

[patch 15/26] mount options: fix hostfs

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add the "host path" option to /proc/mounts for UML hostfs filesystems. The mount source (mnt_devname) should really be used for this, but not easy to change now in a backward compatible way. Signed-off-by: Miklos Szeredi <[EMAIL PRO

[patch 16/26] mount options: fix hpfs

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a .show_options super operation to hpfs. Use generic_show_options() and save the complete option string in hpfs_fill_super() and hpfs_remount_fs(). Also add a small fix: hpfs_remount_fs() should return -EINVAL on error, instead of 1, which is

[patch 18/26] mount options: fix isofs

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a .show_options super operation to isofs. Use generic_show_options() and save the complete option string in isofs_fill_super(). Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> --- Index: linux/fs/i

[patch 02/26] mount options: add generic_show_options()

2008-01-24 Thread Miklos Szeredi
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a new s_options field to struct super_block. Filesystems can save mount options passed to them in mount or remount. It is automatically freed when the superblock is destroyed. A new helper function, generic_show_options() is introduced, whic

<    1   2   3   4   5   6   7   8   9   10   >