From: "Michal Koutný" <mkoutny@suse.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86/mm: Do not shuffle CPU entry areas without KASLR
Date: Sat, 4 Mar 2023 00:04:30 +0100 [thread overview]
Message-ID: <ZAJ8/hryzQ18Gs2R@blackbook> (raw)
In-Reply-To: <addc0715-7b75-59d3-fe82-dcfd6a7ef81a@intel.com>
On Fri, Mar 03, 2023 at 01:24:53PM -0800, Dave Hansen <dave.hansen@intel.com> wrote:
> Should this be kaslr_memory_enabled() or kaslr_enabled()?
Originally, I had chosen kaslr_enabled(), seeing the PGD requirement of
KASAN (whole randomization area CPU_ENTRY_AREA_MAP_SIZE would fit in PGD
afterall).
> The delta seems to be CONFIG_KASAN, and the cpu entry area randomization
> works just fine with KASAN after some recent fixes.
But then I found KASAN code trying to be smart and having the fixups,
hence I chickened out to kaslr_memory_enabled().
> I _think_ that makes cpu entry area randomization more like module
> randomization which would point toward kaslr_enabled().
<del>I understood the only difference between kaslr_enabled and
kaslr_memory_enabled is the PGD alignment of the respective regions.
(Although, I don't see where KASAN breaks with unaligned ranges except
for better efficiency of page tables.)</del>
I've just found your [1], wondering the similar.
That being said, I will send v2 with just kaslr_enabled() guard and
updated commit message to beware of KASAN fixups (when backporting).
Thanks,
Michal
[1] https://lore.kernel.org/r/299fbb80-e3ab-3b7c-3491-e85cac107930@intel.com/
prev parent reply other threads:[~2023-03-03 23:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-03 16:06 Michal Koutný
2023-03-03 21:24 ` Dave Hansen
2023-03-03 23:04 ` Michal Koutný [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=ZAJ8/hryzQ18Gs2R@blackbook \
--to=mkoutny@suse.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®