All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Kees Cook <keescook@chromium.org>
Cc: Borislav Petkov <bp@alien8.de>,
	linux-tip-commits@vger.kernel.org,
	Andy Lutomirski <luto@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Joerg Roedel <jroedel@suse.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Toshimitsu Kani <toshi.kani@hpe.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [tip:x86/urgent] x86/mm: Avoid VLA in pgd_alloc()
Date: Tue, 9 Oct 2018 09:33:56 +0200	[thread overview]
Message-ID: <CAK8P3a2KTzTD5d10KkmcKh=_E7J7EJkE48wrcUe4AAwDiBVuEQ@mail.gmail.com> (raw)
In-Reply-To: <CAGXu5j+4hjJSFpYi=5SqDmkonJ79J=hcb65qJC8+_r6+5NHewg@mail.gmail.com>

On Tue, Oct 9, 2018 at 1:28 AM Kees Cook <keescook@chromium.org> wrote:
> On Mon, Oct 8, 2018 at 1:22 PM, Borislav Petkov <bp@alien8.de> wrote:
> > On Fri, Oct 05, 2018 at 09:24:53AM -0700, tip-bot for Arnd Bergmann wrote:

> >
> > For whatever reason - probably because it forced
> > MAX_PREALLOCATED_USER_PMDS be KERNEL_PGD_PTRS and not 0 (and I don't
> > have CONFIG_PAGE_TABLE_ISOLATION so it was 0 here with my .config
> > before) but this patch causes the fun below.
> >
> > If I revert it, no splat.
> >
> > Also, config has CONFIG_X86_PAE=y. And CONFIG_STACKPROTECTOR_STRONG=y. If I
> > disable _STRONG, it boots too. Attached.
>
> This really should mean that the stack canary changed. Either the
> stack canary wasn't prepared yet (but this is from run_init_process(),
> which is WELL after boot_init_stack_canary()), or the canary was
> actually stomped on, which would certainly be a bug in the existing
> code.
>
> Ah! I see it now. "pmds" shouldn't have changed, it's not .._USER_PMDS...
>
> -       pmd_t *u_pmds[PREALLOCATED_USER_PMDS];
> -       pmd_t *pmds[PREALLOCATED_PMDS];
> +       pmd_t *u_pmds[MAX_PREALLOCATED_USER_PMDS];
> +       pmd_t *pmds[MAX_PREALLOCATED_USER_PMDS];

Ah, cool, thanks for the analysis. Is the patch already reverted?
I.e. should I send a replacement patch, or a relative fix, or is
someone else already on it?

      Arnd

  reply	other threads:[~2018-10-09  7:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-05 16:13 [PATCH] x86: avoid " Arnd Bergmann
2018-10-05 16:24 ` [tip:x86/urgent] x86/mm: Avoid " tip-bot for Arnd Bergmann
2018-10-08 20:22   ` Borislav Petkov
2018-10-08 23:28     ` Kees Cook
2018-10-09  7:33       ` Arnd Bergmann [this message]
2018-10-09  7:39         ` Joerg Roedel
2018-10-09  7:48           ` Ingo Molnar
2018-10-08 23:54 [PATCH] x86/mm: Fix preallocated PMD stack array Kees Cook
2018-10-09  7:03 ` [tip:x86/urgent] x86/mm: Avoid VLA in pgd_alloc() tip-bot for Kees Cook
2018-10-09  7:58   ` Arnd Bergmann

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='CAK8P3a2KTzTD5d10KkmcKh=_E7J7EJkE48wrcUe4AAwDiBVuEQ@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jroedel@suse.de \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=toshi.kani@hpe.com \
    --subject='Re: [tip:x86/urgent] x86/mm: Avoid VLA in pgd_alloc()' \
    /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

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.