search for: vol_arg

Displaying 9 results from an estimated 9 matches for "vol_arg".

Did you mean: val_arg
2009 Jan 19
4
[Patch] Btrfs: use BTRFS_VOL_NAME_MAX for struct btrfs_ioctl_vol_args
....org> Cc: Chris Mason <chris.mason@oracle.com> --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index c2aa33e..f229950 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -472,7 +472,7 @@ static int btrfs_ioctl_resize(struct btrfs_root *root, void __user *arg) goto out; } - vol_args->name[BTRFS_PATH_NAME_MAX] = ''\0''; + vol_args->name[BTRFS_VOL_NAME_MAX] = ''\0''; namelen = strlen(vol_args->name); mutex_lock(&root->fs_info->volume_mutex); @@ -576,7 +576,7 @@ static noinline int btrfs_ioctl_snap_create(struct file *file...
2008 Jun 30
0
[PATCH] Null terminate strings passed in from userspace
The ''char name[BTRFS_PATH_NAME_MAX]'' member of struct btrfs_ioctl_vol_args is passed directly to strlen() after being copied from user. I haven''t verified this, but in theory a userspace program could pass in an unterminated string and cause a kernel crash as strlen walks off the end of the array. This patch terminates the ->name string in all btrfs ioctl fu...
2014 Apr 23
0
[PATCH 001/001] btrfs: Mechanism to modify the permission of a subvolume
...x-3.13.6/fs/btrfs/ioctl.c 2014-03-07 11:37:02.000000000 +0530 +++ linux-3.13.6_btrfs/fs/btrfs/ioctl.c 2014-03-19 14:25:28.375139699 +0530 @@ -1636,6 +1636,68 @@ out: return ret; } +static noinline int btrfs_ioctl_subvol_modify(struct file *file, + void __user *arg) +{ + struct btrfs_ioctl_vol_args_v2 *vol_args; + struct inode *inode = file_inode(file); + struct btrfs_root *root = BTRFS_I(inode)->root; + struct btrfs_trans_handle *trans; + u64 root_flags; + u64 flags; + int ret = 0; + + ret = mnt_want_write_file(file); + if (ret) + goto out; + + if (btrfs_ino(inode) != BTRFS_FIRST_FREE_O...
2007 Sep 20
0
[patch]use strnlen to deal with string from user space
Hello I think strlen is unsafe here Regards YZ diff -r 24c661119092 inode.c --- a/inode.c Mon Sep 17 11:25:58 2007 -0400 +++ b/inode.c Thu Sep 20 22:25:34 2007 +0800 @@ -1985,7 +1988,7 @@ static int btrfs_ioctl_snap_create(struc if (copy_from_user(&vol_args, arg, sizeof(vol_args))) return -EFAULT; - namelen = strlen(vol_args.name); + namelen = strnlen(vol_args.name, BTRFS_VOL_NAME_MAX + 1); if (namelen > BTRFS_VOL_NAME_MAX) return -EINVAL; if (strchr(vol_args.name, '/'))
2010 Oct 25
2
[PATCH] Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed
...rn 0; +} + /* copy of may_create in fs/namei.c() */ static inline int btrfs_may_create(struct inode *dir, struct dentry *child) { @@ -1288,9 +1358,6 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, int ret; int err = 0; - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - vol_args = memdup_user(arg, sizeof(*vol_args)); if (IS_ERR(vol_args)) return PTR_ERR(vol_args); @@ -1320,13 +1387,45 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, } inode = dentry->d_inode; + dest = BTRFS_I(inode)->root; + if (!capable(CAP_SYS_ADMIN)){ + /* + * Regu...
2011 Aug 23
40
[PATCH 00/21] [RFC] Btrfs: restriper
Hello, This patch series adds an initial implementation of restriper (it''s a clever name for relocation framework that allows to do selective profile changing and selective balancing with some goodies like pausing/resuming and reporting progress to the user. Profile changing is global (per-FS) so far, per-subvolume profiles require some discussion and can be implemented in future.
2010 Oct 25
14
[PATCH 0/6] Btrfs commit fixes, async subvol operations
Hi Chris, This is the extent of my current queue of Btrfs snapshot/subvol/commit stuff. Most of these were posted several months ago. Can be sent upstream during this merge window? Not having this functionality is becoming a bit of a roadblock for our efforts to keep the Ceph data in a consistent state. These patches are also available from
2010 Mar 22
5
[PATCH 0/5] asynchronous commit, snapshot ponies
Hi everyone, This patchset is the latest approach I''m using for the Ceph storage daemon to keep track of which data has safely committed to disk. The basic idea is to not use the (problematic) user transaction ioctls at all. Instead, the daemon quiesces its own write requests, initiates an async snapshot, and then continues. The snapshot approach is nice because it provides rollback.
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible to limit subvolumes and any group of subvolumes and also to track the amount of space that will get freed when deleting snapshots. The current version is functionally incomplete, with the main missing feature being the initial scan and rescan of an existing filesystem. I put some effort into writing an introduction into