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: <1256674369.26028.433.camel@gandalf.stny.rr.com>
Date:	Tue, 27 Oct 2009 16:12:49 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Li Hong <lihong.hi@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/9] tracing: recordmcount.pl Support absolute path
 check on $inputfile

On Tue, 2009-10-27 at 14:58 +0800, Li Hong wrote:
> >From fdf89709ddf4a6ff2f2d21ff8a964e949a069fe4 Mon Sep 17 00:00:00 2001
> From: Li Hong <lihong.hi@...il.com>
> Date: Tue, 27 Oct 2009 12:32:18 +0800
> Subject: [PATCH] tracing: recordmcount.pl Support absolute path check on $inputfile
> 
> Signed-off-by: Li Hong <lihong.hi@...il.com>
> 
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index 0850b83..94daf9e 100755
> --- a/scripts/recordmcount.pl
> +++ b/scripts/recordmcount.pl
> @@ -122,9 +122,7 @@ my ($arch, $bits, $objdump, $objcopy, $cc,
>      $ld, $nm, $rm, $mv, $is_module, $inputfile) = @ARGV;
>  
>  # This file refers to mcount and shouldn't be ftraced, so lets' ignore it
> -if ($inputfile eq "kernel/trace/ftrace.o") {
> -    exit(0);
> -}
> +exit (0) if ($inputfile =~ "kernel/trace/ftrace.o");

I prefer to keep the C like notation for error paths. Less to scare C
programers from perl the better.

Also, if you are using a regular expression to match, might as well do
it fully:

if ($inputfile =~ m,kernel/tracel/ftrace\.o$,) {
	exit(0);
}

-- Steve


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