[lkml]   [2017]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 00/14] Fix wrong %pF and %pS printk format specifier usages
On (09/07/17 18:36), Sergey Senozhatsky wrote:
> > I can look into adding such check-code, but even then the warning will
> > only show up if you run on ia64, ppc64 and parisc64.

sorry, not sure I understand the "warning" part.

what I'm thinking about is:

- every platform that needs descriptor dereference defines its own
function. otherwise dereference_descriptor(p) is just (p).

- so it's something like


#undef dereference_function_descriptor
static inline void *dereference_function_descriptor(void *ptr)
if (not_a_function_descriptor(ptr))
return ptr;

if (!probe_kernel_address(....))
return function_ip;
return ptr;

- so then in lib/vsprintf.c we can do unconditionally

case F:
case f:
case S:
case s:
case B:
ptr = dereference_function_descriptor(ptr);
return symbol_string(....);

because platforms will take care of proper descriptor dereference,
when needed.

- and ideally we even can drop %pF-%pf. because there won't
be any difference between `S' and `F'.

something like this.
let's see if this is possible.

any thoughts?


 \ /
  Last update: 2017-09-07 11:54    [W:0.055 / U:23.284 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site