From patchwork Sat Nov 19 16:24:13 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: 23290 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp786751wrr; Sat, 19 Nov 2022 08:39:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf7oA4tHzRrUgjhvnGkN3samZ2+muzb7IsQI/wJfBKQhi3jdelp6WUCsLXvWUp17DT25q/xq X-Received: by 2002:a63:ea52:0:b0:46f:9c0c:8673 with SMTP id l18-20020a63ea52000000b0046f9c0c8673mr498457pgk.154.1668875988739; Sat, 19 Nov 2022 08:39:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668875988; cv=none; d=google.com; s=arc-20160816; b=BahtQBLxLUYgnvVUwVteG20bVzdSM8RDj4IQRUGJGRqsGeI1cjzATRzTUwDKkCoksU LaKSB2xNjTWDoG2LdWNMn2GRiWpkG9QWS7zVegnf5/Vc9yGCodsrLvuPQMoIOzDfZMAW t7VM4aScWFAJ2aB3nmtKsPfuqv5cR0KSrohAr1URw2EgsDPWuA21xBAPA0kNkMdUYUFl nwZH0KMK+S7oEaOvaOlJNemRQmVUxB0NLsQVZXVZhzWDK4dusc/WSmP6oMloEVrLWYK5 pO3FA1OtvroGet54sqDqcu4ffHJvmbPYWF5lZ2OEYhR5LEc/HkKxZoIrmKSoaXKAoMOc JgXA== 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=SiKrt5XTfHd3CiBi0yd6HUda024+pjU7El4bHX6oN8c=; b=brnjOCkKU9NU1tF9NzoLZWzcZLG8hoCdFACCHTDuq39sfLjMl9UXRDIgQYKWrWDHFx 6rQC6cwg6I1Zi+gUGKusZB9iRyJWhYxpMXjHGY3j4N/1L87ers2/WXEIZqJZ+Lsl5MyT IbMHZwz7v9A51WO86TiesdJesfcvFriDxvwwXotBtBnvjzOC5B4jREm3x5GGu2a8cZcR /HRmNjeV4v3Dp4BI6eKdqripJkk+JiqF8k+G0QfU3jhzYE0gEy7WwyTJZlEl/J3RzbZG 3WZ9hMIU4GtnFfTjYjdvVZyj7SOBPeduVgUqNb6/fcXVxXteGKIIBJtv+kWvRrAZOzy5 //VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=R4GBKWHv; 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 c14-20020a056a000ace00b0054116441045si6576127pfl.281.2022.11.19.08.39.33; Sat, 19 Nov 2022 08:39:48 -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=R4GBKWHv; 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 S234422AbiKSQZN (ORCPT + 99 others); Sat, 19 Nov 2022 11:25:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234071AbiKSQYV (ORCPT ); Sat, 19 Nov 2022 11:24:21 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A1E6554F1; Sat, 19 Nov 2022 08:24:16 -0800 (PST) Date: Sat, 19 Nov 2022 16:24:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668875054; 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=SiKrt5XTfHd3CiBi0yd6HUda024+pjU7El4bHX6oN8c=; b=R4GBKWHvmQsY6153Qfc9qDsfrWim266d/foLHr3/gWaeiFaj5U3K3hywtLTy5QvHO6v/lW ydoBbve9j3uiSTVp9oUn+vYTd2MDhbwZCBC+okEVUQ+fzTiNvgjHXDzZV5G+EW7NxWY1Rx GbnZMLWkucC74Rd2ohjfoowyuOnIzJDfBBJgdOTDNLgF7NhOgbPvUdSFD4l46PQggiebRB 6Ew5C0JAzc7RsShaHugWqhj9hrKrlHZ2iFEWqMDvMfWsuI2Q1h2ooo8RsvgwMVPPNYhecW vKRdQjipXKO613c99QJnN8JT7UZShs8wlvyR39cH/8bbPRgulKludQARqW8DQg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668875054; 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=SiKrt5XTfHd3CiBi0yd6HUda024+pjU7El4bHX6oN8c=; b=zgv4gxGtRw1Twlt8srhhOBM8mHao7QjJCG5nV0fkGucMhJcaTQD9QzNZpH/MhYT4jXbOmM KRP41l6PR/LaeoBQ== From: "tip-bot2 for Jithu Joseph" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/microcode] platform/x86/intel/ifs: Return a more appropriate error code Cc: Jithu Joseph , Borislav Petkov , Tony Luck , Sohil Mehta , Hans de Goede , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221117035935.4136738-3-jithu.joseph@intel.com> References: <20221117035935.4136738-3-jithu.joseph@intel.com> MIME-Version: 1.0 Message-ID: <166887505351.4906.14248563178913178675.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?1749943308570504833?= X-GMAIL-MSGID: =?utf-8?q?1749943308570504833?= The following commit has been merged into the x86/microcode branch of tip: Commit-ID: f4e209e956b5d66f0e6e34e89f19811c2c1e596e Gitweb: https://git.kernel.org/tip/f4e209e956b5d66f0e6e34e89f19811c2c1e596e Author: Jithu Joseph AuthorDate: Wed, 16 Nov 2022 19:59:21 -08:00 Committer: Borislav Petkov CommitterDate: Fri, 18 Nov 2022 21:30:36 +01:00 platform/x86/intel/ifs: Return a more appropriate error code scan_chunks_sanity_check() returns -ENOMEM if it encounters an error while copying IFS test image from memory to Secure Memory. Return -EIO in this scenario, as it is more appropriate. Signed-off-by: Jithu Joseph Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Sohil Mehta Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20221117035935.4136738-3-jithu.joseph@intel.com --- drivers/platform/x86/intel/ifs/load.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel/ifs/load.c b/drivers/platform/x86/intel/ifs/load.c index d056617..89ce265 100644 --- a/drivers/platform/x86/intel/ifs/load.c +++ b/drivers/platform/x86/intel/ifs/load.c @@ -157,8 +157,10 @@ static int scan_chunks_sanity_check(struct device *dev) INIT_WORK(&local_work.w, copy_hashes_authenticate_chunks); schedule_work_on(cpu, &local_work.w); wait_for_completion(&ifs_done); - if (ifsd->loading_error) + if (ifsd->loading_error) { + ret = -EIO; goto out; + } package_authenticated[curr_pkg] = 1; } ret = 0;