From: Will Deacon <will.deacon@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Mark Rutland <mark.rutland@arm.com>, Yury <yury.norov@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Linus Walleij <linus.walleij@linaro.org>,
"Suzuki K. Poulose" <Suzuki.Poulose@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Alexey Klimov <klimov.linux@gmail.com>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
David Keitel <dkeitel@codeaurora.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH RFT] arm64: kasan: Make KASAN work with 16K pages + 48 bit VA
Date: Fri, 27 Nov 2015 10:02:11 +0000 [thread overview]
Message-ID: <20151127100210.GB25781@arm.com> (raw)
In-Reply-To: <20151127093529.GX3109@e104818-lin.cambridge.arm.com>
On Fri, Nov 27, 2015 at 09:35:29AM +0000, Catalin Marinas wrote:
> On Fri, Nov 27, 2015 at 11:12:28AM +0300, Andrey Ryabinin wrote:
> > On 11/26/2015 07:40 PM, Ard Biesheuvel wrote:
> > > On 26 November 2015 at 14:14, Andrey Ryabinin <aryabinin@virtuozzo.com> wrote:
> > >> Currently kasan assumes that shadow memory covers one or more entire PGDs.
> > >> That's not true for 16K pages + 48bit VA space, where PGDIR_SIZE is bigger
> > >> than the whole shadow memory.
> > >>
> > >> This patch tries to fix that case.
> > >> clear_page_tables() is a new replacement of clear_pgs(). Instead of always
> > >> clearing pgds it clears top level page table entries that entirely belongs
> > >> to shadow memory.
> > >> In addition to 'tmp_pg_dir' we now have 'tmp_pud' which is used to store
> > >> puds that now might be cleared by clear_page_tables.
> > >>
> > >> Reported-by: Suzuki K. Poulose <Suzuki.Poulose@arm.com>
> > >> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
> > >
> > > I would argue that the Kasan code is complicated enough, and we should
> > > avoid complicating it even further for a configuration that is highly
> > > theoretical in nature.
> > >
> > > In a 16k configuration, the 4th level only adds a single bit of VA
> > > space (which is, as I understand it, exactly the issue you need to
> > > address here since the top level page table has only 2 entries and
> > > hence does not divide by 8 cleanly), which means you are better off
> > > using 3 levels unless you *really* need more than 128 TB of VA space.
> > >
> > > So can't we just live with the limitation, and keep the current code?
> >
> > No objections from my side. Let's keep the current code.
>
> Ard had a good point, so fine by me as well.
Ok, so obvious follow-up question: why do we even support 48-bit + 16k
pages in the kernel? Either it's useful, and we make things work with it,
or it's not and we can drop it (or, at least, hide it behind EXPERT like
we do for 36-bit).
Will
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-11-27 10:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 13:14 Andrey Ryabinin
2015-11-26 14:48 ` Mark Rutland
2015-11-26 15:47 ` Andrey Ryabinin
2015-11-26 16:21 ` Mark Rutland
2015-11-26 16:40 ` Andrey Ryabinin
2015-11-26 17:08 ` Mark Rutland
2015-11-26 16:40 ` Ard Biesheuvel
2015-11-27 8:12 ` Andrey Ryabinin
2015-11-27 9:35 ` Catalin Marinas
2015-11-27 10:02 ` Will Deacon [this message]
2015-11-27 10:39 ` Ard Biesheuvel
2015-11-27 14:11 ` Catalin Marinas
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=20151127100210.GB25781@arm.com \
--to=will.deacon@arm.com \
--cc=Suzuki.Poulose@arm.com \
--cc=ard.biesheuvel@linaro.org \
--cc=arnd@arndb.de \
--cc=aryabinin@virtuozzo.com \
--cc=catalin.marinas@arm.com \
--cc=dkeitel@codeaurora.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=klimov.linux@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=yury.norov@gmail.com \
/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