An error occurred fetching the project authors.
  1. 17 Sep, 2024 2 commits
  2. 15 Jul, 2024 1 commit
  3. 02 Jul, 2024 1 commit
  4. 13 Mar, 2024 1 commit
  5. 25 Feb, 2024 1 commit
  6. 31 Oct, 2023 2 commits
  7. 18 Oct, 2023 1 commit
  8. 10 Aug, 2023 2 commits
  9. 13 Jul, 2023 1 commit
  10. 27 Feb, 2023 1 commit
  11. 01 Aug, 2022 1 commit
  12. 23 May, 2022 1 commit
  13. 18 Apr, 2022 1 commit
  14. 01 Apr, 2022 2 commits
    • Yuezhang Mo's avatar
      exfat: do not clear VolumeDirty in writeback · a4a3d8c5
      Yuezhang Mo authored
      Before this commit, VolumeDirty will be cleared first in
      writeback if 'dirsync' or 'sync' is not enabled. If the power
      is suddenly cut off after cleaning VolumeDirty but other
      updates are not written, the exFAT filesystem will not be able
      to detect the power failure in the next mount.
      
      And VolumeDirty will be set again but not cleared when updating
      the parent directory. It means that BootSector will be written at
      least once in each write-back, which will shorten the life of the
      device.
      Reviewed-by: default avatarAndy Wu <Andy.Wu@sony.com>
      Reviewed-by: default avatarAoyama Wataru <wataru.aoyama@sony.com>
      Signed-off-by: default avatarYuezhang Mo <Yuezhang.Mo@sony.com>
      Signed-off-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
      a4a3d8c5
    • Vasant Karasulli's avatar
      exfat: allow access to paths with trailing dots · 9ec784bf
      Vasant Karasulli authored
       The Linux kernel exfat driver currently unconditionally strips
       trailing periods '.' from path components. This isdone intentionally,
       loosely following Windows behaviour and specifications
       which state:
      
        #exFAT
        The concatenated file name has the same set of illegal characters as
        other FAT-based file systems (see Table 31).
      
        #FAT
        ...
        Leading and trailing spaces in a long name are ignored.
        Leading and embedded periods are allowed in a name and are stored in
        the long name. Trailing periods are ignored.
      
      Note: Leading and trailing space ' ' characters are currently retained
      by Linux kernel exfat, in conflict with the above specification.
      On Windows 10, trailing and leading space ' ' characters are stripped
      from the filenames.
      Some implementations, such as fuse-exfat, don't perform path trailer
      removal. When mounting images which contain trailing-dot paths, these
      paths are unreachable, e.g.:
      
        + mount.exfat-fuse /dev/zram0 /mnt/test/
        FUSE exfat 1.3.0
        + cd /mnt/test/
        + touch fuse_created_dots... '  fuse_created_spaces  '
        + ls -l
        total 0
        -rwxrwxrwx 1 root 0 0 Aug 18 09:45 '  fuse_created_spaces  '
        -rwxrwxrwx 1 root 0 0 Aug 18 09:45  fuse_created_dots...
        + cd /
        + umount /mnt/test/
        + mount -t exfat /dev/zram0 /mnt/test
        + cd /mnt/test
        + ls -l
        ls: cannot access 'fuse_created_dots...': No such file or directory
        total 0
        -rwxr-xr-x 1 root 0 0 Aug 18 09:45 '  fuse_created_spaces  '
        -????????? ? ?    ? ?            ?  fuse_created_dots...
        + touch kexfat_created_dots... '  kexfat_created_spaces  '
        + ls -l
        ls: cannot access 'fuse_created_dots...': No such file or directory
        total 0
        -rwxr-xr-x 1 root 0 0 Aug 18 09:45 '  fuse_created_spaces  '
        -rwxr-xr-x 1 root 0 0 Aug 18 09:45 '  kexfat_created_spaces  '
        -????????? ? ?    ? ?            ?  fuse_created_dots...
        -rwxr-xr-x 1 root 0 0 Aug 18 09:45  kexfat_created_dots
        + cd /
        + umount /mnt/test/
      
      This commit adds "keep_last_dots" mount option that controls whether or
      not trailing periods '.' are stripped
      from path components during file lookup or file creation.
      This mount option can be used to access
      paths with trailing periods and disallow creating files with names with
      trailing periods. E.g. continuing from the previous example:
      
        + mount -t exfat -o keep_last_dots /dev/zram0 /mnt/test
        + cd /mnt/test
        + ls -l
        total 0
        -rwxr-xr-x 1 root 0 0 Aug 18 10:32 '  fuse_created_spaces  '
        -rwxr-xr-x 1 root 0 0 Aug 18 10:32 '  kexfat_created_spaces  '
        -rwxr-xr-x 1 root 0 0 Aug 18 10:32  fuse_created_dots...
        -rwxr-xr-x 1 root 0 0 Aug 18 10:32  kexfat_created_dots
      
        + echo > kexfat_created_dots_again...
        sh: kexfat_created_dots_again...: Invalid argument
      
      Link: https://bugzilla.suse.com/show_bug.cgi?id=1188964
      Link: https://lore.kernel.org/linux-fsdevel/003b01d755e4$31fb0d80$95f12880$
      @samsung.com/
      Link: https://docs.microsoft.com/en-us/windows/win32/fileio/exfat-specificationSuggested-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarVasant Karasulli <vkarasulli@suse.de>
      Co-developed-by: default avatarDavid Disseldorp <ddiss@suse.de>
      Signed-off-by: default avatarDavid Disseldorp <ddiss@suse.de>
      Signed-off-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
      9ec784bf
  15. 22 Mar, 2022 1 commit
  16. 10 Jan, 2022 3 commits
  17. 28 Jun, 2021 1 commit
  18. 27 Apr, 2021 1 commit
  19. 22 Feb, 2021 1 commit
    • Namjae Jeon's avatar
      exfat: fix shift-out-of-bounds in exfat_fill_super() · 78c276f5
      Namjae Jeon authored
      syzbot reported a warning which could cause shift-out-of-bounds issue.
      
      Call Trace:
       __dump_stack lib/dump_stack.c:79 [inline]
       dump_stack+0x183/0x22e lib/dump_stack.c:120
       ubsan_epilogue lib/ubsan.c:148 [inline]
       __ubsan_handle_shift_out_of_bounds+0x432/0x4d0 lib/ubsan.c:395
       exfat_read_boot_sector fs/exfat/super.c:471 [inline]
       __exfat_fill_super fs/exfat/super.c:556 [inline]
       exfat_fill_super+0x2acb/0x2d00 fs/exfat/super.c:624
       get_tree_bdev+0x406/0x630 fs/super.c:1291
       vfs_get_tree+0x86/0x270 fs/super.c:1496
       do_new_mount fs/namespace.c:2881 [inline]
       path_mount+0x1937/0x2c50 fs/namespace.c:3211
       do_mount fs/namespace.c:3224 [inline]
       __do_sys_mount fs/namespace.c:3432 [inline]
       __se_sys_mount+0x2f9/0x3b0 fs/namespace.c:3409
       do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      exfat specification describe sect_per_clus_bits field of boot sector
      could be at most 25 - sect_size_bits and at least 0. And sect_size_bits
      can also affect this calculation, It also needs validation.
      This patch add validation for sect_per_clus_bits and sect_size_bits
      field of boot sector.
      
      Fixes: 719c1e18 ("exfat: add super block operations")
      Cc: stable@vger.kernel.org # v5.9+
      Reported-by: syzbot+da4fe66aaadd3c2e2d1c@syzkaller.appspotmail.com
      Reviewed-by: default avatarSungjong Seo <sj1557.seo@samsung.com>
      Tested-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
      78c276f5
  20. 21 Oct, 2020 1 commit
  21. 07 Oct, 2020 1 commit
    • Namjae Jeon's avatar
      exfat: fix use of uninitialized spinlock on error path · 8ff006e5
      Namjae Jeon authored
      syzbot reported warning message:
      
      Call Trace:
       __dump_stack lib/dump_stack.c:77 [inline]
       dump_stack+0x1d6/0x29e lib/dump_stack.c:118
       register_lock_class+0xf06/0x1520 kernel/locking/lockdep.c:893
       __lock_acquire+0xfd/0x2ae0 kernel/locking/lockdep.c:4320
       lock_acquire+0x148/0x720 kernel/locking/lockdep.c:5029
       __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
       _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151
       spin_lock include/linux/spinlock.h:354 [inline]
       exfat_cache_inval_inode+0x30/0x280 fs/exfat/cache.c:226
       exfat_evict_inode+0x124/0x270 fs/exfat/inode.c:660
       evict+0x2bb/0x6d0 fs/inode.c:576
       exfat_fill_super+0x1e07/0x27d0 fs/exfat/super.c:681
       get_tree_bdev+0x3e9/0x5f0 fs/super.c:1342
       vfs_get_tree+0x88/0x270 fs/super.c:1547
       do_new_mount fs/namespace.c:2875 [inline]
       path_mount+0x179d/0x29e0 fs/namespace.c:3192
       do_mount fs/namespace.c:3205 [inline]
       __do_sys_mount fs/namespace.c:3413 [inline]
       __se_sys_mount+0x126/0x180 fs/namespace.c:3390
       do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      If exfat_read_root() returns an error, spinlock is used in
      exfat_evict_inode() without initialization. This patch combines
      exfat_cache_init_inode() with exfat_inode_init_once() to initialize
      spinlock by slab constructor.
      
      Fixes: c35b6810 ("exfat: add exfat cache")
      Cc: stable@vger.kernel.org # v5.7+
      Reported-by: default avatarsyzbot <syzbot+b91107320911a26c9a95@syzkaller.appspotmail.com>
      Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
      8ff006e5
  22. 18 Sep, 2020 1 commit
  23. 11 Aug, 2020 2 commits
    • Tetsuhiro Kohada's avatar
      exfat: retain 'VolumeFlags' properly · 7018ec68
      Tetsuhiro Kohada authored
      MediaFailure and VolumeDirty should be retained if these are set before
      mounting.
      
      In '3.1.13.3 Media Failure Field' of exfat specification describe:
      
       If, upon mounting a volume, the value of this field is 1,
       implementations which scan the entire volume for media failures and
       record all failures as "bad" clusters in the FAT (or otherwise resolve
       media failures) may clear the value of  this field to 0.
      
      Therefore, We should not clear MediaFailure without scanning volume.
      
      In '8.1 Recommended Write Ordering' of exfat specification describe:
      
       Clear the value of the VolumeDirty field to 0, if its value prior to
       the first step was 0.
      
      Therefore, We should not clear VolumeDirty after mounting.
      Also rename ERR_MEDIUM to MEDIA_FAILURE.
      Signed-off-by: default avatarTetsuhiro Kohada <kohada.t2@gmail.com>
      Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
      7018ec68
    • Tetsuhiro Kohada's avatar
      exfat: remove EXFAT_SB_DIRTY flag · 2c7f8937
      Tetsuhiro Kohada authored
      This flag is set/reset in exfat_put_super()/exfat_sync_fs()
      to avoid sync_blockdev().
      - exfat_put_super():
      Before calling this, the VFS has already called sync_filesystem(),
      so sync is never performed here.
      - exfat_sync_fs():
      After calling this, the VFS calls sync_blockdev(), so, it is meaningless
      to check EXFAT_SB_DIRTY or to bypass sync_blockdev() here.
      
      Remove the EXFAT_SB_DIRTY check to ensure synchronization.
      And remove the code related to the flag.
      Signed-off-by: default avatarTetsuhiro Kohada <kohada.t2@gmail.com>
      Reviewed-by: default avatarSungjong Seo <sj1557.seo@samsung.com>
      Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
      2c7f8937
  24. 29 Jun, 2020 1 commit
  25. 09 Jun, 2020 6 commits
  26. 21 May, 2020 1 commit
  27. 22 Apr, 2020 2 commits