[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <07fca94f-86e1-3a0a-0078-0c0d6aa52363@oracle.com>
Date: Thu, 3 Jun 2021 21:49:04 -0400
From: Boris Ostrovsky <boris.ostrovsky@...cle.com>
To: Anchal Agarwal <anchalag@...zon.com>
Cc: "tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>,
"jgross@...e.com" <jgross@...e.com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"sstabellini@...nel.org" <sstabellini@...nel.org>,
"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
"roger.pau@...rix.com" <roger.pau@...rix.com>,
"axboe@...nel.dk" <axboe@...nel.dk>,
"davem@...emloft.net" <davem@...emloft.net>,
"rjw@...ysocki.net" <rjw@...ysocki.net>,
"len.brown@...el.com" <len.brown@...el.com>,
"pavel@....cz" <pavel@....cz>,
"peterz@...radead.org" <peterz@...radead.org>,
"xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dwmw@...zon.co.uk" <dwmw@...zon.co.uk>
Subject: Re: [PATCH v3 01/11] xen/manage: keep track of the on-going suspend
mode
On 6/3/21 7:27 PM, Anchal Agarwal wrote:
> On Thu, Jun 03, 2021 at 04:11:46PM -0400, Boris Ostrovsky wrote:
>
>> But if KASLR is on then this comparison not failing should cause xen_vcpu pointer in the loaded image to become bogus because xen_vcpu is now registered for a different xen_vcpu_info address during boot.
>>
> The reason for that I think is once you jump into the image that information is
> getting lost. But there is some residue somewhere that's causing the resume to
> fail. I haven't been able to pinpoint the exact field value that may be causing
> that issue.
xen_vcpu now points to address which is not where the hypervisor thinks vcpu_info should be.
> Correct me if I am wrong here, but even if hypothetically I put a hack to tell the kernel
> somehow re-register vcpu it won't pass because there is no hypercall to
> unregister it in first place?
Right. You will be shown the door in map_vcpu_info():
if ( !mfn_eq(v->vcpu_info_mfn, INVALID_MFN) )
return -EINVAL;
> Can the resumed kernel use the new values in that
> case [Now this is me just throwing wild guesses!!]
I don't think so --- hypervisor is now pointing to a random location in your image.
-boris
Powered by blists - more mailing lists