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, 7 Oct 2022 08:45:40 -0700
From:   Ira Weiny <ira.weiny@...el.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
CC:     "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Christoph Hellwig <hch@....de>,
        kernel test robot <lkp@...el.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        Linus Walleij <linus.walleij@...aro.org>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2] highmem: Fix kmap_to_page() for kmap_local_page()
 addresses

On Thu, Oct 06, 2022 at 01:33:31PM -0700, Andrew Morton wrote:
> On Wed,  5 Oct 2022 21:05:55 -0700 ira.weiny@...el.com wrote:
> 
> > kmap_to_page() is used to get the page for a virtual address which may
> > be kmap'ed.  Unfortunately, kmap_local_page() stores mappings in a
> > thread local array separate from kmap().  These mappings were not
> > checked by the call.
> > 
> > Check the kmap_local_page() mappings and return the page if found.
> > 
> > Because it is intended to remove kmap_to_page() add a warn on once to
> > the kmap checks to flag potential issues early.
> 
> What were the user-visible runtime effects of this?

No one actually hit a bug with this because AFAIK only one kmap() call has been
converted to kmap_local_page() which then eventually calls kmap_to_page().

	https://lore.kernel.org/lkml/YzN+ZYLjK6HI1P1C@ZenIV/

However that has already been fixed by Al in that thread.

> 
> Are we able to identify a Fixes:?

I suppose this could be added as a Fixes: to the original patch introducing
kmap_local_page()?  But one could argue that kmap_to_page() was only intended
to support kmap() addresses because it does not work with kmap_atomic()
addresses either.

I'm proposing this as a stop gap to ensure that work can continue on converting
kmap() uses to kmap_local_page() without fear of causing breakage while
simultaneously we evaluate and hopefully remove kmap_to_page() as well.

Ira

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ