linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>,
	 Linux ARM <linux-arm-kernel@lists.infradead.org>,
	 Quanyang Wang <quanyang.wang@windriver.com>
Subject: Re: [PATCH] kmap_local: don't assume kmap PTEs are linear arrays in memory
Date: Fri, 5 Nov 2021 16:01:20 +0100	[thread overview]
Message-ID: <CAMj1kXE+38C_HxqmG6hKVPxpKx7MAT3+aeDow1r2rE0W9hV1CA@mail.gmail.com> (raw)
In-Reply-To: <YYVElmQOUveS5voK@shell.armlinux.org.uk>

On Fri, 5 Nov 2021 at 15:50, Russell King (Oracle)
<linux@armlinux.org.uk> wrote:
>
> On Fri, Nov 05, 2021 at 03:21:00PM +0100, Ard Biesheuvel wrote:
> > On Tue, 26 Oct 2021 at 15:13, 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.
> > >
> > > Reported-by: Quanyang Wang <quanyang.wang@windriver.com>
> > > Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> > > ---
> >
> > Ping? Can we get this fixed please?
>
> Who are you expecting to apply it? It seems to be touching only core
> code, so I don't think it's up to me - not without some kind of review
> from mm guys.
>

I was hoping Thomas would respond, given that he introduced the
problem in the first place, and can either carry the fix himself, or
tell us whether he wants it fixed in a different way.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-11-05 15:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26 13:12 [PATCH] kmap_local: don't assume kmap PTEs are linear arrays in memory Ard Biesheuvel
2021-11-05 14:21 ` Ard Biesheuvel
2021-11-05 14:49   ` Russell King (Oracle)
2021-11-05 15:01     ` Ard Biesheuvel [this message]
2021-11-09 11:47       ` Russell King (Oracle)
2021-11-15  7:54         ` Ard Biesheuvel
2021-11-16  4:09           ` Andrew Morton
2021-11-09 11:39 ` Linus Walleij

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=CAMj1kXE+38C_HxqmG6hKVPxpKx7MAT3+aeDow1r2rE0W9hV1CA@mail.gmail.com \
    --to=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).