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:	Mon, 26 May 2014 18:06:05 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Joe Perches <joe@...ches.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/4] get_maintainer script cleanups

On Mon, 26 May 2014 18:00:49 -0700
Joe Perches <joe@...ches.com> wrote:

> On Mon, 2014-05-26 at 13:33 -0700, Stephen Hemminger wrote:
> > Some simple perl hacking changes.
> 
> I don't really care for these.
> 
> Why do you think these are better?
> 
> I think the first one breaks the code too.
> 
> 

$ perlcritic scripts/get_maintainer.pl 
Use IO::Interactive::is_interactive() instead of -t at line 237, column 5.  See page 218 of PBP.  (Severity: 5)
Two-argument "open" used at line 429, column 2.  See page 207 of PBP.  (Severity: 5)
Expression form of "eval" at line 1410, column 17.  See page 161 of PBP.  (Severity: 5)
Expression form of "eval" at line 1412, column 17.  See page 161 of PBP.  (Severity: 5)

If you read Perl Best Practices you will see why these are issues.
The first is because the test for STDIN and ARGV is not sufficient to check for
interactive usage.

The next is because using quoted two arg open breaks if there is a space in name etc.

Lastly eval of a string leads to runtime errors versus compile time.

Yes, for a trivial program like this it really doesn't matter.
But this program is likely to grow and be copied by other developers
and I would like it to use current best practices. The same applies to
all the other parts of the kernel.

I tested each step, and they all work for me™ 
--
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