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:   Thu, 02 Aug 2018 18:22:29 -0700
From:   Joe Perches <joe@...ches.com>
To:     Murilo Opsfelder Araujo <muriloo@...ux.ibm.com>,
        Christophe LEROY <christophe.leroy@....fr>
Cc:     linux-kernel@...r.kernel.org,
        Alastair D'Silva <alastair@...ilva.org>,
        Andrew Donnellan <andrew.donnellan@....ibm.com>,
        Balbir Singh <bsingharora@...il.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Cyril Bur <cyrilbur@...il.com>,
        "Eric W . Biederman" <ebiederm@...ssion.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Michael Neuling <mikey@...ling.org>,
        Nicholas Piggin <npiggin@...il.com>,
        Paul Mackerras <paulus@...ba.org>,
        Simon Guo <wei.guo.simon@...il.com>,
        Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
        "Tobin C . Harding" <me@...in.cc>, linuxppc-dev@...ts.ozlabs.org,
        Segher Boessenkool <segher@...nel.crashing.org>
Subject: Re: [PATCH v4 5/6] powerpc: Add show_user_instructions()

On Thu, 2018-08-02 at 21:42 -0300, Murilo Opsfelder Araujo wrote:
> > > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
[]
> > > @@ -1299,6 +1299,46 @@ static void show_instructions(struct pt_regs *regs)
> > >   	pr_cont("\n");
> > >   }
> > > +void show_user_instructions(struct pt_regs *regs)
> > > +{
> > > +	int i;
> > > +	const char *prefix = KERN_INFO "%s[%d]: code: ";
> > > +	unsigned long pc = regs->nip - (instructions_to_print * 3 / 4 *
> > > +					sizeof(int));
> > > +
> > > +	printk(prefix, current->comm, current->pid);
> > 
> > Why not use pr_info() and remove KERN_INFO from *prefix ?
> 
> Because it doesn't compile:
> 
>   arch/powerpc/kernel/process.c:1317:10: error: expected ‘)’ before ‘prefix’
>     pr_info(prefix, current->comm, current->pid);
>             ^
>   ./include/linux/printk.h:288:21: note: in definition of macro ‘pr_fmt’
>    #define pr_fmt(fmt) fmt
>                      ^

What being suggested is using:

	pr_info("%s[%d]: code: ", current->comm, current->pid);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ