mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
* refs/heads/tmp-2bb70f4: ANDROID: virtio: virtio_input: Set the amount of multitouch slots in virtio input ANDROID: dummy_cpufreq: Implement get() rtlwifi: Fix potential overflow on P2P code ANDROID: cpufreq: create dummy cpufreq driver ANDROID: Allow DRM_IOCTL_MODE_*_DUMB for render clients. ANDROID: sdcardfs: evict dentries on fscrypt key removal ANDROID: fscrypt: add key removal notifier chain ANDROID: Move from clang r353983c to r365631c ANDROID: move up spin_unlock_bh() ahead of remove_proc_entry() BACKPORT: arm64: tags: Preserve tags for addresses translated via TTBR1 UPSTREAM: arm64: memory: Implement __tag_set() as common function UPSTREAM: arm64/mm: fix variable 'tag' set but not used UPSTREAM: arm64: avoid clang warning about self-assignment ANDROID: refactor build.config files to remove duplication UPSTREAM: mm: vmalloc: show number of vmalloc pages in /proc/meminfo BACKPORT: PM/sleep: Expose suspend stats in sysfs UPSTREAM: power: supply: Init device wakeup after device_add() UPSTREAM: PM / wakeup: Unexport wakeup_source_sysfs_{add,remove}() UPSTREAM: PM / wakeup: Register wakeup class kobj after device is added BACKPORT: PM / wakeup: Fix sysfs registration error path BACKPORT: PM / wakeup: Show wakeup sources stats in sysfs UPSTREAM: PM / wakeup: Print warn if device gets enabled as wakeup source during sleep UPSTREAM: PM / wakeup: Use wakeup_source_register() in wakelock.c UPSTREAM: PM / wakeup: Only update last time for active wakeup sources UPSTREAM: PM / core: Add support to skip power management in device/driver model cuttlefish-4.14: Enable CONFIG_DM_SNAPSHOT ANDROID: cuttlefish_defconfig: Enable BPF_JIT and BPF_JIT_ALWAYS_ON UPSTREAM: netfilter: xt_IDLETIMER: fix sysfs callback function type UPSTREAM: mm: untag user pointers in mmap/munmap/mremap/brk UPSTREAM: vfio/type1: untag user pointers in vaddr_get_pfn UPSTREAM: media/v4l2-core: untag user pointers in videobuf_dma_contig_user_get UPSTREAM: drm/radeon: untag user pointers in radeon_gem_userptr_ioctl BACKPORT: drm/amdgpu: untag user pointers UPSTREAM: userfaultfd: untag user pointers UPSTREAM: fs/namespace: untag user pointers in copy_mount_options UPSTREAM: mm: untag user pointers in get_vaddr_frames UPSTREAM: mm: untag user pointers in mm/gup.c BACKPORT: mm: untag user pointers passed to memory syscalls BACKPORT: lib: untag user pointers in strn*_user UPSTREAM: arm64: Fix reference to docs for ARM64_TAGGED_ADDR_ABI UPSTREAM: selftests, arm64: add kernel headers path for tags_test BACKPORT: arm64: Relax Documentation/arm64/tagged-pointers.rst UPSTREAM: arm64: Define Documentation/arm64/tagged-address-abi.rst UPSTREAM: arm64: Change the tagged_addr sysctl control semantics to only prevent the opt-in UPSTREAM: arm64: Tighten the PR_{SET, GET}_TAGGED_ADDR_CTRL prctl() unused arguments UPSTREAM: selftests, arm64: fix uninitialized symbol in tags_test.c UPSTREAM: arm64: mm: Really fix sparse warning in untagged_addr() UPSTREAM: selftests, arm64: add a selftest for passing tagged pointers to kernel BACKPORT: arm64: Introduce prctl() options to control the tagged user addresses ABI UPSTREAM: thread_info: Add update_thread_flag() helpers UPSTREAM: arm64: untag user pointers in access_ok and __uaccess_mask_ptr UPSTREAM: uaccess: add noop untagged_addr definition BACKPORT: block: annotate refault stalls from IO submission ext4: add verity flag check for dax ANDROID: usb: gadget: Fix dependency for f_accessory ANDROID: sched: fair: balance for single core cluster UPSTREAM: mm/kasan: fix false positive invalid-free reports with CONFIG_KASAN_SW_TAGS=y f2fs: add a condition to detect overflow in f2fs_ioc_gc_range() f2fs: fix to add missing F2FS_IO_ALIGNED() condition f2fs: fix to fallback to buffered IO in IO aligned mode f2fs: fix to handle error path correctly in f2fs_map_blocks f2fs: fix extent corrupotion during directIO in LFS mode f2fs: check all the data segments against all node ones f2fs: Add a small clarification to CONFIG_FS_F2FS_FS_SECURITY f2fs: fix inode rwsem regression f2fs: fix to avoid accessing uninitialized field of inode page in is_alive() f2fs: avoid infinite GC loop due to stale atomic files f2fs: Fix indefinite loop in f2fs_gc() f2fs: convert inline_data in prior to i_size_write f2fs: fix error path of f2fs_convert_inline_page() f2fs: add missing documents of reserve_root/resuid/resgid f2fs: fix flushing node pages when checkpoint is disabled f2fs: enhance f2fs_is_checkpoint_ready()'s readability f2fs: clean up __bio_alloc()'s parameter f2fs: fix wrong error injection path in inc_valid_block_count() f2fs: fix to writeout dirty inode during node flush f2fs: optimize case-insensitive lookups f2fs: introduce f2fs_match_name() for cleanup f2fs: Fix indefinite loop in f2fs_gc() f2fs: allocate memory in batch in build_sit_info() f2fs: fix to avoid data corruption by forbidding SSR overwrite f2fs: Fix build error while CONFIG_NLS=m Revert "f2fs: avoid out-of-range memory access" f2fs: cleanup the code in build_sit_entries. f2fs: fix wrong available node count calculation f2fs: remove duplicate code in f2fs_file_write_iter f2fs: fix to migrate blocks correctly during defragment f2fs: use wrapped f2fs_cp_error() f2fs: fix to use more generic EOPNOTSUPP f2fs: use wrapped IS_SWAPFILE() f2fs: Support case-insensitive file name lookups f2fs: include charset encoding information in the superblock fs: Reserve flag for casefolding f2fs: fix to avoid call kvfree under spinlock fs: f2fs: Remove unnecessary checks of SM_I(sbi) in update_general_status() f2fs: disallow direct IO in atomic write f2fs: fix to handle quota_{on,off} correctly f2fs: fix to detect cp error in f2fs_setxattr() f2fs: fix to spread f2fs_is_checkpoint_ready() f2fs: support fiemap() for directory inode f2fs: fix to avoid discard command leak f2fs: fix to avoid tagging SBI_QUOTA_NEED_REPAIR incorrectly f2fs: fix to drop meta/node pages during umount f2fs: disallow switching io_bits option during remount f2fs: fix panic of IO alignment feature f2fs: introduce {page,io}_is_mergeable() for readability f2fs: fix livelock in swapfile writes f2fs: add fs-verity support ext4: update on-disk format documentation for fs-verity ext4: add fs-verity read support ext4: add basic fs-verity support fs-verity: support builtin file signatures fs-verity: add SHA-512 support fs-verity: implement FS_IOC_MEASURE_VERITY ioctl fs-verity: implement FS_IOC_ENABLE_VERITY ioctl fs-verity: add data verification hooks for ->readpages() fs-verity: add the hook for file ->setattr() fs-verity: add the hook for file ->open() fs-verity: add inode and superblock fields fs-verity: add Kconfig and the helper functions for hashing fs: uapi: define verity bit for FS_IOC_GETFLAGS fs-verity: add UAPI header fs-verity: add MAINTAINERS file entry fs-verity: add a documentation file ext4: fix kernel oops caused by spurious casefold flag ext4: fix coverity warning on error path of filename setup ext4: optimize case-insensitive lookups ext4: fix dcache lookup of !casefolded directories unicode: update to Unicode 12.1.0 final unicode: add missing check for an error return from utf8lookup() ext4: export /sys/fs/ext4/feature/casefold if Unicode support is present unicode: refactor the rule for regenerating utf8data.h ext4: Support case-insensitive file name lookups ext4: include charset encoding information in the superblock unicode: update unicode database unicode version 12.1.0 unicode: introduce test module for normalized utf8 implementation unicode: implement higher level API for string handling unicode: reduce the size of utf8data[] unicode: introduce code for UTF-8 normalization unicode: introduce UTF-8 character database ext4 crypto: fix to check feature status before get policy fscrypt: document the new ioctls and policy version ubifs: wire up new fscrypt ioctls f2fs: wire up new fscrypt ioctls ext4: wire up new fscrypt ioctls fscrypt: require that key be added when setting a v2 encryption policy fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS ioctl fscrypt: allow unprivileged users to add/remove keys for v2 policies fscrypt: v2 encryption policy support fscrypt: add an HKDF-SHA512 implementation fscrypt: add FS_IOC_GET_ENCRYPTION_KEY_STATUS ioctl fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY ioctl fscrypt: add FS_IOC_ADD_ENCRYPTION_KEY ioctl fscrypt: rename keyinfo.c to keysetup.c fscrypt: move v1 policy key setup to keysetup_v1.c fscrypt: refactor key setup code in preparation for v2 policies fscrypt: rename fscrypt_master_key to fscrypt_direct_key fscrypt: add ->ci_inode to fscrypt_info fscrypt: use FSCRYPT_* definitions, not FS_* fscrypt: use FSCRYPT_ prefix for uapi constants fs, fscrypt: move uapi definitions to new header <linux/fscrypt.h> fscrypt: use ENOPKG when crypto API support missing fscrypt: improve warnings for missing crypto API support fscrypt: improve warning messages for unsupported encryption contexts fscrypt: make fscrypt_msg() take inode instead of super_block fscrypt: clean up base64 encoding/decoding fscrypt: remove loadable module related code ANDROID: arm64: bpf: implement arch_bpf_jit_check_func ANDROID: bpf: validate bpf_func when BPF_JIT is enabled with CFI UPSTREAM: kcm: use BPF_PROG_RUN UPSTREAM: psi: get poll_work to run when calling poll syscall next time UPSTREAM: sched/psi: Do not require setsched permission from the trigger creator UPSTREAM: sched/psi: Reduce psimon FIFO priority BACKPORT: arm64: Add support for relocating the kernel with RELR relocations ANDROID: Log which device failed to suspend in dpm_suspend_start() ANDROID: Revert "ANDROID: sched: Disallow WALT with CFS bandwidth control" ANDROID: sched: WALT: Add support for CFS_BANDWIDTH ANDROID: sched: WALT: Refactor cumulative runnable average fixup ANDROID: sched: Disallow WALT with CFS bandwidth control fscrypt: document testing with xfstests fscrypt: remove selection of CONFIG_CRYPTO_SHA256 fscrypt: remove unnecessary includes of ratelimit.h fscrypt: don't set policy for a dead directory fscrypt: decrypt only the needed blocks in __fscrypt_decrypt_bio() fscrypt: support decrypting multiple filesystem blocks per page fscrypt: introduce fscrypt_decrypt_block_inplace() fscrypt: handle blocksize < PAGE_SIZE in fscrypt_zeroout_range() fscrypt: support encrypting multiple filesystem blocks per page fscrypt: introduce fscrypt_encrypt_block_inplace() fscrypt: clean up some BUG_ON()s in block encryption/decryption fscrypt: rename fscrypt_do_page_crypto() to fscrypt_crypt_block() fscrypt: remove the "write" part of struct fscrypt_ctx fscrypt: simplify bounce page handling ANDROID: fiq_debugger: remove UPSTREAM: lib/test_meminit.c: use GFP_ATOMIC in RCU critical section UPSTREAM: mm: slub: Fix slab walking for init_on_free UPSTREAM: lib/test_meminit.c: minor test fixes UPSTREAM: lib/test_meminit.c: fix -Wmaybe-uninitialized false positive UPSTREAM: lib: introduce test_meminit module UPSTREAM: mm: init: report memory auto-initialization features at boot time BACKPORT: mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options UPSTREAM: arm64: move jump_label_init() before parse_early_param() ANDROID: Add a tracepoint for mapping inode to full path BACKPORT: arch: add pidfd and io_uring syscalls everywhere UPSTREAM: dma-buf: add show_fdinfo handler UPSTREAM: dma-buf: add DMA_BUF_SET_NAME ioctls BACKPORT: dma-buf: give each buffer a full-fledged inode ANDROID: fix kernelci build-break UPSTREAM: drm/virtio: Fix cache entry creation race. UPSTREAM: drm/virtio: Wake up all waiters when capset response comes in. UPSTREAM: drm/virtio: Ensure cached capset entries are valid before copying. UPSTREAM: drm/virtio: use u64_to_user_ptr macro UPSTREAM: drm/virtio: remove irrelevant DRM_UNLOCKED flag UPSTREAM: drm/virtio: Remove redundant return type UPSTREAM: drm/virtio: allocate fences with GFP_KERNEL UPSTREAM: drm/virtio: add trace events for commands UPSTREAM: drm/virtio: trace drm_fence_emit BACKPORT: drm/virtio: set seqno for dma-fence BACKPORT: drm/virtio: move drm_connector_update_edid_property() call UPSTREAM: drm/virtio: add missing drm_atomic_helper_shutdown() call. BACKPORT: drm/virtio: rework resource creation workflow. UPSTREAM: drm/virtio: params struct for virtio_gpu_cmd_create_resource_3d() BACKPORT: drm/virtio: params struct for virtio_gpu_cmd_create_resource() BACKPORT: drm/virtio: use struct to pass params to virtio_gpu_object_create() UPSTREAM: drm/virtio: add virtio-gpu-features debugfs file. UPSTREAM: drm/virtio: remove set but not used variable 'vgdev' BACKPORT: drm/virtio: implement prime export UPSTREAM: drm/virtio: remove prime pin/unpin callbacks. UPSTREAM: drm/virtio: implement prime mmap UPSTREAM: drm/virtio: drop virtio_gpu_fence_cleanup() UPSTREAM: drm/virtio: fix pageflip flush UPSTREAM: drm/virtio: log error responses UPSTREAM: drm/virtio: Add missing virtqueue reset UPSTREAM: drm/virtio: Remove incorrect kfree() UPSTREAM: drm/virtio: virtio_gpu_cmd_resource_create_3d: drop unused fence arg UPSTREAM: drm/virtio: fence: pass plain pointer BACKPORT: drm/virtio: add edid support UPSTREAM: virtio-gpu: add VIRTIO_GPU_F_EDID feature BACKPORT: drm/virtio: fix memory leak of vfpriv on error return path UPSTREAM: drm/virtio: bump driver version after explicit synchronization addition UPSTREAM: drm/virtio: add in/out fence support for explicit synchronization UPSTREAM: drm/virtio: add uapi for in and out explicit fences UPSTREAM: drm/virtio: add virtio_gpu_alloc_fence() UPSTREAM: drm/virtio: Handle error from virtio_gpu_resource_id_get UPSTREAM: gpu/drm/virtio/virtgpu_vq.c: Use kmem_cache_zalloc UPSTREAM: drm/virtio: fix resource id handling UPSTREAM: drm/virtio: drop resource_id argument. UPSTREAM: drm/virtio: use virtio_gpu_object->hw_res_handle in virtio_gpu_resource_create_ioctl() UPSTREAM: drm/virtio: use virtio_gpu_object->hw_res_handle in virtio_gpu_mode_dumb_create() UPSTREAM: drm/virtio: use virtio_gpu_object->hw_res_handle in virtio_gpufb_create() BACKPORT: drm/virtio: track created object state UPSTREAM: drm/virtio: document drm_dev_set_unique workaround UPSTREAM: virtio: Support prime objects vmap/vunmap UPSTREAM: virtio: Rework virtio_gpu_object_kmap() UPSTREAM: virtio: Add virtio_gpu_object_kunmap() UPSTREAM: drm/virtio: pass virtio_gpu_object to virtio_gpu_cmd_transfer_to_host_{2d, 3d} UPSTREAM: drm/virtio: add dma sync for dma mapped virtio gpu framebuffer pages UPSTREAM: drm/virtio: Remove set but not used variable 'bo' UPSTREAM: drm/virtio: add iommu support. UPSTREAM: drm/virtio: add virtio_gpu_object_detach() function UPSTREAM: drm/virtio: track virtual output state UPSTREAM: drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset() UPSTREAM: gpu: drm: virtio: code cleanup UPSTREAM: drm/virtio: Place GEM BOs in drm_framebuffer UPSTREAM: drm/virtio: fix mode_valid's return type UPSTREAM: drm/virtio: Add spaces around operators UPSTREAM: drm/virtio: Remove multiple blank lines UPSTREAM: drm/virtio: Replace 'unsigned' for 'unsigned int' UPSTREAM: drm/virtio: Remove return from void function UPSTREAM: drm/virtio: Add */ in block comments to separate line UPSTREAM: drm/virtio: Add blank line after variable declarations UPSTREAM: drm/virtio: Add tabs at the start of a line UPSTREAM: drm/virtio: Don't return invalid caps on timeout UPSTREAM: virtgpu: remove redundant task_comm copying UPSTREAM: drm/virtio: add create_handle support. UPSTREAM: drm: virtio: replace reference/unreference with get/put UPSTREAM: drm/virtio: Replace instances of reference/unreference with get/put UPSTREAM: drm: byteorder: add DRM_FORMAT_HOST_* UPSTREAM: drm: add drm_connector_attach_edid_property() BACKPORT: drm/prime: Add drm_gem_prime_mmap() f2fs: fix build error on android tracepoints ANDROID: cuttlefish_defconfig: Enable CAN/VCAN UPSTREAM: pidfd: fix a poll race when setting exit_state BACKPORT: arch: wire-up pidfd_open() BACKPORT: pid: add pidfd_open() UPSTREAM: pidfd: add polling support UPSTREAM: signal: improve comments UPSTREAM: fork: do not release lock that wasn't taken BACKPORT: signal: support CLONE_PIDFD with pidfd_send_signal BACKPORT: clone: add CLONE_PIDFD UPSTREAM: Make anon_inodes unconditional UPSTREAM: signal: use fdget() since we don't allow O_PATH UPSTREAM: signal: don't silently convert SI_USER signals to non-current pidfd BACKPORT: signal: add pidfd_send_signal() syscall UPSTREAM: net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier ANDROID: fix up 9p filesystem due to CFI non-upstream patches f2fs: use EINVAL for superblock with invalid magic f2fs: fix to read source block before invalidating it f2fs: remove redundant check from f2fs_setflags_common() f2fs: use generic checking function for FS_IOC_FSSETXATTR f2fs: use generic checking and prep function for FS_IOC_SETFLAGS ubifs, fscrypt: cache decrypted symlink target in ->i_link vfs: use READ_ONCE() to access ->i_link fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory ANDROID: (arm64) cuttlefish_defconfig: enable CONFIG_CPU_FREQ_TIMES ANDROID: xfrm: remove in_compat_syscall() checks ANDROID: enable CONFIG_RTC_DRV_TEST on cuttlefish UPSTREAM: binder: Set end of SG buffer area properly. ANDROID: x86_64_cuttlefish_defconfig: enable CONFIG_CPU_FREQ_TIMES ANDROID: f2fs: add android fsync tracepoint ANDROID: f2fs: fix wrong android tracepoint fscrypt: cache decrypted symlink target in ->i_link fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext fscrypt: only set dentry_operations on ciphertext dentries fscrypt: fix race allowing rename() and link() of ciphertext dentries fscrypt: clean up and improve dentry revalidation fscrypt: use READ_ONCE() to access ->i_crypt_info fscrypt: remove WARN_ON_ONCE() when decryption fails fscrypt: drop inode argument from fscrypt_get_ctx() f2fs: improve print log in f2fs_sanity_check_ckpt() f2fs: avoid out-of-range memory access f2fs: fix to avoid long latency during umount f2fs: allow all the users to pin a file f2fs: support swap file w/ DIO f2fs: allocate blocks for pinned file f2fs: fix is_idle() check for discard type f2fs: add a rw_sem to cover quota flag changes f2fs: set SBI_NEED_FSCK for xattr corruption case f2fs: use generic EFSBADCRC/EFSCORRUPTED f2fs: Use DIV_ROUND_UP() instead of open-coding f2fs: print kernel message if filesystem is inconsistent f2fs: introduce f2fs_<level> macros to wrap f2fs_printk() f2fs: avoid get_valid_blocks() for cleanup f2fs: ioctl for removing a range from F2FS f2fs: only set project inherit bit for directory f2fs: separate f2fs i_flags from fs_flags and ext4 i_flags UPSTREAM: kasan: initialize tag to 0xff in __kasan_kmalloc UPSTREAM: x86/boot: Provide KASAN compatible aliases for string routines UPSTREAM: mm/kasan: Remove the ULONG_MAX stack trace hackery UPSTREAM: x86/uaccess, kasan: Fix KASAN vs SMAP UPSTREAM: x86/uaccess: Introduce user_access_{save,restore}() UPSTREAM: kasan: fix variable 'tag' set but not used warning UPSTREAM: Revert "x86_64: Increase stack size for KASAN_EXTRA" UPSTREAM: kasan: fix coccinelle warnings in kasan_p*_table UPSTREAM: kasan: fix kasan_check_read/write definitions BACKPORT: kasan: remove use after scope bugs detection. BACKPORT: kasan: turn off asan-stack for clang-8 and earlier UPSTREAM: slub: fix a crash with SLUB_DEBUG + KASAN_SW_TAGS UPSTREAM: kasan, slab: remove redundant kasan_slab_alloc hooks UPSTREAM: kasan, slab: make freelist stored without tags UPSTREAM: kasan, slab: fix conflicts with CONFIG_HARDENED_USERCOPY UPSTREAM: kasan: prevent tracing of tags.c UPSTREAM: kasan: fix random seed generation for tag-based mode UPSTREAM: slub: fix SLAB_CONSISTENCY_CHECKS + KASAN_SW_TAGS UPSTREAM: kasan, slub: fix more conflicts with CONFIG_SLAB_FREELIST_HARDENED UPSTREAM: kasan, slub: fix conflicts with CONFIG_SLAB_FREELIST_HARDENED UPSTREAM: kasan, slub: move kasan_poison_slab hook before page_address UPSTREAM: kasan, kmemleak: pass tagged pointers to kmemleak UPSTREAM: kasan: fix assigning tags twice UPSTREAM: kasan: mark file common so ftrace doesn't trace it UPSTREAM: kasan, arm64: remove redundant ARCH_SLAB_MINALIGN define UPSTREAM: kasan: fix krealloc handling for tag-based mode UPSTREAM: kasan: make tag based mode work with CONFIG_HARDENED_USERCOPY UPSTREAM: kasan, arm64: use ARCH_SLAB_MINALIGN instead of manual aligning BACKPORT: mm/memblock.c: skip kmemleak for kasan_init() UPSTREAM: kasan: add SPDX-License-Identifier mark to source files BACKPORT: kasan: update documentation UPSTREAM: kasan, arm64: select HAVE_ARCH_KASAN_SW_TAGS UPSTREAM: kasan: add __must_check annotations to kasan hooks BACKPORT: kasan, mm, arm64: tag non slab memory allocated via pagealloc UPSTREAM: kasan, arm64: add brk handler for inline instrumentation UPSTREAM: kasan: add hooks implementation for tag-based mode UPSTREAM: mm: move obj_to_index to include/linux/slab_def.h UPSTREAM: kasan: add bug reporting routines for tag-based mode UPSTREAM: kasan: split out generic_report.c from report.c UPSTREAM: kasan, mm: perform untagged pointers comparison in krealloc BACKPORT: kasan, arm64: enable top byte ignore for the kernel BACKPORT: kasan, arm64: fix up fault handling logic UPSTREAM: kasan: preassign tags to objects with ctors or SLAB_TYPESAFE_BY_RCU UPSTREAM: kasan, arm64: untag address in _virt_addr_is_linear UPSTREAM: kasan: add tag related helper functions BACKPORT: arm64: move untagged_addr macro from uaccess.h to memory.h BACKPORT: kasan: initialize shadow to 0xff for tag-based mode BACKPORT: kasan: rename kasan_zero_page to kasan_early_shadow_page BACKPORT: kasan, arm64: adjust shadow size for tag-based mode BACKPORT: kasan: add CONFIG_KASAN_GENERIC and CONFIG_KASAN_SW_TAGS UPSTREAM: kasan: rename source files to reflect the new naming scheme BACKPORT: kasan: move common generic and tag-based code to common.c UPSTREAM: kasan, slub: handle pointer tags in early_kmem_cache_node_alloc UPSTREAM: kasan, mm: change hooks signatures UPSTREAM: arm64: add EXPORT_SYMBOL_NOKASAN() BACKPORT: compiler: remove __no_sanitize_address_or_inline again UPSTREAM: mm/kasan/quarantine.c: make quarantine_lock a raw_spinlock_t UPSTREAM: lib/test_kasan.c: add tests for several string/memory API functions UPSTREAM: arm64: lib: use C string functions with KASAN enabled UPSTREAM: compiler: introduce __no_sanitize_address_or_inline UPSTREAM: arm64: Fix typo in a comment in arch/arm64/mm/kasan_init.c BACKPORT: kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN BACKPORT: mm/mempool.c: remove unused argument in kasan_unpoison_element() and remove_element() UPSTREAM: kasan: only select SLUB_DEBUG with SYSFS=y UPSTREAM: kasan: depend on CONFIG_SLUB_DEBUG UPSTREAM: KASAN: prohibit KASAN+STRUCTLEAK combination UPSTREAM: arm64: kasan: avoid pfn_to_nid() before page array is initialized UPSTREAM: kasan: fix invalid-free test crashing the kernel UPSTREAM: kasan, slub: fix handling of kasan_slab_free hook UPSTREAM: slab, slub: skip unnecessary kasan_cache_shutdown() BACKPORT: kasan: make kasan_cache_create() work with 32-bit slab cache sizes UPSTREAM: locking/atomics: Instrument cmpxchg_double*() UPSTREAM: locking/atomics: Instrument xchg() UPSTREAM: locking/atomics: Simplify cmpxchg() instrumentation UPSTREAM: locking/atomics/x86: Reduce arch_cmpxchg64*() instrumentation UPSTREAM: locking/atomic, asm-generic, x86: Add comments for atomic instrumentation UPSTREAM: locking/atomic, asm-generic: Add KASAN instrumentation to atomic operations UPSTREAM: locking/atomic/x86: Switch atomic.h to use atomic-instrumented.h UPSTREAM: locking/atomic, asm-generic: Add asm-generic/atomic-instrumented.h BACKPORT: kasan, arm64: clean up KASAN_SHADOW_SCALE_SHIFT usage UPSTREAM: kasan: clean up KASAN_SHADOW_SCALE_SHIFT usage UPSTREAM: kasan: fix prototype author email address UPSTREAM: kasan: detect invalid frees UPSTREAM: kasan: unify code between kasan_slab_free() and kasan_poison_kfree() UPSTREAM: kasan: detect invalid frees for large mempool objects UPSTREAM: kasan: don't use __builtin_return_address(1) UPSTREAM: kasan: detect invalid frees for large objects UPSTREAM: kasan: add functions for unpoisoning stack variables UPSTREAM: kasan: add tests for alloca poisoning UPSTREAM: kasan: support alloca() poisoning UPSTREAM: kasan/Makefile: support LLVM style asan parameters BACKPORT: kasan: add compiler support for clang BACKPORT: fs: dcache: Revert "manually unpoison dname after allocation to shut up kasan's reports" UPSTREAM: fs/dcache: Use read_word_at_a_time() in dentry_string_cmp() UPSTREAM: lib/strscpy: Shut up KASAN false-positives in strscpy() UPSTREAM: compiler.h: Add read_word_at_a_time() function. UPSTREAM: compiler.h, kasan: Avoid duplicating __read_once_size_nocheck() UPSTREAM: arm64/mm/kasan: don't use vmemmap_populate() to initialize shadow UPSTREAM: Documentation/features/KASAN: mark KASAN as supported only on 64-bit on x86 f2fs: Add option to limit required GC for checkpoint=disable f2fs: Fix accounting for unusable blocks f2fs: Fix root reserved on remount f2fs: Lower threshold for disable_cp_again f2fs: fix sparse warning f2fs: fix f2fs_show_options to show nodiscard mount option f2fs: add error prints for debugging mount failure f2fs: fix to do sanity check on segment bitmap of LFS curseg f2fs: add missing sysfs entries in documentation f2fs: fix to avoid deadloop if data_flush is on f2fs: always assume that the device is idle under gc_urgent f2fs: add bio cache for IPU f2fs: allow ssr block allocation during checkpoint=disable period f2fs: fix to check layout on last valid checkpoint park Conflicts: arch/arm64/configs/cuttlefish_defconfig arch/arm64/include/asm/memory.h arch/arm64/include/asm/thread_info.h arch/x86/configs/x86_64_cuttlefish_defconfig build.config.common drivers/dma-buf/dma-buf.c fs/crypto/Makefile fs/crypto/bio.c fs/crypto/fscrypt_private.h fs/crypto/keyinfo.c fs/ext4/page-io.c fs/f2fs/data.c fs/f2fs/f2fs.h fs/f2fs/inode.c fs/f2fs/segment.c fs/userfaultfd.c include/linux/dma-buf.h include/linux/fscrypt.h include/linux/kasan.h include/linux/platform_data/ds2482.h include/uapi/linux/fs.h kernel/sched/deadline.c kernel/sched/fair.c kernel/sched/rt.c kernel/sched/sched.h kernel/sched/stop_task.c kernel/sched/walt.c kernel/sched/walt.h lib/test_kasan.c mm/kasan/common.c mm/kasan/kasan.h mm/kasan/report.c mm/slub.c mm/vmalloc.c scripts/Makefile.kasan Changed below files to fix build errors: drivers/char/diag/diagchar_core.c drivers/power/supply/qcom/battery.c drivers/power/supply/qcom/smb1390-charger-psy.c drivers/power/supply/qcom/smb1390-charger.c drivers/power/supply/qcom/step-chg-jeita.c fs/crypto/fscrypt_ice.c fs/crypto/fscrypt_private.h fs/f2fs/inode.c include/uapi/linux/fscrypt.h net/qrtr/qrtr.c gen_headers_arm.bp gen_headers_arm64.bp Extra added fixes in fs/f2fs/data.c for FBE: * Fix FBE regression with 9937c21ce1 ("f2fs: add bio cache for IPU"). The above commit is not setting the DUN for bio, due to which the bio's could get corrupted when FBE is enabled. * The f2fs_merge_page_bio() incorrectly uses the bio after it is submitted for IO when fscrypt_mergeable_bio() returns false. Fix it by making the submitted bio NULL so that a new bio gets allocated for the next/new page. Ignored the below scheduler patches as they are already present: ANDROID: sched: WALT: Add support for CFS_BANDWIDTH ANDROID: sched: WALT: Refactor cumulative runnable average fixup picked below patches from 4.14.159 and 4.14.172 versions to fix issues 0e39aa9d5 "UPSTREAM: arm64: Validate tagged addresses in access_ok() called from kernel threads" 352902650 "fscrypt: support passing a keyring key to FS_IOC_ADD_ENCRYPTION_KEY" Change-Id: I205b796ee125fa6e9d27fa30f881e4e8fe8bea29 Signed-off-by: Srinivasarao P <spathi@codeaurora.org> Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
519 lines
12 KiB
C
519 lines
12 KiB
C
/*
|
|
* fs/sdcardfs/main.c
|
|
*
|
|
* Copyright (c) 2013 Samsung Electronics Co. Ltd
|
|
* Authors: Daeho Jeong, Woojoong Lee, Seunghwan Hyun,
|
|
* Sunghwan Yun, Sungjong Seo
|
|
*
|
|
* This program has been developed as a stackable file system based on
|
|
* the WrapFS which written by
|
|
*
|
|
* Copyright (c) 1998-2011 Erez Zadok
|
|
* Copyright (c) 2009 Shrikar Archak
|
|
* Copyright (c) 2003-2011 Stony Brook University
|
|
* Copyright (c) 2003-2011 The Research Foundation of SUNY
|
|
*
|
|
* This file is dual licensed. It may be redistributed and/or modified
|
|
* under the terms of the Apache 2.0 License OR version 2 of the GNU
|
|
* General Public License.
|
|
*/
|
|
|
|
#include "sdcardfs.h"
|
|
#include <linux/fscrypt.h>
|
|
#include <linux/module.h>
|
|
#include <linux/types.h>
|
|
#include <linux/parser.h>
|
|
|
|
enum {
|
|
Opt_fsuid,
|
|
Opt_fsgid,
|
|
Opt_gid,
|
|
Opt_debug,
|
|
Opt_mask,
|
|
Opt_multiuser,
|
|
Opt_userid,
|
|
Opt_reserved_mb,
|
|
Opt_gid_derivation,
|
|
Opt_default_normal,
|
|
Opt_nocache,
|
|
Opt_unshared_obb,
|
|
Opt_err,
|
|
};
|
|
|
|
static const match_table_t sdcardfs_tokens = {
|
|
{Opt_fsuid, "fsuid=%u"},
|
|
{Opt_fsgid, "fsgid=%u"},
|
|
{Opt_gid, "gid=%u"},
|
|
{Opt_debug, "debug"},
|
|
{Opt_mask, "mask=%u"},
|
|
{Opt_userid, "userid=%d"},
|
|
{Opt_multiuser, "multiuser"},
|
|
{Opt_gid_derivation, "derive_gid"},
|
|
{Opt_default_normal, "default_normal"},
|
|
{Opt_unshared_obb, "unshared_obb"},
|
|
{Opt_reserved_mb, "reserved_mb=%u"},
|
|
{Opt_nocache, "nocache"},
|
|
{Opt_err, NULL}
|
|
};
|
|
|
|
static int parse_options(struct super_block *sb, char *options, int silent,
|
|
int *debug, struct sdcardfs_vfsmount_options *vfsopts,
|
|
struct sdcardfs_mount_options *opts)
|
|
{
|
|
char *p;
|
|
substring_t args[MAX_OPT_ARGS];
|
|
int option;
|
|
|
|
/* by default, we use AID_MEDIA_RW as uid, gid */
|
|
opts->fs_low_uid = AID_MEDIA_RW;
|
|
opts->fs_low_gid = AID_MEDIA_RW;
|
|
vfsopts->mask = 0;
|
|
opts->multiuser = false;
|
|
opts->fs_user_id = 0;
|
|
vfsopts->gid = 0;
|
|
/* by default, 0MB is reserved */
|
|
opts->reserved_mb = 0;
|
|
/* by default, gid derivation is off */
|
|
opts->gid_derivation = false;
|
|
opts->default_normal = false;
|
|
opts->nocache = false;
|
|
|
|
*debug = 0;
|
|
|
|
if (!options)
|
|
return 0;
|
|
|
|
while ((p = strsep(&options, ",")) != NULL) {
|
|
int token;
|
|
|
|
if (!*p)
|
|
continue;
|
|
|
|
token = match_token(p, sdcardfs_tokens, args);
|
|
|
|
switch (token) {
|
|
case Opt_debug:
|
|
*debug = 1;
|
|
break;
|
|
case Opt_fsuid:
|
|
if (match_int(&args[0], &option))
|
|
return 0;
|
|
opts->fs_low_uid = option;
|
|
break;
|
|
case Opt_fsgid:
|
|
if (match_int(&args[0], &option))
|
|
return 0;
|
|
opts->fs_low_gid = option;
|
|
break;
|
|
case Opt_gid:
|
|
if (match_int(&args[0], &option))
|
|
return 0;
|
|
vfsopts->gid = option;
|
|
break;
|
|
case Opt_userid:
|
|
if (match_int(&args[0], &option))
|
|
return 0;
|
|
opts->fs_user_id = option;
|
|
break;
|
|
case Opt_mask:
|
|
if (match_int(&args[0], &option))
|
|
return 0;
|
|
vfsopts->mask = option;
|
|
break;
|
|
case Opt_multiuser:
|
|
opts->multiuser = true;
|
|
break;
|
|
case Opt_reserved_mb:
|
|
if (match_int(&args[0], &option))
|
|
return 0;
|
|
opts->reserved_mb = option;
|
|
break;
|
|
case Opt_gid_derivation:
|
|
opts->gid_derivation = true;
|
|
break;
|
|
case Opt_default_normal:
|
|
opts->default_normal = true;
|
|
break;
|
|
case Opt_nocache:
|
|
opts->nocache = true;
|
|
break;
|
|
case Opt_unshared_obb:
|
|
opts->unshared_obb = true;
|
|
break;
|
|
/* unknown option */
|
|
default:
|
|
if (!silent)
|
|
pr_err("Unrecognized mount option \"%s\" or missing value", p);
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
if (*debug) {
|
|
pr_info("sdcardfs : options - debug:%d\n", *debug);
|
|
pr_info("sdcardfs : options - uid:%d\n",
|
|
opts->fs_low_uid);
|
|
pr_info("sdcardfs : options - gid:%d\n",
|
|
opts->fs_low_gid);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
int parse_options_remount(struct super_block *sb, char *options, int silent,
|
|
struct sdcardfs_vfsmount_options *vfsopts)
|
|
{
|
|
char *p;
|
|
substring_t args[MAX_OPT_ARGS];
|
|
int option;
|
|
int debug;
|
|
|
|
if (!options)
|
|
return 0;
|
|
|
|
while ((p = strsep(&options, ",")) != NULL) {
|
|
int token;
|
|
|
|
if (!*p)
|
|
continue;
|
|
|
|
token = match_token(p, sdcardfs_tokens, args);
|
|
|
|
switch (token) {
|
|
case Opt_debug:
|
|
debug = 1;
|
|
break;
|
|
case Opt_gid:
|
|
if (match_int(&args[0], &option))
|
|
return 0;
|
|
vfsopts->gid = option;
|
|
|
|
break;
|
|
case Opt_mask:
|
|
if (match_int(&args[0], &option))
|
|
return 0;
|
|
vfsopts->mask = option;
|
|
break;
|
|
case Opt_unshared_obb:
|
|
case Opt_default_normal:
|
|
case Opt_multiuser:
|
|
case Opt_userid:
|
|
case Opt_fsuid:
|
|
case Opt_fsgid:
|
|
case Opt_reserved_mb:
|
|
case Opt_gid_derivation:
|
|
if (!silent)
|
|
pr_warn("Option \"%s\" can't be changed during remount\n", p);
|
|
break;
|
|
/* unknown option */
|
|
default:
|
|
if (!silent)
|
|
pr_err("Unrecognized mount option \"%s\" or missing value", p);
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
if (debug) {
|
|
pr_info("sdcardfs : options - debug:%d\n", debug);
|
|
pr_info("sdcardfs : options - gid:%d\n", vfsopts->gid);
|
|
pr_info("sdcardfs : options - mask:%d\n", vfsopts->mask);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
#if 0
|
|
/*
|
|
* our custom d_alloc_root work-alike
|
|
*
|
|
* we can't use d_alloc_root if we want to use our own interpose function
|
|
* unchanged, so we simply call our own "fake" d_alloc_root
|
|
*/
|
|
static struct dentry *sdcardfs_d_alloc_root(struct super_block *sb)
|
|
{
|
|
struct dentry *ret = NULL;
|
|
|
|
if (sb) {
|
|
static const struct qstr name = {
|
|
.name = "/",
|
|
.len = 1
|
|
};
|
|
|
|
ret = d_alloc(NULL, &name);
|
|
if (ret) {
|
|
d_set_d_op(ret, &sdcardfs_ci_dops);
|
|
ret->d_sb = sb;
|
|
ret->d_parent = ret;
|
|
}
|
|
}
|
|
return ret;
|
|
}
|
|
#endif
|
|
|
|
DEFINE_MUTEX(sdcardfs_super_list_lock);
|
|
EXPORT_SYMBOL_GPL(sdcardfs_super_list_lock);
|
|
LIST_HEAD(sdcardfs_super_list);
|
|
EXPORT_SYMBOL_GPL(sdcardfs_super_list);
|
|
|
|
/*
|
|
* There is no need to lock the sdcardfs_super_info's rwsem as there is no
|
|
* way anyone can have a reference to the superblock at this point in time.
|
|
*/
|
|
static int sdcardfs_read_super(struct vfsmount *mnt, struct super_block *sb,
|
|
const char *dev_name, void *raw_data, int silent)
|
|
{
|
|
int err = 0;
|
|
int debug;
|
|
struct super_block *lower_sb;
|
|
struct path lower_path;
|
|
struct sdcardfs_sb_info *sb_info;
|
|
struct sdcardfs_vfsmount_options *mnt_opt = mnt->data;
|
|
struct inode *inode;
|
|
|
|
pr_info("sdcardfs version 2.0\n");
|
|
|
|
if (!dev_name) {
|
|
pr_err("sdcardfs: read_super: missing dev_name argument\n");
|
|
err = -EINVAL;
|
|
goto out;
|
|
}
|
|
|
|
pr_info("sdcardfs: dev_name -> %s\n", dev_name);
|
|
pr_info("sdcardfs: options -> %s\n", (char *)raw_data);
|
|
pr_info("sdcardfs: mnt -> %pK\n", mnt);
|
|
|
|
/* parse lower path */
|
|
err = kern_path(dev_name, LOOKUP_FOLLOW | LOOKUP_DIRECTORY,
|
|
&lower_path);
|
|
if (err) {
|
|
pr_err("sdcardfs: error accessing lower directory '%s'\n", dev_name);
|
|
goto out;
|
|
}
|
|
|
|
/* allocate superblock private data */
|
|
sb->s_fs_info = kzalloc(sizeof(struct sdcardfs_sb_info), GFP_KERNEL);
|
|
if (!SDCARDFS_SB(sb)) {
|
|
pr_crit("sdcardfs: read_super: out of memory\n");
|
|
err = -ENOMEM;
|
|
goto out_free;
|
|
}
|
|
|
|
sb_info = sb->s_fs_info;
|
|
/* parse options */
|
|
err = parse_options(sb, raw_data, silent, &debug, mnt_opt, &sb_info->options);
|
|
if (err) {
|
|
pr_err("sdcardfs: invalid options\n");
|
|
goto out_freesbi;
|
|
}
|
|
|
|
/* set the lower superblock field of upper superblock */
|
|
lower_sb = lower_path.dentry->d_sb;
|
|
atomic_inc(&lower_sb->s_active);
|
|
sdcardfs_set_lower_super(sb, lower_sb);
|
|
|
|
sb->s_stack_depth = lower_sb->s_stack_depth + 1;
|
|
if (sb->s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
|
|
pr_err("sdcardfs: maximum fs stacking depth exceeded\n");
|
|
err = -EINVAL;
|
|
goto out_sput;
|
|
}
|
|
|
|
/* inherit maxbytes from lower file system */
|
|
sb->s_maxbytes = lower_sb->s_maxbytes;
|
|
|
|
/*
|
|
* Our c/m/atime granularity is 1 ns because we may stack on file
|
|
* systems whose granularity is as good.
|
|
*/
|
|
sb->s_time_gran = 1;
|
|
|
|
sb->s_magic = SDCARDFS_SUPER_MAGIC;
|
|
sb->s_op = &sdcardfs_sops;
|
|
|
|
/* get a new inode and allocate our root dentry */
|
|
inode = sdcardfs_iget(sb, d_inode(lower_path.dentry), 0);
|
|
if (IS_ERR(inode)) {
|
|
err = PTR_ERR(inode);
|
|
goto out_sput;
|
|
}
|
|
sb->s_root = d_make_root(inode);
|
|
if (!sb->s_root) {
|
|
err = -ENOMEM;
|
|
goto out_sput;
|
|
}
|
|
d_set_d_op(sb->s_root, &sdcardfs_ci_dops);
|
|
|
|
/* link the upper and lower dentries */
|
|
sb->s_root->d_fsdata = NULL;
|
|
err = new_dentry_private_data(sb->s_root);
|
|
if (err)
|
|
goto out_freeroot;
|
|
|
|
/* set the lower dentries for s_root */
|
|
sdcardfs_set_lower_path(sb->s_root, &lower_path);
|
|
|
|
/*
|
|
* No need to call interpose because we already have a positive
|
|
* dentry, which was instantiated by d_make_root. Just need to
|
|
* d_rehash it.
|
|
*/
|
|
d_rehash(sb->s_root);
|
|
|
|
/* setup permission policy */
|
|
sb_info->obbpath_s = kzalloc(PATH_MAX, GFP_KERNEL);
|
|
mutex_lock(&sdcardfs_super_list_lock);
|
|
if (sb_info->options.multiuser) {
|
|
setup_derived_state(d_inode(sb->s_root), PERM_PRE_ROOT,
|
|
sb_info->options.fs_user_id, AID_ROOT);
|
|
snprintf(sb_info->obbpath_s, PATH_MAX, "%s/obb", dev_name);
|
|
} else {
|
|
setup_derived_state(d_inode(sb->s_root), PERM_ROOT,
|
|
sb_info->options.fs_user_id, AID_ROOT);
|
|
snprintf(sb_info->obbpath_s, PATH_MAX, "%s/Android/obb", dev_name);
|
|
}
|
|
fixup_tmp_permissions(d_inode(sb->s_root));
|
|
sb_info->sb = sb;
|
|
list_add(&sb_info->list, &sdcardfs_super_list);
|
|
mutex_unlock(&sdcardfs_super_list_lock);
|
|
|
|
sb_info->fscrypt_nb.notifier_call = sdcardfs_on_fscrypt_key_removed;
|
|
fscrypt_register_key_removal_notifier(&sb_info->fscrypt_nb);
|
|
|
|
if (!silent)
|
|
pr_info("sdcardfs: mounted on top of %s type %s\n",
|
|
dev_name, lower_sb->s_type->name);
|
|
goto out; /* all is well */
|
|
|
|
/* no longer needed: free_dentry_private_data(sb->s_root); */
|
|
out_freeroot:
|
|
dput(sb->s_root);
|
|
sb->s_root = NULL;
|
|
out_sput:
|
|
/* drop refs we took earlier */
|
|
atomic_dec(&lower_sb->s_active);
|
|
out_freesbi:
|
|
kfree(SDCARDFS_SB(sb));
|
|
sb->s_fs_info = NULL;
|
|
out_free:
|
|
path_put(&lower_path);
|
|
|
|
out:
|
|
return err;
|
|
}
|
|
|
|
struct sdcardfs_mount_private {
|
|
struct vfsmount *mnt;
|
|
const char *dev_name;
|
|
void *raw_data;
|
|
};
|
|
|
|
static int __sdcardfs_fill_super(
|
|
struct super_block *sb,
|
|
void *_priv, int silent)
|
|
{
|
|
struct sdcardfs_mount_private *priv = _priv;
|
|
|
|
return sdcardfs_read_super(priv->mnt,
|
|
sb, priv->dev_name, priv->raw_data, silent);
|
|
}
|
|
|
|
static struct dentry *sdcardfs_mount(struct vfsmount *mnt,
|
|
struct file_system_type *fs_type, int flags,
|
|
const char *dev_name, void *raw_data)
|
|
{
|
|
struct sdcardfs_mount_private priv = {
|
|
.mnt = mnt,
|
|
.dev_name = dev_name,
|
|
.raw_data = raw_data
|
|
};
|
|
|
|
return mount_nodev(fs_type, flags,
|
|
&priv, __sdcardfs_fill_super);
|
|
}
|
|
|
|
static struct dentry *sdcardfs_mount_wrn(struct file_system_type *fs_type,
|
|
int flags, const char *dev_name, void *raw_data)
|
|
{
|
|
WARN(1, "sdcardfs does not support mount. Use mount2.\n");
|
|
return ERR_PTR(-EINVAL);
|
|
}
|
|
|
|
void *sdcardfs_alloc_mnt_data(void)
|
|
{
|
|
return kmalloc(sizeof(struct sdcardfs_vfsmount_options), GFP_KERNEL);
|
|
}
|
|
|
|
void sdcardfs_kill_sb(struct super_block *sb)
|
|
{
|
|
struct sdcardfs_sb_info *sbi;
|
|
|
|
if (sb->s_magic == SDCARDFS_SUPER_MAGIC && sb->s_fs_info) {
|
|
sbi = SDCARDFS_SB(sb);
|
|
|
|
fscrypt_unregister_key_removal_notifier(&sbi->fscrypt_nb);
|
|
|
|
mutex_lock(&sdcardfs_super_list_lock);
|
|
list_del(&sbi->list);
|
|
mutex_unlock(&sdcardfs_super_list_lock);
|
|
}
|
|
kill_anon_super(sb);
|
|
}
|
|
|
|
static struct file_system_type sdcardfs_fs_type = {
|
|
.owner = THIS_MODULE,
|
|
.name = SDCARDFS_NAME,
|
|
.mount = sdcardfs_mount_wrn,
|
|
.mount2 = sdcardfs_mount,
|
|
.alloc_mnt_data = sdcardfs_alloc_mnt_data,
|
|
.kill_sb = sdcardfs_kill_sb,
|
|
.fs_flags = 0,
|
|
};
|
|
MODULE_ALIAS_FS(SDCARDFS_NAME);
|
|
|
|
static int __init init_sdcardfs_fs(void)
|
|
{
|
|
int err;
|
|
|
|
pr_info("Registering sdcardfs " SDCARDFS_VERSION "\n");
|
|
|
|
err = sdcardfs_init_inode_cache();
|
|
if (err)
|
|
goto out;
|
|
err = sdcardfs_init_dentry_cache();
|
|
if (err)
|
|
goto out;
|
|
err = packagelist_init();
|
|
if (err)
|
|
goto out;
|
|
err = register_filesystem(&sdcardfs_fs_type);
|
|
out:
|
|
if (err) {
|
|
sdcardfs_destroy_inode_cache();
|
|
sdcardfs_destroy_dentry_cache();
|
|
packagelist_exit();
|
|
}
|
|
return err;
|
|
}
|
|
|
|
static void __exit exit_sdcardfs_fs(void)
|
|
{
|
|
sdcardfs_destroy_inode_cache();
|
|
sdcardfs_destroy_dentry_cache();
|
|
packagelist_exit();
|
|
unregister_filesystem(&sdcardfs_fs_type);
|
|
pr_info("Completed sdcardfs module unload\n");
|
|
}
|
|
|
|
/* Original wrapfs authors */
|
|
MODULE_AUTHOR("Erez Zadok, Filesystems and Storage Lab, Stony Brook University (http://www.fsl.cs.sunysb.edu/)");
|
|
|
|
/* Original sdcardfs authors */
|
|
MODULE_AUTHOR("Woojoong Lee, Daeho Jeong, Kitae Lee, Yeongjin Gil System Memory Lab., Samsung Electronics");
|
|
|
|
/* Current maintainer */
|
|
MODULE_AUTHOR("Daniel Rosenberg, Google");
|
|
MODULE_DESCRIPTION("Sdcardfs " SDCARDFS_VERSION);
|
|
MODULE_LICENSE("GPL");
|
|
|
|
module_init(init_sdcardfs_fs);
|
|
module_exit(exit_sdcardfs_fs);
|