lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YdQN8Q4UsLgZVR+c@B-P7TQMD6M-0146.local>
Date:   Tue, 4 Jan 2022 17:05:53 +0800
From:   Gao Xiang <hsiangkao@...ux.alibaba.com>
To:     Chao Yu <chao@...nel.org>
Cc:     linux-erofs@...ts.ozlabs.org, Liu Bo <bo.liu@...ux.alibaba.com>,
        LKML <linux-kernel@...r.kernel.org>, Yue Hu <huyue2@...ong.com>
Subject: Re: [PATCH v2 1/5] erofs: introduce meta buffer operations

Hi Chao,

On Tue, Jan 04, 2022 at 03:54:08PM +0800, Chao Yu wrote:
> On 2022/1/2 12:00, Gao Xiang wrote:
> > In order to support subpage and folio for all uncompressed files,
> > introduce meta buffer descriptors, which can be effectively stored
> > on stack, in place of meta page operations.
> > 
> > This converts the uncompressed data path to meta buffers.
> > 
> > Signed-off-by: Gao Xiang <hsiangkao@...ux.alibaba.com>
> > ---
> >   fs/erofs/data.c     | 97 +++++++++++++++++++++++++++++++++++----------
> >   fs/erofs/internal.h | 13 ++++++
> >   2 files changed, 89 insertions(+), 21 deletions(-)
> > 
> > diff --git a/fs/erofs/data.c b/fs/erofs/data.c
> > index 4f98c76ec043..6495e16a50a9 100644
> > --- a/fs/erofs/data.c
> > +++ b/fs/erofs/data.c
> > @@ -22,6 +22,56 @@ struct page *erofs_get_meta_page(struct super_block *sb, erofs_blk_t blkaddr)
> >   	return page;
> >   }
> > +void erofs_unmap_metabuf(struct erofs_buf *buf)
> > +{
> > +	if (buf->kmap_type == EROFS_KMAP)
> > +		kunmap(buf->page);
> > +	else if (buf->kmap_type == EROFS_KMAP_ATOMIC)
> > +		kunmap_atomic(buf->base);
> 
> Once user calls this function, .base should be invalidated.
> 
> buf->base = NULL;

Thanks for your suggestion!

Since buf->kmap_type will be switched to EROFS_NO_KMAP, so buf->base
is completely ignored (IOWs, it's unnecessary to reset buf->base..),
however I'm fine to set buf->base = NULL here either.

Thanks,
Gao Xiang 

> 
> Otherwise, it looks good to me.
> 
> Reviewed-by: Chao Yu <chao@...nel.org>
> 
> Thanks,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ