* Early printk breakage due to 3e5903eb9cff ("vsprintf: Prevent crash when dereferencing invalid pointers")
@ 2019-05-09 10:46 Heiko Carstens
0 siblings, 0 replies; only message in thread
From: Heiko Carstens @ 2019-05-09 10:46 UTC (permalink / raw)
To: Petr Mladek; +Cc: linux-kernel, linux-arch, linux-s390, Martin Schwidefsky
Hello Petr,
I just realized that early printks, or more specific vsnprintf invocations,
are broken on s390 due to
3e5903eb9cff ("vsprintf: Prevent crash when dereferencing invalid pointers").
E.g. the early boot output now looks like this where the first
(efault) should be the linux_banner:
[ 0.099985] (efault)
[ 0.099985] setup: Linux is running as a z/VM guest operating system in 64-bit mode
[ 0.100066] setup: The maximum memory size is 8192MB
[ 0.100070] cma: Reserved 4 MiB at (efault)
[ 0.100100] numa: NUMA mode: (efault)
The reason for this, is that your code assumes that
probe_kernel_address() works very early. This however is not true on
at least s390. Uaccess on KERNEL_DS works only after page tables have
been setup on s390, which happens with setup_arch()->paging_init().
Any probe_kernel_address() invocation before that will return -EFAULT.
So how should we fix this? We could e.g. again add an arch specific
version of probe_kernel_read() for s390, which would be more or less a
copy of the generic variant, just that it would do something different
if page tables aren't setup yet.
Or... any other idea?
Cc'ing linux-arch, just in case other architectures are also affected.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-05-09 10:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-09 10:46 Early printk breakage due to 3e5903eb9cff ("vsprintf: Prevent crash when dereferencing invalid pointers") Heiko Carstens
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.