Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4878603pjb; Mon, 27 Jul 2020 07:26:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBTVkyZn1wH9gLDhS3fBEFruO4r7NKIOncdJqPekljrkyIxOGp4s/FfUlGz/T1cZN1PpK5 X-Received: by 2002:a50:dacd:: with SMTP id s13mr8610043edj.271.1595859977630; Mon, 27 Jul 2020 07:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859977; cv=none; d=google.com; s=arc-20160816; b=RhIcEBGOZ7BdkeGpU3of/ch/zRniLktQutjO/8KJjaU9lFz9nHl77/SIiKPsSsROiv kA9up6Nx5RHM23n15FhalAYN5q1e/0xRf4U2Cugb+donYlPGW+GfF5U48H1mwamuHeNX Hl4eAm7wcY3SctY2whQd9ej/X+gQm85oD4mJDsHAFAPyfeCTJOpRMrRhrCNV6WZbxCRf OXF8QXgor66b/ywEQQK/95H72ThNIpV7wWJZpZSrkh68oB7LvdQEabARg/6FcMcPEO5l xA/j1YLpIkI4U/X6s57MHJENOTOqd1EkJrRTssloSpOansUjcSgkAoCei/dtSzDdi8cP 6fyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VKVlYiBL92fD8Zm3MLngNn77kSX61uQeF6y5YXpvTj8=; b=pKebcT4D3GZWwZGDhzYGGNnwWInokFxKZoF/kmSsihmdcs8qs/jUiyO4WiHuBi7/7O PnDfmsu4WxsehcohhQAbbAnUtxdujs0grppObqPzPr5kk532oYovdxAHveSAgegMFsFc 9qn5phsAno4ci+5KgNN13OpgUdHV6e6fkxyExoKAW/KmrToKU6Sxo3JieQkK/d28TXty ncfBsvrE/ZC75BFGWclUabp7fVK7Iwb3h8Ml954H9MQ8f3i2QmrcgvRLr3vH3l3lzpRo N1rdiTby4JRNzBGZ5TP/XZL9tL7kXezagjJgS6Ze59rpWf4WJShnJI696/bhtzOhyv/Q V68w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hqDp0WN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y2si1531195ejf.344.2020.07.27.07.25.55; Mon, 27 Jul 2020 07:26:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hqDp0WN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732301AbgG0OYh (ORCPT + 99 others); Mon, 27 Jul 2020 10:24:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:54184 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732283AbgG0OYe (ORCPT ); Mon, 27 Jul 2020 10:24:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7804421775; Mon, 27 Jul 2020 14:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859874; bh=8CVLljuIEwXs0puMnxHS10FA9u3SjYy216HgOc6fzLc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hqDp0WN5S0kRfML2qKB7ZwlCqfa4GYiyOWxf+ja7BOs+1RU8ClmkrfP3PpJTXZgNg l4mDKu8dcVp6d81vVhsU8UyPpKcDwqPUfRSOqIRaKM+xPbgUuaecX+qnDT6GCUv6P+ EcMKCBdiDJ0UDIPfNXeYVDWxV6Eq1QIwujTi8NGk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arvind Sankar , Thomas Gleixner , Masahiro Yamada , Ard Biesheuvel , Sasha Levin Subject: [PATCH 5.7 138/179] x86/boot: Dont add the EFI stub to targets Date: Mon, 27 Jul 2020 16:05:13 +0200 Message-Id: <20200727134939.355856112@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arvind Sankar [ Upstream commit da05b143a308bd6a7a444401f9732678ae63fc70 ] vmlinux-objs-y is added to targets, which currently means that the EFI stub gets added to the targets as well. It shouldn't be added since it is built elsewhere. This confuses Makefile.build which interprets the EFI stub as a target $(obj)/$(objtree)/drivers/firmware/efi/libstub/lib.a and will create drivers/firmware/efi/libstub/ underneath arch/x86/boot/compressed, to hold this supposed target, if building out-of-tree. [0] Fix this by pulling the stub out of vmlinux-objs-y into efi-obj-y. [0] See scripts/Makefile.build near the end: # Create directories for object files if they do not exist Signed-off-by: Arvind Sankar Signed-off-by: Thomas Gleixner Reviewed-by: Masahiro Yamada Acked-by: Ard Biesheuvel Link: https://lkml.kernel.org/r/20200715032631.1562882-1-nivedita@alum.mit.edu Signed-off-by: Sasha Levin --- arch/x86/boot/compressed/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -88,8 +88,8 @@ 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 +efi-obj-$(CONFIG_EFI_STUB) = $(objtree)/drivers/firmware/efi/libstub/lib.a # 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 @@ -113,7 +113,7 @@ endef quiet_cmd_check-and-link-vmlinux = LD $@ cmd_check-and-link-vmlinux = $(cmd_check_data_rel); $(cmd_ld) -$(obj)/vmlinux: $(vmlinux-objs-y) FORCE +$(obj)/vmlinux: $(vmlinux-objs-y) $(efi-obj-y) FORCE $(call if_changed,check-and-link-vmlinux) OBJCOPYFLAGS_vmlinux.bin := -R .comment -S