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: <20120914213239.GB29307@liondog.tnic>
Date:	Fri, 14 Sep 2012 23:32:39 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	mingo@...nel.org, hpa@...or.com, linux-kernel@...r.kernel.org,
	JBeulich@...e.com, tglx@...utronix.de,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/asm] x86: Prefer TZCNT over BFS

On Fri, Sep 14, 2012 at 02:14:57PM -0700, Linus Torvalds wrote:
> On Thu, Sep 13, 2012 at 11:23 PM, tip-bot for Jan Beulich
> <JBeulich@...e.com> wrote:
> >
> > x86: Prefer TZCNT over BFS
> 
> This patch is insane.
> 
> > For the moment, only do this when the respective generic-CPU
> > option is selected (as there are no specific-CPU options
> > covering the CPUs supporting TZCNT), and don't do that when size
> > optimization was requested.
> 
> This is pure garbage.
> 
> Anybody who thinks this:
> 
> > +#if (defined(CONFIG_X86_GENERIC) || defined(CONFIG_GENERIC_CPU)) \
> > +    && !defined(CONFIG_CC_OPTIMIZE_FOR_SIZE)
> 
> is a good idea should be shot. Don't do it.
> 
> Introduce a new CONFIG variable with a sane name, for chrissake, the
> same way we have CONFIG_X86_XADD etc. It would be logical to call it
> X86_TZCNT, wouldn't it?
> 
> And then add sane rules for that in the x86 config file. And no, the
> above is *NOT* a sane rule at all. If I read that right, it will
> enable TZCNT even for old 32-bit CPU's, for example. That's just
> f*cking insane.
> 
> Stop this kind of idiocy. The code looks bad, and the logic is pure shit too.

And the other important question is, is this even worth the complexity?
I mean "may execute that faster than 'bsf ...'" doesn't mean a lot so
can anyone remind me again why we're doing this?

Any hot paths I've missed?

Thanks.

-- 
Regards/Gruss,
    Boris.
--
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