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: <20210203155648.GE1993@suse.cz>
Date:   Wed, 3 Feb 2021 16:56:48 +0100
From:   David Sterba <dsterba@...e.cz>
To:     ira.weiny@...el.com
Cc:     clm@...com, josef@...icpanda.com, dsterba@...e.com,
        Miao Xie <miaox@...fujitsu.com>, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] fs/btrfs: Fix raid6 qstripe kmap'ing

On Wed, Jan 27, 2021 at 10:15:03PM -0800, ira.weiny@...el.com wrote:
> From: Ira Weiny <ira.weiny@...el.com>
> 
> When a qstripe is required an extra page is allocated and mapped.  There
> were 3 problems.
> 
> 1) There is no reason to map the qstripe page more than 1 time if the
>    number of bits set in rbio->dbitmap is greater than one.
> 2) There is no reason to map the parity page and unmap it each time
>    through the loop.
> 3) There is no corresponding call of kunmap() for the qstripe page.
> 
> The page memory can continue to be reused with a single mapping on each
> iteration by raid6_call.gen_syndrome() without remapping.  So map the
> page for the duration of the loop.
> 
> Similarly, improve the algorithm by mapping the parity page just 1 time.
> 
> Fixes: 5a6ac9eacb49 ("Btrfs, raid56: support parity scrub on raid56")
> To: Chris Mason <clm@...com>
> To: Josef Bacik <josef@...icpanda.com>
> To: David Sterba <dsterba@...e.com>
> Cc: Miao Xie <miaox@...fujitsu.com>
> Signed-off-by: Ira Weiny <ira.weiny@...el.com>
> 
> ---
> This was found while replacing kmap() with kmap_local_page().  After
> this patch unwinding all the mappings becomes pretty straight forward.
> 
> I'm not exactly sure I've worded this commit message intelligently.
> Please forgive me if there is a better way to word it.

Changelog is good, thanks. I've added stable tags as the missing unmap
is a potential problem.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ