Re: [PATCH] vsprintf: Do not break early boot with probing addresses

From
Petr Mladek <pmladek@suse.com>
Date
2019-05-10 14:49:21
Also in
linux-arch, linux-s390, lkml
Reply to
Petr Mladek, 2019-05-10
On Fri 2019-05-10 10:42:13, Petr Mladek wrote:
The commit 3e5903eb9cff70730 ("vsprintf: Prevent crash when dereferencing
invalid pointers") broke boot on several architectures. The common
pattern is that probe_kernel_read() is not working during early
boot because userspace access framework is not ready.

It is a generic problem. We have to avoid any complex external
functions in vsprintf() code, especially in the common path.
They might break printk() easily and are hard to debug.

Replace probe_kernel_read() with some simple checks for obvious
problems.
JFYI, I have sent a pull request with this patch, see
https://lkml.kernel.org/r/20190510144718.riyy72g4cy5nkggx@pathway.suse.cz

Best Regards,
Petr
Thread (39 messages) 39 messages, 11 authors, last reply 2019-05-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help