Re: [PATCH 3/5] cachefiles: flush ondemand_object_worker during clean object

2024-04-24 Thread Baokun Li
Hi Jia, On 2024/4/25 13:41, Jia Zhu wrote: Thanks for catching this. How about adding a Fixes tag. Reviewed-by: Jia Zhu Ok, I will add the Fixes tag in the next iteration. Thank you very much for your review! Cheers! Baokun 在 2024/4/24 11:34, libao...@huaweicloud.com 写道: From: Hou Tao

Re: [PATCH 3/5] cachefiles: flush ondemand_object_worker during clean object

2024-04-24 Thread Jia Zhu via Linux-erofs
Thanks for catching this. How about adding a Fixes tag. Reviewed-by: Jia Zhu 在 2024/4/24 11:34, libao...@huaweicloud.com 写道: From: Hou Tao When queuing ondemand_object_worker() to re-open the object, cachefiles_object is not pinned. The cachefiles_object may be freed when the pending read r

Re: [PATCH 12/12] cachefiles: make on-demand read killable

2024-04-24 Thread Jia Zhu via Linux-erofs
在 2024/4/24 11:39, libao...@huaweicloud.com 写道: From: Baokun Li Replacing wait_for_completion() with wait_for_completion_killable() in cachefiles_ondemand_send_req() allows us to kill processes that might trigger a hunk_task if the daemon is abnormal. But now only CACHEFILES_OP_READ is kill

Re: [PATCH 10/12] cachefiles: Set object to close if ondemand_id < 0 in copen

2024-04-24 Thread Jia Zhu via Linux-erofs
在 2024/4/24 11:39, libao...@huaweicloud.com 写道: From: Zizhi Wo If copen is maliciously called in the user mode, it may delete the request corresponding to the random id. And the request may have not been read yet. Note that when the object is set to reopen, the open request will be done wit

Re: [External] [PATCH 04/12] cachefiles: fix slab-use-after-free in cachefiles_ondemand_daemon_read()

2024-04-24 Thread Jia Zhu via Linux-erofs
在 2024/4/24 11:39, libao...@huaweicloud.com 写道: From: Baokun Li We got the following issue in a fuzz test of randomly issuing the restore command: == BUG: KASAN: slab-use-after-free in cachefiles_ondemand_daemon_read+0xb41/0xb6

Re: [PATCH 03/12] cachefiles: fix slab-use-after-free in cachefiles_ondemand_get_fd()

2024-04-24 Thread Jia Zhu via Linux-erofs
在 2024/4/24 11:39, libao...@huaweicloud.com 写道: From: Baokun Li We got the following issue in a fuzz test of randomly issuing the restore command: == BUG: KASAN: slab-use-after-free in cachefiles_ondemand_daemon_read+0x609/0xab

Re: [PATCH 02/12] cachefiles: remove err_put_fd tag in cachefiles_ondemand_daemon_read()

2024-04-24 Thread Jia Zhu via Linux-erofs
在 2024/4/24 11:39, libao...@huaweicloud.com 写道: From: Baokun Li The err_put_fd tag is only used once, so remove it to make the code more readable. Signed-off-by: Baokun Li Reviewed-by: Jia Zhu --- fs/cachefiles/ondemand.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-)

Re: [PATCH 01/12] cachefiles: remove request from xarry during flush requests

2024-04-24 Thread Jia Zhu via Linux-erofs
在 2024/4/24 11:39, libao...@huaweicloud.com 写道: From: Baokun Li This prevents concurrency from causing access to a freed req. Signed-off-by: Baokun Li Reviewed-by: Jia Zhu --- fs/cachefiles/daemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/cachefiles/daemon.c b/fs/cac

Re: [PATCH v2] erofs-utils: add missing block counting

2024-04-24 Thread Noboru Asai
Hi Gao, Oh, sorry. I knew to access i_blkaddr on uncompressed file, but it didn't occur on the file system for testing, so I overlooked it. I needed to be careful. 2024年4月24日(水) 19:38 Gao Xiang : > > On Wed, Apr 24, 2024 at 02:15:58PM +0800, Gao Xiang wrote: > > > > > > On 2024/4/24 13:59, Nobor

Re: [PATCH 03/12] cachefiles: fix slab-use-after-free in cachefiles_ondemand_get_fd()

2024-04-24 Thread Baokun Li
Hi Jia, On 2024/4/24 22:55, Jia Zhu wrote: 在 2024/4/24 11:39, libao...@huaweicloud.com 写道: From: Baokun Li We got the following issue in a fuzz test of randomly issuing the restore command: == BUG: KASAN: slab-use-after-free

Re: Trying to work with the tests

2024-04-24 Thread Gao Xiang
On 2024/4/24 18:37, Ian Kent wrote: On 24/4/24 17:47, Ian Kent wrote: On 23/4/24 18:34, Gao Xiang wrote: Hi Ian, On 2024/4/22 21:10, Ian Kent wrote: On 22/4/24 17:12, Gao Xiang wrote: Hi Ian, (+Cc Jingbo here). On 2024/4/22 16:31, Ian Kent wrote: I'm new to the list so Hi to all, I'm

Re: [PATCH 03/12] cachefiles: fix slab-use-after-free in cachefiles_ondemand_get_fd()

2024-04-24 Thread Jia Zhu via Linux-erofs
在 2024/4/24 11:39, libao...@huaweicloud.com 写道: From: Baokun Li We got the following issue in a fuzz test of randomly issuing the restore command: == BUG: KASAN: slab-use-after-free in cachefiles_ondemand_daemon_read+0x609/0xab

Re: [PATCH -next] erofs: modify the error message when prepare_ondemand_read failed

2024-04-24 Thread Jingbo Xu
On 4/24/24 4:42 PM, Hongbo Li wrote: > When prepare_ondemand_read failed, wrong error message is printed. > The prepare_read is also implemented in cachefiles, so we amend it. > > Reviewed-by: Gao Xiang > Signed-off-by: Hongbo Li > --- > fs/erofs/fscache.c | 2 +- > 1 file changed, 1 inserti

Re: Trying to work with the tests

2024-04-24 Thread Ian Kent
On 24/4/24 17:47, Ian Kent wrote: On 23/4/24 18:34, Gao Xiang wrote: Hi Ian, On 2024/4/22 21:10, Ian Kent wrote: On 22/4/24 17:12, Gao Xiang wrote: Hi Ian, (+Cc Jingbo here). On 2024/4/22 16:31, Ian Kent wrote: I'm new to the list so Hi to all, I'm working with a heavily patched 5.14 ker

Re: [PATCH v2] erofs-utils: add missing block counting

2024-04-24 Thread Gao Xiang
On Wed, Apr 24, 2024 at 02:15:58PM +0800, Gao Xiang wrote: > > > On 2024/4/24 13:59, Noboru Asai wrote: > > Add missing block counting when the data to be inlined is not inlined. > > > > --- > > v2: > > - move from erofs_write_tail_end() to erofs_prepare_tail_block() > > > > Signed-off-by: Nobo

Re: Trying to work with the tests

2024-04-24 Thread Gao Xiang
On 2024/4/24 17:47, Ian Kent wrote: On 23/4/24 18:34, Gao Xiang wrote: Hi Ian, On 2024/4/22 21:10, Ian Kent wrote: On 22/4/24 17:12, Gao Xiang wrote: Hi Ian, (+Cc Jingbo here). On 2024/4/22 16:31, Ian Kent wrote: I'm new to the list so Hi to all, I'm working with a heavily patched 5.1

Re: Trying to work with the tests

2024-04-24 Thread Ian Kent
On 23/4/24 18:34, Gao Xiang wrote: Hi Ian, On 2024/4/22 21:10, Ian Kent wrote: On 22/4/24 17:12, Gao Xiang wrote: Hi Ian, (+Cc Jingbo here). On 2024/4/22 16:31, Ian Kent wrote: I'm new to the list so Hi to all, I'm working with a heavily patched 5.14 kernel and I've gathered together pat

[PATCH -next] erofs: modify the error message when prepare_ondemand_read failed

2024-04-24 Thread Hongbo Li via Linux-erofs
When prepare_ondemand_read failed, wrong error message is printed. The prepare_read is also implemented in cachefiles, so we amend it. Reviewed-by: Gao Xiang Signed-off-by: Hongbo Li --- fs/erofs/fscache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/fscache.c b/

Re: [PATCH -next] erofs: modify the error message when prepare_ondemand_read failed

2024-04-24 Thread Hongbo Li via Linux-erofs
ok, thanks! On 2024/4/24 11:29, Gao Xiang wrote: (+cc linux-erofs & LKML) On 2024/4/24 10:39, Hongbo Li wrote: When prepare_ondemand_read failed, wrong error message is printed. The prepare_read is also implemented in cachefiles, so we amend it. Signed-off-by: Hongbo Li Reviewed-by: Gao X