wrapfs-3.11.y.git
3 years agoWrapfs: add ->bmap support wrapfs
Erez Zadok [Fri, 13 May 2022 23:43:26 +0000 (19:43 -0400)]
Wrapfs: add ->bmap support

Signed-off-by: Aditya Sonavane <aditya.sonavane@stonybrook.edu>
Signed-off-by: Erez Zadok <ezk@cs.stonybrook.edu>
3 years agowrapfs: copyright year update
Erez Zadok [Sat, 7 May 2022 22:12:06 +0000 (18:12 -0400)]
wrapfs: copyright year update

3 years agowrapfs: change http URLs to https
Erez Zadok [Sat, 7 May 2022 20:48:06 +0000 (16:48 -0400)]
wrapfs: change http URLs to https

5 years agomerge changes
Erez Zadok [Mon, 16 Dec 2019 00:00:10 +0000 (19:00 -0500)]
merge changes

5 years agowrapfs: update copyright
Erez Zadok [Sat, 14 Dec 2019 05:05:39 +0000 (00:05 -0500)]
wrapfs: update copyright

5 years agowrapfs: remove unused variable
Erez Zadok [Sat, 14 Dec 2019 04:20:54 +0000 (23:20 -0500)]
wrapfs: remove unused variable

6 years agoupdate copyright
Erez Zadok [Fri, 29 Mar 2019 20:45:36 +0000 (16:45 -0400)]
update copyright

6 years agofix spell error
Erez Zadok [Fri, 29 Mar 2019 20:39:19 +0000 (16:39 -0400)]
fix spell error

8 years agoWrapfs: ->iget fixes
Erez Zadok [Sun, 19 Feb 2017 00:11:22 +0000 (19:11 -0500)]
Wrapfs: ->iget fixes

Change where we igrab/iput to ensure we always hold a valid lower_inode.
Return ENOMEM (not EACCES) if iget5_locked returns NULL.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
8 years agoWrapfs: update copyrights for 2017
Erez Zadok [Sat, 18 Feb 2017 20:25:29 +0000 (15:25 -0500)]
Wrapfs: update copyrights for 2017

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
9 years agoWrapfs: support NFS exports
Erez Zadok [Sun, 22 May 2016 04:45:40 +0000 (00:45 -0400)]
Wrapfs: support NFS exports

Based on patch from Sandeep Joshi <sanjos100@gmail.com>.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
9 years agoWrapfs: use d_splice_alias
Erez Zadok [Sun, 22 May 2016 04:45:40 +0000 (00:45 -0400)]
Wrapfs: use d_splice_alias

Refactor interpose code to allow lookup to use d_splice_alias.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
9 years agoWrapfs: update nlinks after rename
Erez Zadok [Mon, 14 Dec 2015 00:27:59 +0000 (19:27 -0500)]
Wrapfs: update nlinks after rename

Signed-off-by: Logeswari P Viswanath <logeswari.pv@hpe.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
9 years agoWrapfs: update copyright year to 2015
Erez Zadok [Wed, 4 Nov 2015 04:56:11 +0000 (23:56 -0500)]
Wrapfs: update copyright year to 2015

9 years agoWrapfs: use vfs xattr helpers
Erez Zadok [Wed, 4 Nov 2015 04:56:11 +0000 (23:56 -0500)]
Wrapfs: use vfs xattr helpers

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: properly copy meta-data after AIO operations from lower inode
Erez Zadok [Sat, 16 Aug 2014 03:02:59 +0000 (23:02 -0400)]
Wrapfs: properly copy meta-data after AIO operations from lower inode

Signed-off-by: Mengyang Li <li.mengyang@stonybrook.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: leave placeholders for updating upper inode after AIO
Erez Zadok [Mon, 11 Aug 2014 22:36:25 +0000 (18:36 -0400)]
Wrapfs: leave placeholders for updating upper inode after AIO

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: protect lower_file by ref-count during aio operation
Erez Zadok [Sun, 10 Aug 2014 05:27:20 +0000 (01:27 -0400)]
Wrapfs: protect lower_file by ref-count during aio operation

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Mengyang Li <li.mengyang@stonybrook.edu>
11 years agoWrapfs: fix ->llseek to update upper and lower offsets
Erez Zadok [Thu, 26 Jun 2014 03:07:54 +0000 (23:07 -0400)]
Wrapfs: fix ->llseek to update upper and lower offsets

Fixes bug: xfstests generic/257. f_pos consistently is required by and
only by dir_ops->wrapfs_readdir, main_ops is not affected.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Mengyang Li <li.mengyang@stonybrook.edu>
11 years ago Wrapfs: support extended attributes (xattr) operations
Erez Zadok [Thu, 26 Jun 2014 03:06:51 +0000 (23:06 -0400)]
 Wrapfs: support extended attributes (xattr) operations

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Mengyang Li <li.mengyang@stonybrook.edu>
11 years agoWrapfs: support asynchronous-IO (AIO) operations
Erez Zadok [Sat, 21 Jun 2014 00:11:07 +0000 (20:11 -0400)]
Wrapfs: support asynchronous-IO (AIO) operations

Signed-off-by: Li Mengyang <li.mengyang@stonybrook.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: support direct-IO (DIO) operations
Erez Zadok [Sat, 21 Jun 2014 00:11:07 +0000 (20:11 -0400)]
Wrapfs: support direct-IO (DIO) operations

Signed-off-by: Li Mengyang <li.mengyang@stonybrook.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: implement vm_ops->page_mkwrite
Erez Zadok [Thu, 15 May 2014 04:16:00 +0000 (00:16 -0400)]
Wrapfs: implement vm_ops->page_mkwrite

Some file systems (e.g., ext4) require it.  Reported by Ted Ts'o.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: update documentation
Erez Zadok [Thu, 3 Apr 2014 18:21:22 +0000 (14:21 -0400)]
Wrapfs: update documentation

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: update maintainers
Erez Zadok [Thu, 3 Apr 2014 18:21:14 +0000 (14:21 -0400)]
Wrapfs: update maintainers

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: update documentation
Erez Zadok [Tue, 21 Jan 2014 08:32:08 +0000 (03:32 -0500)]
Wrapfs: update documentation

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: 2014 Copyright update
Erez Zadok [Tue, 21 Jan 2014 06:23:26 +0000 (01:23 -0500)]
Wrapfs: 2014 Copyright update

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agopatch wrapfs-copyright-update.patch
Erez Zadok [Wed, 20 Nov 2013 03:53:40 +0000 (22:53 -0500)]
patch wrapfs-copyright-update.patch

11 years agoWrapfs: ->readdir op now ->iterate
Erez Zadok [Wed, 20 Nov 2013 03:48:34 +0000 (22:48 -0500)]
Wrapfs: ->readdir op now ->iterate

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: copy lower inode attributes in ->ioctl
Erez Zadok [Wed, 5 Jun 2013 05:36:58 +0000 (01:36 -0400)]
Wrapfs: copy lower inode attributes in ->ioctl

Some ioctls (e.g., EXT2_IOC_SETFLAGS) can change inode attributes, so copy
them from lower inode.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: remove unnecessary call to vm_unmap in ->mmap
Erez Zadok [Wed, 5 Jun 2013 05:36:58 +0000 (01:36 -0400)]
Wrapfs: remove unnecessary call to vm_unmap in ->mmap

Code is unnecessary and causes deadlocks in newer kernels.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: declare MODULE_ALIAS_FS
Erez Zadok [Wed, 5 Jun 2013 03:19:32 +0000 (23:19 -0400)]
Wrapfs: declare MODULE_ALIAS_FS

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: don't use FS_REVAL_DOT in fs_flags
Erez Zadok [Wed, 5 Jun 2013 03:19:32 +0000 (23:19 -0400)]
Wrapfs: don't use FS_REVAL_DOT in fs_flags

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: remove dependency on now-defunct CONFIG_EXPERIMENTAL
Erez Zadok [Wed, 5 Jun 2013 03:19:31 +0000 (23:19 -0400)]
Wrapfs: remove dependency on now-defunct CONFIG_EXPERIMENTAL

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: dentry_open() no longer does mntput/dput
Erez Zadok [Wed, 5 Jun 2013 03:19:31 +0000 (23:19 -0400)]
Wrapfs: dentry_open() no longer does mntput/dput

We need to grab a reference on the path before dentry_open, and drop it
after.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: no need to call mnt_want_write any longer
Erez Zadok [Wed, 5 Jun 2013 03:19:30 +0000 (23:19 -0400)]
Wrapfs: no need to call mnt_want_write any longer

Apparently this is now being done by the VFS.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: remove VM_CAN_NONLINEAR flag use in ->mmap
Erez Zadok [Wed, 5 Jun 2013 03:19:30 +0000 (23:19 -0400)]
Wrapfs: remove VM_CAN_NONLINEAR flag use in ->mmap

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: ->lookup takes flags not a nameidata
Erez Zadok [Wed, 5 Jun 2013 03:19:29 +0000 (23:19 -0400)]
Wrapfs: ->lookup takes flags not a nameidata

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: ->create no longer takes a nameidata, only a flag
Erez Zadok [Wed, 5 Jun 2013 03:19:29 +0000 (23:19 -0400)]
Wrapfs: ->create no longer takes a nameidata, only a flag

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: ->d_revalidate now takes namei flags, not nameidata
Erez Zadok [Wed, 5 Jun 2013 03:19:29 +0000 (23:19 -0400)]
Wrapfs: ->d_revalidate now takes namei flags, not nameidata

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: struct nameidata no longer has an open-intent data
Erez Zadok [Wed, 5 Jun 2013 03:19:28 +0000 (23:19 -0400)]
Wrapfs: struct nameidata no longer has an open-intent data

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: dentry_open now takes a struct path
Erez Zadok [Wed, 5 Jun 2013 03:19:28 +0000 (23:19 -0400)]
Wrapfs: dentry_open now takes a struct path

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: use vm_munmap in ->mmap
Erez Zadok [Wed, 5 Jun 2013 03:19:27 +0000 (23:19 -0400)]
Wrapfs: use vm_munmap in ->mmap

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: use clear_inode in evict_inode
Erez Zadok [Wed, 5 Jun 2013 03:19:27 +0000 (23:19 -0400)]
Wrapfs: use clear_inode in evict_inode

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: use d_make_root
Erez Zadok [Wed, 5 Jun 2013 03:19:26 +0000 (23:19 -0400)]
Wrapfs: use d_make_root

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: use mode_t
Erez Zadok [Tue, 31 Jan 2012 09:40:19 +0000 (04:40 -0500)]
Wrapfs: use mode_t

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: use set_nlink()
Erez Zadok [Mon, 30 Jan 2012 01:34:27 +0000 (20:34 -0500)]
Wrapfs: use set_nlink()

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: drop our dentry in ->rmdir
Erez Zadok [Fri, 9 Sep 2011 04:47:49 +0000 (00:47 -0400)]
Wrapfs: drop our dentry in ->rmdir

Also clear nlinks on our inode.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: use d_alloc_root
Erez Zadok [Tue, 6 Sep 2011 04:10:32 +0000 (00:10 -0400)]
Wrapfs: use d_alloc_root

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: use d_set_d_op
Erez Zadok [Tue, 6 Sep 2011 04:10:31 +0000 (00:10 -0400)]
Wrapfs: use d_set_d_op

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: use updated vfs_path_lookup prototype
Erez Zadok [Tue, 6 Sep 2011 04:10:30 +0000 (00:10 -0400)]
Wrapfs: use updated vfs_path_lookup prototype

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: ->fsync updates for new prototype
Erez Zadok [Tue, 6 Sep 2011 04:10:30 +0000 (00:10 -0400)]
Wrapfs: ->fsync updates for new prototype

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: support LOOKUP_RCU in ->d_revalidate
Erez Zadok [Tue, 6 Sep 2011 04:10:29 +0000 (00:10 -0400)]
Wrapfs: support LOOKUP_RCU in ->d_revalidate

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: new ->permission prototype and fixes.
Erez Zadok [Tue, 6 Sep 2011 04:10:28 +0000 (00:10 -0400)]
Wrapfs: new ->permission prototype and fixes.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: lookup fixes
Erez Zadok [Mon, 2 May 2011 06:00:02 +0000 (02:00 -0400)]
Wrapfs: lookup fixes

Don't use lookup_one_len any longer (doesn't work for NFS).
Initialize lower wrapfs_dentry_info so lower_path is NULL.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: remove extra debug in rmdir
Erez Zadok [Fri, 18 Mar 2011 17:14:28 +0000 (13:14 -0400)]
Wrapfs: remove extra debug in rmdir

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: checkpatch fixes
Erez Zadok [Fri, 18 Mar 2011 16:38:01 +0000 (12:38 -0400)]
Wrapfs: checkpatch fixes

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: port to 2.6.39
Erez Zadok [Fri, 18 Mar 2011 04:45:17 +0000 (00:45 -0400)]
Wrapfs: port to 2.6.39

Remove lock/unlock_kernel in ->fasync.
Convert from ->get_sb to ->mount op.
Remove include to smp_lock.h, added sched.h.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: copyright update for 2011
Erez Zadok [Fri, 18 Mar 2011 03:21:55 +0000 (23:21 -0400)]
Wrapfs: copyright update for 2011

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: better handling of NFS silly-renamed files
Erez Zadok [Fri, 18 Mar 2011 03:21:55 +0000 (23:21 -0400)]
Wrapfs: better handling of NFS silly-renamed files

In ->unlink, if we try to unlink an NFS silly-renamed file, NFS returns
-EBUSY.  We have to treat it as a success and return 0 to the VFS.  NFS will
remove silly-deleted files later on anyway.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: update parent directory inode size in inode ops
Erez Zadok [Fri, 18 Mar 2011 03:21:55 +0000 (23:21 -0400)]
Wrapfs: update parent directory inode size in inode ops

After ->unlink, ->rmdir, and ->rename, we need to copy the (possibly
changed) inode size of the parent directory(ies) where the operation took
place.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: remove unnecessary calls to copy lower inode->n_links
Erez Zadok [Fri, 18 Mar 2011 03:21:55 +0000 (23:21 -0400)]
Wrapfs: remove unnecessary calls to copy lower inode->n_links

Removed from ->create, ->symlink, and ->mknod.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: ->setattr fixes
Erez Zadok [Tue, 8 Mar 2011 04:20:33 +0000 (23:20 -0500)]
Wrapfs: ->setattr fixes

Call inode_change_ok on our inode, not lower.
Don't copy inode sizes (VFS does it).
Pass lower file in struct iattr passed to notify_change on lower inode.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: update ->permission prototye and code for new iperm flag
Erez Zadok [Sun, 6 Mar 2011 21:23:16 +0000 (16:23 -0500)]
Wrapfs: update ->permission prototye and code for new iperm flag

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: handle maxbytes properly
Erez Zadok [Fri, 12 Nov 2010 23:15:05 +0000 (18:15 -0500)]
Wrapfs: handle maxbytes properly

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: support ->unlocked_ioctl and ->compat_ioctl
Erez Zadok [Sat, 11 Sep 2010 19:49:33 +0000 (15:49 -0400)]
Wrapfs: support ->unlocked_ioctl and ->compat_ioctl

Old ->ioctl was split into ->unlocked_ioctl and ->compat_ioctl.  Compat
version doesn't need to lock_kernel any longer.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: new vfs_statfs and ->evict_inode prototypes
Erez Zadok [Wed, 11 Aug 2010 03:50:14 +0000 (23:50 -0400)]
Wrapfs: new vfs_statfs and ->evict_inode prototypes

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: update ->fsync prototype
Erez Zadok [Sat, 7 Aug 2010 03:37:29 +0000 (23:37 -0400)]
Wrapfs: update ->fsync prototype

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: update documentation
Erez Zadok [Wed, 21 Apr 2010 01:22:02 +0000 (21:22 -0400)]
Wrapfs: update documentation

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: include slab.h
Erez Zadok [Tue, 20 Apr 2010 19:32:09 +0000 (15:32 -0400)]
Wrapfs: include slab.h

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: avoid an extra path_get/put pair in wrapfs_open
Erez Zadok [Tue, 20 Apr 2010 19:26:02 +0000 (15:26 -0400)]
Wrapfs: avoid an extra path_get/put pair in wrapfs_open

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: decrement nd_path on follow_link error
Erez Zadok [Fri, 26 Feb 2010 08:18:04 +0000 (03:18 -0500)]
Wrapfs: decrement nd_path on follow_link error

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: don't mention kernel version in modload message
Erez Zadok [Tue, 5 Jan 2010 09:27:00 +0000 (04:27 -0500)]
Wrapfs: don't mention kernel version in modload message

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoKconfig: hook to configure Wrapfs
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Kconfig: hook to configure Wrapfs

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoMakefile: hook to compile Wrapfs
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Makefile: hook to compile Wrapfs

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: file system magic number
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: file system magic number

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: Kconfig options
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: Kconfig options

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: main Makefile
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: main Makefile

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: vm_ops operations
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: vm_ops operations

Includes necessary address_space workaround ops.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: mount-time and module-linkage functions
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: mount-time and module-linkage functions

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: lookup-related functions
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: lookup-related functions

Main lookup function, nameidata helpers, and stacking-interposition
functions.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: file operations
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: file operations

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: dentry operations
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: dentry operations

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: inode operations
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: inode operations

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: superblock operations
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: superblock operations

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: main header file
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: main header file

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: Maintainers
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: Maintainers

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoDocumentation: index entry for Wrapfs
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Documentation: index entry for Wrapfs

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoWrapfs: introduction and usage documentation
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: introduction and usage documentation

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
11 years agoLinux 3.11.10 master v3.11.10
Greg Kroah-Hartman [Fri, 29 Nov 2013 18:42:37 +0000 (10:42 -0800)]
Linux 3.11.10

11 years agoexec/ptrace: fix get_dumpable() incorrect tests
Kees Cook [Tue, 12 Nov 2013 23:11:17 +0000 (15:11 -0800)]
exec/ptrace: fix get_dumpable() incorrect tests

commit d049f74f2dbe71354d43d393ac3a188947811348 upstream.

The get_dumpable() return value is not boolean.  Most users of the
function actually want to be testing for non-SUID_DUMP_USER(1) rather than
SUID_DUMP_DISABLE(0).  The SUID_DUMP_ROOT(2) is also considered a
protected state.  Almost all places did this correctly, excepting the two
places fixed in this patch.

Wrong logic:
    if (dumpable == SUID_DUMP_DISABLE) { /* be protective */ }
        or
    if (dumpable == 0) { /* be protective */ }
        or
    if (!dumpable) { /* be protective */ }

Correct logic:
    if (dumpable != SUID_DUMP_USER) { /* be protective */ }
        or
    if (dumpable != 1) { /* be protective */ }

Without this patch, if the system had set the sysctl fs/suid_dumpable=2, a
user was able to ptrace attach to processes that had dropped privileges to
that user.  (This may have been partially mitigated if Yama was enabled.)

The macros have been moved into the file that declares get/set_dumpable(),
which means things like the ia64 code can see them too.

CVE-2013-2929

Reported-by: Vasily Kulikov <segoon@openwall.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoRevert "ima: policy for RAMFS"
Mimi Zohar [Thu, 17 Oct 2013 11:34:02 +0000 (07:34 -0400)]
Revert "ima: policy for RAMFS"

commit 08de59eb144d7c41351a467442f898d720f0f15f upstream.

This reverts commit 4c2c392763a682354fac65b6a569adec4e4b5387.

Everything in the initramfs should be measured and appraised,
but until the initramfs has extended attribute support, at
least measured.

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoBluetooth: revert: "Bluetooth: Add missing reset_resume dev_pm_ops"
Hans de Goede [Sat, 28 Sep 2013 13:25:39 +0000 (15:25 +0200)]
Bluetooth: revert: "Bluetooth: Add missing reset_resume dev_pm_ops"

commit b1a8014471b01dd862de9f91bbbff1296afac42d upstream.

Many btusb devices have 2 modes, a hid mode and a bluetooth hci mode. These
devices default to hid mode for BIOS use. This means that after having been
reset they will revert to HID mode, and are no longer usable as a HCI.

Therefor it is a very bad idea to just blindly make reset_resume point to
the regular resume handler. Note that the btusb driver has no clue how to
switch these devices from hid to hci mode, this is done in userspace through
udev rules, so the proper way to deal with this is to not have a reset-resume
handler and instead let the usb-system re-enumerate the device, and re-run
the udev rules.

I must also note, that the commit message for the commit causing this
problem has a very weak motivation for the change:

"Add missing reset_resume dev_pm_ops. Missing reset_resume results in the
following message after power management device test. This change sets
reset_resume to btusb_resume().

[ 2506.936134] btusb 1-1.5:1.0: no reset_resume for driver btusb?
[ 2506.936137] btusb 1-1.5:1.1: no reset_resume for driver btusb?"

Making a change solely to silence a warning while also changing important
behavior (normal resume handling versus re-enumeration) requires a commit
message with a proper explanation why it is safe to do so, which clearly lacks
here, and unsurprisingly it turns out to not be safe to make this change.

Reverting the commit in question fixes bt no longer working on my Dell
E6430 after a suspend/resume, and I believe it likely also fixes the
following bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=988481
https://bugzilla.redhat.com/show_bug.cgi?id=1010649
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1213239

This reverts commit 502f769662978a2fe99d0caed5e53e3006107381.

Cc: Shuah Khan <shuah.kh@samsung.com>
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agort2x00: fix HT TX descriptor settings regression
Stanislaw Gruszka [Thu, 31 Oct 2013 10:23:57 +0000 (11:23 +0100)]
rt2x00: fix HT TX descriptor settings regression

commit 3d8bfe141be8e5c21261fc63da8e7964d44f2645 upstream.

Since:

commit 36323f817af0376c78612cfdab714b0feb05fea5
Author: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Date:   Mon Jul 23 21:33:42 2012 +0200

    mac80211: move TX station pointer and restructure TX

we do not pass sta pointer to rt2x00queue_create_tx_descriptor_ht(),
hence we do not correctly set station WCID and AMPDU density parameters.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agort2x00: rt2800lib: fix VGC adjustment for RT5592
Gabor Juhos [Thu, 3 Oct 2013 18:00:40 +0000 (20:00 +0200)]
rt2x00: rt2800lib: fix VGC adjustment for RT5592

commit 0beb1bbf19c72f17809e42b8f33522a55c2cc18c upstream.

In commit 3d81535ea5940446510a8a5cee1c6ad23c90c753
(rt2800: 5592: add chip specific vgc calculations)
the rt2800_link_tuner function has been modified to
adjust VGC level for the RT5592 chipset.

On the RT5592 chipset, the VGC level must be adjusted
only if rssi is greater than -65. However the current
code adjusts the VGC value by 0x10 regardless of the
actual chipset if the rssi value is between -80 and
-65.

Fix the broken behaviour by reordering the if-else
statements.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agort2x00: check if device is still available on rt2x00mac_flush()
Stanislaw Gruszka [Tue, 15 Oct 2013 12:31:12 +0000 (14:31 +0200)]
rt2x00: check if device is still available on rt2x00mac_flush()

commit 5671ab05cf2a579218985ef56595387932d78ee4 upstream.

Fix random kernel panic with below messages when remove dongle.

[ 2212.355447] BUG: unable to handle kernel NULL pointer dereference at 0000000000000250
[ 2212.355527] IP: [<ffffffffa02667f2>] rt2x00usb_kick_tx_entry+0x12/0x160 [rt2x00usb]
[ 2212.355599] PGD 0
[ 2212.355626] Oops: 0000 [#1] SMP
[ 2212.355664] Modules linked in: rt2800usb rt2x00usb rt2800lib crc_ccitt rt2x00lib mac80211 cfg80211 tun arc4 fuse rfcomm bnep snd_hda_codec_realtek snd_hda_intel snd_hda_codec btusb uvcvideo bluetooth snd_hwdep x86_pkg_temp_thermal snd_seq coretemp aesni_intel aes_x86_64 snd_seq_device glue_helper snd_pcm ablk_helper videobuf2_vmalloc sdhci_pci videobuf2_memops videobuf2_core sdhci videodev mmc_core serio_raw snd_page_alloc microcode i2c_i801 snd_timer hid_multitouch thinkpad_acpi lpc_ich mfd_core snd tpm_tis wmi tpm tpm_bios soundcore acpi_cpufreq i915 i2c_algo_bit drm_kms_helper drm i2c_core video [last unloaded: cfg80211]
[ 2212.356224] CPU: 0 PID: 34 Comm: khubd Not tainted 3.12.0-rc3-wl+ #3
[ 2212.356268] Hardware name: LENOVO 3444CUU/3444CUU, BIOS G6ET93WW (2.53 ) 02/04/2013
[ 2212.356319] task: ffff880212f687c0 ti: ffff880212f66000 task.ti: ffff880212f66000
[ 2212.356392] RIP: 0010:[<ffffffffa02667f2>]  [<ffffffffa02667f2>] rt2x00usb_kick_tx_entry+0x12/0x160 [rt2x00usb]
[ 2212.356481] RSP: 0018:ffff880212f67750  EFLAGS: 00010202
[ 2212.356519] RAX: 000000000000000c RBX: 000000000000000c RCX: 0000000000000293
[ 2212.356568] RDX: ffff8801f4dc219a RSI: 0000000000000000 RDI: 0000000000000240
[ 2212.356617] RBP: ffff880212f67778 R08: ffffffffa02667e0 R09: 0000000000000002
[ 2212.356665] R10: 0001f95254ab4b40 R11: ffff880212f675be R12: ffff8801f4dc2150
[ 2212.356712] R13: 0000000000000000 R14: ffffffffa02667e0 R15: 000000000000000d
[ 2212.356761] FS:  0000000000000000(0000) GS:ffff88021e200000(0000) knlGS:0000000000000000
[ 2212.356813] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2212.356852] CR2: 0000000000000250 CR3: 0000000001a0c000 CR4: 00000000001407f0
[ 2212.356899] Stack:
[ 2212.356917]  000000000000000c ffff8801f4dc2150 0000000000000000 ffffffffa02667e0
[ 2212.356980]  000000000000000d ffff880212f677b8 ffffffffa03a31ad ffff8801f4dc219a
[ 2212.357038]  ffff8801f4dc2150 0000000000000000 ffff8800b93217a0 ffff8801f49bc800
[ 2212.357099] Call Trace:
[ 2212.357122]  [<ffffffffa02667e0>] ? rt2x00usb_interrupt_txdone+0x90/0x90 [rt2x00usb]
[ 2212.357174]  [<ffffffffa03a31ad>] rt2x00queue_for_each_entry+0xed/0x170 [rt2x00lib]
[ 2212.357244]  [<ffffffffa026701c>] rt2x00usb_kick_queue+0x5c/0x60 [rt2x00usb]
[ 2212.357314]  [<ffffffffa03a3682>] rt2x00queue_flush_queue+0x62/0xa0 [rt2x00lib]
[ 2212.357386]  [<ffffffffa03a2930>] rt2x00mac_flush+0x30/0x70 [rt2x00lib]
[ 2212.357470]  [<ffffffffa04edded>] ieee80211_flush_queues+0xbd/0x140 [mac80211]
[ 2212.357555]  [<ffffffffa0502e52>] ieee80211_set_disassoc+0x2d2/0x3d0 [mac80211]
[ 2212.357645]  [<ffffffffa0506da3>] ieee80211_mgd_deauth+0x1d3/0x240 [mac80211]
[ 2212.357718]  [<ffffffff8108b17c>] ? try_to_wake_up+0xec/0x290
[ 2212.357788]  [<ffffffffa04dbd18>] ieee80211_deauth+0x18/0x20 [mac80211]
[ 2212.357872]  [<ffffffffa0418ddc>] cfg80211_mlme_deauth+0x9c/0x140 [cfg80211]
[ 2212.357913]  [<ffffffffa041907c>] cfg80211_mlme_down+0x5c/0x60 [cfg80211]
[ 2212.357962]  [<ffffffffa041cd18>] cfg80211_disconnect+0x188/0x1a0 [cfg80211]
[ 2212.358014]  [<ffffffffa04013bc>] ? __cfg80211_stop_sched_scan+0x1c/0x130 [cfg80211]
[ 2212.358067]  [<ffffffffa03f8954>] cfg80211_leave+0xc4/0xe0 [cfg80211]
[ 2212.358124]  [<ffffffffa03f8d1b>] cfg80211_netdev_notifier_call+0x3ab/0x5e0 [cfg80211]
[ 2212.358177]  [<ffffffff815140f8>] ? inetdev_event+0x38/0x510
[ 2212.358217]  [<ffffffff81085a94>] ? __wake_up+0x44/0x50
[ 2212.358254]  [<ffffffff8155995c>] notifier_call_chain+0x4c/0x70
[ 2212.358293]  [<ffffffff81081156>] raw_notifier_call_chain+0x16/0x20
[ 2212.358361]  [<ffffffff814b6dd5>] call_netdevice_notifiers_info+0x35/0x60
[ 2212.358429]  [<ffffffff814b6ec9>] __dev_close_many+0x49/0xd0
[ 2212.358487]  [<ffffffff814b7028>] dev_close_many+0x88/0x100
[ 2212.358546]  [<ffffffff814b8150>] rollback_registered_many+0xb0/0x220
[ 2212.358612]  [<ffffffff814b8319>] unregister_netdevice_many+0x19/0x60
[ 2212.358694]  [<ffffffffa04d8eb2>] ieee80211_remove_interfaces+0x112/0x190 [mac80211]
[ 2212.358791]  [<ffffffffa04c585f>] ieee80211_unregister_hw+0x4f/0x100 [mac80211]
[ 2212.361994]  [<ffffffffa03a1221>] rt2x00lib_remove_dev+0x161/0x1a0 [rt2x00lib]
[ 2212.365240]  [<ffffffffa0266e2e>] rt2x00usb_disconnect+0x2e/0x70 [rt2x00usb]
[ 2212.368470]  [<ffffffff81419ce4>] usb_unbind_interface+0x64/0x1c0
[ 2212.371734]  [<ffffffff813b446f>] __device_release_driver+0x7f/0xf0
[ 2212.374999]  [<ffffffff813b4503>] device_release_driver+0x23/0x30
[ 2212.378131]  [<ffffffff813b3c98>] bus_remove_device+0x108/0x180
[ 2212.381358]  [<ffffffff813b0565>] device_del+0x135/0x1d0
[ 2212.384454]  [<ffffffff81417760>] usb_disable_device+0xb0/0x270
[ 2212.387451]  [<ffffffff8140d9cd>] usb_disconnect+0xad/0x1d0
[ 2212.390294]  [<ffffffff8140f6cd>] hub_thread+0x63d/0x1660
[ 2212.393034]  [<ffffffff8107c860>] ? wake_up_atomic_t+0x30/0x30
[ 2212.395728]  [<ffffffff8140f090>] ? hub_port_debounce+0x130/0x130
[ 2212.398412]  [<ffffffff8107baa0>] kthread+0xc0/0xd0
[ 2212.401058]  [<ffffffff8107b9e0>] ? insert_kthread_work+0x40/0x40
[ 2212.403639]  [<ffffffff8155de3c>] ret_from_fork+0x7c/0xb0
[ 2212.406193]  [<ffffffff8107b9e0>] ? insert_kthread_work+0x40/0x40
[ 2212.408732] Code: 24 58 08 00 00 bf 80 00 00 00 e8 3a c3 e0 e0 5b 41 5c 5d c3 0f 1f 44 00 00 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 <48> 8b 47 10 48 89 fb 4c 8b 6f 28 4c 8b 20 49 8b 04 24 4c 8b 30
[ 2212.414671] RIP  [<ffffffffa02667f2>] rt2x00usb_kick_tx_entry+0x12/0x160 [rt2x00usb]
[ 2212.417646]  RSP <ffff880212f67750>
[ 2212.420547] CR2: 0000000000000250
[ 2212.441024] ---[ end trace 5442918f33832bce ]---

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agort2x00: fix a crash bug in the HT descriptor handling fix
Felix Fietkau [Thu, 14 Nov 2013 20:33:15 +0000 (21:33 +0100)]
rt2x00: fix a crash bug in the HT descriptor handling fix

commit b4089d6d8e71a7293e2192025dfa507a04f661c4 upstream.

Commit "rt2x00: fix HT TX descriptor settings regression"
assumes that the control parameter to rt2x00mac_tx is always non-NULL.
There is an internal call in rt2x00lib_bc_buffer_iter where NULL is
passed. Fix the resulting crash by adding an initialized dummy on-stack
ieee80211_tx_control struct.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoDrivers: hv: vmbus: Fix a bug in channel rescind code
K. Y. Srinivasan [Thu, 17 Oct 2013 02:27:19 +0000 (19:27 -0700)]
Drivers: hv: vmbus: Fix a bug in channel rescind code

commit 565ce6422ff92f5af71e4d5a09f78215433b2695 upstream.

Rescind of subchannels were not being correctly handled. Fix the bug.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: avoid memleak for subdevice private
Ian Abbott [Mon, 7 Oct 2013 14:51:58 +0000 (15:51 +0100)]
staging: comedi: avoid memleak for subdevice private

commit 67aa4acbc97f6a55b328e4e2305ef19cbe949d85 upstream.

`comedi_alloc_spriv()` allocates private storage for a comedi subdevice
and sets the `SRF_FREE_SPRIV` flag in the `runflags` member of the
subdevice to allow the private storage to be automatically freed when
the comedi device is being cleaned up.  Unfortunately, the flag gets
clobbered by `do_cmd_ioctl()` which calls
`comedi_set_subdevice_runflags()` with a mask value `~0` and only the
`SRF_USER` and `SRF_RUNNING` flags set, all the other SRF flags being
cleared.

Change the calls to `comedi_set_subdevice_runflags()` that currently use
a mask value of `~0` to use a more relevant mask value.  For
`do_cmd_ioctl()`, the relevant SRF flags are `SRF_USER`, `SRF_ERROR` and
`SRF_RUNNING`.  (At one time, `SRF_RT` would be included in that set of
flags, but it is no longer used.)  For `comedi_alloc_spriv()` replace
the call to `comedi_set_subdevice_runflags()` with a simple
OR-assignment to avoid unnecessary use of a spin-lock.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: zram: Fix access of NULL pointer
Rashika Kheria [Wed, 30 Oct 2013 13:06:32 +0000 (18:36 +0530)]
Staging: zram: Fix access of NULL pointer

commit 46a51c80216cb891f271ad021f59009f34677499 upstream.

This patch fixes the bug in reset_store caused by accessing NULL pointer.

The bdev gets its value from bdget_disk() which could fail when memory
pressure is severe and hence can return NULL because allocation of
inode in bdget could fail.

Hence, this patch introduces a check for bdev to prevent reference to a
NULL pointer in the later part of the code. It also removes unnecessary
check of bdev for fsync_bdev().

Acked-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>