Re: [PATCH 03/10] jump label v11: base patch

H. Peter Anvin
2010-09-21T18:59:53Z

On 09/21/2010 11:55 AM, Konrad Rzeszutek Wilk wrote:
>>> +early_initcall(init_jump_label);
>>
>> Is there any danger of not patching the instructions with NOPs before
>> early_initcall is called? I guess for your uses (tracing) there won't.
>> And even if there are not patched it will just call the function.
>
> Ah, nevermind - if you don't patch the addresses which are in
> _jump_label section, the untouched code will just do far jump (jmpq)
> to right after the macro, which is ok.

Technical point of order: jmpq is *NOT* a far jump. A far jump (called
ljmp in gas) is a completely different x86 instruction with *very*
different semantics.

-hpa