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, 22 Feb 2010 08:43:39 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Cong Wang <amwang@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Luis R. Rodriguez" <lrodriguez@...eros.com>,
	Sam Ravnborg <sam@...nborg.org>,
	Vegard Nossum <vegard.nossum@...il.com>,
	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>,
	"Robert P. J. Day" <rpjday@...shcourse.ca>,
	Arnd Bergmann <arnd@...db.de>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Hui Zhu <teawater@...il.com>,
	Ozan Ãaglayan <ozan@...dus.org.tr>,
	Matthew Wilcox <willy@...ux.intel.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Li Hong <lihong.hi@...il.com>, Ingo Molnar <mingo@...e.hu>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Matt Fleming <matt@...sole-pimps.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scripts: improve checkstack

On Sat, 20 Feb 2010 15:35:06 +0800
Cong Wang <amwang@...hat.com> wrote:

> Stephen Hemminger wrote:
> > Turn on strict checking, and get rid of annoying use of prototype.
> > Fix syntax error in declaration
> > 
> > Use efficient sort algorithm by using schwartzian transform.
> >   http://en.wikipedia.org/wiki/Schwartzian_transform
> 
> 
> Yeah, the idea is good, this can also make it more perlish. ;)
> 
> But...
> 
> 
> > -print sort bysize @stack;
> > +# Use Schwartzian transform to sort by last field (size)
> > +print map { $_->[0] }
> > +      sort { $b->[1] <=> $a->[1] }
> > +      map { [$_, /:\t*(\d+)$/] } @stack;
> 
> This regex here is not strictly the same as before.
> 
> Can we just keep the original regex? If not, what's wrong?

The original one had extra cruft:
  1. The expression is anchored on right, so leading .* is meaningless
  2. Putting tab directly makes it invisible when reading source (use \t)
  3. Want to match on number, not just anything (that is why the \d)
--
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