Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp158295rdb; Fri, 18 Aug 2023 18:47:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDXzXrX9TuLhbYnpk3qJBjns8CwmNwvABzXEfU/Me/mfQZ7LRnif4vvIH0hkbHXUi5qZlT X-Received: by 2002:a9d:481a:0:b0:6b9:dcb5:cb90 with SMTP id c26-20020a9d481a000000b006b9dcb5cb90mr1100031otf.13.1692409666620; Fri, 18 Aug 2023 18:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692409666; cv=none; d=google.com; s=arc-20160816; b=KVmcDZ4/e6twd8u1HiJTDjkVkt+Ap0IKzECE7QgjihaeQhqVY+GYhKZWOTMrC7EjYL hLoX9bpsDVKuosei7CAfafyJULUQk1jZ8RiGkBSCQLR4aSUrl5KgZ12Q8MhW0PaVFAUR jBC6+IAVjVngrcFfgRWz0QsF1p4JYyV2bZAgMbxpsaRTKpZPw5sMFrD8zvgOJiqdFm8d tliC4F4jpwIGWrCG/XCmRVJbLRwLJ/BRygKoCppqbDC0SSXqQuEkCaiBmUNPPN9U9jj/ EtDxaq2ZqOaQiWCt9UwvqkrYy6/9O3sTZu+9Q7ZU0TkoTYBcfHQ/xyP8v0nSJifmLh2g 5NkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g00g4OdbR2v3gSFnx7Y4TZaarhsB3jq5RcqUgFcbbCA=; fh=2K0cnVWNN/lSoXOQ2Jt2UifFp/1e7O4elwn57wGf9gU=; b=jzM5d2UEhxmai6cRvpa4vY2BLphDdaFHqIBDlPCM3s5Zl3dxWyTVeCD/sDesvcYZF5 oSOfpBTQmNuUQS1BgvJEWMr5xaS607OMqtA4jKZdGw52bOBtkmXxWbc4DxuA/Znfpdez CHJHYcXOj7qVTJqUunJRP0eF+1CMPWl/XiVFW0pJbLrqLvh2RQJE+pjP7XPYBOcAZpYB f01cBA/rfMlgIlGw5WUcrF9A2RgktvEkjCVEwVxRCg1Z8SEhzSb/ABdSfqHUrWgkGG2N tGWfejhhFB0sboVDt3eGt8iU/HoBRSjHq75ZEHTMaIJRuoqZodMDGdCi6Nf+BROxLT8Q 38zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ItSRvMFo; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j2-20020a63e742000000b00563dde13952si2372207pgk.720.2023.08.18.18.47.31; Fri, 18 Aug 2023 18:47:46 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=ItSRvMFo; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377569AbjHROB2 (ORCPT + 99 others); Fri, 18 Aug 2023 10:01:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377364AbjHRNpQ (ORCPT ); Fri, 18 Aug 2023 09:45:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEFEB4204; Fri, 18 Aug 2023 06:45:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8A28666A97; Fri, 18 Aug 2023 13:45:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23C2DC433C8; Fri, 18 Aug 2023 13:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692366308; bh=RctLeH91sUvM0RywhiGBIOdDJRjXojQ3lHnfxJM0QOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ItSRvMFooE//MKYJe2iZoiC6PNRAGDcz+ItiweHZApzUHXhcvKFvZkvSkUn0VauYI PTwyG/lHGEX/I6rmBPeoC3gEkRqRvqj6/DZpsa2UYio3R+LFZSL+c/DEGMdruGnhlK zhXQ0fFhlRPUm+FTCEy/qTHRW0FY4WkkB6ZdKw88wP+V1yjSYW2fGVj6pcijCoZPCP 9zbrdPvuWJIofQH+WwWLd7Pp6qFZVyQikdJ3uzAX7ZZrrjORPABa/yz/w47hjEKjug QG2KHwCzNdT6VE/4E+QwMhI6HtNlE/1KciOFZG87NFZHQsh0DYfjniE7i9Fal65EZR KSUj3h8VIjADQ== From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel , Evgeniy Baskov , Borislav Petkov , Dave Hansen , Ingo Molnar , Thomas Gleixner , Peter Jones , Matthew Garrett , Gerd Hoffmann , Kees Cook , "H. Peter Anvin" , =?UTF-8?q?Marvin=20H=C3=A4user?= Subject: [PATCH 08/17] x86/boot: Drop references to startup_64 Date: Fri, 18 Aug 2023 15:44:13 +0200 Message-Id: <20230818134422.380032-9-ardb@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230818134422.380032-1-ardb@kernel.org> References: <20230818134422.380032-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2126; i=ardb@kernel.org; h=from:subject; bh=RctLeH91sUvM0RywhiGBIOdDJRjXojQ3lHnfxJM0QOk=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JIeV+6VLNjxZB+748FP8dIed4Xatw//3Yn5NTXgnJ5a7sv FZvcVujo5SFQYyDQVZMkUVg9t93O09PlKp1niULM4eVCWQIAxenAEzk6TJGhpXuX4K0/wqXzPx2 8aTzY5MjkzfsfdX4JCG3+YLszH0yElsYGd5lbnly7O0Po51l1w0EIlouHTaf9TCP9cxWhbVGb/f IezICAA== X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 The x86 boot image generation tool assign a default value to startup_64 and subsequently parses the actual value from zoffset.h but it never actually uses the value anywhere. So remove this code. Signed-off-by: Ard Biesheuvel --- arch/x86/boot/Makefile | 2 +- arch/x86/boot/tools/build.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index f33e45ed143765f9..0e98bc5036994715 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -89,7 +89,7 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE SETUP_OBJS = $(addprefix $(obj)/,$(setup-y)) -sed-zoffset := -e 's/^\([0-9a-fA-F]*\) [a-zA-Z] \(startup_32\|startup_64\|efi32_stub_entry\|efi64_stub_entry\|efi_pe_entry\|efi32_pe_entry\|input_data\|kernel_info\|_end\|_ehead\|_text\|z_.*\)$$/\#define ZO_\2 0x\1/p' +sed-zoffset := -e 's/^\([0-9a-fA-F]*\) [a-zA-Z] \(startup_32\|efi32_stub_entry\|efi64_stub_entry\|efi_pe_entry\|efi32_pe_entry\|input_data\|kernel_info\|_end\|_ehead\|_text\|z_.*\)$$/\#define ZO_\2 0x\1/p' quiet_cmd_zoffset = ZOFFSET $@ cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@ diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c index 660627ea6cbb46f5..14ef13fe7ab021e7 100644 --- a/arch/x86/boot/tools/build.c +++ b/arch/x86/boot/tools/build.c @@ -59,7 +59,6 @@ static unsigned long efi32_stub_entry; static unsigned long efi64_stub_entry; static unsigned long efi_pe_entry; static unsigned long efi32_pe_entry; -static unsigned long startup_64; static unsigned long _end; /*----------------------------------------------------------------------*/ @@ -263,7 +262,6 @@ static void efi_stub_defaults(void) efi_pe_entry = 0x10; #else efi_pe_entry = 0x210; - startup_64 = 0x200; #endif } @@ -338,7 +336,6 @@ static void parse_zoffset(char *fname) PARSE_ZOFS(p, efi64_stub_entry); PARSE_ZOFS(p, efi_pe_entry); PARSE_ZOFS(p, efi32_pe_entry); - PARSE_ZOFS(p, startup_64); PARSE_ZOFS(p, _end); p = strchr(p, '\n'); -- 2.39.2