RE: [PATCH] staging: erofs: fix an error handling in erofs_readdir()

2019-08-19 Thread Li, Philip
> Subject: Re: [PATCH] staging: erofs: fix an error handling in erofs_readdir() > > Hi Philip, > > On Tue, Aug 20, 2019 at 02:50:38PM +0800, Philip Li wrote: > > On Sun, Aug 18, 2019 at 09:25:04PM +0800, Gao Xiang wrote: > > > On Sun, Aug 18, 2019 at 09:17:52PM +0800, kbuild test robot wrote: > >

Re: [PATCH] staging: erofs: fix an error handling in erofs_readdir()

2019-08-19 Thread Gao Xiang
Hi Philip, On Tue, Aug 20, 2019 at 02:50:38PM +0800, Philip Li wrote: > On Sun, Aug 18, 2019 at 09:25:04PM +0800, Gao Xiang wrote: > > On Sun, Aug 18, 2019 at 09:17:52PM +0800, kbuild test robot wrote: > > > Hi Gao, > > > > > > I love your patch! Yet something to improve: > > > > > > [auto build

Re: [PATCH] staging: erofs: fix an error handling in erofs_readdir()

2019-08-19 Thread Philip Li
On Sun, Aug 18, 2019 at 09:25:04PM +0800, Gao Xiang wrote: > On Sun, Aug 18, 2019 at 09:17:52PM +0800, kbuild test robot wrote: > > Hi Gao, > > > > I love your patch! Yet something to improve: > > > > [auto build test ERROR on linus/master] > > [cannot apply to v5.3-rc4 next-20190816] > > [if you

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Gao Xiang
Hi Qu, On Tue, Aug 20, 2019 at 02:04:46PM +0800, Qu Wenruo wrote: > [...] > > And performance is another point. > That tree-checker in btrfs is as fast/slow as CRC32. > Not sure how it would be for dm-verity, but I guess it's slower than > CRC32 if using any strong hash. Just a word, dm-verity c

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Qu Wenruo
[...] >> The same tool exists for btrfs, although lacks the write ability, but >> that dump is more comprehensive and a great tool to learn the on-disk >> format. >> >> >> And for the fuzzing defending part, just a few kernel releases ago, >> there is none for btrfs, and now we have a full static v

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Gao Xiang
On Tue, Aug 20, 2019 at 11:33:51AM +0800, Miao Xie wrote: > > > on 2019/8/20 at 8:55, Qu Wenruo wrote: > > [...] > I have made a simple fuzzer to inject messy in inode metadata, > dir data, compressed indexes and super block, > https://git.kernel.org/pub/scm/linux/kernel/git/xiang/

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Miao Xie
on 2019/8/20 at 8:55, Qu Wenruo wrote: > [...] I have made a simple fuzzer to inject messy in inode metadata, dir data, compressed indexes and super block, https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?h=experimental-fuzzer I am testing wi

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Qu Wenruo
On 2019/8/20 上午10:24, Chao Yu wrote: > On 2019/8/20 8:55, Qu Wenruo wrote: >> [...] > I have made a simple fuzzer to inject messy in inode metadata, > dir data, compressed indexes and super block, > https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?h=experi

Re: [RFC PATCH 08/15] drivers/acrn: add VM memory management for ACRN char device

2019-08-19 Thread Zhao, Yakui
On 2019年08月19日 15:39, Dan Carpenter wrote: On Mon, Aug 19, 2019 at 01:32:54PM +0800, Zhao, Yakui wrote: In fact as this driver is mainly used for embedded IOT usage, it doesn't handle the complex cleanup when such error is encountered. Instead the clean up is handled in free_guest_vm. A use

Re: [RFC PATCH 15/15] drivers/acrn: add the support of offline SOS cpu

2019-08-19 Thread Zhao, Yakui
On 2019年08月19日 18:34, Dan Carpenter wrote: On Fri, Aug 16, 2019 at 10:25:56AM +0800, Zhao Yakui wrote: diff --git a/drivers/staging/acrn/acrn_dev.c b/drivers/staging/acrn/acrn_dev.c index 0602125..6868003 100644 --- a/drivers/staging/acrn/acrn_dev.c +++ b/drivers/staging/acrn/acrn_dev.c @@ -58

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Chao Yu
On 2019/8/20 8:55, Qu Wenruo wrote: > [...] I have made a simple fuzzer to inject messy in inode metadata, dir data, compressed indexes and super block, https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?h=experimental-fuzzer I am testing with som

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Gao Xiang
Hi Qu, On Tue, Aug 20, 2019 at 08:55:32AM +0800, Qu Wenruo wrote: > [...] > >>> I have made a simple fuzzer to inject messy in inode metadata, > >>> dir data, compressed indexes and super block, > >>> https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?h=experimental-fuzz

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Qu Wenruo
[...] >>> I have made a simple fuzzer to inject messy in inode metadata, >>> dir data, compressed indexes and super block, >>> https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?h=experimental-fuzzer >>> >>> I am testing with some given dirs and the following script. >>>

driverdev-devel@linuxdriverproject.org

2019-08-19 Thread Mr. Ryan Roger
Good Day , My name is Mr. Ryan Rogers the Independent Financial Consultant. We are contacting you concerning funding of your business project. We are interested to partnership with you as we are seeking to diversify our financial portfolio into viable and lucrative business projects that worth

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Gao Xiang
Hi Darrick, On Mon, Aug 19, 2019 at 09:09:23AM -0700, Darrick J. Wong wrote: > On Mon, Aug 19, 2019 at 04:14:11AM +0800, Gao Xiang wrote: > > Hi all, > > > > On Mon, Aug 19, 2019 at 02:16:55AM +0800, Gao Xiang wrote: > > > Hi Hch, > > > > > > On Sun, Aug 18, 2019 at 10:47:02AM -0700, Christoph H

Re: [PATCH 2/2] staging: rtl8192e: rtllib_crypt_ccmp.c: Use crypto API ccm(aes)

2019-08-19 Thread Larry Finger
On 8/16/19 1:59 AM, Christina Quast wrote: Use ccm(aes) aead transform instead of invoking the AES block cipher block by block. Signed-off-by: Christina Quast --- drivers/staging/rtl8192e/Kconfig | 1 + drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 187 --- 2

[PATCH] staging: rtl8723bs: core: Remove unneeded declaration WFD_OUI

2019-08-19 Thread Hariprasad Kelam
Remove unneeded declaration "extern unsigned char WFD_OUI" Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/core/rtw_ap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 02f5478..6d18d23 1006

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Darrick J. Wong
On Mon, Aug 19, 2019 at 04:14:11AM +0800, Gao Xiang wrote: > Hi all, > > On Mon, Aug 19, 2019 at 02:16:55AM +0800, Gao Xiang wrote: > > Hi Hch, > > > > On Sun, Aug 18, 2019 at 10:47:02AM -0700, Christoph Hellwig wrote: > > > On Sun, Aug 18, 2019 at 10:29:38AM -0700, Eric Biggers wrote: > > > > No

Re: [PATCH 6/6] staging: erofs: avoid endless loop of invalid lookback distance 0

2019-08-19 Thread Chao Yu
On 2019-8-19 18:34, Gao Xiang wrote: > As reported by erofs-utils fuzzer, Lookback distance should > be a positive number, so it should be actually looked back > rather than spinning. > > Fixes: 02827e1796b3 ("staging: erofs: add erofs_map_blocks_iter") > Cc: # 4.19+ > Signed-off-by: Gao Xiang

Re: [PATCH 5/6] staging: erofs: detect potential multiref due to corrupted images

2019-08-19 Thread Chao Yu
On 2019-8-19 18:34, Gao Xiang wrote: > As reported by erofs-utils fuzzer, currently, multiref > (ondisk deduplication) hasn't been supported for now, > we should forbid it properly. > > Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") > Cc: # 4.19+ > Signed-off-by: Gao

Re: [PATCH 4/6] staging: erofs: avoid loop in submit chains

2019-08-19 Thread Chao Yu
On 2019-8-19 18:34, Gao Xiang wrote: > As reported by erofs-utils fuzzer, 2 conditions > can happen in corrupted images, which can cause > unexpected behaviors. > - access the same pcluster one more time; > - access the tail end pcluster again, e.g. > _ access again (will trigger tail

Re: [PATCH 2/6] staging: erofs: cannot set EROFS_V_Z_INITED_BIT if fill_inode_lazy fails

2019-08-19 Thread Chao Yu
On 2019-8-19 18:34, Gao Xiang wrote: > As reported by erofs-utils fuzzer, unsupported compressed > clustersize will make fill_inode_lazy fail, for such case > we cannot set EROFS_V_Z_INITED_BIT since we need return > failure for each z_erofs_map_blocks_iter(). > > Fixes: 152a333a5895 ("staging: er

Re: [PATCH 3/6] staging: erofs: add two missing erofs_workgroup_put for corrupted images

2019-08-19 Thread Chao Yu
On 2019-8-19 18:34, Gao Xiang wrote: > As reported by erofs-utils fuzzer, these error handling > path will be entered to handle corrupted images. > > Lack of erofs_workgroup_puts will cause unmounting > unsuccessfully. > > Fix these return values to EFSCORRUPTED as well. > > Fixes: 3883a79abd02

Re: [PATCH 1/6] staging: erofs: some compressed cluster should be submitted for corrupted images

2019-08-19 Thread Chao Yu
On 2019-8-19 18:34, Gao Xiang wrote: > As reported by erofs_utils fuzzer, a logical page can belong > to at most 2 compressed clusters, if one compressed cluster > is corrupted, but the other has been ready in submitting chain. > > The chain needs to submit anyway in order to keep the page > worki

Re: [PATCH 1/6] staging: erofs: some compressed cluster should be submitted for corrupted images

2019-08-19 Thread Chao Yu
On 2019-8-19 18:34, Gao Xiang wrote: > As reported by erofs_utils fuzzer, a logical page can belong > to at most 2 compressed clusters, if one compressed cluster > is corrupted, but the other has been ready in submitting chain. > > The chain needs to submit anyway in order to keep the page > worki

[PATCH 2/6] staging: erofs: cannot set EROFS_V_Z_INITED_BIT if fill_inode_lazy fails

2019-08-19 Thread Gao Xiang
As reported by erofs-utils fuzzer, unsupported compressed clustersize will make fill_inode_lazy fail, for such case we cannot set EROFS_V_Z_INITED_BIT since we need return failure for each z_erofs_map_blocks_iter(). Fixes: 152a333a5895 ("staging: erofs: add compacted compression indexes support")

[PATCH 5/6] staging: erofs: detect potential multiref due to corrupted images

2019-08-19 Thread Gao Xiang
As reported by erofs-utils fuzzer, currently, multiref (ondisk deduplication) hasn't been supported for now, we should forbid it properly. Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") Cc: # 4.19+ Signed-off-by: Gao Xiang --- drivers/staging/erofs/zdata.c | 16

[PATCH 6/6] staging: erofs: avoid endless loop of invalid lookback distance 0

2019-08-19 Thread Gao Xiang
As reported by erofs-utils fuzzer, Lookback distance should be a positive number, so it should be actually looked back rather than spinning. Fixes: 02827e1796b3 ("staging: erofs: add erofs_map_blocks_iter") Cc: # 4.19+ Signed-off-by: Gao Xiang --- drivers/staging/erofs/zmap.c | 6 ++ 1 file

[PATCH 3/6] staging: erofs: add two missing erofs_workgroup_put for corrupted images

2019-08-19 Thread Gao Xiang
As reported by erofs-utils fuzzer, these error handling path will be entered to handle corrupted images. Lack of erofs_workgroup_puts will cause unmounting unsuccessfully. Fix these return values to EFSCORRUPTED as well. Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support")

[PATCH 4/6] staging: erofs: avoid loop in submit chains

2019-08-19 Thread Gao Xiang
As reported by erofs-utils fuzzer, 2 conditions can happen in corrupted images, which can cause unexpected behaviors. - access the same pcluster one more time; - access the tail end pcluster again, e.g. _ access again (will trigger tail merging) | 1 2 3 1 2

[PATCH 0/6] staging: erofs: first stage of corrupted compressed images

2019-08-19 Thread Gao Xiang
Hi all, I have fuzzed EROFS for about a day and observed the following issues due to corrupted compression images by my first fuzzer (It seems ok for uncompressed images for now). Now it can survive for 10+ minutes on my PC (Let me send out what I'm done and I will dig it more deeply...) All the

[PATCH 1/6] staging: erofs: some compressed cluster should be submitted for corrupted images

2019-08-19 Thread Gao Xiang
As reported by erofs_utils fuzzer, a logical page can belong to at most 2 compressed clusters, if one compressed cluster is corrupted, but the other has been ready in submitting chain. The chain needs to submit anyway in order to keep the page working properly (page unlocked with PG_error set, PG_

Re: [RFC PATCH 15/15] drivers/acrn: add the support of offline SOS cpu

2019-08-19 Thread Dan Carpenter
On Fri, Aug 16, 2019 at 10:25:56AM +0800, Zhao Yakui wrote: > diff --git a/drivers/staging/acrn/acrn_dev.c b/drivers/staging/acrn/acrn_dev.c > index 0602125..6868003 100644 > --- a/drivers/staging/acrn/acrn_dev.c > +++ b/drivers/staging/acrn/acrn_dev.c > @@ -588,6 +588,41 @@ static const struct fil

Re: [RFC PATCH 08/15] drivers/acrn: add VM memory management for ACRN char device

2019-08-19 Thread Borislav Petkov
On Mon, Aug 19, 2019 at 10:39:58AM +0300, Dan Carpenter wrote: > On Mon, Aug 19, 2019 at 01:32:54PM +0800, Zhao, Yakui wrote: > > In fact as this driver is mainly used for embedded IOT usage, it doesn't > > handle the complex cleanup when such error is encountered. Instead the clean > > up is handl

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Gao Xiang
Hi Richard, On Mon, Aug 19, 2019 at 09:35:43AM +0200, Richard Weinberger wrote: > - Ursprüngliche Mail - > > I have made a simple fuzzer to inject messy in inode metadata, > > dir data, compressed indexes and super block, > > https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-util

Re: [RFC PATCH 08/15] drivers/acrn: add VM memory management for ACRN char device

2019-08-19 Thread Dan Carpenter
On Mon, Aug 19, 2019 at 01:32:54PM +0800, Zhao, Yakui wrote: > In fact as this driver is mainly used for embedded IOT usage, it doesn't > handle the complex cleanup when such error is encountered. Instead the clean > up is handled in free_guest_vm. A use after free here seems like a potential secu

Re: [PATCH v3 1/3] ARM: dts: imx6ul: Add csi node

2019-08-19 Thread Shawn Guo
On Wed, Jul 31, 2019 at 06:32:57PM +0200, Sébastien Szymanski wrote: > Add csi node for i.MX6UL SoC. > > Reviewed-by: Fabio Estevam > Signed-off-by: Sébastien Szymanski Applied, thanks. ___ devel mailing list de...@linuxdriverproject.org http://driver

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Richard Weinberger
- Ursprüngliche Mail - > On Sun, Aug 18, 2019 at 10:29:38AM -0700, Eric Biggers wrote: >> Not sure what you're even disagreeing with, as I *do* expect new filesystems >> to >> be held to a high standard, and to be written with the assumption that the >> on-disk data may be corrupted or mal

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Richard Weinberger
- Ursprüngliche Mail - > I have made a simple fuzzer to inject messy in inode metadata, > dir data, compressed indexes and super block, > https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?h=experimental-fuzzer > > I am testing with some given dirs and the follow