From patchwork Thu Nov 24 08:11:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 25349 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3258372wrr; Thu, 24 Nov 2022 00:13:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf7ERxk1eG6PdoctOBhGIIzDZVoSNPoTRn3UUc88aQ/ZgoCaLqEUelwEjx3sXsDzlnjHwyJs X-Received: by 2002:a17:903:2013:b0:188:f7d0:3952 with SMTP id s19-20020a170903201300b00188f7d03952mr12226315pla.164.1669277612900; Thu, 24 Nov 2022 00:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669277612; cv=none; d=google.com; s=arc-20160816; b=wMYK6NyLwGCZNUxEuNFMs0r06X81/VPCLk2NyoaoamNdPr5hJdGNUyquIU7IEKGw6S Z0XPbbFzdjh5+GulnwD9D1diqyy843xmzBqcSmfS5lfN8cQsLiSBwJJ0uOvtPClFlNvZ jYLolXZZy0F0ksxjruZmgibznYjTDxp7mjeZ/fajFlNeykoxMlOT1smJVokYPjoztwCt q5DkuR1gWqXrKy/1piQkW5BRG1yclSCCqE/73rTQdB+7zmYoW3ZADtlBG7BHgVRjgA+W K7J6qQ13QSw0MZHakyhohqVlDOxbve8LKv6bOg0hX4RzxDd1WbAI5K5l1eChCB0h1M1c CxOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=CskZbCqKrwexy97HjUI29JgnA5O45r1vBW03Gc0+UEE=; b=S+AwVo6gfIf8TTP1/RkRjL3Z619ERuGIj8xZo6yh+f1/6hq3HySi2Dp5FPGYPXEsfN jfyjgksA+wJb5M8Kc1HDOmDIBX31u3N4BOIzj/483QOTJOETzvFm4bpOx2J0BbNMqn5Y whJfuS2tWvsFCXtVBim4C/2JQMnqQsZf1o0xrGO+y5tXFsofRpxF8aDqMbvv6LR/5rQo qDj6YRva4iGbyC6kTQFDKNoISqf+RK8B8DmjgZ9Sx5pP4vIStnet2XtJ+VEWKEqKChS8 ON8Ylh/+w2DHxXXHzLKZUW3WWNpV/F+xdjyYw308RrG98ulN5BHx5h8iWs14kiAYt5Lj aWKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=veo983jk; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020a170903018500b00179c921918esi515415plg.17.2022.11.24.00.13.18; Thu, 24 Nov 2022 00:13:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=veo983jk; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229585AbiKXINE (ORCPT + 99 others); Thu, 24 Nov 2022 03:13:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229815AbiKXIMM (ORCPT ); Thu, 24 Nov 2022 03:12:12 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFD44DB87D; Thu, 24 Nov 2022 00:12:01 -0800 (PST) Date: Thu, 24 Nov 2022 08:11:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669277520; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CskZbCqKrwexy97HjUI29JgnA5O45r1vBW03Gc0+UEE=; b=veo983jkg9RsBcru3v9EXXgmCv1/4Z+q+PLuzNtkQSgkXw4cdrNVC6t4mzuJePYAPlSWO/ Huu61fQWPanp10vLiERr+ylpqgqDT5VZ8etJF2eTXbvcxVE44CbaEBxWgter8xddrx8WUY QtfLRm1cyXKPbALHrcHXVLlb5UcD5CMZak6j9zP4SCFGTHwIT3N6OKh2QSQuDWlmoFlGPo Hgk6FLVEtoFLYQp63SXNo1aJDlgyvWWdaItsCKjlHqmjgaPOV+qFINr3p+ccpvX5lf73RN eT0YFfBQiMZ6Db4e1YoKVmOkP1l2CLI+fTCt8nvA4zgXuvgRvTCfR4PJ3cpx+w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669277520; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CskZbCqKrwexy97HjUI29JgnA5O45r1vBW03Gc0+UEE=; b=pHcUyV2Z73akOeBj0E6S+sNkJh9uw+vqDaXrQ7aVy1n1CE5m99Rk8Twa6U8Dk1ZBYKEju3 badW+s0vkuRYKyDw== From: "tip-bot2 for Ard Biesheuvel" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/boot] x86/boot/compressed: Only build mem_encrypt.S if AMD_MEM_ENCRYPT=y Cc: Ard Biesheuvel , Borislav Petkov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221122161017.2426828-17-ardb@kernel.org> References: <20221122161017.2426828-17-ardb@kernel.org> MIME-Version: 1.0 Message-ID: <166927751915.4906.5763903520238092711.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750364442017799268?= X-GMAIL-MSGID: =?utf-8?q?1750364442017799268?= The following commit has been merged into the x86/boot branch of tip: Commit-ID: 61de13df95901bc58456bc5acdbd3c18c66cf859 Gitweb: https://git.kernel.org/tip/61de13df95901bc58456bc5acdbd3c18c66cf859 Author: Ard Biesheuvel AuthorDate: Tue, 22 Nov 2022 17:10:16 +01:00 Committer: Borislav Petkov CommitterDate: Thu, 24 Nov 2022 08:57:41 +01:00 x86/boot/compressed: Only build mem_encrypt.S if AMD_MEM_ENCRYPT=y Avoid building the mem_encrypt.o object if memory encryption support is not enabled to begin with. Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221122161017.2426828-17-ardb@kernel.org --- arch/x86/boot/compressed/Makefile | 2 +- arch/x86/boot/compressed/mem_encrypt.S | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index cd1a629..3dc5db6 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -100,7 +100,7 @@ vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/kaslr.o ifdef CONFIG_X86_64 vmlinux-objs-y += $(obj)/ident_map_64.o vmlinux-objs-y += $(obj)/idt_64.o $(obj)/idt_handlers_64.o - vmlinux-objs-y += $(obj)/mem_encrypt.o + vmlinux-objs-$(CONFIG_AMD_MEM_ENCRYPT) += $(obj)/mem_encrypt.o vmlinux-objs-y += $(obj)/pgtable_64.o vmlinux-objs-$(CONFIG_AMD_MEM_ENCRYPT) += $(obj)/sev.o endif diff --git a/arch/x86/boot/compressed/mem_encrypt.S b/arch/x86/boot/compressed/mem_encrypt.S index e696745..32f7cc8 100644 --- a/arch/x86/boot/compressed/mem_encrypt.S +++ b/arch/x86/boot/compressed/mem_encrypt.S @@ -307,7 +307,6 @@ SYM_FUNC_END(startup32_check_sev_cbit) .data -#ifdef CONFIG_AMD_MEM_ENCRYPT .balign 8 SYM_DATA(sme_me_mask, .quad 0) SYM_DATA(sev_status, .quad 0) @@ -323,4 +322,3 @@ SYM_DATA_START_LOCAL(boot32_idt_desc) .word . - boot32_idt - 1 .long 0 SYM_DATA_END(boot32_idt_desc) -#endif