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:   Thu, 27 Oct 2022 18:05:48 +0800
From:   Zhao Liu <zhao1.liu@...ux.intel.com>
To:     Wei Liu <wei.liu@...nel.org>
Cc:     "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Dexuan Cui <decui@...rosoft.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>, linux-hyperv@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Ira Weiny  <ira.weiny@...el.com>,
        "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
        Zhenyu Wang <zhenyu.z.wang@...el.com>,
        Zhao Liu <zhao1.liu@...el.com>
Subject: Re: [PATCH v2] x86/hyperv: Remove BUG_ON() for kmap_local_page()

On Wed, Oct 26, 2022 at 03:17:18PM +0000, Wei Liu wrote:
> Date: Wed, 26 Oct 2022 15:17:18 +0000
> From: Wei Liu <wei.liu@...nel.org>
> Subject: Re: [PATCH v2] x86/hyperv: Remove BUG_ON() for kmap_local_page()
> 
> On Thu, Oct 20, 2022 at 04:38:20PM +0800, Zhao Liu wrote:
> > From: Zhao Liu <zhao1.liu@...el.com>
> > 
> > The commit 154fb14df7a3c ("x86/hyperv: Replace kmap() with
> > kmap_local_page()") keeps the BUG_ON() to check if kmap_local_page()
> > fails.
> > 
> > But in fact, kmap_local_page() always returns a valid kernel address
> > and won't return NULL here. It will BUG on its own if it fails. [1]
> > 
> > So directly use memcpy_to_page() which creates local mapping to copy.
> > 
> > [1]: https://lore.kernel.org/lkml/YztFEyUA48et0yTt@iweiny-mobl/
> > 
> > Suggested-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
> > Suggested-by: Ira Weiny <ira.weiny@...el.com>
> > Reviewed-by: Ira Weiny <ira.weiny@...el.com>
> > Signed-off-by: Zhao Liu <zhao1.liu@...el.com>
> 
> Applied to hyperv-fixes. Thanks.

Sorry Wei, I appology for not deleting unused variables, which caused
the next tree break. Do I need to send another v3 to make up for my
carelessness?

Zhao

Powered by blists - more mailing lists