From patchwork Tue Mar 14 10:13:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeniy Baskov X-Patchwork-Id: 69507 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1694751wrd; Tue, 14 Mar 2023 04:18:55 -0700 (PDT) X-Google-Smtp-Source: AK7set8ix9xciD5Ss2d6exM7pm5HOP3CmXD/aqzcM+iQ1N0Mh/GD3UT48RQEfYeHotwTrvDXyGtQ X-Received: by 2002:a05:6a20:2a22:b0:d3:eab3:bc0e with SMTP id e34-20020a056a202a2200b000d3eab3bc0emr7174501pzh.25.1678792735230; Tue, 14 Mar 2023 04:18:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678792735; cv=none; d=google.com; s=arc-20160816; b=hbuyx9b1+fkXe0aU6EeycfKWYDgNJnv/8ff1lZmoHKV8a666dI1PXp0U2GNlIF8MjE oZ5WEmkuvNFOQtk3s3+qfl/JLhYItFcnvuqAs7780OfZ6baM34rMJaF1eky73sydUxJp ojEtXrLfJRzcO8ZPWoUOe3azFEo2O4TTcFi1Ok5tAYSEydQEEAafK16Om+9kGEklGD82 F5ohZT5WRgs4OjODDNDqowcWawhtar8QetxHeJI9H1ad2qqVZPKtg9Tvhp8GCW40CC0r ZfNpLk8d98lKSwPHDi6Cjr5THxu+5Z9/5kprMLPGamBZIw7ZOhLE/PM9/14tHaqYfwGb FkaQ== 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:dkim-filter; bh=h+bkgqPm7b7uPEaroJgzVv9itrgVunPxx6RhvF4UiD0=; b=REQrHLf4Y4Xl/+JIEZ8N9NVlUtxAKnhF/U7M1Wa6swn3gy1ICjywKhZ3cWZHczP/F+ YVdE4DSkB66xkVytAgeJ4tEou+3WVmUlyhzIqwUwcNPMTgTAE8UcgqEdiRxKcFR+ZhLL /hHLUCHdLyaxPKpoyrxQikOGxUpBqYJAP/bwy2ztKXMLDTDbNam9FSLa3AHw0PYpbK0N l696dWLEH7ZMbSIs2mA8w6pKPjW7kefbTtLraCcO7ERCaowNqs1WP2GHcRK65uFsNFso qIKzN35qvJUifc4Usq0+gdA0z/f5y5rm92I5/oEvGkXe8R8H8NThZXbgj4S4iSp4KYWQ AMRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ispras.ru header.s=default header.b=LllV8BRJ; 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=ispras.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e9-20020aa798c9000000b00594252e8a11si1974451pfm.170.2023.03.14.04.18.37; Tue, 14 Mar 2023 04:18:55 -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=@ispras.ru header.s=default header.b=LllV8BRJ; 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=ispras.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230286AbjCNLC0 (ORCPT + 99 others); Tue, 14 Mar 2023 07:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbjCNLCT (ORCPT ); Tue, 14 Mar 2023 07:02:19 -0400 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ABB395E1A; Tue, 14 Mar 2023 04:02:02 -0700 (PDT) Received: from localhost.localdomain (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPSA id 6E10A40755D2; Tue, 14 Mar 2023 10:23:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 6E10A40755D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1678789405; bh=h+bkgqPm7b7uPEaroJgzVv9itrgVunPxx6RhvF4UiD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LllV8BRJ4K+NnkNRyF8DlukEoGrApXJeih+vpRc/nGWBLcqSAAajZRaoP7HKrLI3O jH7ukC0VE8qSvCoJlTCXmhgXJ2qsh9FcgiNs1gzBGl++zm2eLTR7id94S3tc2zvyHi fXASBwRFAO+bDu9KAS9q/E72xBJs7RNnXvV9d0JA= From: Evgeniy Baskov To: Ard Biesheuvel Cc: Evgeniy Baskov , Borislav Petkov , Andy Lutomirski , Dave Hansen , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Alexey Khoroshilov , Peter Jones , Gerd Hoffmann , "Limonciello, Mario" , joeyli , lvc-project@linuxtesting.org, x86@kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: [PATCH v5 23/27] efi/libstub: Don't set ramdisk_image/ramdisk_size Date: Tue, 14 Mar 2023 13:13:50 +0300 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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?1760341770932070162?= X-GMAIL-MSGID: =?utf-8?q?1760341770932070162?= The local copy of the boot_params made during build time is used now, so setting ramdisk_image/ramdisk_size fields is no longer needed, since they are already set to 0. Remove no longer required assignments. Signed-off-by: Evgeniy Baskov --- drivers/firmware/efi/libstub/x86-stub.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c index 5dbc9c7a4aa3..7c5561aaba71 100644 --- a/drivers/firmware/efi/libstub/x86-stub.c +++ b/drivers/firmware/efi/libstub/x86-stub.c @@ -389,9 +389,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, efi_set_u64_split((unsigned long)cmdline_ptr, &hdr->cmd_line_ptr, &efi_boot_params.ext_cmd_line_ptr); - hdr->ramdisk_image = 0; - hdr->ramdisk_size = 0; - efi_stub_entry(handle, sys_table_arg, &efi_boot_params); /* not reached */