All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: Ganesh Goudar <ganeshgr@linux.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH 2/2] powerpc/64: poison __per_cpu_offset to catch use-before-init
Date: Mon, 01 Aug 2022 22:02:03 +1000	[thread overview]
Message-ID: <87bkt4b29w.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20220711030653.150950-2-npiggin@gmail.com>

Nicholas Piggin <npiggin@gmail.com> writes:
> If the boot CPU tries to access per-cpu data of other CPUs before
> per cpu areas are set up, it will unexpectedly use offset 0.
>
> Try to catch such accesses by poisoning the __per_cpu_offset array.

I wasn't sure about this.

On bare metal it's just an instant checkstop which is very user hostile.

I worry it's just going to cause unusual configurations/options to crash
for folks, like eg. booting with page_poison=1 did a while back.

Can we put it behind a debug option? Maybe CONFIG_DEBUG_VM ?

cheers

  reply	other threads:[~2022-08-01 12:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-11  3:06 [PATCH 1/2] powerpc/mce: mce_init use early_cpu_to_node Nicholas Piggin
2022-07-11  3:06 ` [PATCH 2/2] powerpc/64: poison __per_cpu_offset to catch use-before-init Nicholas Piggin
2022-08-01 12:02   ` Michael Ellerman [this message]
2022-07-29 13:02 ` [PATCH 1/2] powerpc/mce: mce_init use early_cpu_to_node Michael Ellerman

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=87bkt4b29w.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=ganeshgr@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@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 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.