mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: "Michal Koutný" <mkoutny@suse.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org
Cc: 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: Fri, 3 Mar 2023 13:24:53 -0800	[thread overview]
Message-ID: <addc0715-7b75-59d3-fe82-dcfd6a7ef81a@intel.com> (raw)
In-Reply-To: <20230303160645.3594-1-mkoutny@suse.com>

On 3/3/23 08:06, Michal Koutný wrote:
> @@ -29,6 +30,12 @@ static __init void init_cea_offsets(void)
>  	unsigned int max_cea;
>  	unsigned int i, j;
>  
> +	if (!kaslr_memory_enabled()) {
> +		for_each_possible_cpu(i)
> +			per_cpu(_cea_offset, i) = i;
> +		return;
> +	}

Should this be kaslr_memory_enabled() or kaslr_enabled()?

The delta seems to be CONFIG_KASAN, and the cpu entry area randomization
works just fine with KASAN after some recent fixes.  I _think_ that
makes cpu entry area randomization more like module randomization which
would point toward kaslr_enabled().


  reply	other threads:[~2023-03-03 21:25 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 [this message]
2023-03-03 23:04   ` Michal Koutný

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=addc0715-7b75-59d3-fe82-dcfd6a7ef81a@intel.com \
    --to=dave.hansen@intel.com \
    --cc=bp@alien8.de \
    --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=mkoutny@suse.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®