[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/build: Use new .nops directive when available



>>> On 28.08.18 at 19:58, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 17/08/18 13:45, Jan Beulich wrote:
>>>>> On 15.08.18 at 19:57, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> --- a/xen/arch/x86/alternative.c
>>> +++ b/xen/arch/x86/alternative.c
>>> @@ -84,6 +84,19 @@ static const unsigned char * const 
>>> p6_nops[ASM_NOP_MAX+1] 
> 
>>> init_or_livepatch_cons
>>>  
>>>  static const unsigned char * const *ideal_nops init_or_livepatch_data = 
>>> p6_nops;
>>>  
>>> +#ifdef HAVE_AS_NOP_DIRECTIVE
>>> +
>>> +/* Nops in .init.rodata to compare against the runtime ideal nops. */
>>> +asm ( ".pushsection .init.rodata, \"a\", @progbits\n\t"
>>> +      "toolchain_nops: .nops " __stringify(ASM_NOP_MAX) "\n\t"
>>> +      ".popsection\n\t");
>> Any particular reason not to put them in .init.text?
> 
> Because its data, not executable code.

Well, depends. My view is that any insn is (potentially) executable
code. In fact I like gas'es behavior on ARM where insns and data
directives are separated by emitting "artificial" labels as markers.
But I'm fine either way.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.