Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp176139rbb; Fri, 23 Feb 2024 16:50:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW+CZdNSfCrGf+fKPcUGv9qq3bvbQk/uCYd+7YpwL8DgqOkJf7eU16sK8D3jorBgAiUaTmrcWL8gr9mvf/UWmuQ6y3RCbwiH9A5jXb84A== X-Google-Smtp-Source: AGHT+IGKM3e8H+eROeDHEGr5KehVzGKQ6e2UFQEmNYgQyoYuubNRqpkKMIt6oXAqpbwFpiaHvtGi X-Received: by 2002:a17:907:9486:b0:a42:e819:e663 with SMTP id dm6-20020a170907948600b00a42e819e663mr224721ejc.27.1708735819318; Fri, 23 Feb 2024 16:50:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708735819; cv=pass; d=google.com; s=arc-20160816; b=QgxgtflQXdCGFqrN0lnOAt5m3CwC/VrbwFyLD1TWroa3Et2fU15F+sA/7ZyO2yVA04 Lv+zRwXdc6gSDaSzhYFqog/NI9v8Lfm6NIwNjg2MkGyE0jyccqaKbn3I+7XTt8W1XB3M xassJJu9nQL6lIsmf6D13BHuO7vboCE+GyrVJOAxLjv4lbWbonMU4w3gsAYZoibwUofh TSj5VOwo0x3j7uq0lM132tJ5MmEua6J4FU0flGvfQqL8LqVM/818yE3fGNMR8FI5RBQG /3sybqv0kiPiTspJvTSVcYnLvr8DvKheziCfNIfD9Wovly1G5sQ77hDYMlqIVmRTWIdS 4VWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=VETsWFRdZwbHcoBWASJcfyjb9nHNMxyu2vq6q+bD5UA=; fh=WuYK/xUf5kZHZns3mdkh3JIBlf+AQe0zxhC84pDS7Sg=; b=Pi7ih2r0irVi0Nh900p9ZprC7aTSt5120996gfAuNW8UqgqsAI9f0yCnk+Ex2aaHHv gdaGvcxP/DJuftxowz6y+dxBdTAT3IdJSRzEzZirptuFssd6Cgkh9sWRvd//xv6UD9gQ cNmuiiCI0RoCBnJKk3JNMrxY+l31z/lXkz/3+efCfTR5m6i4IEb2xchwZTBi1hFf2ck+ JndtwO5y6js6WQKqgwg7aY+HEeM8SPA+ywK3pp9P9dSQBnvORPNUBHyiJjVwjmaBAvzV /OiHVkoL0a2xQz799TFl+7w2CXviKvQVjcPwCq8HAgz4aXKkKtvjgmzVIgpCh49dONTa mu9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au dmarc=pass fromdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-kernel+bounces-79374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=QUARANTINE dis=NONE) header.from=apana.org.au Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e15-20020a170906374f00b00a41308ca5a4si90192ejc.202.2024.02.23.16.50.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 16:50:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au dmarc=pass fromdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-kernel+bounces-79374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=QUARANTINE dis=NONE) header.from=apana.org.au Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 183DB1F249E1 for ; Sat, 24 Feb 2024 00:50:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C965184E; Sat, 24 Feb 2024 00:50:10 +0000 (UTC) Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4C8FEDF; Sat, 24 Feb 2024 00:50:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=144.6.53.87 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708735809; cv=none; b=XYfjKN4ZomdmnpOjZ3TQcUOEALTPXq1QfuXbJ78XWP6ZIjv1RUV2ds0JYNgWntHcB+nkFqk4LQhwykAzWCm3JRS6kUqjL+kzoGbqWG6fYV6Oy4iEXS/D/rnNYzsx7jtKRn4Pzz2W64pw7nM0+T5dJtVhrHiKhZgUfDoc1gfJBT4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708735809; c=relaxed/simple; bh=iECHTxNDwkUlCGebZh3m3aXMznwI8B5GScF3a8/3nY0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BNM6YYP1LLYrnYlu/e78xkZ7IC59lS1jAvXXURggTrlv5fmy4hs4OUgDCY1EvpWGGqz/cKleLIKuLztsG1etNI87GjmnRurYIqjf2uLXA7NL/d23XQCiasXma7c1ArGhe2z6RzNw4aD+cTX1iNnMb6f2MsF0vZDcee6iGqhIjbg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au; spf=pass smtp.mailfrom=gondor.apana.org.au; arc=none smtp.client-ip=144.6.53.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1rdgEs-00HDvE-Iz; Sat, 24 Feb 2024 08:50:03 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Sat, 24 Feb 2024 08:50:17 +0800 Date: Sat, 24 Feb 2024 08:50:17 +0800 From: Herbert Xu To: Mario Limonciello Cc: Tom Lendacky , John Allen , "open list:AMD CRYPTOGRAPHIC COPROCESSOR (CCP) DRIVER - DB..." , open list , Tim Van Patten Subject: Re: [PATCH v2 1/2] crypto: ccp: Avoid discarding errors in psp_send_platform_access_msg() Message-ID: References: <20240213173429.43748-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240213173429.43748-1-mario.limonciello@amd.com> On Tue, Feb 13, 2024 at 11:34:28AM -0600, Mario Limonciello wrote: > Errors can potentially occur in the "processing" of PSP commands or > commands can be processed successfully but still return an error code in > the header. > > This second case was being discarded because PSP communication worked but > the command returned an error code in the payload header. > > Capture both cases and return them to the caller as -EIO for the caller > to investigate. The caller can detect the latter by looking at > `req->header->status`. > > Reported-and-tested-by: Tim Van Patten > Fixes: 7ccc4f4e2e50 ("crypto: ccp - Add support for an interface for platform features") > Signed-off-by: Mario Limonciello > --- > v1->v2: > * Update tag for Tim > * Reword commit message > --- > drivers/crypto/ccp/platform-access.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt