Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp750268imm; Fri, 1 Jun 2018 08:55:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJemLMjm7Yak/V4ZjCxQNhr006yM1MqNKwsXAYPmL5/y2ROZqP0Um5gVR3bdJPPkJDHq2Mq X-Received: by 2002:a63:bd09:: with SMTP id a9-v6mr9276044pgf.250.1527868528955; Fri, 01 Jun 2018 08:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527868528; cv=none; d=google.com; s=arc-20160816; b=bJ/NZ7NvltrcwUlb7K4qOH250M52TZkT6J2wjLXnIQFtfbt126MYRvQjFQUcVTuW1q QqRX6AmFWACGN82PKOAHpjhEFw8cADE5Zel7Wva+ISDt96Fw6KSMxLlR6uvscb6xRp0t 4nfOyAmwkFmj28ITYTkrV73zWpsiv1Q7ee/X6/vxcxvy0wcifW+s0Dl2aDvGaCeit2LQ KwxIeoidwwLgCddwU2oKiIY9y7pmZAbPazZSHfchRuLsfOtVyNBAZbq7BAot1QiG6eVl vGEMQpRat5IE8bwtonLb0EhHk+kPOWVDrj/4MIqwOZcZoAFAeUPDaR7TkSTKuV/I+Xtp eGZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=51KLIfXGsrNo7DdfzknTD8Ub9y93pH28dNDiv7yMWDs=; b=kRrzU39Y5MEtJpSCNGJK144CzJduvUCj6AKU3ebG/S85SZYhlWgEcQ0eoet6cso2WO TYHHHxQJk+58dqYOqYiBK20odK6fbPZkgmQGv8VOJlZRu2xulSanAf0ao4tZOFFlsNLX xTRqn5543czi1uuMeEjlNYtkMklMB5wqcTVKmMgKehZhJ4yRwb6LJLXOAP7NSFsJwO8E R/cI8mae8xMtdSVxE+L9XJtrVJndvEImXQkX7gI9tSb1fdM/7UjXR/VC20KwnkNhGxb8 Ifi6e4Cz7ZKigZ6hSE/fzaQkgkMP67LsTaoy6kmJ8Sryjqaa+BKB4cx+GjpqUxBQKL8/ cOzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=kT0T0ukv; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d14-v6si11104727plr.244.2018.06.01.08.55.14; Fri, 01 Jun 2018 08:55:28 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=kT0T0ukv; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753089AbeFAPxe (ORCPT + 99 others); Fri, 1 Jun 2018 11:53:34 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:54925 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752810AbeFAPxc (ORCPT ); Fri, 1 Jun 2018 11:53:32 -0400 Received: by mail-it0-f68.google.com with SMTP id 76-v6so2371931itx.4 for ; Fri, 01 Jun 2018 08:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=51KLIfXGsrNo7DdfzknTD8Ub9y93pH28dNDiv7yMWDs=; b=kT0T0ukv9PNQk+CUcU/Jl4g8LkQNdKmn/Nu1rmSYkjlaaAW6UjucUhLaiHNqHC9y7E GeOy8XgMYf6/jjdck3pHpBE6ltnYPzFAPpBxl1YdclYgbQLRvc+8KlyY2gZEP9gNWDT8 SFkME//OZzujnkALAcsvxqDy9C/iDRgUm2CPnw84FgoEM7ahG5Ax8UTbELt0uMs5GMZ/ CzSXI5JmNpJ61tDOuXRXOMsR7nVhK2X4BXDXuRZVUXqfLeG+Ie95TeaHy8a2pWWlEanp WdXJKBU4Tq0Dp2DkNED4F8J8zEiMZOR+YSS00l9hC0WNCyyV/vA6SOzULsE4Z4Ccgy4G T5Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=51KLIfXGsrNo7DdfzknTD8Ub9y93pH28dNDiv7yMWDs=; b=uZjIWMf/xohqd7tDEJrb4vkiPl+7AXQhJoQKoRcqjH6FtHcXG9qDLGDTWYCpKYMcNf UvU631xFzl69b0T7z7YWkphyBN1vTZbvsSmQ4rkHrqXxtnuorUtMb3u0x0mZjovTUmVj es5Sl17LZ8k8XlR9p8eBoyAYWp+VAEyav5aC1rdMbATj2C1jzdObS9nArsSC4IuqD2vl 8nV+A9DivTQ/BfJftWqo8S5KqpbVzQIQScX/RTE/NDnKdd2S4DRblFlGJ5xviGeNmMSf chlgq5B13/Pi/S+tsH5pIviKhBF7qjdTOlO7SlIcPiO049yrDSQIXJ2ZHy+JnMV0ALJ2 p4iw== X-Gm-Message-State: APt69E3EMw8Rd0pcWo8VroDdrivEOKWYzFz0ARMwAlefwsnKktYMyHrv yn0a/lOZzlCQ8YVfyPO3rhonZfiMKMC/y4h/lalRyQ== X-Received: by 2002:a24:4c6:: with SMTP id 189-v6mr4955725itb.53.1527868411970; Fri, 01 Jun 2018 08:53:31 -0700 (PDT) MIME-Version: 1.0 References: <20180529221625.33541-1-thgarnie@google.com> <20180529221625.33541-19-thgarnie@google.com> In-Reply-To: From: Thomas Garnier Date: Fri, 1 Jun 2018 08:53:21 -0700 Message-ID: Subject: Re: [PATCH v4 18/27] xen: Adapt assembly for PIE support To: Boris Ostrovsky Cc: Kernel Hardening , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , "the arch/x86 maintainers" , Juergen Gross , Greg KH , Kate Stewart , "H . J . Lu" , LKML , xen-devel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 1, 2018 at 8:40 AM Boris Ostrovsky wrote: > > On 05/29/2018 06:15 PM, Thomas Garnier wrote: > > diff --git a/arch/x86/xen/xen-pvh.S b/arch/x86/xen/xen-pvh.S > > index ca2d3b2bf2af..82ba89ba8bb3 100644 > > --- a/arch/x86/xen/xen-pvh.S > > +++ b/arch/x86/xen/xen-pvh.S > > @@ -114,8 +114,8 @@ ENTRY(pvh_start_xen) > > call xen_prepare_pvh > > > > /* startup_64 expects boot_params in %rsi. */ > > - mov $_pa(pvh_bootparams), %rsi > > - mov $_pa(startup_64), %rax > > + movabs $_pa(pvh_bootparams), %rsi > > + movabs $_pa(startup_64), %rax > > jmp *%rax > > > > #else /* CONFIG_X86_64 */ > > @@ -161,10 +161,15 @@ END(pvh_start_xen) > > > > .section ".init.data","aw" > > .balign 8 > > + /* > > + * Use a quad for _pa(gdt_start) because PIE does not understand a > > + * long is enough. The resulting value will still be in the lower long > > + * part. > > + */ > > gdt: > > .word gdt_end - gdt_start > > - .long _pa(gdt_start) > > - .word 0 > > + .quad _pa(gdt_start) > > > With this becoming .quad 32-bit compilation fails: > > /data/root/linux/arch/x86/xen/xen-pvh.S: Assembler messages: > /data/root/linux/arch/x86/xen/xen-pvh.S:147: Error: cannot represent > relocation type BFD_RELOC_64 Thanks, I will look to fix this in the next patch set and run a full 32-bit build. > > > -boris > > > > + .balign 8 > > gdt_start: > > .quad 0x0000000000000000 /* NULL descriptor */ > > #ifdef CONFIG_X86_64 > -- Thomas