From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: keir.xen@gmail.com, Feng Wu <feng.wu@intel.com>, xen-devel@lists.xen.org
Subject: Re: [PATCH 3/3] x86: Use alternative mechanism to define CLAC/STAC
Date: Mon, 26 May 2014 17:22:37 +0100 [thread overview]
Message-ID: <53836A4D.1020200@citrix.com> (raw)
In-Reply-To: <538385820200007800015D71@mail.emea.novell.com>
On 26/05/2014 17:18, Jan Beulich wrote:
>>>> On 26.05.14 at 17:49, <andrew.cooper3@citrix.com> wrote:
>> On 26/05/2014 08:27, Feng Wu wrote:
>>> @@ -166,26 +168,34 @@ void ret_from_intr(void);
>>> #define __ASM_STAC .byte 0x0f,0x01,0xcb
>>>
>>> #ifdef __ASSEMBLY__
>>> -#define ASM_AC(op) \
>>> - btl $X86_FEATURE_SMAP & 31, \
>>> - CPUINFO_FEATURE_OFFSET(X86_FEATURE_SMAP)+boot_cpu_data(%rip); \
>>> - jnc 881f; \
>>> - __ASM_##op; \
>>> -881:
>>> -
>>> -#define ASM_STAC ASM_AC(STAC)
>>> -#define ASM_CLAC ASM_AC(CLAC)
>>> +#define ASM_CLAC \
>>> + 661: ASM_NOP3; \
>>> + .pushsection .altinstr_replacement, "ax"; \
>> The altinstr_replacement section doesn't need to be executable. The
>> data inside it is copied out into the .text section.
> But having it executable allows easily disassembling their contents -
> reasonable disassemblers don't disassemble non-executable sections
> by default.
>
> Jan
>
True, but without labels, the disassembly would just be a jumble of
instructions.
~Andrew
next prev parent reply other threads:[~2014-05-26 16:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 7:27 [PATCH 0/3] x86: Use alternative mechanism to define CLAC/STAC Feng Wu
2014-05-26 7:27 ` [PATCH 1/3] x86: Add definitions for NOP operation Feng Wu
2014-05-26 15:04 ` Andrew Cooper
2014-05-26 7:27 ` [PATCH 2/3] x86: Port the basic alternative mechanism from Linux to Xen Feng Wu
2014-05-26 15:40 ` Andrew Cooper
2014-05-26 16:16 ` Jan Beulich
2014-05-27 6:13 ` Wu, Feng
2014-05-27 9:30 ` Jan Beulich
2014-05-27 15:35 ` Jan Beulich
2014-05-26 7:27 ` [PATCH 3/3] x86: Use alternative mechanism to define CLAC/STAC Feng Wu
2014-05-26 15:49 ` Andrew Cooper
2014-05-26 16:18 ` Jan Beulich
2014-05-26 16:22 ` Andrew Cooper [this message]
2014-05-27 6:24 ` Wu, Feng
2014-05-27 15:42 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53836A4D.1020200@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=feng.wu@intel.com \
--cc=keir.xen@gmail.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.