lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 Aug 2017 17:35:52 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Helge Deller <deller@....de>
Cc:     Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org
Subject: Re: [PATCH] printk-formats.txt: Add examples for %pS and %pF

On Tue, 15 Aug 2017 21:47:27 +0200
Helge Deller <deller@....de> wrote:

> > Very interesting!
> > 
> > This code:
> > void smp_cpus_done() {
> > printk("Called from %pF.\n", smp_cpus_done);
> > printk("Called from %pf.\n", smp_cpus_done);
> > printk("Called in %pS.\n", __func__);
> > printk("Called in %ps.\n", __func__);
> > printk("Called in %pF.\n", __func__);
> > printk("Called in %pf.\n", __func__);
> > 
> > gives:
> >  Called from smp_cpus_done+0x0/0x1b8.
> >  Called from smp_cpus_done.
> >  Called in __func__.28197+0x0/0x20.
> >  Called in __func__.28197.
> >  Called in 0x5041524953433332.
> >  Called in 0x5041524953433332.
> > 
> > So, the correct usage is:
> > printk("Called in %pS.\n", __func__);  
> 
> I'm wrong.
> The correct usage would be:
>  printk("Called in %s.\n", __func__);
> 
> __func__ is just a pointer to a string.

OK, I'm still on vacation :-/

Yeah, I was looking for usages of %pF, and came across this:

		pr_warn("%s: NULL omap_sr from %pF\n",
			__func__, (void *)_RET_IP_);

And not noticing the first "%s" :-p

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ