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:	Wed, 30 Sep 2009 09:14:02 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Eric Dumazet <eric.dumazet@...il.com>
cc:	Arjan van de Ven <arjan@...radead.org>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	John Stultz <johnstul@...ibm.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: Linux 2.6.32-rc1



On Wed, 30 Sep 2009, Eric Dumazet wrote:
> 
> lock; cmpxchg8b (%%esi)
> 
> gives 4 bytes opcode : f0 0f c7 0e
> Because alternative (call cmpxchg8b_emu) uses 5 bytes, a nop will be added.
> 
> Choosing ".byte 0xf0, 0x0f, 0xc7, 0x4e, 0x00"  aka "lock cmpxchg8b 0x0(%esi)" is a litle bit better ?

And if you want to be really clever, you would want to handle the non-SMP 
case too, where you have just "cmpxchgb (%%esi)" (three bytes) without the 
lock prefix.

However, at this point I think Arjan's patch is already way superior to 
what we have now (feel free to take a look at what we generate on 32-bit 
without PAE today - just have a barf-bag handy), so all I'd really want is 
a few "tested-by"s to make me feel happier about it, and a few more people 
looking at the emulation routine to all say "ok, looks sane, ACK".

And at that point we can then either make "cmpxchg()" just do the 8-byte 
case natively, or just take your patch to change sched_clock.c to now use 
the no-longer-entirely-disgusting cmpxchg64().

Ingo - I suspect both those patches should just go through you. You do 
both x86 and scheduler, so I'll happily pull the end result.

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