[f2fs-dev] [Bug 204043] New: F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

Bug ID: 204043
   Summary: F2fs kernel BUG at fs/f2fs/data.c:317!
   Product: File System
   Version: 2.5
Kernel Version: 5.1.3
  Hardware: All
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: f2fs
  Assignee: filesystem_f...@kernel-bugs.kernel.org
  Reporter: midwinter1...@gmail.com
Regression: No

Created attachment 283507
  --> https://bugzilla.kernel.org/attachment.cgi?id=283507&action=edit
syscall in C code

I mounted an f2fs image and did some operations, then, a bug occurred.
This bug does not occur every time, but according to my attempts, it occurs at
least 1/5 (hitting once in five runnings).

The attached file is the syscall I did in C code.

The triggering script follows: (it should be run by root)
```
#!/bin/bash

DISK_NAME=xx.img

dd if=/dev/zero of=xx.img bs=1M count=196
mkfs.f2fs -a 0 -o 0 -t 0 -z 9 -f -q $DISK_NAME

g++ -static 2.c

losetup "/dev/loop0" $DISK_NAME

mkdir /root/mnt

./a.out

umount /root/mnt
losetup -D
```



--- Core dump ---
[   54.834378] kernel BUG at fs/f2fs/data.c:317!
[   54.835035] invalid opcode:  [#1] SMP KASAN PTI
[   54.835727] CPU: 1 PID: 1094 Comm: kworker/u4:4 Not tainted 5.1.3 #7
[   54.836608] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
Ubuntu-1.8.2-1ubuntu1 04/01/2014
[   54.837998] Workqueue: writeback wb_workfn (flush-7:0)
[   54.838732] RIP: 0010:__submit_merged_bio+0x8b0/0x8c0
[   54.839453] Code: 8b 54 24 1c 4c 89 f1 4c 89 e6 e8 2b 75 33 01 48 89 ef e8
e3 c4 8a ff 4c 8b 6d 00 4d 85 ed 75 ca e9 cc fd ff ff e8 10 89 74 ff <0f> 0b 0f
1f 40 00 66 2e 0f 1f 84 00 00 00 00 00 41 57 41 56 41 55
[   54.842001] RSP: 0018:888069af7158 EFLAGS: 00010293
[   54.842732] RAX: 888069ad9980 RBX: 88806a2624c0 RCX:
af2c9ca0
[   54.843738] RDX:  RSI: 0fff RDI:
0005
[   54.844718] RBP:  R08: 888069ad9980 R09:
8880594a
[   54.845709] R10: ed100b2941ff R11: 8880594a0fff R12:
88805a0b2200
[   54.846702] R13: 0001 R14: 88805a171600 R15:
88806a2624c8
[   54.847700] FS:  () GS:88806d30()
knlGS:
[   54.848817] CS:  0010 DS:  ES:  CR0: 80050033
[   54.849602] CR2: 7fddbb634d30 CR3: 698d2000 CR4:
06e0
[   54.850570] Call Trace:
[   54.850946]  f2fs_submit_page_write+0x3cd/0xdd0
[   54.851577]  do_write_page+0x15d/0x360
[   54.852137]  f2fs_outplace_write_data+0xd7/0x210
[   54.852776]  ? f2fs_do_write_node_page+0x190/0x190
[   54.853449]  ? __save_stack_trace+0x7a/0xf0
[   54.854033]  f2fs_do_write_data_page+0x43b/0xf30
[   54.854672]  ? f2fs_should_update_outplace+0x1c0/0x1c0
[   54.855386]  ? kmem_cache_alloc+0xab/0x1b0
[   54.855956]  ? add_free_nid+0x5d/0x390
[   54.856479]  ? f2fs_write_node_pages+0xf5/0x5c0
[   54.857109]  ? do_writepages+0xbb/0x1e0
[   54.857650]  __write_data_page+0xcf6/0x1140
[   54.858234]  ? page_mapped+0xf8/0x1f0
[   54.858748]  ? f2fs_do_write_data_page+0xf30/0xf30
[   54.859419]  ? page_referenced+0x3d0/0x3d0
[   54.859985]  f2fs_write_cache_pages+0x3ba/0xb40
[   54.860617]  ? __write_data_page+0x1140/0x1140
[   54.861238]  ? xas_start+0xbf/0x1c0
[   54.861728]  ? __mutex_lock_slowpath+0x10/0x10
[   54.862349]  f2fs_write_data_pages+0x3dd/0x8b0
[   54.862975]  ? f2fs_write_cache_pages+0xb40/0xb40
[   54.863627]  ? f2fs_set_node_page_dirty+0x175/0x3a0
[   54.864299]  ? f2fs_inode_synced+0x1c7/0x200
[   54.864891]  ? memset+0x20/0x40
[   54.865336]  ? f2fs_write_cache_pages+0xb40/0xb40
[   54.865987]  do_writepages+0xbb/0x1e0
[   54.866504]  ? page_writeback_cpu_online+0x10/0x10
[   54.867175]  ? _raw_spin_lock+0x75/0xd0
[   54.867712]  ? _raw_spin_lock_irq+0xd0/0xd0
[   54.868311]  ? __wake_up_bit+0x84/0xe0
[   54.868867]  __writeback_single_inode+0xb6/0x800
[   54.869511]  ? inode_add_lru+0xd9/0x110
[   54.870046]  writeback_sb_inodes+0x441/0x910
[   54.870640]  ? sync_inode_metadata+0x100/0x100
[   54.871251]  ? queue_io+0x16b/0x220
[   54.871737]  wb_writeback+0x261/0x650
[   54.872237]  ? __writeback_inodes_wb+0x170/0x170
[   54.872874]  ? cwt_wakefn+0x60/0x60
[   54.873360]  ? _raw_spin_lock_bh+0x80/0xd0
[   54.873924]  ? _raw_read_unlock_irqrestore+0x20/0x20
[   54.874604]  ? __switch_to_asm+0x34/0x70
[   54.875151]  ? wb_workfn+0xc4/0x7a0
[   54.875644]  wb_workfn+0x1f9/0x7a0
[   54.876118]  ? inode_wait_for_writeback+0x40/0x40
[   54.876765]  ? __schedule+0x481/0xc80
[   54.877271]  ? _raw_spin_lock_irq+0x76/0xd0
[   54.877847]  ? read_word_at_a_time+0xe/0x20
[   54.878427]  ? strscpy+0xb2/0x180
[   54.878896]  process_one_work+0x503/0x970
[   54.879449]  worker_thread+0x7d/0x820
[   54.879952]  kthread+0x1ad/0x210
[   54.880400]  ? process_one_work+0x970/0x970
[   54.880960]  ? kthread_park+0x130/0x1

[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-04 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||c...@kernel.org

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Could you help to add below diff to check debug info?

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index bc5cea27b512..333285cb14c5 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -241,7 +241,7 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
struct bio *bio, enum page_type type)
 {
if (!is_read_io(bio_op(bio))) {
-   unsigned int start;
+   unsigned int start, ofs;

if (type != DATA && type != NODE)
goto submit_io;
@@ -256,7 +256,7 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
goto submit_io;

/* fill dummy pages */
-   for (; start < F2FS_IO_SIZE(sbi); start++) {
+   for (ofs = start; ofs < F2FS_IO_SIZE(sbi); ofs++) {
struct page *page =
mempool_alloc(sbi->write_io_dummy,
  GFP_NOIO | __GFP_NOFAIL);
@@ -266,8 +266,16 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
SetPagePrivate(page);
set_page_private(page, (unsigned
long)DUMMY_WRITTEN_PAGE);
lock_page(page);
-   if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE)
-   f2fs_bug_on(sbi, 1);
+   if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE)
{
+   printk("ofs:%u, start:%u, io_size:%u, "
+   "size:%u, vcnt:%u, max_vecs:%u",
+   ofs, start, F2FS_IO_SIZE(sbi),
+   bio->bi_iter.bi_size,
+   bio->bi_vcnt,
+   bio->bi_max_vecs);
+   WARN_ON(1);
+   break;
+   }
}
/*
 * In the NODE case, we lose next block address chain. So, we

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-07 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

--- Comment #2 from midwinter1...@gmail.com ---
(In reply to Chao Yu from comment #1)
> Could you help to add below diff to check debug info?
> 
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index bc5cea27b512..333285cb14c5 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -241,7 +241,7 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
>   struct bio *bio, enum page_type type)
>  {
>   if (!is_read_io(bio_op(bio))) {
> - unsigned int start;
> + unsigned int start, ofs;
>  
>   if (type != DATA && type != NODE)
>   goto submit_io;
> @@ -256,7 +256,7 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
>   goto submit_io;
>  
>   /* fill dummy pages */
> - for (; start < F2FS_IO_SIZE(sbi); start++) {
> + for (ofs = start; ofs < F2FS_IO_SIZE(sbi); ofs++) {
>   struct page *page =
>   mempool_alloc(sbi->write_io_dummy,
> GFP_NOIO | __GFP_NOFAIL);
> @@ -266,8 +266,16 @@ static inline void __submit_bio(struct f2fs_sb_info
> *sbi,
>   SetPagePrivate(page);
>   set_page_private(page, (unsigned 
> long)DUMMY_WRITTEN_PAGE);
>   lock_page(page);
> - if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE)
> - f2fs_bug_on(sbi, 1);
> + if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) {
> + printk("ofs:%u, start:%u, io_size:%u, "
> + "size:%u, vcnt:%u, max_vecs:%u",
> + ofs, start, F2FS_IO_SIZE(sbi),
> + bio->bi_iter.bi_size,
> + bio->bi_vcnt,
> + bio->bi_max_vecs);
> + WARN_ON(1);
> + break;
> + }
>   }
>   /*
>* In the NODE case, we lose next block address chain. So, we

Hi!

I patched the kernel, and after I run the test case about 7 times, a warning
occurred:

[   78.460040] F2FS-fs (loop0): Test dummy encryption mount option ignored
[   78.464621] F2FS-fs (loop0): Found nat_bits in checkpoint
[   78.479864] F2FS-fs (loop0): Mounted with checkpoint version = aaca8fb
[   78.482474] F2FS-fs (loop0): Test dummy encryption mount option ignored
[   78.483451] F2FS-fs (loop0): switch extent_cache option is not allowed
[   78.691092] ofs:1, start:1, io_size:8, size:1085440, vcnt:256, max_vecs:256
[   78.691161] WARNING: CPU: 1 PID: 1072 at fs/f2fs/data.c:323
__submit_merged_bio.cold+0x74/0x7c
[   78.693234] Modules linked in:
[   78.693579] CPU: 1 PID: 1072 Comm: kworker/u4:3 Not tainted 5.1.3 #8
[   78.694330] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
Ubuntu-1.8.2-1ubuntu1 04/01/2014
[   78.695523] Workqueue: writeback wb_workfn (flush-7:0)
[   78.696109] RIP: 0010:__submit_merged_bio.cold+0x74/0x7c
[   78.696762] Code: 00 00 00 45 89 e1 41 89 e8 41 8b 8d bc 04 00 00 41 57 48
c7 c7 80 6f dd 8c 8b 54 24 3c 8b 74 24 10 d3 e0 89 c1 e8 50 01 68 ff <0f> 0b 58
e9 15 c3 fe ff e8 9a 4f 73 ff 49 8d 7c 24 5a e8 60 89 89
[   78.699018] RSP: 0018:888117fa7140 EFLAGS: 00010282
[   78.699620] RAX: 003f RBX: 88810828bb40 RCX:

[   78.700530] RDX:  RSI: 0278 RDI:
ed1022ff4e1a
[   78.701337] RBP: 00109000 R08: 003f R09:
fbfff1c7766c
[   78.702027] R10: fbfff1c7766b R11: 8e3bb35e R12:
0100
[   78.702874] R13: 888107a1a200 R14: 888108101500 R15:
0100
[   78.703735] FS:  () GS:88811b50()
knlGS:
[   78.704722] CS:  0010 DS:  ES:  CR0: 80050033
[   78.705383] CR2: 5615108e12d8 CR3: 000107c58000 CR4:
06e0
[   78.706229] Call Trace:
[   78.706498]  f2fs_submit_page_write+0x3cd/0xdd0
[   78.707014]  do_write_page+0x15d/0x360
[   78.707453]  f2fs_outplace_write_data+0xd7/0x210
[   78.707985]  ? f2fs_do_write_node_page+0x190/0x190
[   78.708549]  ? __enqueue_entity+0xae/0xe0
[   78.709047]  f2fs_do_write_data_page+0x43b/0xf30
[   78.709590]  ? f2fs_should_update_outplace+0x1c0/0x1c0
[   78.710177]  ? __switch_to_asm+0x34/0x70
[   78.710602]  ? __switch_to_asm+0x40/0x70
[   78.711067]  ? __switch_to_asm+0x34/0x70
[   78.711534]  ? finish_task_switch+0x145/0x370
[   78.712048]  ? __switch_to_asm+0x34/0x70
[   78.712497]  ? __switch_to_asm+0x40/0x70
[   78.712959]  __write_data_page+0xcf6/0x1140
[   78.713461]  ? page_mapped+0xf8/0x1f0
[   78.713870]  ? f2fs_do_write_data_page+0xf30/0xf30
[   78.714462]  ? page_referenced+0x3d0/0x3d0
[   78.714909]  ? _raw_wr

[f2fs-dev] [Bug 203223] hangs on running program after mounting a crafted image

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203223

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203231] kernel BUG at fs/f2fs/segment.c:2079! and hangs on sync

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203231

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203235] kernel BUG at fs/f2fs/segment.c:2131! and hangs on sync

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203235

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203233] kernel BUG at fs/f2fs/segment.c:2102!

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203233

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203345] page fault and hang on mounting crafted image and running program

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203345

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203163] RIP: 0010:update_sit_entry+0x50/0x420 when mounting crafted image

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203163

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203165] Kernel panic - not syncing: corrupted stack end detected inside scheduler

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203165

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203341] Kernel read fault when mounting a crafted image and running program

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203341

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203167] Kernel page fault with update_sit_entry+0x113/0x420

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203167

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203171] PF error: at __remove_dirty_segment+0x61/0xd0

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203171

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203215] failure at fs/f2fs/f2fs.h:2809/verify_blkaddr()!

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203215

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203241] kernel BUG at fs/f2fs/segment.c:3222! and hangs on sync

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203241

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |CODE_FIX

--- Comment #1 from Jungyeon (jungy...@gatech.edu) ---
f2fs: introduce DATA_GENERIC_ENHANCE

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203343] page fault and hang on umounting

2019-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203343

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |PATCH_ALREADY_AVAILABLE

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203861] Division by zero error in fsck.f2fs when fixing a corrupted image

2019-07-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203861

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||c...@kernel.org

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Sorry for the long delay, I forgot to reply this thread to let you know we have
fixed this issue with below patch, could you please check it with your
testcase?

https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?h=dev&id=d5bec9021f50f3d1e05aee3fe76160dc234c1735

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204135] New: F2FS: BUG: KASAN: null-ptr-deref in mempool_alloc+0xd8/0x2e0

2019-07-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204135

Bug ID: 204135
   Summary: F2FS: BUG: KASAN: null-ptr-deref in
mempool_alloc+0xd8/0x2e0
   Product: File System
   Version: 2.5
Kernel Version: 5.1.3
  Hardware: All
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: f2fs
  Assignee: filesystem_f...@kernel-bugs.kernel.org
  Reporter: midwinter1...@gmail.com
Regression: No

The following script triggers a KASAN null pointer dereference in f2fs file
system.

I tested under kernel 5.1.3 using Qemu; this bug may not happen every time but
according to my tries, it almost happens deterministically.

```
#!/bin/bash

MOUNT_DIR=/root/mnt
DISK=xx.img

dd if=/dev/zero of=$DISK bs=1M count=192
mkfs.f2fs -a 0 -o 19 -t 1 -z 3 -f -q $DISK


mkdir -pv $MOUNT_DIR

mount $DISK $MOUNT_DIR -o "noextent_cache"

mkdir $MOUNT_DIR/Umfoo_28

mount $DISK $MOUNT_DIR -o "remount,noextent_cache,mode=lfs,io_bits=7" # BUG
OCCURS

umount $MOUNT_DIR
```


--- Core dump ---
[   35.256703]
==
[   35.257772] BUG: KASAN: null-ptr-deref in mempool_alloc+0xd8/0x2e0
[   35.258646] Read of size 8 at addr 0020 by task umount/2161
[   35.259591] 
[   35.259833] CPU: 0 PID: 2161 Comm: umount Not tainted 5.1.3 #8
[   35.260646] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
Ubuntu-1.8.2-1ubuntu1 04/01/2014
[   35.261953] Call Trace:
[   35.262315]  dump_stack+0x8a/0xce
[   35.262787]  ? mempool_alloc+0xd8/0x2e0
[   35.263330]  ? mempool_alloc+0xd8/0x2e0
[   35.263819]  kasan_report.cold+0x5/0x32
[   35.264199]  ? mempool_alloc+0xd8/0x2e0
[   35.264678]  mempool_alloc+0xd8/0x2e0
[   35.265197]  ? mempool_resize+0x410/0x410
[   35.265760]  ? blk_init_request_from_bio+0xd0/0xd0
[   35.266439]  ? __write_data_page+0x4c9/0x1140
[   35.267063]  __submit_merged_bio+0x519/0x8c0
[   35.267671]  __submit_merged_write_cond+0x41a/0x520
[   35.268373]  f2fs_write_cache_pages+0xb08/0xb40
[   35.269021]  ? __write_data_page+0x1140/0x1140
[   35.269658]  ? update_group_capacity+0x340/0x340
[   35.270320]  f2fs_write_data_pages+0x796/0x8b0
[   35.270962]  ? f2fs_write_cache_pages+0xb40/0xb40
[   35.271631]  ? deref_stack_reg+0x84/0xd0
[   35.272195]  ? __read_once_size_nocheck.constprop.0+0x10/0x10
[   35.273005]  ? __orc_find+0x63/0xc0
[   35.273499]  ? unwind_next_frame+0x8a8/0x9b0
[   35.274104]  ? f2fs_write_cache_pages+0xb40/0xb40
[   35.274767]  do_writepages+0xbb/0x1e0
[   35.275287]  ? page_writeback_cpu_online+0x10/0x10
[   35.275970]  ? __orc_find+0x63/0xc0
[   35.276464]  ? stack_access_ok+0x35/0x90
[   35.277039]  ? unwind_next_frame+0x8a8/0x9b0
[   35.277644]  ? __update_load_avg_cfs_rq+0x2f/0x4a0
[   35.278340]  ? rb_next+0x33/0x80
[   35.278800]  __filemap_fdatawrite_range+0x142/0x1d0
[   35.279488]  ? delete_from_page_cache_batch+0x650/0x650
[   35.280239]  ? _raw_spin_lock_irq+0xd0/0xd0
[   35.280833]  f2fs_sync_dirty_inodes+0x167/0x490
[   35.281475]  f2fs_write_checkpoint+0x462/0x2f70
[   35.282115]  ? __schedule+0x481/0xc80
[   35.282633]  ? update_cfs_group+0x1d/0x1a0
[   35.283213]  ? __enqueue_entity+0xae/0xe0
[   35.283786]  ? pci_mmcfg_check_reserved+0x130/0x130
[   35.284478]  ? _raw_spin_lock_irq+0x76/0xd0
[   35.285073]  ? f2fs_wait_on_all_pages_writeback+0x1a0/0x1a0
[   35.285859]  ? try_to_wake_up+0xa4/0x750
[   35.286416]  ? bit_wait_io_timeout+0xc0/0xc0
[   35.287021]  ? __migrate_task.isra.0+0xa0/0xa0
[   35.287650]  ? pin_kill+0x121/0x260
[   35.288152]  ? pin_insert+0x30/0x30
[   35.288648]  ? kthread_stop+0x11b/0x260
[   35.289191]  kill_f2fs_super+0x1e7/0x210
[   35.289746]  ? __f2fs_commit_super+0xc0/0xc0
[   35.290347]  ? xas_start+0xbf/0x1c0
[   35.290846]  ? unregister_shrinker+0x9e/0xc0
[   35.291446]  ? kfree+0x9b/0x1c0
[   35.291899]  deactivate_locked_super+0x69/0xc0
[   35.292525]  deactivate_super+0x14e/0x160
[   35.293094]  ? iterate_supers_type+0x1c0/0x1c0
[   35.293723]  cleanup_mnt+0x71/0xc0
[   35.294207]  task_work_run+0x100/0x120
[   35.294663]  exit_to_usermode_loop+0x175/0x180
[   35.295149]  do_syscall_64+0x1f1/0x230
[   35.295560]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   35.296114] RIP: 0033:0x7fe8e01f6d77
[   35.296509] Code: 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00
31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01
f0 ff ff 73 01 c3 48 8b 0d f1 00 2b 00 f7 d8 64 89 01 48
[   35.298601] RSP: 002b:747cec68 EFLAGS: 0246 ORIG_RAX:
00a6
[   35.299401] RAX:  RBX: 55f947ec7080 RCX:
7fe8e01f6d77
[   35.300151] RDX: 0001 RSI:  RDI:
55f947ec7260
[   35.300950] RBP: 55f947ec7260 R08: 55f947ec7280 R09:
0014
[   35.301707] R10: 06b4 R11: 0246 R12:
7fe8e06f8e64
[   35.302

[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

--- Comment #3 from Chao Yu (c...@kernel.org) ---
Could you help to test below two commits?

f2fs: introduce {page,io}_is_mergeable() for readability
f2fs: fix panic of IO alignment feature

https://lore.kernel.org/linux-f2fs-devel/1562841517-77910-1-git-send-email-yuch...@huawei.com/T/#t

https://lore.kernel.org/linux-f2fs-devel/1562841517-77910-2-git-send-email-yuch...@huawei.com/T/#u

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204137] New: F2FS: kernel BUG at fs/f2fs/segment.c:2375!

2019-07-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204137

Bug ID: 204137
   Summary: F2FS: kernel BUG at fs/f2fs/segment.c:2375!
   Product: File System
   Version: 2.5
Kernel Version: 5.1.3
  Hardware: All
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: f2fs
  Assignee: filesystem_f...@kernel-bugs.kernel.org
  Reporter: midwinter1...@gmail.com
Regression: No

The following script triggers a bug in f2fs under kernel 5.1.3

```
#!/bin/bash

DISK=bingo.img
MOUNT_DIR=/root/mnt

dd if=/dev/zero of=$DISK bs=1M count=105
mkfs.f2fs -a 1 -o 19 -t 1 -z 1 -f -q $DISK


mkdir -pv $MOUNT_DIR

mount $DISK $MOUNT_DIR -o
"noinline_dentry,flush_merge,noextent_cache,mode=lfs,io_bits=7,fsync_mode=strict"

for (( i = 0; i < 4096; i++ )); do
name=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 10`
mkdir $MOUNT_DIR/$name
done

umount $MOUNT_DIR
```

--- Core dump ---
[   30.151113] [ cut here ]
[   30.151670] kernel BUG at fs/f2fs/segment.c:2375!
[   30.152273] invalid opcode:  [#1] SMP KASAN PTI
[   30.152914] CPU: 0 PID: 2190 Comm: runner-1 Not tainted 5.1.3 #8
[   30.153743] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
Ubuntu-1.8.2-1ubuntu1 04/01/2014
[   30.155075] RIP: 0010:new_curseg+0x845/0x870
[   30.155667] Code: e8 e0 88 87 ff 44 0f af ad e0 03 00 00 89 df 44 89 ee e8
fe 4e 71 ff 44 39 eb 0f 83 89 fa ff ff e9 13 fd ff ff e8 fb 4d 71 ff <0f> 0b e8
f4 4d 71 ff 44 89 e0 31 d2 41 f7 f7 89 04 24 e9 b8 f9 ff
[   30.158171] RSP: 0018:88810bb7ed68 EFLAGS: 00010293
[   30.158889] RAX: 888108911980 RBX: 002c RCX:
8c0fd7b5
[   30.159850] RDX:  RSI: 002c RDI:
0004
[   30.160812] RBP: 88810bd92a80 R08: 888108911980 R09:
ed102176fda3
[   30.161777] R10: ed102176fda2 R11: 0003 R12:
002c
[   30.162746] R13: 002c R14:  R15:
002c
[   30.163703] FS:  029c08c0() GS:88811b40()
knlGS:
[   30.164785] CS:  0010 DS:  ES:  CR0: 80050033
[   30.165563] CR2: 02d25068 CR3: 00010a5ce000 CR4:
06f0
[   30.166535] Call Trace:
[   30.166888]  allocate_segment_by_default+0x23a/0x720
[   30.167570]  ? f2fs_is_valid_blkaddr+0x9d/0x460
[   30.168191]  ? new_curseg+0x870/0x870
[   30.168702]  ? ktime_get_real_seconds+0x5/0x10
[   30.169311]  ? update_sit_entry+0x570/0x9b0
[   30.169888]  f2fs_allocate_data_block+0x446/0xf50
[   30.170539]  do_write_page+0x1d1/0x360
[   30.171058]  f2fs_outplace_write_data+0xd7/0x210
[   30.171688]  ? f2fs_do_write_node_page+0x190/0x190
[   30.172340]  ? __enqueue_entity+0xae/0xe0
[   30.172894]  f2fs_do_write_data_page+0x43b/0xf30
[   30.173530]  ? f2fs_should_update_outplace+0x1c0/0x1c0
[   30.174234]  ? __switch_to_asm+0x34/0x70
[   30.174783]  ? __switch_to_asm+0x40/0x70
[   30.175323]  ? __switch_to_asm+0x34/0x70
[   30.175865]  ? finish_task_switch+0x145/0x370
[   30.176467]  ? __switch_to_asm+0x34/0x70
[   30.177006]  ? __switch_to_asm+0x40/0x70
[   30.177548]  __write_data_page+0x10e7/0x1140
[   30.178137]  ? page_mapped+0xf8/0x1f0
[   30.178651]  ? f2fs_do_write_data_page+0xf30/0xf30
[   30.179305]  ? page_referenced+0x3d0/0x3d0
[   30.179871]  f2fs_write_cache_pages+0x3ba/0xb40
[   30.180496]  ? __write_data_page+0x1140/0x1140
[   30.181104]  ? deref_stack_reg+0x20/0xd0
[   30.181645]  ? __read_once_size_nocheck.constprop.0+0x10/0x10
[   30.182398]  ? __se_sys_keyctl+0x241/0x3e0
[   30.182971]  ? _raw_spin_lock+0x75/0xd0
[   30.183501]  ? _raw_spin_lock_irq+0xd0/0xd0
[   30.184075]  ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   30.184774]  ? __sanitizer_cov_trace_switch+0x45/0x70
[   30.185466]  ? f2fs_remove_dirty_inode+0x2a9/0x2e0
[   30.186124]  f2fs_write_data_pages+0x796/0x8b0
[   30.186742]  ? f2fs_write_cache_pages+0xb40/0xb40
[   30.187356]  ? __kasan_slab_free+0x1ba/0x220
[   30.187946]  ? f2fs_write_cache_pages+0xb40/0xb40
[   30.188592]  do_writepages+0xbb/0x1e0
[   30.189099]  ? f2fs_mkdir+0x1ed/0x340
[   30.189607]  ? page_writeback_cpu_online+0x10/0x10
[   30.190263]  ? __f2fs_setxattr+0x15e/0xf70
[   30.190836]  ? __find_xattr+0xf0/0xf0
[   30.191348]  __filemap_fdatawrite_range+0x142/0x1d0
[   30.192032]  ? delete_from_page_cache_batch+0x650/0x650
[   30.192765]  ? _raw_spin_lock_irq+0xd0/0xd0
[   30.193348]  f2fs_sync_dirty_inodes+0x167/0x490
[   30.193974]  f2fs_write_checkpoint+0x462/0x2f70
[   30.194606]  ? __read_once_size_nocheck.constprop.0+0x10/0x10
[   30.195389]  ? lsm_ipc_alloc.isra.0+0x80/0x80
[   30.195988]  ? __orc_find+0x63/0xc0
[   30.196471]  ? unwind_next_frame+0x8a8/0x9b0
[   30.197059]  ? stack_access_ok+0x35/0x90
[   30.197597]  ? f2fs_wait_on_all_pages_writeback+0x1a0/0x1a0
[   30.198357]  ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   3

[f2fs-dev] [Bug 203169] crash at fs/f2fs/checkpoint.c:160 f2fs_is_valid_blkaddr

2019-07-12 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203169

Jungyeon (jungy...@gatech.edu) changed:

   What|Removed |Added

 Status|NEEDINFO|CLOSED
 Resolution|--- |CODE_FIX

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203861] Division by zero error in fsck.f2fs when fixing a corrupted image

2019-07-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203861

--- Comment #2 from Seulbae Kim (seul...@gatech.edu) ---
No problem. I checked that the bug is fixed through the patch.
Thank you!

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 203861] Division by zero error in fsck.f2fs when fixing a corrupted image

2019-07-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203861

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |CODE_FIX

--- Comment #3 from Chao Yu (c...@kernel.org) ---
Thanks for confirming that! :)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

--- Comment #4 from Chao Yu (c...@kernel.org) ---
Sorry, previous version is broken... I've updated them.

https://lore.kernel.org/linux-f2fs-devel/20190712085542.4068-1-yuch...@huawei.com/T/#u

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204135] F2FS: BUG: KASAN: null-ptr-deref in mempool_alloc+0xd8/0x2e0

2019-07-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204135

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||c...@kernel.org

--- Comment #1 from Chao Yu (c...@kernel.org) ---
I've sent one patch to fix this issue, just simply refusing remount w/ io_bits
change, could you have a try?

https://lore.kernel.org/linux-f2fs-devel/20190712085700.4239-1-yuch...@huawei.com/T/#u

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

--- Comment #5 from midwinter1...@gmail.com ---
(In reply to Chao Yu from comment #4)
> Sorry, previous version is broken... I've updated them.
> 
> https://lore.kernel.org/linux-f2fs-devel/20190712085542.4068-1-
> yuch...@huawei.com/T/#u

Sorry! I have not tested these patches yet. :(

I have just tried the updated patch but failed.
It seems inconsistent with kernel-5.1.3?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204135] F2FS: BUG: KASAN: null-ptr-deref in mempool_alloc+0xd8/0x2e0

2019-07-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204135

--- Comment #2 from midwinter1...@gmail.com ---
(In reply to Chao Yu from comment #1)
> I've sent one patch to fix this issue, just simply refusing remount w/
> io_bits change, could you have a try?
> 
> https://lore.kernel.org/linux-f2fs-devel/20190712085700.4239-1-
> yuch...@huawei.com/T/#u

I have tested this patch but have compiling errors:

> /linux-5.1.3/fs/f2fs/super.c:1538:22: error: implicit declaration of function 
> F2FS_IO_ALIGNED; did you mean F2FS_BLK_ALIGN? 
> [-Werror=implicit-function-declaration]

> /linux-5.1.3/fs/f2fs/super.c:1621:3: error: implicit declaration of function 
> f2fs_warn [-Werror=implicit-function-declaration]

I "grep" the whole file system directory but not found the symbol
"F2FS_IO_ALIGNED" and "f2fs_warn".

Should I change the kernel version to test?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204135] F2FS: BUG: KASAN: null-ptr-deref in mempool_alloc+0xd8/0x2e0

2019-07-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204135

--- Comment #3 from Chao Yu (c...@kernel.org) ---
F2FS_IO_ALIGNED() was defined in last patch for your previous issue... so,
should apply them before this patch.

Could you change to last code in dev branch in Jaegeuk's git repo.

https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/log/?h=dev

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

  Comment #6 is|1   |0
private||

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 202495] oops in fs/f2fs/checkpoint.c:150 f2fs_is_valid_blkaddr

2019-07-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=202495

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |PATCH_ALREADY_AVAILABLE

--- Comment #6 from Chao Yu (c...@kernel.org) ---
Was fixed with a backported patch ("f2fs: fix to skip verifying block address
for non-regular inode")

Close it.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204193] New: BUG: KASAN: null-ptr-deref in f2fs_write_end_io+0x215/0x650

2019-07-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204193

Bug ID: 204193
   Summary: BUG: KASAN: null-ptr-deref in
f2fs_write_end_io+0x215/0x650
   Product: File System
   Version: 2.5
Kernel Version: 5.1.3
  Hardware: All
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: f2fs
  Assignee: filesystem_f...@kernel-bugs.kernel.org
  Reporter: midwinter1...@gmail.com
Regression: No

A null pointer dereference bug is triggered in f2fs under kernel-5.1.3.


--- Core dump ---
[   81.996211] BUG: KASAN: null-ptr-deref in f2fs_write_end_io+0x215/0x650
[   81.997150] Read of size 8 at addr 0030 by task swapper/1/0
[   81.998084] 
[   81.998312] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.1.3 #10
[   81.999142] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
Ubuntu-1.8.2-1ubuntu1 04/01/2014
[   82.000470] Call Trace:
[   82.000829]  
[   82.001133]  dump_stack+0x8a/0xce
[   82.001616]  ? f2fs_write_end_io+0x215/0x650
[   82.002234]  ? f2fs_write_end_io+0x215/0x650
[   82.002848]  kasan_report.cold+0x5/0x32
[   82.003403]  ? f2fs_write_end_io+0x215/0x650
[   82.004017]  f2fs_write_end_io+0x215/0x650
[   82.004606]  ? __read_end_io+0x360/0x360
[   82.005176]  bio_endio+0x26e/0x320
[   82.005671]  blk_update_request+0x209/0x5d0
[   82.006286]  blk_mq_end_request+0x2e/0x230
[   82.006881]  lo_complete_rq+0x12c/0x190
[   82.007437]  blk_done_softirq+0x14a/0x1a0
[   82.008015]  ? blk_try_merge+0x120/0x120
[   82.008584]  ? pvclock_clocksource_read+0xd9/0x1a0
[   82.009273]  __do_softirq+0x119/0x3e5
[   82.009801]  ? blk_done_softirq+0x1a0/0x1a0
[   82.010409]  ? flush_smp_call_function_queue+0x10d/0x220
[   82.011164]  irq_exit+0x94/0xe0
[   82.011621]  call_function_single_interrupt+0xf/0x20
[   82.012327]  
[   82.012639] RIP: 0010:default_idle+0x64/0x1f0
[   82.013263] Code: c7 c7 a0 c8 99 85 e8 9b 9a 82 fe 48 c7 c7 a0 c8 99 85 e8
bf b6 82 fe 8b 05 e9 1e c5 01 85 c0 7e 07 0f 00 2d 7e 45 4d 00 fb f4 <65> 8b 2d
65 d7 2c 7c be 04 00 00 00 48 c7 c7 88 53 07 85 e8 64 9a
[   82.015868] RSP: 0018:88811ab9fdf0 EFLAGS: 0246 ORIG_RAX:
ff04
[   82.016933] RAX:  RBX: 88811ab88cc0 RCX:
83d4a9b1
[   82.017932] RDX: 0003 RSI: dc00 RDI:
8599c8a0
[   82.018940] RBP: 0001 R08: 88811ab88cc0 R09:
fbfff0b33915
[   82.019936] R10: fbfff0b33914 R11: 0003 R12:
88811ab88cc0
[   82.020936] R13:  R14:  R15:
88811ab88cc0
[   82.021941]  ? default_idle+0x51/0x1f0
[   82.022489]  do_idle+0x25a/0x2b0
[   82.022958]  ? arch_cpu_idle_exit+0x30/0x30
[   82.023557]  ? schedule_idle+0x34/0x50
[   82.024095]  cpu_startup_entry+0x14/0x20
[   82.024657]  start_secondary+0x206/0x250
[   82.025219]  ? set_cpu_sibling_map+0x970/0x970
[   82.025855]  secondary_startup_64+0xa4/0xb0
[   82.026455]
==
[   82.027466] Disabling lock debugging due to kernel taint
[   82.028266] BUG: unable to handle kernel NULL pointer dereference at
0030
[   82.029367] #PF error: [normal kernel read fault]
[   82.030038] PGD 0 P4D 0 
[   82.030412] Oops:  [#1] SMP KASAN PTI
[   82.030985] CPU: 1 PID: 0 Comm: swapper/1 Tainted: GB 5.1.3
#10
[   82.032008] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
Ubuntu-1.8.2-1ubuntu1 04/01/2014
[   82.05] RIP: 0010:f2fs_write_end_io+0x21e/0x650
[   82.034035] Code: 00 e8 a6 83 74 ff 48 8d 7d 78 e8 5d bf 8a ff 48 8b 45 78
48 8d 78 30 48 89 44 24 08 e8 4b bf 8a ff 48 8b 44 24 08 48 8b 0c 24 <48> 39 48
30 0f 84 35 03 00 00 e8 73 83 74 ff 4e 8d a4 a5 28 04 00
[   82.036593] RSP: 0018:88811b507d70 EFLAGS: 00010286
[   82.037337] RAX:  RBX: ea0004276c00 RCX:
8881098bc160
[   82.038349] RDX: 10b41557 RSI: 0246 RDI:
85a0aab8
[   82.039345] RBP: 88810a4a9100 R08: 002c R09:
ed10236a3c9b
[   82.040349] R10: ed10236a3c9a R11: 88811b51e4d7 R12:
0007
[   82.041350] R13: 888116b1ac00 R14:  R15:
0001
[   82.042357] FS:  () GS:88811b50()
knlGS:
[   82.043488] CS:  0010 DS:  ES:  CR0: 80050033
[   82.044305] CR2: 0030 CR3: 00010c12c000 CR4:
06e0
[   82.045307] Call Trace:
[   82.045665]  
[   82.045957]  ? __read_end_io+0x360/0x360
[   82.046523]  bio_endio+0x26e/0x320
[   82.047002]  blk_update_request+0x209/0x5d0
[   82.047607]  blk_mq_end_request+0x2e/0x230
[   82.048176]  lo_complete_rq+0x12c/0x190
[   82.048713]  blk_done_softirq+0x14a/0x1a0
[   82.049324]  ? blk_try_merge+0x120/0x120
[   82.049889]  ? pvclock_clocksource_read+0xd9/0x1a0
[   82.050573]  __do_softirq+0x119/0x

[f2fs-dev] [Bug 204197] New: F2FS: kernel BUG at fs/f2fs/inode.c:722!

2019-07-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204197

Bug ID: 204197
   Summary: F2FS: kernel BUG at fs/f2fs/inode.c:722!
   Product: File System
   Version: 2.5
Kernel Version: 5.1.3
  Hardware: All
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: f2fs
  Assignee: filesystem_f...@kernel-bugs.kernel.org
  Reporter: midwinter1...@gmail.com
Regression: No

A bug was triggered in f2fs.
I will provide the triggering script soon.



--- Core dump ---
[   47.368206] kernel BUG at fs/f2fs/inode.c:722!
[   47.368833] invalid opcode:  [#1] SMP KASAN PTI
[   47.369378] CPU: 0 PID: 2232 Comm: umount Not tainted 5.1.3 #10
[   47.370041] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
Ubuntu-1.8.2-1ubuntu1 04/01/2014
[   47.371214] RIP: 0010:f2fs_evict_inode+0xa13/0xa60
[   47.371792] Code: e9 04 f9 ff ff 4c 8b 6c 24 38 e8 78 58 78 ff 31 ff 89 de
e8 df 59 78 ff 85 db 0f 84 7e fd ff ff e9 1c ff ff ff e8 5d 58 78 ff <0f> 0b e8
56 58 78 ff 48 c7 c7 48 e0 ca 84 48 8b 5c 24 70 e8 05 94
[   47.374202] RSP: 0018:888116897b50 EFLAGS: 00010293
[   47.374875] RAX: 888106af8000 RBX: 0001 RCX:
82c8cd53
[   47.375790] RDX:  RSI:  RDI:
0007
[   47.376708] RBP: 8880b9f5dc80 R08: 888106af8000 R09:
ed1021198ab1
[   47.377651] R10: ed1021198ab0 R11: 888108cc5587 R12:
88811a576600
[   47.378545] R13: 8880b9f5ded0 R14: 8880b9f5df20 R15:
8880b9f5df00
[   47.379461] FS:  7f151521ae40() GS:88811b40()
knlGS:
[   47.380517] CS:  0010 DS:  ES:  CR0: 80050033
[   47.381229] CR2: 7f1514df0cb1 CR3: 000106418000 CR4:
06f0
[   47.382131] Call Trace:
[   47.382404]  ? _raw_spin_lock_irq+0xd0/0xd0
[   47.382933]  ? f2fs_write_inode+0x5d0/0x5d0
[   47.383450]  evict+0x19c/0x340
[   47.383791]  dispose_list+0x72/0xa0
[   47.384239]  evict_inodes+0x2ce/0x310
[   47.384688]  ? dispose_list+0xa0/0xa0
[   47.385126]  ? filemap_write_and_wait+0x88/0xc0
[   47.385695]  ? __sync_blockdev+0x54/0x90
[   47.386140]  generic_shutdown_super+0x6c/0x1d0
[   47.386716]  kill_block_super+0x54/0x90
[   47.387170]  kill_f2fs_super+0x172/0x210
[   47.387632]  ? __f2fs_commit_super+0xc0/0xc0
[   47.388153]  ? xas_start+0xbf/0x1c0
[   47.388572]  ? unregister_shrinker+0x9e/0xc0
[   47.389009]  ? kfree+0x9b/0x1c0
[   47.389321]  deactivate_locked_super+0x69/0xc0
[   47.389751]  deactivate_super+0x14e/0x160
[   47.390141]  ? iterate_supers_type+0x1c0/0x1c0
[   47.390573]  cleanup_mnt+0x71/0xc0
[   47.390911]  task_work_run+0x100/0x120
[   47.391279]  exit_to_usermode_loop+0x175/0x180
[   47.391709]  do_syscall_64+0x1f1/0x230
[   47.392076]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   47.392668] RIP: 0033:0x7f1514afcd77
[   47.393272] Code: 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00
31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01
f0 ff ff 73 01 c3 48 8b 0d f1 00 2b 00 f7 d8 64 89 01 48
[   47.395802] RSP: 002b:7fffe97ea0e8 EFLAGS: 0246 ORIG_RAX:
00a6
[   47.396839] RAX:  RBX: 557449b4c500 RCX:
7f1514afcd77
[   47.397809] RDX: 0001 RSI:  RDI:
557449b4c6e0
[   47.398773] RBP: 557449b4c6e0 R08: 557449b4c700 R09:
0014
[   47.399735] R10: 06b4 R11: 0246 R12:
7f1514ffee64
[   47.400703] R13:  R14:  R15:
7fffe97ea370
[   47.401665] Modules linked in:
[   47.402092] Dumping ftrace buffer:
[   47.402562](ftrace buffer empty)
[   47.403089] ---[ end trace 6f7cea09b723ae50 ]---

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204193] BUG: KASAN: null-ptr-deref in f2fs_write_end_io+0x215/0x650

2019-07-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204193

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 CC||c...@kernel.org

--- Comment #1 from Chao Yu (c...@kernel.org) ---
How to reproduce this, remount to change io_bits option?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 202495] oops in fs/f2fs/checkpoint.c:150 f2fs_is_valid_blkaddr

2019-07-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=202495

--- Comment #7 from phiber2...@gmx.de ---
(In reply to Chao Yu from comment #6)
> Was fixed with a backported patch ("f2fs: fix to skip verifying block
> address for non-regular inode")

Maybe my mistake, but I can't find the backported patch in the v4.14.y branch.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=linux-4.14.y&qt=grep&q=f2fs

Could you just check that?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 202495] oops in fs/f2fs/checkpoint.c:150 f2fs_is_valid_blkaddr

2019-07-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=202495

--- Comment #8 from Chao Yu (c...@kernel.org) ---
It's here, it should be merged in AOSP as well. :)

https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git/commit/?h=linux-4.14.y&id=3cc9792fa1ea67bbfdaee28737e37f9045976b76

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204193] BUG: KASAN: null-ptr-deref in f2fs_write_end_io+0x215/0x650

2019-07-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204193

--- Comment #2 from midwinter1...@gmail.com ---
(In reply to Chao Yu from comment #1)
> How to reproduce this, remount to change io_bits option?

It's not triggered by remount, the following script manifests it (note that
this bug does not occur deterministically, you may execute it repeatedly):


```
#!/bin/bash

DISK=bingo.img
MOUNT_DIR=/root/mnt

dd if=/dev/zero of=$DISK bs=1M count=180
mkfs.f2fs -a 1 -o 9 -t 0 -z 10 -f -q $DISK


mkdir -pv $MOUNT_DIR

# A little bit long options, I have not reduced it yet.
mount $DISK $MOUNT_DIR -o
"background_gc=on,disable_roll_forward,no_heap,nouser_xattr,active_logs=2,disable_ext_identify,inline_dentry,noinline_dentry,flush_merge,nobarrier,noextent_cache,noinline_data,checkpoint=disable,usrquota,grpquota,quota,noquota,alloc_mode=reuse,fsync_mode=posix"

mkdir -pv $MOUNT_DIR/a

new_dir="$MOUNT_DIR/a"
for (( i = 0; i < 512; i++ )); do
name=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 1`
new_dir="$new_dir/$name"
mkdir $new_dir
done


mv "$MOUNT_DIR/a" "$MOUNT_DIR/b1"

mkdir -pv "$MOUNT_DIR/b1/b2/b3/b4/b5"

sync

for (( i = 0; i < 4096; i++ )); do
name=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 10`
mkdir $MOUNT_DIR/b1/b2/b3/b4/b5/$name
done

umount $MOUNT_DIR
```

Sorry that I didn't provide the script before because it's tedious for me to
reduce it. :(

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204193] BUG: KASAN: null-ptr-deref in f2fs_write_end_io+0x215/0x650

2019-07-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204193

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #3 from Chao Yu (c...@kernel.org) ---
Thanks, I can reproduce it now.

I've made a patch for this issue, could you verify it?

https://lore.kernel.org/linux-f2fs-devel/20190718083959.32321-1-yuch...@huawei.com/T/#u

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

--- Comment #7 from midwinter1...@gmail.com ---
(In reply to Chao Yu from comment #6)
> You mean it failed when you apply those patches to kernel 5.1.3?
> 
> I made patches based on last dev branch below:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/log/?h=dev
> 
> Could you download last code for test? Last code should has issues you
> reported.

Hi! I cloned the repo and patched the latest dev branch.
The aforementioned kernel bug does not manifest again with the provided script.

But my original(complex/long) script triggers another bug; I'm not sure whether
this bug was introduced by the patch.

--- Core dump ---
[   17.678583] [ cut here ]
[   17.679405] kernel BUG at fs/f2fs/segment.c:2391!
[   17.680654] invalid opcode:  [#1] SMP KASAN PTI
[   17.681394] CPU: 0 PID: 461 Comm: runner-1 Not tainted 5.2.0+ #5
[   17.682279] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
Ubuntu-1.8.2-1ubuntu1 04/01/2014
[   17.683674] RIP: 0010:new_curseg+0xbb5/0xf10
[   17.684309] Code: 14 11 84 d2 74 09 80 fa 03 0f 8e 19 03 00 00 44 0f af ad
00 04 00 00 44 39 e8 0f 83 7f f7 ff ff e9 45 fa ff ff e8 8b 61 80 ff <0f> 0b e8
84 61 80 ff 44 89 e8 31 d2 f7 74 24 08 89 c3 e9 5a f6 ff
[   17.687001] RSP: 0018:888110c0f360 EFLAGS: 00010293
[   17.687772] RAX: 88811514b400 RBX:  RCX:
b93585b5
[   17.688792] RDX:  RSI: 0048 RDI:
88810f9fe900
[   17.689771] RBP: 888112b2aa80 R08:  R09:
ed1022181e62
[   17.690804] R10: ed1022181e61 R11: 0003 R12:
888111f4ff30
[   17.691852] R13: 0048 R14: 88810f9fe900 R15:
0048
[   17.692894] FS:  571fe8c0() GS:88811b20()
knlGS:
[   17.694066] CS:  0010 DS:  ES:  CR0: 80050033
[   17.694926] CR2: 57302000 CR3: 000110406000 CR4:
06f0
[   17.695981] Call Trace:
[   17.696372]  ? f2fs_need_SSR+0x4fe/0x670
[   17.696973]  allocate_segment_by_default+0x222/0x440
[   17.697717]  f2fs_allocate_data_block+0x649/0x2720
[   17.698409]  ? f2fs_submit_page_write+0xc25/0x19c0
[   17.699035]  do_write_page+0x1c1/0x590
[   17.699628]  f2fs_outplace_write_data+0x157/0x3d0
[   17.700439]  ? f2fs_do_write_node_page+0x280/0x280
[   17.701188]  ? f2fs_is_valid_blkaddr+0x1f8/0xe70
[   17.701807]  f2fs_do_write_data_page+0xa60/0x13f0
[   17.702353]  ? f2fs_should_update_outplace+0x330/0x330
[   17.703017]  ? _raw_spin_lock+0x75/0xd0
[   17.703556]  ? percpu_counter_add_batch+0xc1/0x110
[   17.704215]  ? f2fs_remove_dirty_inode+0x191/0x520
[   17.704873]  move_data_page+0x5bc/0x990
[   17.705405]  ? get_victim_by_default+0x21d0/0x21d0
[   17.705986]  ? down_read_trylock+0x170/0x170
[   17.706402]  ? __radix_tree_lookup+0x1a9/0x220
[   17.706834]  do_garbage_collect+0x14cd/0x4020
[   17.707339]  ? __switch_to_asm+0x40/0x70
[   17.707797]  ? mutex_lock+0x89/0xd0
[   17.708167]  ? mutex_unlock+0x18/0x40
[   17.708555]  ? move_data_block+0x2500/0x2500
[   17.709004]  ? preempt_schedule_common+0x36/0x50
[   17.709488]  ? down_read+0x1f0/0x1f0
[   17.709869]  f2fs_gc+0x69b/0x37e0
[   17.710224]  ? f2fs_start_bidx_of_node+0x40/0x40
[   17.710709]  ? delete_node+0x1ef/0x820
[   17.74]  ? node_tag_clear+0x8a/0x1b0
[   17.711530]  ? mutex_lock+0x89/0xd0
[   17.711901]  ? __mutex_lock_slowpath+0x10/0x10
[   17.712368]  ? f2fs_balance_fs+0x5ae/0x19c0
[   17.712809]  f2fs_balance_fs+0x5ae/0x19c0
[   17.713232]  ? __d_instantiate+0x320/0x430
[   17.713664]  f2fs_mkdir+0x40a/0x5e0
[   17.714034]  ? security_inode_mkdir+0xca/0x100
[   17.714501]  vfs_mkdir+0x351/0x560
[   17.714864]  do_mkdirat+0x11b/0x210
[   17.715242]  ? __ia32_sys_mknod+0xb0/0xb0
[   17.715687]  ? schedule+0x9c/0x230
[   17.716051]  do_syscall_64+0x9a/0x330
[   17.716440]  ? prepare_exit_to_usermode+0x142/0x1d0
[   17.716953]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   17.717485] RIP: 0033:0x50eaf7
[   17.717813] Code: 1f 40 00 b8 89 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 2d
f5 f8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 53 00 00 00 0f 05 <48> 3d 01
f0 ff ff 0f 83 0d f5 f8 ff c3 66 2e 0f 1f 84 00 00 00 00
[   17.719740] RSP: 002b:77965da8 EFLAGS: 0202 ORIG_RAX:
0053
[   17.720531] RAX: ffda RBX: 00400328 RCX:
0050eaf7
[   17.721273] RDX: 57337f90 RSI: 01fd RDI:
57337f90
[   17.722015] RBP: 77965de0 R08:  R09:
003e
[   17.722963] R10: 0035 R11: 0202 R12:
0049e490
[   17.723941] R13: 0049e520 R14:  R15:

[   17.724914] Modules linked in:
[   17.725343] Dumping ftrace buffer:
[   17.725816](ftrace buffer empty)
[   17.726356] ---[ end trace 110112c63ed78316 ]---

-- 
You are receiving this mail because:
You are watching the assignee of the bug

[f2fs-dev] [Bug 204193] BUG: KASAN: null-ptr-deref in f2fs_write_end_io+0x215/0x650

2019-07-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204193

--- Comment #4 from midwinter1...@gmail.com ---
(In reply to Chao Yu from comment #3)
> Thanks, I can reproduce it now.
> 
> I've made a patch for this issue, could you verify it?
> 
> https://lore.kernel.org/linux-f2fs-devel/20190718083959.32321-1-
> yuch...@huawei.com/T/#u


Hi! I used the script to test the patched code several times, this bug does not
manifest again. :-P

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204135] F2FS: BUG: KASAN: null-ptr-deref in mempool_alloc+0xd8/0x2e0

2019-07-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204135

--- Comment #4 from midwinter1...@gmail.com ---
(In reply to Chao Yu from comment #3)
> F2FS_IO_ALIGNED() was defined in last patch for your previous issue... so,
> should apply them before this patch.
> 
> Could you change to last code in dev branch in Jaegeuk's git repo.
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/log/?h=dev

Hi! I tested the patch under commit:
> Hash: e3110f4; f2fs: fix to read source block before invalidating it

But the F2FS_IO_ALIGNED was still missing!? (Or something wrong I did?)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204193] BUG: KASAN: null-ptr-deref in f2fs_write_end_io+0x215/0x650

2019-07-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204193

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |CODE_FIX

--- Comment #5 from Chao Yu (c...@kernel.org) ---
Cool, I test it with your script for a long time, and it looks the bug was
fixed.

Anyway, thanks very much, let me close this track. :)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

--- Comment #8 from Chao Yu (c...@kernel.org) ---
This bug was reported by you in another track...

So could you confirm the issue in this track again?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204135] F2FS: BUG: KASAN: null-ptr-deref in mempool_alloc+0xd8/0x2e0

2019-07-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204135

--- Comment #5 from Chao Yu (c...@kernel.org) ---
Sorry, I meant I made the two fix patches based Jaegeuk's git repo, however
Jaegeuk hasn't merge the two patches in his branch.

So you can do the merge by yourself, or you can use below codes in my repo,
I've update the all fixes on it.

https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=dev

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

--- Comment #9 from Chao Yu (c...@kernel.org) ---
BTW, to avoid panic in new_curseg(), you'd better to expand image size.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204197] F2FS: kernel BUG at fs/f2fs/inode.c:722!

2019-07-22 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204197

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||c...@kernel.org

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Could you please update the script?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200219] Buffer overrun when reading inline data in f2fs

2019-07-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200219

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 CC||c...@kernel.org
  Component|Other   |f2fs
   Assignee|fs_ot...@kernel-bugs.osdl.o |filesystem_f2fs@kernel-bugs
   |rg  |.kernel.org

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Should have been fixed with below commit:

042be0f849e5 ("f2fs: fix to do sanity check with current segment number")

To Wen Xu, let me know if you have further question about this.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 104211] segfault / heap out of bounds read in fsck.f2fs

2019-07-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=104211

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||c...@kernel.org
  Component|Other   |f2fs
 Resolution|--- |PATCH_ALREADY_AVAILABLE
   Assignee|fs_ot...@kernel-bugs.osdl.o |filesystem_f2fs@kernel-bugs
   |rg  |.kernel.org

--- Comment #2 from Chao Yu (c...@kernel.org) ---
I tried last fsck, the issue has gone, close it.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 66631] F2FS-fs reports error for valid mount options

2019-07-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=66631

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||c...@kernel.org
  Component|Other   |f2fs
 Resolution|--- |OBSOLETE
   Assignee|fs_ot...@kernel-bugs.osdl.o |filesystem_f2fs@kernel-bugs
   |rg  |.kernel.org

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

--- Comment #10 from midwinter1...@gmail.com ---
(In reply to Chao Yu from comment #8)
> This bug was reported by you in another track...
> 
> So could you confirm the issue in this track again?

Sorry! I forgot that bug.

I have tested the patch with the triggering script several times, and the issue
in this track does not happen again (though another bug occurs).

Thank you! :-P

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204043] F2fs kernel BUG at fs/f2fs/data.c:317!

2019-07-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204043

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |CODE_FIX

--- Comment #11 from Chao Yu (c...@kernel.org) ---
Thanks for confirming that! Let me close this track. :)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204135] F2FS: BUG: KASAN: null-ptr-deref in mempool_alloc+0xd8/0x2e0

2019-07-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204135

--- Comment #6 from midwinter1...@gmail.com ---
(In reply to Chao Yu from comment #5)
> Sorry, I meant I made the two fix patches based Jaegeuk's git repo, however
> Jaegeuk hasn't merge the two patches in his branch.
> 
> So you can do the merge by yourself, or you can use below codes in my repo,
> I've update the all fixes on it.
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=dev

I have tested several times in your repo and under dev branch; the
above-mentioned bug did not happen anymore. :-P

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204135] F2FS: BUG: KASAN: null-ptr-deref in mempool_alloc+0xd8/0x2e0

2019-07-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204135

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |CODE_FIX

--- Comment #7 from Chao Yu (c...@kernel.org) ---
Thanks for the test, let me close this track. :)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 204137] F2FS: kernel BUG at fs/f2fs/segment.c:2375!

2019-08-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204137

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||c...@kernel.org

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Finally, I figure out two patches to fix this, in your case, I guess it will
just forbiden the mount due to the image has not enough free space.

Could you help to verify this issue?

https://lore.kernel.org/linux-f2fs-devel/20190827102425.29607-1-yuch...@huawei.com/T/#t

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205181] New: kernel panic when accessing btrfs root device with f2fs in kernel

2019-10-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205181

Bug ID: 205181
   Summary: kernel panic when accessing btrfs root device with
f2fs in kernel
   Product: File System
   Version: 2.5
Kernel Version: 4.19.76-4.19.79
  Hardware: All
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: blocking
  Priority: P1
 Component: f2fs
  Assignee: filesystem_f...@kernel-bugs.kernel.org
  Reporter: rogan6...@gmail.com
Regression: No

This happens on kernel versions 4.19.76-4.19.79 on x86_64 (Slackware):
With support for btrfs, f2fs, ext*, xfs and a few others compiled in kernel it
panics when accessing a btrfs root device.
If support for f2fs is removed all works normally on 4.19.79, as does versions
before 4.19.76.
The problem has been verified on different machines by different users.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205181] kernel panic when accessing btrfs root device with f2fs in kernel

2019-10-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205181

--- Comment #1 from Roger (rogan6...@gmail.com) ---
Related linuxquestions.org thread:
https://www.linuxquestions.org/questions/slackware-14/the-latest-kernel-release-4175597503/page112.html

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205181] kernel panic when accessing btrfs root device with f2fs in kernel

2019-10-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205181

Andrew Macks (andy...@gmail.com) changed:

   What|Removed |Added

 CC||andy...@gmail.com

--- Comment #2 from Andrew Macks (andy...@gmail.com) ---
The issue is present in 4.14 longterm, 4.19 longterm and 5.2 stable EOL.

The cause is the following patch:

July 2: Original commit
  10f966bbf521bb9b2e497bbca496a5141f4071d0
  f2fs: use generic EFSBADCRC/EFSCORRUPTED

July 12: Merged into mainline with f2fs-for-5.3

July 28: Fix from Icenowy Zheng (read this for some background)
  38fb6d0ea34299d97b031ed64fe994158b6f8eb3
  f2fs: use EINVAL for superblock with invalid magic

July 30: Fix merged into mainline with f2fs-for-5.4-rc3 (note the typo in
branch name, this was actually for 5.3-rc3)

September 15: Kernel 5.3 was born so already contained the fix.

It was backported into the relevant branches below:

October 1: Original commit merged into 5.2.18

  5.2.18 (5.2.19, 5.2.20, 5.2.21 EOL still affected)
  c704eb3aaffae0d6463b1773b37e69695b112ca4
  f2fs: use generic EFSBADCRC/EFSCORRUPTED

October 1: Original commit merged into 4.19.76

  4.19.76 (4.19.77, 4.19.78, 4.19.79 still affected)
  59a5cea41dd0ae706ab83f8ecd64199aadefb493
  f2fs: use generic EFSBADCRC/EFSCORRUPTED

October 5: Original commit merged into 4.14.147

  4.14.147 (4.14.148 and 4.14.149 still affected)
  e991f02f6f9117514ed1374b39ce195013ab9cd0
  f2fs: use generic EFSBADCRC/EFSCORRUPTED

...

Further notes:

* To date, 4.14, 4.19 and 5.2 all contain the issue.

* The f2fs development/stable kernel branches contain a fix (including their
4.14 and 4.19 branches), so the issue is not present there.

* Not quite sure why this commit was backported at all to longterm, but maybe I
am missing some behavioural change which warranted it.  (To me, it seems like
this was long-standing functionality already).

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205181] kernel panic when accessing btrfs root device with f2fs in kernel

2019-10-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205181

--- Comment #3 from Roger (rogan6...@gmail.com) ---
Thanks for the reply.
This is a real mess for Slackware since we use "huge" kernels with support
for nearly every file system as default installation kernels. This particular
flavour often remain as system default as it gets upgraded. This is how it was
discovered, when someone upgraded his server with a btrfs root fs and a "huge"
kernel.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205203] New: ram_thresh default (DEF_RAM_THRESHOLD) is wrong (outdated) in f2fs document

2019-10-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205203

Bug ID: 205203
   Summary: ram_thresh default (DEF_RAM_THRESHOLD) is wrong
(outdated) in f2fs document
   Product: File System
   Version: 2.5
Kernel Version: all
  Hardware: All
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: low
  Priority: P1
 Component: f2fs
  Assignee: filesystem_f...@kernel-bugs.kernel.org
  Reporter: yfdyh...@gmail.com
Regression: No

The default value appears to have been corrected by "f2fs: fix wrong
percentage" commit[1], but still the old values ​​in the f2fs document[2].


ref:
1:
https://github.com/torvalds/linux/commit/29710bcf9426c84bb6a9b1d94316895ed6143813
2: https://www.kernel.org/doc/Documentation/filesystems/f2fs.txt

introduces ram_thresh: https://lore.kernel.org/patchwork/patch/450476/

define DEF_RAM_THRESHOLD1:
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git/tree/fs/f2fs/node.h?h=linux-4.19.y#n23

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205181] kernel panic when accessing btrfs root device with f2fs in kernel

2019-10-19 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205181

--- Comment #4 from Roger (rogan6...@gmail.com) ---
Thanks for the quick response
4.19.80 works just fine here :)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205203] ram_thresh default (DEF_RAM_THRESHOLD) is wrong (outdated) in f2fs document

2019-10-22 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205203

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||c...@kernel.org

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Thanks for the report, I've sent a patch for this issue.

https://lore.kernel.org/linux-f2fs-devel/20191022092611.58191-1-yuch...@huawei.com/T/#u

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205181] kernel panic when accessing btrfs root device with f2fs in kernel

2019-10-31 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205181

--- Comment #5 from Andrew Macks (andy...@gmail.com) ---
Confirmed that 4.19.80 is fine also.  Sorry for the delayed reply.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205967] New: [bisected] f2fs compression support breaks build

2019-12-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205967

Bug ID: 205967
   Summary: [bisected] f2fs compression support breaks build
   Product: File System
   Version: 2.5
Kernel Version: 5.5.0-rc2-next
  Hardware: All
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: f2fs
  Assignee: filesystem_f...@kernel-bugs.kernel.org
  Reporter: da...@ixit.cz
Regression: No

commit: 25d18e19a91e60837d36368ee939db13fd16dc64

breaks build for me (armv6):
/usr/bin/armv6-alpine-linux-musleabihf-ld: fs/f2fs/file.o: in function
`f2fs_truncate_blocks':
/mnt/linux/.output/../fs/f2fs/file.c:738: undefined reference to
`__aeabi_uldivmod'
make[1]: *** [/mnt/linux/Makefile:1079: vmlinux] Error 1

and Pavel Machek (x86-32) [1]:
LD .tmp_vmlinux1
ld: fs/f2fs/file.o: in function `f2fs_truncate_blocks':
file.c:(.text+0x2968): undefined reference to `__udivdi3'
make: *** [Makefile:1079: vmlinux] Error 1

[1] https://lkml.org/lkml/fancy/2019/12/22/48

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205203] ram_thresh default (DEF_RAM_THRESHOLD) is wrong (outdated) in f2fs document

2019-12-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205203

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |CODE_FIX

--- Comment #2 from Chao Yu (c...@kernel.org) ---
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4c3258b9b0fff24623a6e95381e1112cc290abd4

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205967] [bisected] f2fs compression support breaks build

2019-12-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205967

--- Comment #1 from Chao Yu (c...@kernel.org) ---
We have fixed this issue, could you please check commit in last dev branch?

https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/log/?h=dev

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 205967] [bisected] f2fs compression support breaks build

2020-01-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205967

David Heidelberg (okias) (da...@ixit.cz) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |PATCH_ALREADY_AVAILABLE

--- Comment #2 from David Heidelberg (okias) (da...@ixit.cz) ---
Tested, fixed.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206057] New: 5.5.0: f2fs is extremely slow, with ext4 system works well

2020-01-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206057

Bug ID: 206057
   Summary: 5.5.0: f2fs is extremely slow, with ext4 system works
well
   Product: File System
   Version: 2.5
Kernel Version: 5.5.0-rc2-next
  Hardware: All
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: f2fs
  Assignee: filesystem_f...@kernel-bugs.kernel.org
  Reporter: da...@ixit.cz
Regression: No

Machine model: ASUS Google Nexus 7 2012 (Project Bach)

used "f2fs: support data compression" from kernel/git/jaegeuk/f2fs.git . (to
fix 32bit divide compilation issue)

Compiled without F2FS compression support.

It seems that f2fs doing something extremely slow? After I flashed data onto
f2fs, tablet started behave slow and even didn't run Phoc UI.

/dev/mapper/mmcblk1p10p2 on / type f2fs
(rw,relatime,lazytime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,fsync_mode=posix)

Failures:

[   12.291917] F2FS-fs (dm-1): Mounted with checkpoint version = 64abe365
[   14.617980] random: crng init done
[   14.989616] udevd[687]: starting version 3.2.9
[   15.257380] udevd[687]: starting eudev-3.2.9
[   16.584866] Bluetooth: HCI UART driver ver 2.3
[   16.584879] Bluetooth: HCI UART protocol H4 registered
[   16.589646] Bluetooth: HCI UART protocol Broadcom registered
[   17.002771] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4330-sdio
for chip BCM4330/4
[   17.041791] Bluetooth: hci0: BCM: chip id 62
[   17.042404] Bluetooth: hci0: BCM: features 0x0f
[   17.044464] Bluetooth: hci0: BCM4330B1
[   17.044480] Bluetooth: hci0: BCM4330B1 (002.001.003) build 
[   17.087552] bluetooth hci0: Direct firmware load for brcm/BCM4330B1.hcd
failed with error -2
[   17.087583] Bluetooth: hci0: BCM: Patch brcm/BCM4330B1.hcd not found
[   17.313674] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4330-sdio
for chip BCM4330/4
[   17.313993] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available
(err=-2), device may have limited channels available
[   17.318905] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4330/4 wl0: Jan 23
2013 17:47:42 version 5.90.195.114 FWID 01-73201c1f
[   20.181213] EXT4-fs (dm-0): mounting ext2 file system using the ext4
subsystem
[   20.202239] EXT4-fs (dm-0): mounted filesystem without journal. Opts: (null)
[   20.202311] ext2 filesystem being mounted at /boot supports timestamps until
2038 (0x7fff)
[   22.994765] elogind-daemon[1245]: Failed to create inotify watch on
/dev/null/utmp, ignoring: Not a directory
[   23.006602] elogind-daemon[1245]: New seat seat0.
[   23.182764] elogind-daemon[1245]: Watching system buttons on
/dev/input/event3 (gpio-keys)
[   23.329474] elogind-daemon[1245]: Failed to set utmp path to /dev/null/utmp:
Not supported
[   24.169197] ieee80211 phy0: brcmf_p2p_create_p2pdev: timeout occurred
[   24.169221] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface
p2p-dev-wlan0 type 10 failed: err=-5
[   25.008074] elogind-daemon[1245]: Failed to create inotify watch on
/dev/null/utmp, ignoring: Not a directory
[   25.022306] elogind-daemon[1245]: New session c1 of user okias.
[   35.682232] vdd_camera: disabling
[   35.683021] avdd_dsi_csi: disabling
[   36.930091] rfkill: input handler disabled
[  243.681507] INFO: task kworker/u8:2:222 blocked for more than 122 seconds.
[  243.681588]   Not tainted 5.5.0-rc2-next-20191220 #8
[  243.681622] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[  243.681661] kworker/u8:2D0   222  2 0x
[  243.681834] Workqueue: writeback wb_workfn (flush-254:1)
[  243.682036] [] (__schedule) from []
(schedule+0xc8/0x120)
[  243.682195] [] (schedule) from []
(rwsem_down_write_slowpath+0x294/0x3b8)
[  243.682331] [] (rwsem_down_write_slowpath) from []
(f2fs_write_single_data_page+0x420/0x4bc)
[  243.682438] [] (f2fs_write_single_data_page) from []
(f2fs_write_cache_pages+0x2a4/0x3d8)
[  243.682526] [] (f2fs_write_cache_pages) from []
(f2fs_write_data_pages+0x154/0x228)
[  243.682663] [] (f2fs_write_data_pages) from []
(do_writepages+0x34/0x68)
[  243.682771] [] (do_writepages) from []
(__writeback_single_inode+0x64/0x4d8)
[  243.682871] [] (__writeback_single_inode) from []
(writeback_sb_inodes+0x248/0x428)
[  243.682958] [] (writeback_sb_inodes) from []
(__writeback_inodes_wb+0x64/0xa0)
[  243.683097] [] (__writeback_inodes_wb) from []
(wb_writeback+0x1e0/0x34c)
[  243.683209] [] (wb_writeback) from []
(wb_workfn+0x194/0x3dc)
[  243.683307] [] (wb_workfn) from []
(process_one_work+0x19c/0x35c)
[  243.683395] [] (process_one_work) from []
(worker_thread+0x234/0x2d8)
[  243.683518] [] (worker_thread) from []
(kthread+0xfc/0x104)
[  243.683622] [] (kthread) from []
(ret_from_fork+0x14/0x24)
[  243.683668] Exception stack

[f2fs-dev] [Bug 206057] 5.5.0-rc2-next: f2fs is extremely slow, with ext4 system works well

2020-01-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206057

David Heidelberg (okias) (da...@ixit.cz) changed:

   What|Removed |Added

 CC||jaeg...@kernel.org
Summary|5.5.0: f2fs is extremely|5.5.0-rc2-next: f2fs is
   |slow, with ext4 system  |extremely slow, with ext4
   |works well  |system works well

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206057] 5.5.0-rc2-next: f2fs is extremely slow, with ext4 system works well

2020-01-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206057

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 CC||c...@kernel.org

--- Comment #1 from Chao Yu (c...@kernel.org) ---
I doubt this issue was caused by below case:

- f2fs_convert_inline_dir()
 - f2fs_lock_op()
 - f2fs_get_node_page() failed
 - return w/o call f2fs_unlock_op()

Could you try below fix?

https://lore.kernel.org/linux-f2fs-devel/d4ea0c19-61da-8181-8fd9-62c3dfd42...@huawei.com/T/#mda4115e74bf06dbadc45d82018e4f1a51b7c36c6

If this doesn't work, could you please help to bisect the commit after 5.5-rc1
which caused this issue?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206057] 5.5.0-rc2-next: f2fs is extremely slow, with ext4 system works well

2020-01-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206057

--- Comment #2 from David Heidelberg (okias) (da...@ixit.cz) ---
I'm not sure I can try bisect (since using custom patches to run device),
anyway if it helps, F2FS filesystem has been created by TWRP (kernel 3.1).

I'll try get complete f2fs image created by recent kernel and retest.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206057] 5.5.0-rc2-next: f2fs is extremely slow, with ext4 system works well

2020-01-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206057

--- Comment #3 from David Heidelberg (okias) (da...@ixit.cz) ---
(also patch didn't helped)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206057] 5.5.0-rc2-next: f2fs is extremely slow, with ext4 system works well

2020-01-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206057

--- Comment #4 from Chao Yu (c...@kernel.org) ---
Thanks for the help, I've bisected the bad commit ("f2fs: cover f2fs_lock_op in
expand_inode_data case"), could you revert it and do the test again?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206057] 5.5.0-rc2-next: f2fs is extremely slow, with ext4 system works well

2020-01-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206057

--- Comment #5 from David Heidelberg (okias) (da...@ixit.cz) ---
sadly, still same output. Also not sure why, sudo -i freezes and cannot be
stopped by CTRL-C.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206551] New: Failed to initialize F2FS segment manager (-117)

2020-02-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206551

Bug ID: 206551
   Summary: Failed to initialize F2FS segment manager (-117)
   Product: File System
   Version: 2.5
Kernel Version: 5.5.3-gentoo
  Hardware: x86-64
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: f2fs
  Assignee: filesystem_f...@kernel-bugs.kernel.org
  Reporter: ste...@konink.de
Regression: No

Created attachment 287423
  --> https://bugzilla.kernel.org/attachment.cgi?id=287423&action=edit
Linux boot, root fs can't be mounted.

I am aware this bug report is done on a non-vanilla Gentoo based kernel, but
since I have seen it now twice in two days on two different kernel versions
5.4.13-gentoo and 5.5.3-gentoo I would like to document it upstream as well.
Not excluding a hardware failure.

I am running Linux on a Lenovo E485 machine having a AMD Ryzen 5 2500U
processor, which is quite problematic to resume after a memory suspend.
Therefore I use hibernation to a swap partition which most of the time allows
me to resume what I was working on. The disk is a Samsung SSD 840 EVO 500GB,
EXT0CB6Q. It wasn't used for quite a while but is now in use for about two
months without issues.

The day before yesterday I again hibernated my machine which kernel paniced
after resuming, the screen was still black, so I wouldn't have any information
on the topic. After restarting, my problems with F2FS, the filesystem for my
root partition, started.

I was able to boot using an Arch Linux ISO, and ran the F2FS-tools. fsck.f2fs
was unable to succeed when I requested to write "missing" files in ./lostfound.
Only when answering "No" the partition was repaired and could be mounted. I
remember that one of the causes flags was something like "Sudden loss of
power".

Today I have completely shutdown my machine using "poweroff". When I switched
the machine back on I had a similar experience as two days ago, my root
partition would mound with the same segment manager error. I again ran the
fsck.f2fs, this time not being prompted for missing files. Neither did it
mention anything similar like loss of power.

I wonder if the partition is fixed using the fsck.f2fs tool, considering the
output. If not, is this a gap in the implementation? Should this partition be
completely be copied, and then restored on a new f2fs partition? Or is it
expected that the file structure is "OK" after running the tool, and the fact
that two days in a row this happened was a coincidence?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206551] Failed to initialize F2FS segment manager (-117)

2020-02-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206551

--- Comment #1 from Stefan de Konink (ste...@konink.de) ---
Created attachment 287425
  --> https://bugzilla.kernel.org/attachment.cgi?id=287425&action=edit
fsck.f2fs result specifically showing SIT bitmap is 0x0.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206551] Failed to initialize F2FS segment manager (-117)

2020-02-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206551

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||c...@kernel.org

--- Comment #2 from Chao Yu (c...@kernel.org) ---
Both kernel log“Mismatch valid blocks” and fsck log "SIT bitmap is 0" says SIT
table may be inconsistent in your image.

I noticed that you're using a swap partition, may I ask where did you build the
swap partition? in your f2fs image? What's your swap option?

Quoted: "I use hibernation to a swap partition"

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206551] Failed to initialize F2FS segment manager (-117)

2020-02-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206551

--- Comment #3 from Stefan de Konink (ste...@konink.de) ---
My swap partition is at /dev/sda3, as independent of f2fs.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206551] Failed to initialize F2FS segment manager (-117)

2020-02-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206551

--- Comment #4 from Chao Yu (c...@kernel.org) ---
What's your mkfs option and mount option?

Can you upload kernel message? maybe we can find clue from it.

Thanks,

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206551] Failed to initialize F2FS segment manager (-117)

2020-02-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206551

--- Comment #5 from Stefan de Konink (ste...@konink.de) ---
[1.404552] F2FS-fs (sda4): Found nat_bits in checkpoint
[1.638356] F2FS-fs (sda4): Mounted with checkpoint version = 68992090

I don't have the dmesg of the 'recovery' attempts.

/dev/sda4 on / type f2fs
(rw,noatime,lazytime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,fsync_mode=posix)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206551] Failed to initialize F2FS segment manager (-117)

2020-02-19 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206551

--- Comment #6 from Chao Yu (c...@kernel.org) ---
IIRC, in knew bugs, except swap file feature, large_nat_bitmap feature can also
damage f2fs metadata (SIT table) (they are all fixed in mainline), did you
enable this feature during mkfs/resize?

Can you try fsck.f2fs -d 3 /dev/sda4 to catch the full fsck log?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206057] 5.5.0-rc2-next: f2fs is extremely slow, with ext4 system works well

2020-02-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206057

--- Comment #6 from Chao Yu (c...@kernel.org) ---
Sorry for the long delay, could you please have a try with below patch:

https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev&id=3a453558c72ef25435fd34b4864f3349f7990abb

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 206057] 5.5.0-rc2-next: f2fs is extremely slow, with ext4 system works well

2020-03-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206057

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #7 from Chao Yu (c...@kernel.org) ---
Hi David,

Sorry for taking so long time to troubleshoot this issue, finally
we figure out below patch, and it can fix 32bit machine hang issue.

https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev-test&id=e36d8816848a4201420ad318f95b97bc86a58ade

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Kernel.org Bugzilla] Your account linux-f2fs-devel@lists.sourceforge.net is being impersonated

2018-07-18 Thread bugzilla-daemon
Konstantin Ryabitsev (mri...@kernel.org) has used the 'sudo' feature to 
access 
Kernel.org Bugzilla using your account.

Konstantin Ryabitsev (mri...@kernel.org) provided the following reason for 
doing this:
Adding bugmail per RT#58184

If you feel that this action was inappropriate, please contact 
helpd...@kernel.org.  For more information on this feature, 
visit .

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200773] New: An issue was discovered in the Linux kernel through 4.17.3. There is a NULL pointer dereference in get_checkpoint_version() in fs/f2fs/checkpoint.c when mounting crafted f

2018-08-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200773

Bug ID: 200773
   Summary: An issue was discovered in the Linux kernel through
4.17.3. There is a NULL pointer dereference in
get_checkpoint_version() in fs/f2fs/checkpoint.c when
mounting crafted f2fs image.
   Product: File System
   Version: 2.5
Kernel Version: 4.4.146, through,  4.17.3
  Hardware: All
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: f2fs
  Assignee: filesystem_f...@kernel-bugs.kernel.org
  Reporter: datadan...@163.com
Regression: No

Created attachment 27
  --> https://bugzilla.kernel.org/attachment.cgi?id=27&action=edit
The crafted f2fs image.

- Reproduce
#mkdir /tmp/mnt
#sudo mount -t f2fs f2fs.img /tmp/mnt

- Kernel message
#dmesg
[107073.517344] F2FS-fs (loop2): Magic Mismatch, valid(0xf2f52010) -
read(0xf2f52090)
[107073.517346] F2FS-fs (loop2): Can't find valid F2FS filesystem in 1th
superblock
[107073.517363] attempt to access beyond end of device
[107073.517364] loop2: rw=56, want=4104, limit=128
[107073.517379] BUG: unable to handle kernel NULL pointer dereference at
0094
[107073.517433] IP: [] f2fs_stop_checkpoint+0x28/0x60 [f2fs]
[107073.517456] PGD 0 

[107073.517467] Oops: 0002 [#1] PREEMPT SMP
[107073.517478] Modules linked in: f2fs uas usb_storage cfg80211 rfkill
hid_generic usbhid hid ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat
nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter
xt_conntrack nf_nat nf_conntrack br_netfilter bridge stp llc xfrm_user
xfrm4_tunnel tunnel4 ipcomp xfrm_ipcomp esp4 ah4 af_key xfrm_algo dm_thin_pool
dm_persistent_data dm_bio_prison dm_bufio loop dm_mod intel_rapl
snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel
x86_pkg_temp_thermal intel_powerclamp snd_hda_codec coretemp snd_hda_core
snd_hwdep iTCO_wdt iTCO_vendor_support kvm snd_pcm sg shpchp snd_timer lpc_ich
mfd_core mei_me mei ie31200_edac battery snd soundcore irqbypass evdev
acpi_cpufreq crct10dif_pclmul crc32_pclmul edac_core ghash_clmulni_intel
intel_cstate
[107073.517752]  serio_raw intel_uncore intel_rapl_perf pcspkr binfmt_misc fuse
parport_pc ppdev lp parport ip_tables x_tables autofs4 ext4 crc16 jbd2 fscrypto
ecb mbcache btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq
async_xor async_tx xor raid6_pq libcrc32c crc32c_generic raid1 raid0 multipath
linear md_mod sr_mod cdrom sd_mod ahci libahci crc32c_intel libata amdkfd
ehci_pci aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd
radeon psmouse xhci_pci i2c_algo_bit ttm i2c_i801 scsi_mod xhci_hcd ehci_hcd
i2c_smbus drm_kms_helper e1000e ptp usbcore pps_core usb_common drm wmi fan
thermal video button
[107073.517977] CPU: 5 PID: 4121 Comm: mount Tainted: G   O   
4.9.0-deepin13-amd64 #1 Deepin 4.9.57-1
[107073.518003] Hardware name: LENOVO ThinkCentre M8400T/MAHOBAY, BIOS
9SKT39AUS 08/07/2012
[107073.518024] task: 8d659f50b0c0 task.stack: b1014ca44000
[107073.518040] RIP: 0010:[]  []
f2fs_stop_checkpoint+0x28/0x60 [f2fs]
[107073.518070] RSP: 0018:b1014ca47bd0  EFLAGS: 00010246
[107073.518084] RAX: 0010 RBX: 8d65314d1000 RCX:

[107073.518103] RDX: 0001 RSI:  RDI:
8d65314d1264
[107073.518122] RBP: 8d65314d1264 R08:  R09:
00010e48
[107073.518141] R10:  R11: 0001 R12:

[107073.518160] R13: b1014ca47bf0 R14: 8d65314d1000 R15:
c0dfe910
[107073.518180] FS:  7f1b8eb5c480() GS:8d661dd4()
knlGS:
[107073.518201] CS:  0010 DS:  ES:  CR0: 80050033
[107073.518217] CR2: 0094 CR3: 50c9b000 CR4:
001406e0
[107073.518236] Stack:
[107073.518242]  d45ac0c53480 8d658dfd5898 0200
c0ddbac1
[107073.518266]  8d65314d1000 0002 0238
0200
[107073.518290]  d45ac0c53480  d7dafc5d1e926bb2
b1014ca47cc0
[107073.518314] Call Trace:
[107073.518326]  [] ? __get_meta_page+0x171/0x1d0 [f2fs]
[107073.518347]  [] ? get_checkpoint_version+0x44/0x160
[f2fs]
[107073.518376]  [] ? validate_checkpoint+0x52/0x290 [f2fs]
[107073.518398]  [] ? get_valid_checkpoint+0x81/0x470 [f2fs]
[107073.518427]  [] ? unlock_new_inode+0x43/0x70
[107073.518447]  [] ? f2fs_fill_super+0x6de/0x1140 [f2fs]
[107073.518468]  [] ? f2fs_commit_super+0xf0/0xf0 [f2fs]
[107073.518487]  [] ? mount_bdev+0x238/0x280
[107073.518502]  [] ? mount_fs+0x36/0x150
[107073.518518]  [] ? vfs_kern_mount+0x5a/0xf0
[107073.518534]  [] ? do_mount+0x1cf/0xc70
[107073.518550]  [] ? memdup_user+0x4a/0x70
[107073.518565]  [] ? SyS_mount+0x7e/0xd0
[107073.518581]  [] ? system_call_fast_compare_end+0xc/0x9b
[1070

[f2fs-dev] [Bug 200773] An issue was discovered in the Linux kernel through 4.17.3. There is a NULL pointer dereference in get_checkpoint_version() in fs/f2fs/checkpoint.c when mounting crafted f2fs i

2018-08-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200773

--- Comment #1 from Shuaibing Lu (datadan...@163.com) ---
-Location
https://elixir.bootlin.com/linux/v4.17.1/source/fs/f2fs/checkpoint.c#L741

*cp_page = get_meta_page(sbi, cp_addr);
*cp_block = (struct f2fs_checkpoint *)page_address(*cp_page);
Here cp_page may be NULL, and thus NULL pointer dereference triggered.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200773] An issue was discovered in the Linux kernel through 4.17.3. There is a NULL pointer dereference in get_checkpoint_version() in fs/f2fs/checkpoint.c when mounting crafted f2fs i

2018-08-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200773

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 CC||c...@kernel.org

--- Comment #2 from Chao Yu (c...@kernel.org) ---
Hi Shuaibing,

I tried your attached image with last f2fs, it failed and below dmesg shown:

[ 3865.295211] F2FS-fs (loop0): Magic Mismatch, valid(0xf2f52010) -
read(0xf2f52090)
[ 3865.295236] F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th
superblock
[ 3865.295277] F2FS-fs (loop0): Invalid segment/section count (14, 7 x 1)
[ 3865.295284] F2FS-fs (loop0): Can't find valid F2FS filesystem in 2th
superblock
[ 3865.295309] F2FS-fs (loop0): Magic Mismatch, valid(0xf2f52010) -
read(0xf2f52090)
[ 3865.295316] F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th
superblock
[ 3865.295327] F2FS-fs (loop0): Invalid segment/section count (14, 7 x 1)
[ 3865.295333] F2FS-fs (loop0): Can't find valid F2FS filesystem in 2th
superblock


I tracked the code history, it seems that below commit can fix this issue, you
can update f2fs module with this commit and retry your case.


commit 0cfe75c5b011994651a4ca6d74f20aa997bfc69a
Author: Jaegeuk Kim 
Date:   Fri Apr 27 19:03:22 2018 -0700

f2fs: enhance sanity_check_raw_super() to avoid potential overflows

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0cfe75c5b011994651a4ca6d74f20aa997bfc69a

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200635] Oops error in refresh_sit_entry() while unmounting a crafted F2FS image

2018-08-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200635

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 CC||c...@kernel.org
   Assignee|fs_ot...@kernel-bugs.osdl.o |filesystem_f2fs@kernel-bugs
   |rg  |.kernel.org

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200871] F2FS experiences data loss (entry is completely lost) when an I/O failure occurs.

2018-08-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200871

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 CC||c...@kernel.org
   Assignee|other_ot...@kernel-bugs.osd |filesystem_f2fs@kernel-bugs
   |l.org   |.kernel.org

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200635] Oops error in refresh_sit_entry() while unmounting a crafted F2FS image

2018-08-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200635

--- Comment #1 from Chao Yu (c...@kernel.org) ---
It has been fixed by below commit, can you please check it?

f2fs: fix to do sanity check with cp_pack_start_sum

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e494c2f995d6181d6e29c4927d68e0f295ecf75b

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200635] Oops error in refresh_sit_entry() while unmounting a crafted F2FS image

2018-08-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200635

Stathis Maneas (sman...@cs.toronto.edu) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |CODE_FIX

--- Comment #2 from Stathis Maneas (sman...@cs.toronto.edu) ---
I can confirm that the specified commit actually resolves the error. Therefore,
I am marking the bug as resolved.

Thanks a lot,
Stathis Maneas

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200635] Oops error in refresh_sit_entry() while unmounting a crafted F2FS image

2018-08-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200635

Stathis Maneas (sman...@cs.toronto.edu) changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|CODE_FIX|---

--- Comment #3 from Stathis Maneas (sman...@cs.toronto.edu) ---
I have reopened the bug, because indeed, the fix included in the aforementioned
commit prevents the file system from being mounted after reading an invalid
value from the superblock.

Nonetheless, after invoking fsck to fix the partition, the file system still
cannot be mounted. Would the patch that introduces the checksum mechanism for
the superblock completely resolve the error?

Thanks,
Stathis Maneas

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200177] BUG() triggered in verify_block_addr() when mounting a corrupted f2fs image

2018-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200177

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||c...@kernel.org
  Component|Other   |f2fs
 Resolution|--- |CODE_FIX
   Assignee|fs_ot...@kernel-bugs.osdl.o |linux-f2fs-de...@lists.sour
   |rg  |ceforge.net

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Fixed by below commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c9b60788fc760d136211853f10ce73dc152d1f4a

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200181] NULL pointer dereference in f2fs_test_bit() when mounting a crafted f2fs image

2018-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200181

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||c...@kernel.org
  Component|Other   |f2fs
 Resolution|--- |CODE_FIX
   Assignee|fs_ot...@kernel-bugs.osdl.o |linux-f2fs-de...@lists.sour
   |rg  |ceforge.net

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Fixed by below commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0cfe75c5b011994651a4ca6d74f20aa997bfc69a

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200183] Divide zero in reset_curseg() when mounting a crafted f2fs image

2018-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200183

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||c...@kernel.org
  Component|Other   |f2fs
 Resolution|--- |CODE_FIX
   Assignee|fs_ot...@kernel-bugs.osdl.o |linux-f2fs-de...@lists.sour
   |rg  |ceforge.net

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Fixed by below commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=42bf546c1fe3f3654bdf914e977acbc2b80a5be5

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200221] BUG() triggered in clear_inode() when mounting and un-mounting a corrupted f2fs image

2018-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200221

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||c...@kernel.org
  Component|Other   |f2fs
 Resolution|--- |CODE_FIX
   Assignee|fs_ot...@kernel-bugs.osdl.o |linux-f2fs-de...@lists.sour
   |rg  |ceforge.net

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Fixed by below commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bcbfbd604dcba45246dd307c8317f216ada5567d

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200419] NULL pointer dereference in __remove_dirty_segment() when mounting an f2fs image

2018-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200419

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||c...@kernel.org
  Component|Other   |f2fs
 Resolution|--- |CODE_FIX
   Assignee|fs_ot...@kernel-bugs.osdl.o |linux-f2fs-de...@lists.sour
   |rg  |ceforge.net

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Fixed by below commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e494c2f995d6181d6e29c4927d68e0f295ecf75b

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200185] NULL pointer dereference in update_sit_entry() when un-mounting a corrupted f2fs image

2018-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200185

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||c...@kernel.org
  Component|Other   |f2fs
 Resolution|--- |CODE_FIX
   Assignee|fs_ot...@kernel-bugs.osdl.o |linux-f2fs-de...@lists.sour
   |rg  |ceforge.net

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Fixed by below commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c9b60788fc760d136211853f10ce73dc152d1f4a

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200223] BUG() triggered in f2fs_truncate_inode_blocks() when un-mounting a mounted f2fs image after writing to it

2018-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200223

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||c...@kernel.org
  Component|Other   |f2fs
 Resolution|--- |CODE_FIX
   Assignee|fs_ot...@kernel-bugs.osdl.o |linux-f2fs-de...@lists.sour
   |rg  |ceforge.net

--- Comment #1 from Chao Yu (c...@kernel.org) ---
Fixed by below commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e34438c903b653daca2b2a7de95aed46226f8ed3

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200423] Out-of-bound access in f2fs_get_dnode_of_data() when operating file on an f2fs image

2018-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200423

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||c...@kernel.org
  Component|Other   |f2fs
 Resolution|--- |CODE_FIX
   Assignee|fs_ot...@kernel-bugs.osdl.o |linux-f2fs-de...@lists.sour
   |rg  |ceforge.net

--- Comment #4 from Chao Yu (c...@kernel.org) ---
After disableing CONFIG_F2FS_CHECK_FS and do retest, below dmesg was printed:

[ 2549.717979] F2FS-fs (loop0): Invalid log blocks per segment (8)
[ 2549.717987] F2FS-fs (loop0): Can't find valid F2FS filesystem in 2th
superblock
[ 2549.718721] F2FS-fs (loop0): invalid crc_offset: 30716
[ 2549.718729] F2FS-fs (loop0): Wrong cp_pack_start_sum: 4194305
[ 2549.718738] F2FS-fs (loop0): Failed to get valid F2FS checkpoint


So I think it has been fixed by below commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e494c2f995d6181d6e29c4927d68e0f295ecf75b

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200171] Divide zero in utilization when mount() a corrupted f2fs image

2018-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200171

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 CC||c...@kernel.org
  Component|Other   |f2fs
   Assignee|fs_ot...@kernel-bugs.osdl.o |linux-f2fs-de...@lists.sour
   |rg  |ceforge.net

--- Comment #3 from Chao Yu (c...@kernel.org) ---
Updated commit link:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9dc956b2c8523aed39d1e6508438be9fea28c8fc

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


[f2fs-dev] [Bug 200167] buffer overrun in build_sit_info() when mounting a crafted f2fs image

2018-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200167

Chao Yu (c...@kernel.org) changed:

   What|Removed |Added

 CC||c...@kernel.org
  Component|Other   |f2fs
   Assignee|fs_ot...@kernel-bugs.osdl.o |linux-f2fs-de...@lists.sour
   |rg  |ceforge.net

--- Comment #4 from Chao Yu (c...@kernel.org) ---
Updated commit link:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e34438c903b653daca2b2a7de95aed46226f8ed3

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


  1   2   3   4   5   6   7   8   >