| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the renamed functions moved from the f2fs crypto files.
[Backporting to 3.10]
- Removed d_is_negative() in fscrypt_d_revalidate().
1. definitions for per-file encryption used by ext4 and f2fs.
2. crypto.c for encrypt/decrypt functions
a. IO preparation:
- fscrypt_get_ctx / fscrypt_release_ctx
b. before IOs:
- fscrypt_encrypt_page
- fscrypt_decrypt_page
- fscrypt_zeroout_range
c. after IOs:
- fscrypt_decrypt_bio_pages
- fscrypt_pullback_bio_page
- fscrypt_restore_control_page
3. policy.c supporting context management.
a. For ioctls:
- fscrypt_process_policy
- fscrypt_get_policy
b. For context permission
- fscrypt_has_permitted_context
- fscrypt_inherit_context
4. keyinfo.c to handle permissions
- fscrypt_get_encryption_info
- fscrypt_free_encryption_info
5. fname.c to support filename encryption
a. general wrapper functions
- fscrypt_fname_disk_to_usr
- fscrypt_fname_usr_to_disk
- fscrypt_setup_filename
- fscrypt_free_filename
b. specific filename handling functions
- fscrypt_fname_alloc_buffer
- fscrypt_fname_free_buffer
6. Makefile and Kconfig
Cc: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Michael Halcrow <mhalcrow@google.com>
Signed-off-by: Ildar Muslukhov <ildarm@google.com>
Signed-off-by: Uday Savagaonkar <savagaon@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
|
|
| |
This reverts commit b6a5e4ec2f6e2cabf5630fefcfc942992e3a028f.
|
| |
|
|
|
|
|
|
|
|
| |
This allows filesystems to use their mount private data to
influence the permssions they use in setattr2. It has
been separated into a new call to avoid disrupting current
setattr users.
Change-Id: I19959038309284448f1b7f232d579674ef546385
Signed-off-by: Daniel Rosenberg <drosen@google.com>
|
| |
|
|
|
|
|
|
|
|
| |
This allows filesystems to use their mount private data to
influence the permssions they return in permission2. It has
been separated into a new call to avoid disrupting current
permission users.
Change-Id: I9d416e3b8b6eca84ef3e336bd2af89ddd51df6ca
Signed-off-by: Daniel Rosenberg <drosen@google.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now we pass the vfsmount when mounting and remounting.
This allows the filesystem to actually set up the mount
specific data, although we can't quite do anything with
it yet. show_options is expanded to include data that
lives with the mount.
To avoid changing existing filesystems, these have
been added as new vfs functions.
Change-Id: If80670bfad9f287abb8ac22457e1b034c9697097
Signed-off-by: Daniel Rosenberg <drosen@google.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
This starts to add private data associated directly
to mount points. The intent is to give filesystems
a sense of where they have come from, as a means of
letting a filesystem take different actions based on
this information.
Change-Id: Ie769d7b3bb2f5972afe05c1bf16cf88c91647ab2
Signed-off-by: Daniel Rosenberg <drosen@google.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Introduce FMODE_SPLICE_READ and FMODE_SPLICE_WRITE. These modes check
whether it is legal to read or write a file using splice. Both get
automatically set on regular files and are not checked when a 'struct
fileoperations' includes the splice_{read,write} methods.
Change-Id: Ice6a3fab20bf0ac131f8d908f4bb0f7dc34bf4e3
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
|
| |
|
|
|
|
|
| |
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: b2497fc3057ae27db9aa29579f16ae5afb6d6d08
Git-repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Ian Maund <imaund@codeaurora.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New method - ->iterate(file, ctx). That's the replacement for ->readdir();
it takes callback from ctx->actor, uses ctx->pos instead of file->f_pos and
calls dir_emit(ctx, ...) instead of filldir(data, ...). It does *not*
update file->f_pos (or look at it, for that matter); iterate_dir() does the
update.
Note that dir_emit() takes the offset from ctx->pos (and eventually
filldir_t will lose that argument).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 83fd542759010949ac7d9638b615fac1bb9744e1
Git-repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Ian Maund <imaund@codeaurora.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
iterate_dir(): new helper, replacing vfs_readdir().
struct dir_context: contains the readdir callback (and will get more stuff
in it), embedded into whatever data that callback wants to deal with;
eventually, we'll be passing it to ->readdir() replacement instead of
(data,filldir) pair.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: c301a0e047e401d41b26db1009d08e088ae2365a
Git-repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Ian Maund <imaund@codeaurora.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement Samsung's FMODE_NONMAPPABLE flag from
sdcardfs version 2.1.4 as we hit a BUG on ext4:
[ 49.655037]@0 Kernel BUG at ffffffc0001deeec [verbose debug info unavailable]
[ 49.655045]@0 Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[ 49.655052]@0 Modules linked in:
[ 49.655061]@0 CPU: 0 PID: 283 Comm: kworker/u8:7 Tainted: G W 3.18.20-perf-g3be2054-00086-ga8307fb #1
[ 49.655070]@0 Hardware name: Qualcomm Technologies, Inc. MSM 8996 v3 + PMI8996 MTP (DT)
[ 49.655077]@0 Workqueue: writeback bdi_writeback_workfn (flush-8:0)
[ 49.655096]@0 task: ffffffc174ba8b00 ti: ffffffc174bb4000 task.ti: ffffffc174bb4000
[ 49.655108]@0 PC is at mpage_prepare_extent_to_map+0x198/0x218
[ 49.655116]@0 LR is at mpage_prepare_extent_to_map+0x110/0x218
[ 49.655121]@0 pc : [<ffffffc0001deeec>] lr : [<ffffffc0001dee64>] pstate: 60000145
[ 49.655126]@0 sp : ffffffc174bb7800
[ 49.655130]@0 x29: ffffffc174bb7800 x28: ffffffc174bb7880
[ 49.655140]@0 x27: 000000000000000d x26: ffffffc1245505e8
[ 49.655149]@0 x25: 0000000000000000 x24: 0000000000003400
[ 49.655160]@0 x23: ffffffffffffffff x22: 0000000000000000
[ 49.655172]@0 x21: ffffffc174bb7888 x20: ffffffc174bb79e0
[ 49.655182]@0 x19: ffffffbdc4ee7b80 x18: 0000007f92872000
[ 49.655191]@0 x17: 0000007f959b6424 x16: ffffffc00016d1ac
[ 49.655201]@0 x15: 0000007f9285d158 x14: ffffffc1734796e8
[ 49.655210]@0 x13: ffffffbdc1ffa4c0 x12: ffffffbdc4ee7b80
[ 49.655220]@0 x11: 0000000000000100 x10: 0000000000000000
[ 49.655229]@0 x9 : 0000000000000000 x8 : ffffffc0b444e210
[ 49.655237]@0 x7 : 0000000000000000 x6 : ffffffc0b444e1e0
[ 49.655246]@0 x5 : 0000000000000000 x4 : 0000000000000001
[ 49.655254]@0 x3 : 0000000000000000 x2 : 400000000002003d
[ 49.655263]@0 x1 : ffffffbdc4ee7b80 x0 : 400000000002003d
[ 49.655271]@0
[ 49.656502]@0 Process kworker/u8:7 (pid: 283, stack limit = 0xffffffc174bb4058)
[ 49.656509]@0 Call trace:
[ 49.656514]@0 [<ffffffc0001deeec>] mpage_prepare_extent_to_map+0x198/0x218
[ 49.656526]@0 [<ffffffc0001e28d0>] ext4_writepages+0x270/0xa58
[ 49.656533]@0 [<ffffffc00012982c>] do_writepages+0x24/0x40
[ 49.656541]@0 [<ffffffc000180160>] __writeback_single_inode+0x40/0x114
[ 49.656549]@0 [<ffffffc000180e50>] writeback_sb_inodes+0x1dc/0x34c
[ 49.656555]@0 [<ffffffc00018103c>] __writeback_inodes_wb+0x7c/0xc4
[ 49.656560]@0 [<ffffffc000181224>] wb_writeback+0x110/0x1a8
[ 49.656565]@0 [<ffffffc000181344>] wb_check_old_data_flush+0x88/0x98
[ 49.656571]@0 [<ffffffc00018156c>] bdi_writeback_workfn+0xf4/0x1fc
[ 49.656576]@0 [<ffffffc0000b14f8>] process_one_work+0x1e0/0x300
[ 49.656585]@0 [<ffffffc0000b1e14>] worker_thread+0x318/0x438
[ 49.656590]@0 [<ffffffc0000b5da0>] kthread+0xe0/0xec
[ 49.656598]@0 Code: f9400260 f9400a63 1ad92063 37580040 (e7f001f2)
[ 49.656604]@0 ---[ end trace cbed09f772fd630d ]---
Change-Id: I931da7cb3841db1f130dba298a7d256b6f02d1bc
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit eee5cc2702929fd41cce28058dc6d6717f723f87 upstream.
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[wangkai: backport to 3.10: adjust context]
Signed-off-by: Wang Kai <morgan.wang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit 4f5e65a1cc90bbb15b9f6cdc362922af1bcc155a upstream.
fput() and delayed_fput() can use llist and avoid the locking.
This is unlikely path, it is not that this change can improve
the performance, but this way the code looks simpler.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrey Vagin <avagin@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Wang Kai <morgan.wang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
|
| | |
|
| |
|