On Wed, Mar 11, 2015 at 8:13 PM, Scott Wood <[email protected]> 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 <[email protected]> > Cc: Anton Vorontsov <[email protected]> > Cc: Colin Cross <[email protected]> > Cc: Kees Cook <[email protected]> > Cc: Tony Luck <[email protected]> > --- > fs/pstore/inode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c > index b32ce53..f8a5bfe 100644 > --- a/fs/pstore/inode.c > +++ b/fs/pstore/inode.c > @@ -107,7 +107,7 @@ static int pstore_ftrace_seq_show(struct seq_file *s, > void *v) > struct pstore_ftrace_seq_data *data = v; > struct pstore_ftrace_record *rec = (void *)(ps->data + data->off); > > - seq_printf(s, "%d %08lx %08lx %pf <- %pF\n", > + seq_printf(s, "%d %08lx %08lx %ps <- %pS\n", > pstore_ftrace_decode_cpu(rec), rec->ip, rec->parent_ip, > (void *)rec->ip, (void *)rec->parent_ip); > > -- > 2.1.0 >
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 <[email protected]> -Kees -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

