Thread (39 messages) flat view 39 messages, 11 authors, 2019-05-15

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

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2019-05-10 16:41:42
Also in: linux-arch, linux-s390, lkml

On Fri, May 10, 2019 at 12:24:01PM -0400, Steven Rostedt wrote:
On Fri, 10 May 2019 10:42:13 +0200
Petr Mladek [off-list ref] wrote:
quoted
 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 ?
Original code used PAGE_SIZE. If it needs to be changed, that it might be a
separate explanation / patch.

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help