lkml.org 
[lkml]   [2015]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] x86: Stop relying on magic jmp behavior for early_idt_handlers
On 05/21/2015 11:51 PM, Andy Lutomirski wrote:
>>>
>>> #ifdef __KERNEL__
>>> +
>>> +/*
>>> + * early_idt_handlers is an array of entry points. For simplicity, it's
>>> + * a real array. We allocate nine bytes for each entry: two one-byte
>>> + * push instructions and a five-byte jump in the worst case.
>>> + */
>>> +#define EARLY_IDT_HANDLER_STRIDE 9
>>
>> So how come that two plus five equals nine? ;-)
>
> A "one-byte push" would be pretty impressive :)
>

Well, non-REX register pushes are just one byte. However, these take an
immediate constant.

>>
>> Ditto for the 64-bit side.
>
> Sounds good. I'll do all this tomorrow and resend.
>

Thank you! Since I trust you, I'll send you this in advance:

Acked-by: H. Peter Anvin <hpa@linux.intel.com>




\
 
 \ /
  Last update: 2015-05-22 23:41    [W:0.051 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site