Re: [PATCH] erofs: initialized fields can only be observed after bit is set

2021-02-10 Thread Chao Yu
On 2021/2/9 21:06, Gao Xiang via Linux-erofs wrote: From: Gao Xiang Currently, although set_bit() & test_bit() pairs are used as a fast- path for initialized configurations. However, these atomic ops are actually relaxed forms. Instead, load-acquire & store-release form is needed to make sure u

Re: [PATCH] erofs: fix shift-out-of-bounds of blkszbits

2021-02-10 Thread Chao Yu
On 2021/1/20 9:30, Gao Xiang via Linux-erofs wrote: From: Gao Xiang syzbot generated a crafted bitszbits which can be shifted out-of-bounds[1]. So directly print unsupported blkszbits instead of blksize. [1] https://lore.kernel.org/r/c72ddd05b9444...@google.com Reported-by: syzbot+

Re: [PATCH] erofs: fix shift-out-of-bounds of blkszbits

2021-02-10 Thread Gao Xiang
Hi Chao, On Wed, Jan 20, 2021 at 09:30:16AM +0800, Gao Xiang wrote: > From: Gao Xiang > > syzbot generated a crafted bitszbits which can be shifted > out-of-bounds[1]. So directly print unsupported blkszbits > instead of blksize. > > [1] https://lore.kernel.org/r/c72ddd05b9444...@go

Re: [PATCH] erofs: initialized fields can only be observed after bit is set

2021-02-10 Thread Gao Xiang
Hi Chao, On Wed, Feb 10, 2021 at 08:09:22PM +0800, Chao Yu wrote: > Hi Xiang, > > On 2021/2/9 21:06, Gao Xiang via Linux-erofs wrote: > > From: Gao Xiang > > > > Currently, although set_bit() & test_bit() pairs are used as a fast- > > path for initialized configurations. However, these atomic o

Re: [PATCH] erofs: initialized fields can only be observed after bit is set

2021-02-10 Thread Chao Yu
Hi Xiang, On 2021/2/9 21:06, Gao Xiang via Linux-erofs wrote: From: Gao Xiang Currently, although set_bit() & test_bit() pairs are used as a fast- path for initialized configurations. However, these atomic ops are actually relaxed forms. Instead, load-acquire & store-release form is needed to