ferreo
1666dcb0ea
Some checks failed
PikaOS Package Build Only (amd64-v3) / build (push) Failing after 36s
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
From f79e3297278167dbd696677f7c26b82b6622f519 Mon Sep 17 00:00:00 2001
|
|
From: Peter Jung <admin@ptr1337.dev>
|
|
Date: Tue, 3 Dec 2024 13:01:08 +0100
|
|
Subject: [PATCH 06/10] crypto: Add fix for 6.13 Module compilation
|
|
|
|
This maybe breaks confidental computing
|
|
|
|
Signed-off-by: Peter Jung <admin@ptr1337.dev>
|
|
Signed-off-by: Eric Naim <dnaim@cachyos.org>
|
|
---
|
|
kernel-open/nvidia/libspdm_ecc.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/kernel-open/nvidia/libspdm_ecc.c b/kernel-open/nvidia/libspdm_ecc.c
|
|
index 1f8f0100..b31901f6 100644
|
|
--- a/kernel-open/nvidia/libspdm_ecc.c
|
|
+++ b/kernel-open/nvidia/libspdm_ecc.c
|
|
@@ -31,6 +31,8 @@ MODULE_SOFTDEP("pre: ecdh_generic,ecdsa_generic");
|
|
#include <crypto/ecdh.h>
|
|
#include <crypto/internal/ecc.h>
|
|
|
|
+#include <linux/version.h>
|
|
+
|
|
struct ecc_ctx {
|
|
unsigned int curve_id;
|
|
u64 priv_key[ECC_MAX_DIGITS]; // In big endian
|
|
@@ -309,7 +311,11 @@ bool lkca_ecdsa_verify(void *ec_context, size_t hash_nid,
|
|
akcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG |
|
|
CRYPTO_TFM_REQ_MAY_SLEEP, crypto_req_done, &wait);
|
|
akcipher_request_set_crypt(req, &sg, NULL, ber_len, hash_size);
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
|
|
err = crypto_wait_req(crypto_akcipher_verify(req), &wait);
|
|
+#else
|
|
+ err = 0;
|
|
+#endif
|
|
|
|
if (err != 0){
|
|
pr_info("Verify FAILED %d\n", -err);
|
|
--
|
|
2.47.1
|
|
|