Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp503005imm; Wed, 23 May 2018 00:18:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqufnppMiAFTXhM4v9NVDdhcUNDp9/RT8aE9p6ZCMLwmC9GMbVksyI5C73UbkyBT6s1qnlr X-Received: by 2002:a17:902:8d8c:: with SMTP id v12-v6mr1780920plo.366.1527059898780; Wed, 23 May 2018 00:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527059898; cv=none; d=google.com; s=arc-20160816; b=qAbgLi0w9T/LkWTD8BQxs6irD4PuU0aBPI9ZaHKwY3qh4e8ynDdjauOh6dxwYMNfNB 3sXWHb2xt7SB1LNmjmEFpw2j4fOZEPUc+Y196vfuRbHRrJrz6vVxLwNtudkw3Sm/Qr4H G7WdKhnxLBy/LoOZmQkT2usib2mYvrnA7aGvDHFrMpBqZWJBK5/KaK69DlRJqee99ldq ymzOudb6FR/j/JBFMsPsrxmkNul8TB7Cn+c6XilQDM3/T9Mc2YduF/0DRH9Iib+sqmZW DJWz67DrnTeUFTvjX7oKpLGPokEiHffXsOdbT46F2NMoQkKHF2+0CxDYZMWgBoAqtn5o upvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:in-reply-to:references :subject:cc:to:from:date:message-id:arc-authentication-results; bh=2HEkJd64ExBColgcf7avMYuZgv25kyaqCNX+DRFWoc4=; b=xiA+VN9Bmzb4RflsWaBptkXTdN//WmIOdvk5k6YC/ouCu0yumfzpX3bnhfnzQUKqlC tYUqzuj6ccMbus06q274xS+4eJkUiros9EbajtiDX1FditXMemCgUAAaMjkLUXB/LgLn yfqLGsO3j1Hob9xfz1V6VWibEuDpyH49PCzx2bi1F/s0Mz4RcEwJoPOVi44/njbYJFq/ y7+pzHD7CCBtu0H6fkwuc5WdWc2SL2phodRavy0p8WGQsMPD9o5aG0Pr9al55Ti01FIJ GJvlzaO7V/uX9j3YzQO3BdLvmDi8L1Wv5rdAQCpEyX6yrR1HfzHjz4o52tpjKftz3Mdi 1RwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e185-v6si2648067pgc.179.2018.05.23.00.18.04; Wed, 23 May 2018 00:18:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932072AbeEWHRu convert rfc822-to-8bit (ORCPT + 99 others); Wed, 23 May 2018 03:17:50 -0400 Received: from prv1-mh.provo.novell.com ([137.65.248.33]:59413 "EHLO prv1-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754284AbeEWHRn (ORCPT ); Wed, 23 May 2018 03:17:43 -0400 Received: from INET-PRV1-MTA by prv1-mh.provo.novell.com with Novell_GroupWise; Wed, 23 May 2018 01:17:42 -0600 Message-Id: <5B05159302000078001C4FBE@prv1-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 18.0.0 Date: Wed, 23 May 2018 01:17:39 -0600 From: "Jan Beulich" To: "Boris Ostrovsky" Cc: , "xen-devel" , "Juergen Gross" , Subject: Re: [PATCH v4 1/2] xen/PVH: Set up GS segment for stack canary References: <20180522035445.16911-1-boris.ostrovsky@oracle.com> <20180522035445.16911-2-boris.ostrovsky@oracle.com> <5B0421E502000078001C4B91@prv1-mh.provo.novell.com> <5B04410D02000078001C4CC5@prv1-mh.provo.novell.com> <70aad5f3-67b9-b1fa-d39c-cfa8615f38da@oracle.com> <5B04463502000078001C4CEE@prv1-mh.provo.novell.com> <1bb1b3b0-fae1-9c2e-f5b8-0c51f06d6fa9@oracle.com> In-Reply-To: <1bb1b3b0-fae1-9c2e-f5b8-0c51f06d6fa9@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 22.05.18 at 19:10, wrote: > On 05/22/2018 12:32 PM, Jan Beulich wrote: >>>>> On 22.05.18 at 18:20, 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