Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4788454ybf; Wed, 4 Mar 2020 10:40:15 -0800 (PST) X-Google-Smtp-Source: ADFU+vvRkAYPeLDE3xzLVar1KA1VGlW685+fBurj2IjNAFwAk5o9+dgHQxlxiInLwULH2OZ1r2ss X-Received: by 2002:a05:6808:aaf:: with SMTP id r15mr2646359oij.124.1583347215445; Wed, 04 Mar 2020 10:40:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583347215; cv=none; d=google.com; s=arc-20160816; b=ftxKcHDymVc/PE1eME14Pwk0JxiCF1JSLR2pUoLpg9io/GCH2qm7KhW6osKFnCxeGg 21t5ZCU/2TqEOSNNR+LSm4IgG10KA6v/TiSN2x9gkn1bVh3dH+Gt5F0m3irFZCYbuapS WfbgpKMVPUL75f8WO0mumERO6RRm1pJIIEiL/fV4dp5DXNCZQ0lXqN7JfRG0ki5Q6i6v 8cjH5Zn1+KRbAV+rbFHeuZDh5884J9yuB5OivD0FUfyhEYC5LurPuDzdevyhvkEpCPKL yPAwi0LmRxemeoSK5pVYLlECawyqi9Z7BQnhZSGWA65DuSuIoqGFLdn9RtjIeY6WJLWp Fkmg== 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; bh=DnZG0Q7yyFx2Ekwqkl8A/y7rij6uOwsLItkALz3MTaI=; b=pF7Dtub++9mU56gO/BlZVfFSD6Q4IgfsL+ZIok1m4TvPHmbStwRqqH/ovRC20k7WWo +4ODAtBtvmV1Zd2mzyxhYGaW01OjFc0znaLKJgF4EUa0E/vSdpyOwjkA4qFNb0jB8TRL L3bk82+ZJeQpLCePRUcQewJlNzF5YUxZBNhxdSWVQpyDIzhRiN7v4kI5NcUyMVXvpPon 0OZcWlVRMeQNBOdogiHbiICO5HgjG0Oo23sh0368Sl8LINHwH3kQZP+O/Xg8GFLtlrZH +B2IA/ptQRyF85wIU5tjxnRg8c3HtEWvgtqjS+SmJoy3+JuKvpMxqc5uNBbFikaZ41tC u4AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vfDJA7Dd; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 19si1813866oip.93.2020.03.04.10.40.03; Wed, 04 Mar 2020 10:40:15 -0800 (PST) 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=@kernel.org header.s=default header.b=vfDJA7Dd; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730249AbgCDSji (ORCPT + 99 others); Wed, 4 Mar 2020 13:39:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:59884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730176AbgCDSjh (ORCPT ); Wed, 4 Mar 2020 13:39:37 -0500 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED41C24654 for ; Wed, 4 Mar 2020 18:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583347177; bh=9tGRcQmnCs+8mBc+xsHARFOn6Shor2qdv6a+qSVcbqI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=vfDJA7Dd3AwkFhExwp4eYq1KDYgYgYvgeUxyYNXoaJ1LDiC039PR0+4wSrkRF4Fjx 6MG4vqMW82SCJ5qxc9mivHWIYRQBl2CU0BDyvfXSP5WUdRaWxzb6f8snhNB5r1BuuW ddUaL7O+Nf8DBtQGYXe04o2dcg22IoWVPROPwFQU= Received: by mail-wm1-f53.google.com with SMTP id 6so3340744wmi.5 for ; Wed, 04 Mar 2020 10:39:36 -0800 (PST) X-Gm-Message-State: ANhLgQ0mLUUcWQlUQaXJkEkieA7anW1SZn+qRVoFDhis4+UAs/beJsfG qlhpMCA6t2eLaklqiddE0bDNCUT5zl5c2uwm71A7wA== X-Received: by 2002:a05:600c:24b:: with SMTP id 11mr4758988wmj.1.1583347175359; Wed, 04 Mar 2020 10:39:35 -0800 (PST) MIME-Version: 1.0 References: <20200304183659.257828-1-nivedita@alum.mit.edu> In-Reply-To: <20200304183659.257828-1-nivedita@alum.mit.edu> From: Ard Biesheuvel Date: Wed, 4 Mar 2020 19:39:23 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] efi/x86: Move mixed-mode thunk to efi/libstub To: Arvind Sankar Cc: linux-efi , "the arch/x86 maintainers" , Linux Kernel Mailing List 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 Wed, 4 Mar 2020 at 19:37, Arvind Sankar wrote: > > Commit c2d0b470154c ("efi/libstub/x86: Incorporate eboot.c into > libstub") moved all the callers of the mixed-mode thunk into > efi/libstub, so move the thunk itself as well for completeness. > > Signed-off-by: Arvind Sankar Thanks for the patch, but I'd prefer to leave the .S pieces under arch/ (unless there's some benefit I'm not seeing) > --- > arch/x86/boot/compressed/Makefile | 1 - > drivers/firmware/efi/libstub/Makefile | 1 + > .../firmware/efi/libstub/x86_64-thunk.S | 0 > 3 files changed, 1 insertion(+), 1 deletion(-) > rename arch/x86/boot/compressed/efi_thunk_64.S => drivers/firmware/efi/libstub/x86_64-thunk.S (100%) > > diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile > index e51879bdc51c..047004d39a55 100644 > --- a/arch/x86/boot/compressed/Makefile > +++ b/arch/x86/boot/compressed/Makefile > @@ -88,7 +88,6 @@ endif > vmlinux-objs-$(CONFIG_ACPI) += $(obj)/acpi.o > > vmlinux-objs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a > -vmlinux-objs-$(CONFIG_EFI_MIXED) += $(obj)/efi_thunk_$(BITS).o > > # The compressed kernel is built with -fPIC/-fPIE so that a boot loader > # can place it anywhere in memory and it will still run. However, since > diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile > index 4d6246c6f651..85b66e5e5d1f 100644 > --- a/drivers/firmware/efi/libstub/Makefile > +++ b/drivers/firmware/efi/libstub/Makefile > @@ -55,6 +55,7 @@ lib-$(CONFIG_EFI_ARMSTUB) += arm-stub.o fdt.o string.o \ > lib-$(CONFIG_ARM) += arm32-stub.o > lib-$(CONFIG_ARM64) += arm64-stub.o > lib-$(CONFIG_X86) += x86-stub.o > +lib-$(CONFIG_EFI_MIXED) += x86_64-thunk.o > CFLAGS_arm32-stub.o := -DTEXT_OFFSET=$(TEXT_OFFSET) > CFLAGS_arm64-stub.o := -DTEXT_OFFSET=$(TEXT_OFFSET) > > diff --git a/arch/x86/boot/compressed/efi_thunk_64.S b/drivers/firmware/efi/libstub/x86_64-thunk.S > similarity index 100% > rename from arch/x86/boot/compressed/efi_thunk_64.S > rename to drivers/firmware/efi/libstub/x86_64-thunk.S > -- > 2.24.1 >