From nobody Fri Apr 17 10:01:38 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66E9AC4332F for ; Sat, 19 Nov 2022 16:25:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234439AbiKSQZO (ORCPT ); Sat, 19 Nov 2022 11:25:14 -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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/microcode branch of tip: Commit-ID: f4e209e956b5d66f0e6e34e89f19811c2c1e596e Gitweb: https://git.kernel.org/tip/f4e209e956b5d66f0e6e34e89f19811c2= c1e596e 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/i= ntel/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 =3D -EIO; goto out; + } package_authenticated[curr_pkg] =3D 1; } ret =3D 0;