[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5B05159302000078001C4FBE@prv1-mh.provo.novell.com>
Date: Wed, 23 May 2018 01:17:39 -0600
From: "Jan Beulich" <JBeulich@...e.com>
To: "Boris Ostrovsky" <boris.ostrovsky@...cle.com>
Cc: <brgerst@...il.com>, "xen-devel" <xen-devel@...ts.xenproject.org>,
"Juergen Gross" <jgross@...e.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 1/2] xen/PVH: Set up GS segment for stack canary
>>> On 22.05.18 at 19:10, <boris.ostrovsky@...cle.com> wrote:
> On 05/22/2018 12:32 PM, Jan Beulich wrote:
>>>>> On 22.05.18 at 18:20, <boris.ostrovsky@...cle.com> wrote:
>>> We are loading virtual address for $canary so we will always have EDX
>>> set to 0xffffffff. Isn't that what we want?
>> Oh, that's rather confusing - we're still running on the low 1:1
>> mapping when we're here. But yes, by the time we enter C code
>> (where the GS base starts to matter) we ought to be on the high
>> mappings - if only there wasn't xen_prepare_pvh().
>
> xen_prepare_pvh() (and whatever it might call) is the only reason for
> this patch to exist. It's the only C call that we are making before
> jumping to startup_64, which I assume will have to set up GS itself
> before calling into C.
>
> I didn't realize we are still on identity mapping. I'll clear EDX (and
> load $_pa(canary)) then.
>
> BTW, don't we have the same issue in startup_xen()?
I don't think so, no - there we're on the high mappings already (the
ELF note specifies the virtual address of the entry point, after all).
Jan
Powered by blists - more mailing lists