1. 30 Sep, 2022 11 commits
    • Alon Zahavi's avatar
      fs/ntfs3: Fix attr_punch_hole() null pointer derenference · 6d5c9e79
      Alon Zahavi authored
      The bug occours due to a misuse of `attr` variable instead of `attr_b`.
      `attr` is being initialized as NULL, then being derenfernced
      as `attr->res.data_size`.
      
      This bug causes a crash of the ntfs3 driver itself,
      If compiled directly to the kernel, it crashes the whole system.
      Signed-off-by: default avatarAlon Zahavi <zahavi.alon@gmail.com>
      Co-developed-by: default avatarTal Lossos <tallossos@gmail.com>
      Signed-off-by: default avatarTal Lossos <tallossos@gmail.com>
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      6d5c9e79
    • Marc Aurèle La France's avatar
      fs/ntfs3: Fix [df]mask display in /proc/mounts · f27b92ec
      Marc Aurèle La France authored
      ntfs3's dmask and fmask mount options are 16-bit quantities but are displayed
      as 1-extended 32-bit values in /proc/mounts.  Fix this by circumventing
      integer promotion.
      Signed-off-by: default avatarMarc Aurèle La France <tsi@tuyoix.net>
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      f27b92ec
    • Edward Lo's avatar
      fs/ntfs3: Add null pointer check to attr_load_runs_vcn · 2681631c
      Edward Lo authored
      Some metadata files are handled before MFT. This adds a null pointer
      check for some corner cases that could lead to NPD while reading these
      metadata files for a malformed NTFS image.
      
      [  240.190827] BUG: kernel NULL pointer dereference, address: 0000000000000158
      [  240.191583] #PF: supervisor read access in kernel mode
      [  240.191956] #PF: error_code(0x0000) - not-present page
      [  240.192391] PGD 0 P4D 0
      [  240.192897] Oops: 0000 [#1] PREEMPT SMP KASAN NOPTI
      [  240.193805] CPU: 0 PID: 242 Comm: mount Tainted: G    B             5.19.0+ #17
      [  240.194477] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
      [  240.195152] RIP: 0010:ni_find_attr+0xae/0x300
      [  240.195679] Code: c8 48 c7 45 88 c0 4e 5e 86 c7 00 f1 f1 f1 f1 c7 40 04 00 f3 f3 f3 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 e8 e2 d9f
      [  240.196642] RSP: 0018:ffff88800812f690 EFLAGS: 00000286
      [  240.197019] RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffffffff85ef037a
      [  240.197523] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff88e95f60
      [  240.197877] RBP: ffff88800812f738 R08: 0000000000000001 R09: fffffbfff11d2bed
      [  240.198292] R10: ffffffff88e95f67 R11: fffffbfff11d2bec R12: 0000000000000000
      [  240.198647] R13: 0000000000000080 R14: 0000000000000000 R15: 0000000000000000
      [  240.199410] FS:  00007f233c33be40(0000) GS:ffff888058200000(0000) knlGS:0000000000000000
      [  240.199895] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  240.200314] CR2: 0000000000000158 CR3: 0000000004d32000 CR4: 00000000000006f0
      [  240.200839] Call Trace:
      [  240.201104]  <TASK>
      [  240.201502]  ? ni_load_mi+0x80/0x80
      [  240.202297]  ? ___slab_alloc+0x465/0x830
      [  240.202614]  attr_load_runs_vcn+0x8c/0x1a0
      [  240.202886]  ? __kasan_slab_alloc+0x32/0x90
      [  240.203157]  ? attr_data_write_resident+0x250/0x250
      [  240.203543]  mi_read+0x133/0x2c0
      [  240.203785]  mi_get+0x70/0x140
      [  240.204012]  ni_load_mi_ex+0xfa/0x190
      [  240.204346]  ? ni_std5+0x90/0x90
      [  240.204588]  ? __kasan_kmalloc+0x88/0xb0
      [  240.204859]  ni_enum_attr_ex+0xf1/0x1c0
      [  240.205107]  ? ni_fname_type.part.0+0xd0/0xd0
      [  240.205600]  ? ntfs_load_attr_list+0xbe/0x300
      [  240.205864]  ? ntfs_cmp_names_cpu+0x125/0x180
      [  240.206157]  ntfs_iget5+0x56c/0x1870
      [  240.206510]  ? ntfs_get_block_bmap+0x70/0x70
      [  240.206776]  ? __kasan_kmalloc+0x88/0xb0
      [  240.207030]  ? set_blocksize+0x95/0x150
      [  240.207545]  ntfs_fill_super+0xb8f/0x1e20
      [  240.207839]  ? put_ntfs+0x1d0/0x1d0
      [  240.208069]  ? vsprintf+0x20/0x20
      [  240.208467]  ? mutex_unlock+0x81/0xd0
      [  240.208846]  ? set_blocksize+0x95/0x150
      [  240.209221]  get_tree_bdev+0x232/0x370
      [  240.209804]  ? put_ntfs+0x1d0/0x1d0
      [  240.210519]  ntfs_fs_get_tree+0x15/0x20
      [  240.210991]  vfs_get_tree+0x4c/0x130
      [  240.211455]  path_mount+0x645/0xfd0
      [  240.211806]  ? putname+0x80/0xa0
      [  240.212112]  ? finish_automount+0x2e0/0x2e0
      [  240.212559]  ? kmem_cache_free+0x110/0x390
      [  240.212906]  ? putname+0x80/0xa0
      [  240.213329]  do_mount+0xd6/0xf0
      [  240.213829]  ? path_mount+0xfd0/0xfd0
      [  240.214246]  ? __kasan_check_write+0x14/0x20
      [  240.214774]  __x64_sys_mount+0xca/0x110
      [  240.215080]  do_syscall_64+0x3b/0x90
      [  240.215442]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
      [  240.215811] RIP: 0033:0x7f233b4e948a
      [  240.216104] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008
      [  240.217615] RSP: 002b:00007fff02211ec8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
      [  240.218718] RAX: ffffffffffffffda RBX: 0000561cdc35b060 RCX: 00007f233b4e948a
      [  240.219556] RDX: 0000561cdc35b260 RSI: 0000561cdc35b2e0 RDI: 0000561cdc363af0
      [  240.219975] RBP: 0000000000000000 R08: 0000561cdc35b280 R09: 0000000000000020
      [  240.220403] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 0000561cdc363af0
      [  240.220803] R13: 0000561cdc35b260 R14: 0000000000000000 R15: 00000000ffffffff
      [  240.221256]  </TASK>
      [  240.221567] Modules linked in:
      [  240.222028] CR2: 0000000000000158
      [  240.223291] ---[ end trace 0000000000000000 ]---
      [  240.223669] RIP: 0010:ni_find_attr+0xae/0x300
      [  240.224058] Code: c8 48 c7 45 88 c0 4e 5e 86 c7 00 f1 f1 f1 f1 c7 40 04 00 f3 f3 f3 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 e8 e2 d9f
      [  240.225033] RSP: 0018:ffff88800812f690 EFLAGS: 00000286
      [  240.225968] RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffffffff85ef037a
      [  240.226624] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff88e95f60
      [  240.227307] RBP: ffff88800812f738 R08: 0000000000000001 R09: fffffbfff11d2bed
      [  240.227816] R10: ffffffff88e95f67 R11: fffffbfff11d2bec R12: 0000000000000000
      [  240.228330] R13: 0000000000000080 R14: 0000000000000000 R15: 0000000000000000
      [  240.228729] FS:  00007f233c33be40(0000) GS:ffff888058200000(0000) knlGS:0000000000000000
      [  240.229281] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  240.230298] CR2: 0000000000000158 CR3: 0000000004d32000 CR4: 00000000000006f0
      Signed-off-by: default avatarEdward Lo <edward.lo@ambergroup.io>
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      2681631c
    • Edward Lo's avatar
      fs/ntfs3: Validate data run offset · 6db62086
      Edward Lo authored
      This adds sanity checks for data run offset. We should make sure data
      run offset is legit before trying to unpack them, otherwise we may
      encounter use-after-free or some unexpected memory access behaviors.
      
      [   82.940342] BUG: KASAN: use-after-free in run_unpack+0x2e3/0x570
      [   82.941180] Read of size 1 at addr ffff888008a8487f by task mount/240
      [   82.941670]
      [   82.942069] CPU: 0 PID: 240 Comm: mount Not tainted 5.19.0+ #15
      [   82.942482] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
      [   82.943720] Call Trace:
      [   82.944204]  <TASK>
      [   82.944471]  dump_stack_lvl+0x49/0x63
      [   82.944908]  print_report.cold+0xf5/0x67b
      [   82.945141]  ? __wait_on_bit+0x106/0x120
      [   82.945750]  ? run_unpack+0x2e3/0x570
      [   82.946626]  kasan_report+0xa7/0x120
      [   82.947046]  ? run_unpack+0x2e3/0x570
      [   82.947280]  __asan_load1+0x51/0x60
      [   82.947483]  run_unpack+0x2e3/0x570
      [   82.947709]  ? memcpy+0x4e/0x70
      [   82.947927]  ? run_pack+0x7a0/0x7a0
      [   82.948158]  run_unpack_ex+0xad/0x3f0
      [   82.948399]  ? mi_enum_attr+0x14a/0x200
      [   82.948717]  ? run_unpack+0x570/0x570
      [   82.949072]  ? ni_enum_attr_ex+0x1b2/0x1c0
      [   82.949332]  ? ni_fname_type.part.0+0xd0/0xd0
      [   82.949611]  ? mi_read+0x262/0x2c0
      [   82.949970]  ? ntfs_cmp_names_cpu+0x125/0x180
      [   82.950249]  ntfs_iget5+0x632/0x1870
      [   82.950621]  ? ntfs_get_block_bmap+0x70/0x70
      [   82.951192]  ? evict+0x223/0x280
      [   82.951525]  ? iput.part.0+0x286/0x320
      [   82.951969]  ntfs_fill_super+0x1321/0x1e20
      [   82.952436]  ? put_ntfs+0x1d0/0x1d0
      [   82.952822]  ? vsprintf+0x20/0x20
      [   82.953188]  ? mutex_unlock+0x81/0xd0
      [   82.953379]  ? set_blocksize+0x95/0x150
      [   82.954001]  get_tree_bdev+0x232/0x370
      [   82.954438]  ? put_ntfs+0x1d0/0x1d0
      [   82.954700]  ntfs_fs_get_tree+0x15/0x20
      [   82.955049]  vfs_get_tree+0x4c/0x130
      [   82.955292]  path_mount+0x645/0xfd0
      [   82.955615]  ? putname+0x80/0xa0
      [   82.955955]  ? finish_automount+0x2e0/0x2e0
      [   82.956310]  ? kmem_cache_free+0x110/0x390
      [   82.956723]  ? putname+0x80/0xa0
      [   82.957023]  do_mount+0xd6/0xf0
      [   82.957411]  ? path_mount+0xfd0/0xfd0
      [   82.957638]  ? __kasan_check_write+0x14/0x20
      [   82.957948]  __x64_sys_mount+0xca/0x110
      [   82.958310]  do_syscall_64+0x3b/0x90
      [   82.958719]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
      [   82.959341] RIP: 0033:0x7fd0d1ce948a
      [   82.960193] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008
      [   82.961532] RSP: 002b:00007ffe59ff69a8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
      [   82.962527] RAX: ffffffffffffffda RBX: 0000564dcc107060 RCX: 00007fd0d1ce948a
      [   82.963266] RDX: 0000564dcc107260 RSI: 0000564dcc1072e0 RDI: 0000564dcc10fce0
      [   82.963686] RBP: 0000000000000000 R08: 0000564dcc107280 R09: 0000000000000020
      [   82.964272] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 0000564dcc10fce0
      [   82.964785] R13: 0000564dcc107260 R14: 0000000000000000 R15: 00000000ffffffff
      Signed-off-by: default avatarEdward Lo <edward.lo@ambergroup.io>
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      6db62086
    • edward lo's avatar
      fs/ntfs3: Add overflow check for attribute size · e19c6277
      edward lo authored
      The offset addition could overflow and pass the used size check given an
      attribute with very large size (e.g., 0xffffff7f) while parsing MFT
      attributes. This could lead to out-of-bound memory R/W if we try to
      access the next attribute derived by Add2Ptr(attr, asize)
      
      [   32.963847] BUG: unable to handle page fault for address: ffff956a83c76067
      [   32.964301] #PF: supervisor read access in kernel mode
      [   32.964526] #PF: error_code(0x0000) - not-present page
      [   32.964893] PGD 4dc01067 P4D 4dc01067 PUD 0
      [   32.965316] Oops: 0000 [#1] PREEMPT SMP NOPTI
      [   32.965727] CPU: 0 PID: 243 Comm: mount Not tainted 5.19.0+ #6
      [   32.966050] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
      [   32.966628] RIP: 0010:mi_enum_attr+0x44/0x110
      [   32.967239] Code: 89 f0 48 29 c8 48 89 c1 39 c7 0f 86 94 00 00 00 8b 56 04 83 fa 17 0f 86 88 00 00 00 89 d0 01 ca 48 01 f0 8d 4a 08 39 f9a
      [   32.968101] RSP: 0018:ffffba15c06a7c38 EFLAGS: 00000283
      [   32.968364] RAX: ffff956a83c76067 RBX: ffff956983c76050 RCX: 000000000000006f
      [   32.968651] RDX: 0000000000000067 RSI: ffff956983c760e8 RDI: 00000000000001c8
      [   32.968963] RBP: ffffba15c06a7c38 R08: 0000000000000064 R09: 00000000ffffff7f
      [   32.969249] R10: 0000000000000007 R11: ffff956983c760e8 R12: ffff95698225e000
      [   32.969870] R13: 0000000000000000 R14: ffffba15c06a7cd8 R15: ffff95698225e170
      [   32.970655] FS:  00007fdab8189e40(0000) GS:ffff9569fdc00000(0000) knlGS:0000000000000000
      [   32.971098] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   32.971378] CR2: ffff956a83c76067 CR3: 0000000002c58000 CR4: 00000000000006f0
      [   32.972098] Call Trace:
      [   32.972842]  <TASK>
      [   32.973341]  ni_enum_attr_ex+0xda/0xf0
      [   32.974087]  ntfs_iget5+0x1db/0xde0
      [   32.974386]  ? slab_post_alloc_hook+0x53/0x270
      [   32.974778]  ? ntfs_fill_super+0x4c7/0x12a0
      [   32.975115]  ntfs_fill_super+0x5d6/0x12a0
      [   32.975336]  get_tree_bdev+0x175/0x270
      [   32.975709]  ? put_ntfs+0x150/0x150
      [   32.975956]  ntfs_fs_get_tree+0x15/0x20
      [   32.976191]  vfs_get_tree+0x2a/0xc0
      [   32.976374]  ? capable+0x19/0x20
      [   32.976572]  path_mount+0x484/0xaa0
      [   32.977025]  ? putname+0x57/0x70
      [   32.977380]  do_mount+0x80/0xa0
      [   32.977555]  __x64_sys_mount+0x8b/0xe0
      [   32.978105]  do_syscall_64+0x3b/0x90
      [   32.978830]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
      [   32.979311] RIP: 0033:0x7fdab72e948a
      [   32.980015] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008
      [   32.981251] RSP: 002b:00007ffd15b87588 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
      [   32.981832] RAX: ffffffffffffffda RBX: 0000557de0aaf060 RCX: 00007fdab72e948a
      [   32.982234] RDX: 0000557de0aaf260 RSI: 0000557de0aaf2e0 RDI: 0000557de0ab7ce0
      [   32.982714] RBP: 0000000000000000 R08: 0000557de0aaf280 R09: 0000000000000020
      [   32.983046] R10: 00000000c0ed0000 R11: 0000000000000206 R12: 0000557de0ab7ce0
      [   32.983494] R13: 0000557de0aaf260 R14: 0000000000000000 R15: 00000000ffffffff
      [   32.984094]  </TASK>
      [   32.984352] Modules linked in:
      [   32.984753] CR2: ffff956a83c76067
      [   32.985911] ---[ end trace 0000000000000000 ]---
      [   32.986555] RIP: 0010:mi_enum_attr+0x44/0x110
      [   32.987217] Code: 89 f0 48 29 c8 48 89 c1 39 c7 0f 86 94 00 00 00 8b 56 04 83 fa 17 0f 86 88 00 00 00 89 d0 01 ca 48 01 f0 8d 4a 08 39 f9a
      [   32.988232] RSP: 0018:ffffba15c06a7c38 EFLAGS: 00000283
      [   32.988532] RAX: ffff956a83c76067 RBX: ffff956983c76050 RCX: 000000000000006f
      [   32.988916] RDX: 0000000000000067 RSI: ffff956983c760e8 RDI: 00000000000001c8
      [   32.989356] RBP: ffffba15c06a7c38 R08: 0000000000000064 R09: 00000000ffffff7f
      [   32.989994] R10: 0000000000000007 R11: ffff956983c760e8 R12: ffff95698225e000
      [   32.990415] R13: 0000000000000000 R14: ffffba15c06a7cd8 R15: ffff95698225e170
      [   32.991011] FS:  00007fdab8189e40(0000) GS:ffff9569fdc00000(0000) knlGS:0000000000000000
      [   32.991524] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   32.991936] CR2: ffff956a83c76067 CR3: 0000000002c58000 CR4: 00000000000006f0
      
      This patch adds an overflow check
      Signed-off-by: default avataredward lo <edward.lo@ambergroup.io>
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      e19c6277
    • edward lo's avatar
      fs/ntfs3: Validate BOOT record_size · 0b660462
      edward lo authored
      When the NTFS BOOT record_size field < 0, it represents a
      shift value. However, there is no sanity check on the shift result
      and the sbi->record_bits calculation through blksize_bits() assumes
      the size always > 256, which could lead to NPD while mounting a
      malformed NTFS image.
      
      [  318.675159] BUG: kernel NULL pointer dereference, address: 0000000000000158
      [  318.675682] #PF: supervisor read access in kernel mode
      [  318.675869] #PF: error_code(0x0000) - not-present page
      [  318.676246] PGD 0 P4D 0
      [  318.676502] Oops: 0000 [#1] PREEMPT SMP NOPTI
      [  318.676934] CPU: 0 PID: 259 Comm: mount Not tainted 5.19.0 #5
      [  318.677289] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
      [  318.678136] RIP: 0010:ni_find_attr+0x2d/0x1c0
      [  318.678656] Code: 89 ca 4d 89 c7 41 56 41 55 41 54 41 89 cc 55 48 89 fd 53 48 89 d3 48 83 ec 20 65 48 8b 04 25 28 00 00 00 48 89 44 24 180
      [  318.679848] RSP: 0018:ffffa6c8c0297bd8 EFLAGS: 00000246
      [  318.680104] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000080
      [  318.680790] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
      [  318.681679] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
      [  318.682577] R10: 0000000000000000 R11: 0000000000000005 R12: 0000000000000080
      [  318.683015] R13: ffff8d5582e68400 R14: 0000000000000100 R15: 0000000000000000
      [  318.683618] FS:  00007fd9e1c81e40(0000) GS:ffff8d55fdc00000(0000) knlGS:0000000000000000
      [  318.684280] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  318.684651] CR2: 0000000000000158 CR3: 0000000002e1a000 CR4: 00000000000006f0
      [  318.685623] Call Trace:
      [  318.686607]  <TASK>
      [  318.686872]  ? ntfs_alloc_inode+0x1a/0x60
      [  318.687235]  attr_load_runs_vcn+0x2b/0xa0
      [  318.687468]  mi_read+0xbb/0x250
      [  318.687576]  ntfs_iget5+0x114/0xd90
      [  318.687750]  ntfs_fill_super+0x588/0x11b0
      [  318.687953]  ? put_ntfs+0x130/0x130
      [  318.688065]  ? snprintf+0x49/0x70
      [  318.688164]  ? put_ntfs+0x130/0x130
      [  318.688256]  get_tree_bdev+0x16a/0x260
      [  318.688407]  vfs_get_tree+0x20/0xb0
      [  318.688519]  path_mount+0x2dc/0x9b0
      [  318.688877]  do_mount+0x74/0x90
      [  318.689142]  __x64_sys_mount+0x89/0xd0
      [  318.689636]  do_syscall_64+0x3b/0x90
      [  318.689998]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
      [  318.690318] RIP: 0033:0x7fd9e133c48a
      [  318.690687] Code: 48 8b 0d 11 fa 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 008
      [  318.691357] RSP: 002b:00007ffd374406c8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
      [  318.691632] RAX: ffffffffffffffda RBX: 0000564d0b051080 RCX: 00007fd9e133c48a
      [  318.691920] RDX: 0000564d0b051280 RSI: 0000564d0b051300 RDI: 0000564d0b0596a0
      [  318.692123] RBP: 0000000000000000 R08: 0000564d0b0512a0 R09: 0000000000000020
      [  318.692349] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 0000564d0b0596a0
      [  318.692673] R13: 0000564d0b051280 R14: 0000000000000000 R15: 00000000ffffffff
      [  318.693007]  </TASK>
      [  318.693271] Modules linked in:
      [  318.693614] CR2: 0000000000000158
      [  318.694446] ---[ end trace 0000000000000000 ]---
      [  318.694779] RIP: 0010:ni_find_attr+0x2d/0x1c0
      [  318.694952] Code: 89 ca 4d 89 c7 41 56 41 55 41 54 41 89 cc 55 48 89 fd 53 48 89 d3 48 83 ec 20 65 48 8b 04 25 28 00 00 00 48 89 44 24 180
      [  318.696042] RSP: 0018:ffffa6c8c0297bd8 EFLAGS: 00000246
      [  318.696531] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000080
      [  318.698114] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
      [  318.699286] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
      [  318.699795] R10: 0000000000000000 R11: 0000000000000005 R12: 0000000000000080
      [  318.700236] R13: ffff8d5582e68400 R14: 0000000000000100 R15: 0000000000000000
      [  318.700973] FS:  00007fd9e1c81e40(0000) GS:ffff8d55fdc00000(0000) knlGS:0000000000000000
      [  318.701688] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  318.702190] CR2: 0000000000000158 CR3: 0000000002e1a000 CR4: 00000000000006f0
      [  318.726510] mount (259) used greatest stack depth: 13320 bytes left
      
      This patch adds a sanity check.
      Signed-off-by: default avataredward lo <edward.lo@ambergroup.io>
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      0b660462
    • Konstantin Komarov's avatar
      fs/ntfs3: Rename variables and add comment · 43f03acb
      Konstantin Komarov authored
      After renaming we don't need to split code in two lines.
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      43f03acb
    • Konstantin Komarov's avatar
      fs/ntfs3: Add option "nocase" · a3a956c7
      Konstantin Komarov authored
      This commit adds mount option and additional functions.
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      a3a956c7
    • Konstantin Komarov's avatar
      fs/ntfs3: Change destroy_inode to free_inode · ae6b47b5
      Konstantin Komarov authored
      Many filesystems already use free_inode callback,
      so we will use it too from now on.
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      ae6b47b5
    • Konstantin Komarov's avatar
      fs/ntfs3: Add hidedotfiles option · 098250db
      Konstantin Komarov authored
      With this option all files with filename[0] == '.'
      will have FILE_ATTRIBUTE_HIDDEN attribute.
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      098250db
    • Konstantin Komarov's avatar
      fs/ntfs3: Add comments about cluster size · bd6ae049
      Konstantin Komarov authored
      This commit adds additional info about CONFIG_NTFS3_64BIT_CLUSTER
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      bd6ae049
  2. 25 Sep, 2022 8 commits
  3. 24 Sep, 2022 10 commits
  4. 23 Sep, 2022 11 commits