lkml.org 
[lkml]   [2018]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Xen-devel] [PATCH v2 1/2] xen/PVH: Set up GS segment for stack canary
From
Date
On 05/14/2018 08:50 AM, Jan Beulich wrote:
>>>> On 09.05.18 at 22:33, <boris.ostrovsky@oracle.com> wrote:
>> @@ -64,6 +67,17 @@ ENTRY(pvh_start_xen)
>> mov %eax,%es
>> mov %eax,%ss
>>
>> + /* Set base address in stack canary descriptor. */
>> + movl _pa(gdt_start),%eax
>> + movl $_pa(canary),%ecx
>> + movw %cx, (PVH_GDT_ENTRY_CANARY * 8) + 0(%eax)
>> + shrl $16, %ecx
>> + movb %cl, (PVH_GDT_ENTRY_CANARY * 8) + 2(%eax)
>> + movb %ch, (PVH_GDT_ENTRY_CANARY * 8) + 5(%eax)
> Is this meaningful / correct for the 64-bit case? I'd rather expect you to
> write the GS base address MSR there.

Yes, I should use the MSR for 64-bit mode and existing code for 32-bit mode.

-boris

\
 
 \ /
  Last update: 2018-05-14 20:25    [W:0.050 / U:1.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site