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: <BANLkTi=xRJ+rRRpYWuLxtRiLfYZwsBU0vQ@mail.gmail.com>
Date:	Wed, 27 Apr 2011 22:38:01 +0300
From:	Pekka Enberg <penberg@...nel.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Thiago Farina <tfransosi@...il.com>,
	linux-kernel@...r.kernel.org,
	Alexey Dobriyan <adobriyan@...il.com>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Ingo Molnar <mingo@...e.hu>,
	"David S. Miller" <davem@...emloft.net>,
	Al Viro <viro@...iv.linux.org.uk>, "Ted Ts'o" <tytso@....edu>,
	Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH] linux/string.h: Introduce streq macro.

On Wed, Apr 27, 2011 at 10:16 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
> On Wed, 2011-04-27 at 21:51 +0300, Pekka Enberg wrote:
>
>> It's the same kind of API extension kstrdup(), for example, is.
>> Whether or not we should it do it is a separate matter and I think the
>> only reasonable argument for and against is whether it (a) reduces the
>> number of bugs,
>
> I did a quick search through the git logs, and found no bug fixes due to
> the semantics. At least by the time it got to mainline, they are fixed
> (which is a good thing).
>
>
>>  (b) improves code readability significantly,
>
> This is a matter of preference. I think I would prefer it, but obviously
> others do not.
>
>
>>  or (c)
>> generates better code.
>
> If we implement streq() separately from strcmp() it gets slightly
> better:

We'd probably end up with both in the tree, though, which is not an
improvement. With kstrdup(), for example, we were able to move code
out-of-line which improved the whole kernel.

To be honest, I don't think the arguments for streq() are that strong
but I wanted to point out that the arguments against it weren't all
that great either...

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