From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 157B4223710; Thu, 17 Apr 2025 18:12:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744913576; cv=none; b=flVBaMToIw7wu9EjZGVB5DTTW8U79ZJdgtj8CFpEBosgGVxVhzou6l5wFj7zDFtmeQvnI1lOyXckK+tYCHvii+8fQtsaBNHGOM8XH8bKtSPFUsx5/EAZJjIS5Es0sB1ImjOfzUbBEIiPQdxpjtS2Xd+HpxR13xv4o0m1qgEGQvU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744913576; c=relaxed/simple; bh=T+wi5MuiKygieo/Y4XYIP7kJKq8ZmOM2nk8NBY7Dg0U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jKks8KT7IegNmAjgsH3tYf+aXezsbNgRw2Lz1wJKMqim+GZGm6590XDPhf0oYEknM/v3UyEIIY7eH2O4GkVtmwvCaelA13PgDQlL4fYWa85zVuZp/n4W0qeVthZhsF2DUC0GBIWfD1rjnP47lSdlXwIy6syoOYR+jpK60ZdoKXw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CIZT/I+o; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CIZT/I+o" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7320BC4CEE4; Thu, 17 Apr 2025 18:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744913575; bh=T+wi5MuiKygieo/Y4XYIP7kJKq8ZmOM2nk8NBY7Dg0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CIZT/I+o5lNWBma6R9ly8MpFHbTD/9LyDOnbYcvC5UflRD7kkdd3lmU9j4zBqysjG 1Ao81L6NbeN6VB8/NmvWU7miK9iHL5jJH3xhf2VGunygfGVgpbrOth1ebOIBExLK7b uymQ5Ht6Wbbtvu1HaPeqNVwAs83R/lUBNOBakQ5w= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Dionna Glaze , Tom Lendacky , Alexey Kardashevskiy , Herbert Xu Subject: [PATCH 6.14 384/449] crypto: ccp - Fix uAPI definitions of PSP errors Date: Thu, 17 Apr 2025 19:51:12 +0200 Message-ID: <20250417175133.714440176@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250417175117.964400335@linuxfoundation.org> References: <20250417175117.964400335@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dionna Glaze commit b949f55644a6d1645c0a71f78afabf12aec7c33b upstream. Additions to the error enum after explicit 0x27 setting for SEV_RET_INVALID_KEY leads to incorrect value assignments. Use explicit values to match the manufacturer specifications more clearly. Fixes: 3a45dc2b419e ("crypto: ccp: Define the SEV-SNP commands") CC: stable@vger.kernel.org Signed-off-by: Dionna Glaze Reviewed-by: Tom Lendacky Signed-off-by: Alexey Kardashevskiy Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- include/uapi/linux/psp-sev.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) --- a/include/uapi/linux/psp-sev.h +++ b/include/uapi/linux/psp-sev.h @@ -73,13 +73,20 @@ typedef enum { SEV_RET_INVALID_PARAM, SEV_RET_RESOURCE_LIMIT, SEV_RET_SECURE_DATA_INVALID, - SEV_RET_INVALID_KEY = 0x27, - SEV_RET_INVALID_PAGE_SIZE, - SEV_RET_INVALID_PAGE_STATE, - SEV_RET_INVALID_MDATA_ENTRY, - SEV_RET_INVALID_PAGE_OWNER, - SEV_RET_INVALID_PAGE_AEAD_OFLOW, - SEV_RET_RMP_INIT_REQUIRED, + SEV_RET_INVALID_PAGE_SIZE = 0x0019, + SEV_RET_INVALID_PAGE_STATE = 0x001A, + SEV_RET_INVALID_MDATA_ENTRY = 0x001B, + SEV_RET_INVALID_PAGE_OWNER = 0x001C, + SEV_RET_AEAD_OFLOW = 0x001D, + SEV_RET_EXIT_RING_BUFFER = 0x001F, + SEV_RET_RMP_INIT_REQUIRED = 0x0020, + SEV_RET_BAD_SVN = 0x0021, + SEV_RET_BAD_VERSION = 0x0022, + SEV_RET_SHUTDOWN_REQUIRED = 0x0023, + SEV_RET_UPDATE_FAILED = 0x0024, + SEV_RET_RESTORE_REQUIRED = 0x0025, + SEV_RET_RMP_INITIALIZATION_FAILED = 0x0026, + SEV_RET_INVALID_KEY = 0x0027, SEV_RET_MAX, } sev_ret_code;