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.2.00.1104270445210.7570@mtl.rackplans.net>
Date:	Wed, 27 Apr 2011 04:47:40 -0400 (EDT)
From:	gmack@...erfire.net
To:	Christoph Hellwig <hch@...radead.org>
cc:	Ted Ts'o <tytso@....edu>, Thiago Farina <tfransosi@...il.com>,
	linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH] linux/string.h: Introduce streq macro.

On Wed, 27 Apr 2011, Christoph Hellwig wrote:

> Date: Wed, 27 Apr 2011 02:47:19 -0400
> From: Christoph Hellwig <hch@...radead.org>
> To: Ted Ts'o <tytso@....edu>, Thiago Farina <tfransosi@...il.com>,
>     linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>
> Subject: Re: [PATCH] linux/string.h: Introduce streq macro.
> 
> On Tue, Apr 26, 2011 at 08:52:43PM -0400, Ted Ts'o wrote:
> > I don't think this is not a good idea.
> > 
> > First of all, changing 2800 instances of strcmp will induce a huge
> > amount of code churn, that will cause patches to break, etc.  And
> > whether streq() looks better is going to be very much a case of
> > personal preference.  I'm so used to !strcmp(a, b) that streq(a, b)
> > would be harder for me, just because I'm not used to it.
> > 
> > So I'd NACK a change like this to any parts of the kernel that I'm
> > maintaining.  If another people feel that way, it's not clear that
> > having two different conventions in the kernel would necessarily help...
> 
> Same here.  Diverging from standard ANSI C just for the sake of being
> different is an utterly bad idea.  strcmp might not be the most natural
> calling convention, but it's been in the wild for 30 years, and everyone
> taking a C 101 course should know about it.
> 
> And if you get it wrong and don't notice it just means your testing
> coverage sucks badly.

Knowing about it and not screwing it up are two different things. I was 
working on a project a few years ago and we made this exact change thanks 
to the backwards logic of strcmp constantly screwing people up and the bug 
count went down considerably.


	Gerhard


--
Gerhard Mack

gmack@...erfire.net

<>< As a computer I find your faith in technology amusing.
--
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