From: Ira Weiny <ira.weiny@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Christoph Hellwig <hch@lst.de>, kernel test robot <lkp@intel.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Linus Walleij <linus.walleij@linaro.org>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2] highmem: Fix kmap_to_page() for kmap_local_page() addresses
Date: Fri, 7 Oct 2022 08:45:40 -0700 [thread overview]
Message-ID: <Y0BJpOiAlStJJ5CM@iweiny-desk3> (raw)
In-Reply-To: <20221006133331.dabd345508f7d62a887dfb4d@linux-foundation.org>
On Thu, Oct 06, 2022 at 01:33:31PM -0700, Andrew Morton wrote:
> On Wed, 5 Oct 2022 21:05:55 -0700 ira.weiny@intel.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
prev parent reply other threads:[~2022-10-07 15:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 4:05 ira.weiny
2022-10-06 20:33 ` Andrew Morton
2022-10-07 15:45 ` Ira Weiny [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y0BJpOiAlStJJ5CM@iweiny-desk3 \
--to=ira.weiny@intel.com \
--cc=akpm@linux-foundation.org \
--cc=fmdefrancesco@gmail.com \
--cc=hch@lst.de \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox