Thread (117 messages) 117 messages, 8 authors, 2021-05-30

Re: [Patch v2 41/42] btrfs: fix the use-after-free bug in writeback subpage helper

From: Ritesh Harjani <hidden>
Date: 2021-05-25 13:02:46

On 21/05/25 07:41PM, Qu Wenruo wrote:

On 2021/5/25 下午6:20, Ritesh Harjani wrote:
[...]
quoted
quoted
quoted
- 9d57e61bf723 ("of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-
    bit memory addresses")
    Will screw up at least my ARM board, which is using device tree for
    its PCIE node.
    Have to revert it.

- 764c7c9a464b ("btrfs: zoned: fix parallel compressed writes")
    Will screw up compressed write with striped RAID profile.
    Fix sent to the mail list:

https://patchwork.kernel.org/project/linux-btrfs/patch/20210525055243.85166-1-wqu@suse.com/


- Known btrfs mkfs bug
    Fix sent to the mail list:

https://patchwork.kernel.org/project/linux-btrfs/patch/20210517095516.129287-1-wqu@suse.com/


- btrfs/215 false alert
    Fix sent to the mail list:

https://patchwork.kernel.org/project/linux-btrfs/patch/20210517092922.119788-1-wqu@suse.com/
Please wait for while.

I just checked my latest result, the branch doesn't pass my local test
for subpage case.

I'll fix it first, sorry for the problem.
Ok, yes (it's failing for me in some test case).
Sure, will until your confirmation.
Got the reason. The patch "btrfs: allow submit_extent_page() to do bio
split for subpage" got a conflict when got rebased, due to zone code change.

The conflict wasn't big, but to be extra safe, I manually re-craft the
patch from the scratch, to find out what's wrong.

During that re-crafting, I forgot to delete two lines, prevent
btrfs_add_bio_page() from splitting bio properly, and submit empty bio,
thus causing an ASSERT() in submit_extent_page().

The bug can be reliably reproduced by btrfs/060, thus that one can be a
quick test to make sure the problem is gone.

BTW, for older subpage branch, the latest one without problem is at HEAD
2af4eb21b234c6ddbc37568529219d33038f7f7c, which I also tested on a
Power8 VM, it passes "-g auto" with only 18 known failures.

I believe it's now safe to re-test.
Thanks. I will give your latest subpage github branch a run then :)

-ritesh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help