All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: mingo@kernel.org, bpetkov@suse.de, peterz@infradead.org,
	bp@alien8.de, tglx@linutronix.de, pavel@ucw.cz, hpa@zytor.com,
	luto@kernel.org, torvalds@linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/urgent] x86/mm/32: Load a sane CR3 before cpu_init() on secondary CPUs
Date: Mon, 18 Sep 2017 10:17:43 +0200	[thread overview]
Message-ID: <75a3b68c-ba51-b479-1d01-62a1c05316cc@molgen.mpg.de> (raw)
In-Reply-To: <tip-4ba55e65f471d011d3ba2ac2022180ea0877d68e@git.kernel.org>

Dear Andy,


On 09/17/17 20:19, tip-bot for Andy Lutomirski wrote:
> Commit-ID:  4ba55e65f471d011d3ba2ac2022180ea0877d68e
> Gitweb:     http://git.kernel.org/tip/4ba55e65f471d011d3ba2ac2022180ea0877d68e
> Author:     Andy Lutomirski <luto@kernel.org>
> AuthorDate: Sun, 17 Sep 2017 09:03:51 -0700
> Committer:  Ingo Molnar <mingo@kernel.org>
> CommitDate: Sun, 17 Sep 2017 18:59:09 +0200
> 
> x86/mm/32: Load a sane CR3 before cpu_init() on secondary CPUs
> 
> For unknown historical reasons (i.e. Borislav doesn't recall),
> 32-bit kernels invoke cpu_init() on secondary CPUs with
> initial_page_table loaded into CR3.  Then they set
> current->active_mm to &init_mm and call enter_lazy_tlb() before
> fixing CR3.

If this should be changed, I’d be happy to help.

> This means that the x86 TLB code gets invoked while CR3
> is inconsistent, and, with the improved PCID sanity checks I added,
> we warn.
> 
> Fix it by loading swapper_pg_dir (i.e. init_mm.pgd) earlier.
> 
> Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
> Reported-by: Pavel Machek <pavel@ucw.cz>
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Borislav Petkov <bpetkov@suse.de>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Fixes: 72c0098d92ce ("x86/mm: Reinitialize TLB state on hotplug and resume")
> Link: http://lkml.kernel.org/r/30cdfea504682ba3b9012e77717800a91c22097f.1505663533.git.luto@kernel.org

This should use the HTTPS protocol.

> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
>   arch/x86/kernel/smpboot.c | 13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)

[…]

Thank you for the fix.

Tested-by: Paul Menzel <pmenzel@molgen.mpg.de> (Lenovo X60t)


Kind regards,

Paul

  reply	other threads:[~2017-09-18  8:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-17 16:03 [PATCH 0/4] More PCID fixes Andy Lutomirski
2017-09-17 16:03 ` [PATCH 1/4] x86/mm: Factor out CR3-building code Andy Lutomirski
2017-09-17 18:18   ` [tip:x86/urgent] " tip-bot for Andy Lutomirski
2017-09-17 16:03 ` [PATCH 2/4] x86/mm/64: Stop using CR3.PCID == 0 in ASID-aware code Andy Lutomirski
2017-09-17 18:19   ` [tip:x86/urgent] " tip-bot for Andy Lutomirski
2017-09-17 16:03 ` [PATCH 3/4] x86/mm/32: Move setup_clear_cpu_cap(X86_FEATURE_PCID) earlier Andy Lutomirski
2017-09-17 18:19   ` [tip:x86/urgent] " tip-bot for Andy Lutomirski
2017-09-17 16:03 ` [PATCH 4/4] x86/mm/32: Load a sane CR3 before cpu_init() on secondary CPUs Andy Lutomirski
2017-09-17 18:19   ` [tip:x86/urgent] " tip-bot for Andy Lutomirski
2017-09-18  8:17     ` Paul Menzel [this message]
2017-09-20 12:52     ` Pavel Machek

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=75a3b68c-ba51-b479-1d01-62a1c05316cc@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=bp@alien8.de \
    --cc=bpetkov@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.