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]
Date:   Tue, 26 Jul 2022 14:04:00 +0200
From:   "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To:     Viacheslav Dubeyko <slava@...eyko.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Ira Weiny <ira.weiny@...el.com>
Subject: Re: [PATCH] hfsplus: Convert kmap() to kmap_local_page() in bitmap.c

On lunedì 25 luglio 2022 19:17:13 CEST Viacheslav Dubeyko wrote:
> 
> > On Jul 24, 2022, at 1:50 PM, Fabio M. De Francesco 
<fmdefrancesco@...il.com> wrote:
> > 
> > kmap() is being deprecated in favor of kmap_local_page().
> > 
> > There are two main problems with kmap(): (1) It comes with an overhead 
as
> > mapping space is restricted and protected by a global lock for
> > synchronization and (2) it also requires global TLB invalidation when 
the
> > kmap’s pool wraps and it might block when the mapping space is fully
> > utilized until a slot becomes available.
> > 
> > With kmap_local_page() the mappings are per thread, CPU local, can take
> > page faults, and can be called from any context (including interrupts).
> > It is faster than kmap() in kernels with HIGHMEM enabled. Furthermore,
> > the tasks can be preempted and, when they are scheduled to run again, 
the
> > kernel virtual addresses are restored and are still valid.
> > 
> > Since its use in bitmap.c is safe everywhere, it should be preferred.
> > 
> > Therefore, replace kmap() with kmap_local_page() in bnode.c.
> > 
> 
> Looks good. Maybe, it makes sense to combine all kmap() related 
modifications in HFS+ into
> one patchset?
> 
> Reviewed by: Viacheslav Dubeyko <slava@...eyko.com> 

Thanks for your reviews of this and of the other patch to bnode.c.

Actually, I started with the first file I met (bnode.c) because I noticed 
that maintainers don't need to care about any special ordering for applying 
the patches, since each of them is self-contained.

This is why I haven't thought of making a series of them.

Currently only one file is still left with some kmap() call sites. I'll 
work on that within the next days.

Again thanks,

Fabio 

> Thanks,
> Slava.
> 
> > Suggested-by: Ira Weiny <ira.weiny@...el.com>
> > Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
> > ---
> > fs/hfsplus/bitmap.c | 18 +++++++++---------
> > 1 file changed, 9 insertions(+), 9 deletions(-)

[snip]


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ