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] [day] [month] [year] [list]
Date:   Fri, 17 Jun 2022 14:18:23 +0200
From:   "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To:     Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>,
        Nick Terrell <terrelln@...com>,
        Chris Down <chris@...isdown.name>,
        Filipe Manana <fdmanana@...e.com>, Qu Wenruo <wqu@...e.com>,
        Nikolay Borisov <nborisov@...e.com>,
        Gabriel Niebler <gniebler@...e.com>,
        linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Ira Weiny <ira.weiny@...el.com>
Subject: Re: [RFC PATCH] btrfs: Replace kmap() with kmap_local_page() in zlib.c

On martedì 14 giugno 2022 12:47:18 CEST Fabio M. De Francesco wrote:
> The use of kmap() is being deprecated in favor of kmap_local_page(). With
> kmap_local_page(), the mapping is per thread, CPU local and not globally
> visible.
> 
> Therefore, use kmap_local_page() / kunmap_local() in zlib.c because in
> this file the mappings are per thread and are not visible in other
> contexts; meanwhile refactor zlib_compress_pages() to comply with nested
> local mapping / unmapping ordering rules.
> 
> Tested with xfstests on QEMU + KVM 32 bits VM with 4GB of RAM and
> HIGHMEM64G enabled.
> 
> This is an RFC PATCH because it passes all tests of the "compress"
> group, with the only two exceptions of tests/btrfs/138 (it freezes the
> VM) and tests/btrfs/251 (it runs forever but doesn't freeze the VM).
> 
> Can anyone please take a look and tell me what I'm still overlooking
> after days of code inspections?
> 
> Suggested-by: Ira Weiny <ira.weiny@...el.com>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
> ---
>  fs/btrfs/zlib.c | 75 ++++++++++++++++++++++++++++++++-----------------
>  1 file changed, 50 insertions(+), 25 deletions(-)
> 
Please don't respond to this RFC and drop it. I've just split it into three 
new versions and send a series of RFC PATCH(es) which seems to work 
properly. 

They can pass all tests of the group "compress", but I decided to implement 
some questionable solutions. Therefore, I'd like to hear about them:

https://lore.kernel.org/lkml/20220617120538.18091-1-fmdefrancesco@gmail.com/T/#t

Thanks,

Fabio


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ