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

From
Steven Rostedt <rostedt@goodmis.org>
Date
2019-05-10 16:24:07
Also in
linux-arch, linux-s390, lkml
Reply to
Petr Mladek, 2019-05-10
On Fri, 10 May 2019 10:42:13 +0200
Petr Mladek [off-list ref] wrote:
quoted hunk ↗ jump to hunk
 static const char *check_pointer_msg(const void *ptr)
 {
-	char byte;
-
 	if (!ptr)
 		return "(null)";
 
-	if (probe_kernel_address(ptr, byte))
+	if ((unsigned long)ptr < PAGE_SIZE || IS_ERR_VALUE(ptr))
 		return "(efault)";
 

	< PAGE_SIZE ?

do you mean: < TASK_SIZE ?

-- Steve
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