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
| ||
|
Date: Mon, 22 Feb 2010 11:55:48 -0800 From: "H. Peter Anvin" <hpa@...or.com> To: Borislav Petkov <bp@...64.org> CC: Michal Marek <mmarek@...e.cz>, linux-kbuild <linux-kbuild@...r.kernel.org>, Peter Zijlstra <peterz@...radead.org>, Andrew Morton <akpm@...ux-foundation.org>, Wu Fengguang <fengguang.wu@...el.com>, LKML <linux-kernel@...r.kernel.org>, Jamie Lokier <jamie@...reable.org>, Roland Dreier <rdreier@...co.com>, Al Viro <viro@...IV.linux.org.uk>, "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>, Brian Gerst <brgerst@...il.com> Subject: Re: [PATCH] x86: Add optimized popcnt variants On 02/22/2010 10:49 AM, Borislav Petkov wrote: >> >> Just a note: this still means rdi is clobbered on x86-64, which is >> probably fine, but needs to be recorded as such. Since gcc doesn't >> support clobbers for registers used as operands (sigh), you have to >> create a dummy output and assign it a "=D" constraint. >> >> I don't know if gcc would handle -fcall-saved-rdi here... and if so, how >> reliably. > > Ok, from looking at kernel/sched.s output it looks like it saves rdi > content over the alternative where needed. I'll do some more testing > just to make sure. > No, you can't rely on behavioral observation. A different version of gcc could behave differently. We need to make sure we tell gcc what the requirements actually are, as opposed to thinking we can just fix them. +#define POPCNT ".byte 0xf3\n\t.byte 0x48\n\t.byte 0x0f\n\t.byte 0xb8\n\t.byte 0xc7" BTW, this can be written: #define POPCNT ".byte 0xf3,0x48,0x0f,0xb8,0xc7" -hpa -- 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