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: <20150407095635.61cdb980@gandalf.local.home>
Date:	Tue, 7 Apr 2015 09:56:35 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Juri Lelli <juri.lelli@....com>
Cc:	Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@...radead.org>,
	Juri Lelli <juri.lelli@...il.com>
Subject: Re: [PATCH] sched/core: Drop debugging leftover trace_printk call

On Tue, 07 Apr 2015 14:47:50 +0100
Juri Lelli <juri.lelli@....com> wrote:

> On 03/04/2015 09:42, Borislav Petkov wrote:
> > From: Borislav Petkov <bp@...e.de>
> > 
> > Commit
> > 
> >   3c18d447b3b3 ("sched/core: Check for available DL bandwidth in cpuset_cpu_inactive()")
> > 
> > forgot a trace_printk debugging piece in and Steve's banner blew in
> > dmesg. Remove it.
> >
> 
> Argh! Sorry about that! Shame on me, I didn't pay much attention to
> Rostedt's banner because I was working on several fixes at once :(.

Right, but it lets other people notice it :-)



> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index d124359..1fc454c5 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3257,6 +3257,12 @@ sub process {
>  			     "Prefer printk_ratelimited or pr_<level>_ratelimited to printk_ratelimit\n" . $herecurr);
>  		}
>  
> +# check for uses of trace_printk
> +		if ($line =~ /\btrace_printk\s*\(/) {
> +			ERROR("TRACE_PRINTK",
> +			      "Never use trace_printk in production code!\n" . $herecurr);
> +		}
> +

if you want to be robust here. You probably want to make an exception
when the code is in kernel/trace/ because "trace_printk" in patches
there would be to fix the trace_printk implementation, and not its use.

-- Steve


>  # printk should use KERN_* levels.  Note that follow on printk's on the
>  # same line do not need a level, so we use the current block context
>  # to try and find and validate the current printk.  In summary the current

--
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