linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
	Quanyang Wang <quanyang.wang@windriver.com>,
	 Linus Walleij <linus.walleij@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	 Russell King <linux@armlinux.org.uk>
Subject: Re: [PATCH resend] kmap_local: don't assume kmap PTEs are linear arrays in memory
Date: Tue, 16 Nov 2021 23:15:33 +0100	[thread overview]
Message-ID: <CAMj1kXEwYVpOsZpiQWt-ioizNkk6nRmB4HybPxBQUe8V4E+Xrw@mail.gmail.com> (raw)
In-Reply-To: <CAMj1kXHMv9uyYXUQWvcxj+WB5jjtoWWdcFS5jas2jJWxvycWVg@mail.gmail.com>

On Tue, 16 Nov 2021 at 23:13, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Tue, 16 Nov 2021 at 23:12, Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > On Tue, 16 Nov 2021 10:47:37 +0100 Ard Biesheuvel <ardb@kernel.org> wrote:
> >
> > > The kmap_local conversion broke the ARM architecture, because the new
> > > code assumes that all PTEs used for creating kmaps form a linear array
> > > in memory, and uses array indexing to look up the kmap PTE belonging to
> > > a certain kmap index.
> > >
> > > On ARM, this cannot work, not only because the PTE pages may be
> > > non-adjacent in memory, but also because ARM/!LPAE interleaves hardware
> > > entries and extended entries (carrying software-only bits) in a way that
> > > is not compatible with array indexing.
> > >
> > > Fortunately, this only seems to affect configurations with more than 8
> > > CPUs, due to the way the per-CPU kmap slots are organized in memory.
> > >
> > > Work around this by permitting an architecture to set a Kconfig symbol
> > > that signifies that the kmap PTEs do not form a lineary array in memory,
> > > and so the only way to locate the appropriate one is to walk the page
> > > tables.
> >
> > A Fixes: link would be helpful.
> >
> > kmap_local() was a year ago, so is a -stable backport desired here?
>
> Fixes: 1834eb1a6027 ("kmap_local: don't assume kmap PTEs are linear
> arrays in memory")

Oops that should be

Fixes: 2a15ba82fa6c ("ARM: highmem: Switch to generic kmap atomic")


> Cc: <stable@vger.kernel.org>


  reply	other threads:[~2021-11-16 22:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16  9:47 Ard Biesheuvel
2021-11-16 12:04 ` Russell King (Oracle)
2021-11-16 22:12 ` Andrew Morton
2021-11-16 22:13   ` Ard Biesheuvel
2021-11-16 22:15     ` Ard Biesheuvel [this message]
2021-11-25 11:00 ` Thomas Gleixner

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=CAMj1kXEwYVpOsZpiQWt-ioizNkk6nRmB4HybPxBQUe8V4E+Xrw@mail.gmail.com \
    --to=ardb@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@armlinux.org.uk \
    --cc=quanyang.wang@windriver.com \
    --cc=tglx@linutronix.de \
    /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