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: <20110525144214.GK10146@htj.dyndns.org>
Date:	Wed, 25 May 2011 16:42:14 +0200
From:	Tejun Heo <tj@...nel.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	oleg@...hat.com, vda.linux@...glemail.com,
	jan.kratochvil@...hat.com, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, indan@....nu, bdonlan@...il.com,
	pedro@...esourcery.com
Subject: Re: [PATCH 07/19] ptrace: use bit_waitqueue for TRAPPING instead
 of wait_chldexit

On Wed, May 25, 2011 at 07:34:27AM -0700, Linus Torvalds wrote:
> On Wed, May 25, 2011 at 1:44 AM, Tejun Heo <tj@...nel.org> wrote:
> > Sure, but can you at least explain why you dislike it so much?  This
> > is the only place bit position is needed and having two variants with
> > _BIT can be confusing (I did that more than once with workqueue code).
> > ilog2() could be, I don't know, unfamiliar, but what's so crappy about
> > it?
> 
> Have you looked at ilog2()?

Yeap, I did.

> Do you realize how much extra crap it is for the compiler? For
> absolutely *no* reason.
>
> I hate that disgusting thing. It basically screams to everybody "I'm a
> f*cking moron, I did things the wrong way around, so now I use this
> thing to undo my braindamage".

I don't know.  The overhead is compile-time and if the bit position
usage is very rare compared to bitmask usage, it is convenient.

> You can get a good idea of the code quality if you grep for users. I
> don't think it's an accident at all that the two big blocks are
> ide-tape and some infiniband drivers.

Maybe, but also ilog2() is relatively new and most already had ways to
deal with bit positions and masks, so the uptake is expected to be
slow.

Anyways, understood.  Linus hates ilog2().  Will convert to _BIT
macros on the next round and stay the f$@? away from it from now on.

Thanks.

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