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: <Ysqo6RjF/njUcOor@kroah.com>
Date:   Sun, 10 Jul 2022 12:24:41 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Cc:     Luis Chamberlain <mcgrof@...nel.org>,
        Russ Weight <russell.h.weight@...el.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Nick Terrell <terrelln@...com>, linux-kernel@...r.kernel.org,
        Ira Weiny <ira.weiny@...el.com>
Subject: Re: [PATCH] firmware_loader: Replace kmap() with kmap_local_page()

On Sun, Jul 10, 2022 at 12:11:56PM +0200, Fabio M. De Francesco wrote:
> The use of kmap() is being deprecated in favor of kmap_local_page().
> 
> With kmap_local_page() the mappings are per thread, CPU local, can take
> page faults, and can be called from any context (including interrupts).

But that is not the case here for this kmap() instance?  If this is a
simple search/replace, why is this not just done once and be done with
it?

> Call kmap_local_page() in firmware_loader wherever kmap() is currently
> used. In firmware_rw() use the copy_{from,to}_page() helpers instead of
> open coding the local mappings plus memcpy().

Isn't that just a different cleanup than the kmap() change?  Or is that
tied to the fact that the other buffer is now allocated with
kmap_local_page() instead of kmap()?

> Suggested-by: Ira Weiny <ira.weiny@...el.com>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
> ---
>  drivers/base/firmware_loader/main.c  | 4 ++--
>  drivers/base/firmware_loader/sysfs.c | 9 ++++-----
>  2 files changed, 6 insertions(+), 7 deletions(-)

Did you run this through the firmware test framework?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ