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]
Message-ID: <alpine.DEB.1.10.0902060106440.5262@gandalf.stny.rr.com>
Date:	Fri, 6 Feb 2009 01:07:26 -0500 (EST)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	linuxppc-dev@...abs.org, LKML <linux-kernel@...r.kernel.org>
cc:	Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Michael Neuling <mikey@...ling.org>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 1/2] ftrace, powerpc: replace debug macro with proper
 pr_deug


[ forgot to add linuxppc ]

On Fri, 6 Feb 2009, Steven Rostedt wrote:

> From: Steven Rostedt <srostedt@...hat.com>
> 
> Impact: cleanup
> 
> The PowerPC ftrace code uses a hacked up DEBUGP macro for prints.
> This patch converts it to the standard pr_debug.
> 
> Signed-off-by: Steven Rostedt <srostedt@...hat.com>
> ---
>  arch/powerpc/kernel/ftrace.c |   26 ++++++++++----------------
>  1 files changed, 10 insertions(+), 16 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
> index 5355244..a913f91 100644
> --- a/arch/powerpc/kernel/ftrace.c
> +++ b/arch/powerpc/kernel/ftrace.c
> @@ -20,12 +20,6 @@
>  #include <asm/code-patching.h>
>  #include <asm/ftrace.h>
>  
> -#if 0
> -#define DEBUGP printk
> -#else
> -#define DEBUGP(fmt , ...)	do { } while (0)
> -#endif
> -
>  static unsigned int ftrace_nop = PPC_NOP_INSTR;
>  
>  #ifdef CONFIG_PPC32
> @@ -175,7 +169,7 @@ __ftrace_make_nop(struct module *mod,
>  	 * 0xe8, 0x4c, 0x00, 0x28,    ld      r2,40(r12)
>  	 */
>  
> -	DEBUGP("ip:%lx jumps to %lx r2: %lx", ip, tramp, mod->arch.toc);
> +	pr_debug("ip:%lx jumps to %lx r2: %lx", ip, tramp, mod->arch.toc);
>  
>  	/* Find where the trampoline jumps to */
>  	if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) {
> @@ -183,7 +177,7 @@ __ftrace_make_nop(struct module *mod,
>  		return -EFAULT;
>  	}
>  
> -	DEBUGP(" %08x %08x", jmp[0], jmp[1]);
> +	pr_debug(" %08x %08x", jmp[0], jmp[1]);
>  
>  	/* verify that this is what we expect it to be */
>  	if (((jmp[0] & 0xffff0000) != 0x3d820000) ||
> @@ -198,18 +192,18 @@ __ftrace_make_nop(struct module *mod,
>  	offset = (unsigned)((unsigned short)jmp[0]) << 16 |
>  		(unsigned)((unsigned short)jmp[1]);
>  
> -	DEBUGP(" %x ", offset);
> +	pr_debug(" %x ", offset);
>  
>  	/* get the address this jumps too */
>  	tramp = mod->arch.toc + offset + 32;
> -	DEBUGP("toc: %lx", tramp);
> +	pr_debug("toc: %lx", tramp);
>  
>  	if (probe_kernel_read(jmp, (void *)tramp, 8)) {
>  		printk(KERN_ERR "Failed to read %lx\n", tramp);
>  		return -EFAULT;
>  	}
>  
> -	DEBUGP(" %08x %08x\n", jmp[0], jmp[1]);
> +	pr_debug(" %08x %08x\n", jmp[0], jmp[1]);
>  
>  	ptr = ((unsigned long)jmp[0] << 32) + jmp[1];
>  
> @@ -286,7 +280,7 @@ __ftrace_make_nop(struct module *mod,
>  	 *  0x4e, 0x80, 0x04, 0x20  bctr
>  	 */
>  
> -	DEBUGP("ip:%lx jumps to %lx", ip, tramp);
> +	pr_debug("ip:%lx jumps to %lx", ip, tramp);
>  
>  	/* Find where the trampoline jumps to */
>  	if (probe_kernel_read(jmp, (void *)tramp, sizeof(jmp))) {
> @@ -294,7 +288,7 @@ __ftrace_make_nop(struct module *mod,
>  		return -EFAULT;
>  	}
>  
> -	DEBUGP(" %08x %08x ", jmp[0], jmp[1]);
> +	pr_debug(" %08x %08x ", jmp[0], jmp[1]);
>  
>  	/* verify that this is what we expect it to be */
>  	if (((jmp[0] & 0xffff0000) != 0x3d600000) ||
> @@ -310,7 +304,7 @@ __ftrace_make_nop(struct module *mod,
>  	if (tramp & 0x8000)
>  		tramp -= 0x10000;
>  
> -	DEBUGP(" %x ", tramp);
> +	pr_debug(" %x ", tramp);
>  
>  	if (tramp != addr) {
>  		printk(KERN_ERR
> @@ -413,7 +407,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
>  	/* ld r2,40(r1) */
>  	op[1] = 0xe8410028;
>  
> -	DEBUGP("write to %lx\n", rec->ip);
> +	pr_debug("write to %lx\n", rec->ip);
>  
>  	if (probe_kernel_write((void *)ip, op, MCOUNT_INSN_SIZE * 2))
>  		return -EPERM;
> @@ -453,7 +447,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
>  		return -EINVAL;
>  	}
>  
> -	DEBUGP("write to %lx\n", rec->ip);
> +	pr_debug("write to %lx\n", rec->ip);
>  
>  	if (probe_kernel_write((void *)ip, &op, MCOUNT_INSN_SIZE))
>  		return -EPERM;
> -- 
> 1.5.6.5
> 
> -- 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ