This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Support for Intel X1000
- From: Florian Weimer <fweimer at redhat dot com>
- To: "dalias at libc dot org" <dalias at libc dot org>, "Kinsella, Ray" <ray dot kinsella at intel dot com>
- Cc: "carlos at redhat dot com" <carlos at redhat dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Wed, 13 May 2015 20:28:32 +0200
- Subject: Re: Support for Intel X1000
- Authentication-results: sourceware.org; auth=none
- References: <1431426490 dot 3246 dot 29 dot camel at intel dot com> <5552104C dot 1020806 at redhat dot com> <20150512152207 dot GW17573 at brightrain dot aerifal dot cx> <1431513937 dot 2622 dot 24 dot camel at intel dot com> <20150513170809 dot GY17573 at brightrain dot aerifal dot cx>
On 05/13/2015 07:08 PM, dalias@libc.org wrote:
> Also, since it's not just glibc you would have to hack the lock prefix
> out of, but also all code generated by GCC or other compilers and any
> hand-written asm, it would make a lot more sense to put the hack that
> NOPs out the lock prefix into the assembler. Then you can just build
> all programs with the hacked binutils and get working binaries.
-momit-lock-prefix already exists in gas:
<https://sourceware.org/binutils/docs/as/i386_002dOptions.html>
Unfortunately, just does that:
/* Some processors fail on LOCK prefix. This options makes
assembler ignore LOCK prefix and serves as a workaround. */
if (omit_lock_prefix)
{
if (i.tm.base_opcode == LOCK_PREFIX_OPCODE)
return;
i.prefix[LOCK_PREFIX] = 0;
}
Which means that instruction offsets change, hardly a conservative approach.
--
Florian Weimer / Red Hat Product Security