Thread (4 messages) flat view 4 messages, 3 authors, 2022-08-01

Re: [PATCH 2/2] powerpc/64: poison __per_cpu_offset to catch use-before-init

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2022-08-01 12:02:46

Nicholas Piggin [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help