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]
Message-ID: <8960694.CDJkKcVGEf@opensuse>
Date:   Mon, 27 Jun 2022 20:01:31 +0200
From:   "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To:     David Sterba <dsterba@...e.com>
Cc:     Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.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>,
        Ira Weiny <ira.weiny@...el.com>, linux-btrfs@...r.kernel.org,
        linux-kernel@...r.kernel.org, David Sterba <dsterba@...e.cz>
Subject: Re: [RFC PATCH] btrfs: Replace kmap_atomic() with kmap_local_page()

On venerdì 24 giugno 2022 10:42:15 CEST Fabio M. De Francesco wrote:
> kmap_atomic() is being deprecated in favor of kmap_local_page() where it
> is feasible. With kmap_local_page() mappings are per thread, CPU local,
> and not globally visible.
> 
> As far as I can see, the kmap_atomic() calls in compression.c and in
> inode.c can be safely converted.
> 
> Above all else, David Sterba has confirmed that "The context in
> check_compressed_csum is atomic [...]" and that "kmap_atomic() in inode.c
> [...] also can be replaced by kmap_local_page().".[1]
> 
> Therefore, convert all kmap_atomic() calls currently still left in fs/
btrfs
> to kmap_local_page().
> 
> This is an RFC only because, testing with "./check -g quick" (xfstests) 
on
> a QEMU + KVM 32-bits VM with 4GB RAM and booting a kernel with 
HIGHMEM64GB
> enabled, outputs several errors. These errors seem to be exactly the same
> which are being output without this patch. It apparently seems that these
> changes don't introduce further errors, however I'd like to ask for
> comments before sending a "real" patch.
> 
> With this patch, there are no more call sites for kmap() and 
kmap_atomic()
> in fs/btrfs.
> 
> [1] https://lore.kernel.org/linux-btrfs/
20220601132545.GM20633@...n.jikos.cz/
> 
> Suggested-by: Ira Weiny <ira.weiny@...el.com>
> Suggested-by: David Sterba <dsterba@...e.cz>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
> ---
>  fs/btrfs/compression.c |  4 ++--
>  fs/btrfs/inode.c       | 12 ++++++------
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 

Please discard this RFC.

I've just submitted a real patch:

https://lore.kernel.org/lkml/20220627174849.29962-1-fmdefrancesco@gmail.com/

Thanks,

Fabio


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ