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: <X85bY0Itm0vxH3+I@google.com>
Date:   Mon, 7 Dec 2020 08:42:11 -0800
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Chao Yu <yuchao0@...wei.com>
Cc:     Daeho Jeong <daeho43@...il.com>, linux-kernel@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net, kernel-team@...roid.com,
        Daeho Jeong <daehojeong@...gle.com>
Subject: Re: [f2fs-dev] [PATCH v3] f2fs: fix race of pending_pages in
 decompression

On 12/07, Chao Yu wrote:
> On 2020/12/7 15:28, Daeho Jeong wrote:
> > > It looks like it will be better to move this into merge condition?
> > > 
> > >                  if (bio && (!page_is_mergeable(sbi, bio,
> > >                                          *last_block_in_bio, blkaddr) ||
> > >                      !f2fs_crypt_mergeable_bio(bio, inode, page->index, NULL) ||
> > >                          f2fs_verify_mergeable_bio())) {
> > > 
> > 
> > I tried this for the first time, but it requires unnecessary checks
> > within the compression cluster.
> 
> We only need to check f2fs_verify_mergeable_bio for i == 0 case? something like:
> 
> static bool f2fs_verify_mergeable_bio(struct bio *bio, bool verify, bool first_page)
> {
> 	if (!first_page)

Agreed that we don't need to run this instruction for every pages.

> 		return false;
> 	if (!verify)
> 		return false;
> 
> 	ctx = bio->bi_private;
> 	if (!(ctx->enabled_steps & (1 << STEP_VERITY)))
> 		return true;
> }
> 
> Thoughts?
> 
> > I wanted to just check one time in the beginning of the cluster.
> > What do you think?
> 
> It's trivial, but I'm think about the readability... at least, one line comment
> is needed to describe why we submit previous bio. :)

I added like this. :P
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev&id=f189a2471df2560e5834d999ab4ff68bc10853e4

> 
> Thanks,
> 
> > .
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ