lkml.org 
[lkml]   [2017]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC 5/6] lib: vsprintf: Add "%paP", "%padP" options
From
Date
On Fri, 2017-05-05 at 21:07 -0700, Greg KH wrote:
> From: Chris Fries <cfries@google.com>
>
> Add %paP and %padP for physical address that need to always be shown
> regardless of kptr restrictions.

The commit message could be improved.

I had to look at the actual code to see if %papP was supported.

> diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
[]
> @@ -82,18 +82,20 @@ Struct Resources:
>
> Physical addresses types phys_addr_t:
>
> - %pa[p] 0x01234567 or 0x0123456789abcdef
> + %pa[p][P] 0x01234567 or 0x0123456789abcdef

Well, that's good.

> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
[]
> @@ -1394,23 +1394,29 @@ static noinline_for_stack
> char *address_val(char *buf, char *end, const void *addr, const char *fmt)
> {
> unsigned long long num;
> + int cleanse = kptr_restrict_cleanse_addresses();

bool

\
 
 \ /
  Last update: 2017-05-06 06:43    [W:0.696 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site