lkml.org 
[lkml]   [2015]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 20/22] pstore: %pF is only for function pointers
On Tue, Jun 16, 2015 at 03:02:50PM -0700, Kees Cook wrote:
> On Wed, Mar 11, 2015 at 8:13 PM, Scott Wood <scottwood@freescale.com> wrote:
> > Use %pS for actual addresses, otherwise you'll get bad output
> > on arches like ppc64 where %pF expects a function descriptor.
> >
> > Signed-off-by: Scott Wood <scottwood@freescale.com>
...
> > - seq_printf(s, "%d %08lx %08lx %pf <- %pF\n",
> > + seq_printf(s, "%d %08lx %08lx %ps <- %pS\n",
...
> Anton, does this look okay to you? (i.e. switching from function
> pointer to direct pointer?) vsprintf docs say:
> * Note: The difference between 'S' and 'F' is that on ia64 and ppc64
> * function pointers are really function descriptors, which contain a
> * pointer to the real address.
>
> So this seems correct to me.
>
> Reviewed-by: Kees Cook <keescook@chromium.org>

Without questioning the confusing behaviour of "%pF", yes, sure... ack. :)

(However, intuitively I'd expect %pF to behave like %pS... but this surely not
going to change...)

Thanks!

Anton


\
 
 \ /
  Last update: 2015-06-17 01:01    [W:0.459 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site