Backport uadk engine from linaro. Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> (cherry picked from commit 766348e9bbea924a5e4535d88612f43c9f59c2ec)
63 lines
1.5 KiB
Diff
63 lines
1.5 KiB
Diff
From 351422390bf42e19a802d0e282f7f85342a1f792 Mon Sep 17 00:00:00 2001
|
|
From: Kai Ye <yekai13@huawei.com>
|
|
Date: Tue, 22 Feb 2022 11:18:46 +0800
|
|
Subject: [PATCH 23/23] engine: add the kae log feature
|
|
|
|
The original version of the kae engine supports the log system. So
|
|
need to be enabled the kae log feature at uadk_engine.
|
|
|
|
example:
|
|
insmod hisi_sec2.ko uacce_mode=2
|
|
|
|
export KAE_CONF_ENV=/var/log/
|
|
cd /var/log/
|
|
touch kae.cnf
|
|
write:
|
|
[LogSection]
|
|
debug_level=error
|
|
|
|
the debug_level can be set to none/error/iofo/warning/debug,
|
|
the result is stored in /var/log/kae.log
|
|
|
|
Signed-off-by: Kai Ye <yekai13@huawei.com>
|
|
---
|
|
src/e_uadk.c | 2 ++
|
|
src/v1/uadk_v1.h | 1 +
|
|
2 files changed, 3 insertions(+)
|
|
|
|
diff --git a/src/e_uadk.c b/src/e_uadk.c
|
|
index 2714d5b..79ecef8 100644
|
|
--- a/src/e_uadk.c
|
|
+++ b/src/e_uadk.c
|
|
@@ -205,6 +205,7 @@ static int uadk_destroy(ENGINE *e)
|
|
hpre_destroy();
|
|
if (uadk_dh_nosva)
|
|
hpre_dh_destroy();
|
|
+ kae_debug_close_log();
|
|
#endif
|
|
|
|
if (uadk_cipher)
|
|
@@ -348,6 +349,7 @@ static int bind_fn(ENGINE *e, const char *id)
|
|
}
|
|
|
|
#ifdef KAE
|
|
+ kae_debug_init_log();
|
|
bind_fn_kae_alg(e);
|
|
|
|
if (uadk_cipher_nosva || uadk_digest_nosva || uadk_rsa_nosva ||
|
|
diff --git a/src/v1/uadk_v1.h b/src/v1/uadk_v1.h
|
|
index d921706..9ca0a94 100644
|
|
--- a/src/v1/uadk_v1.h
|
|
+++ b/src/v1/uadk_v1.h
|
|
@@ -16,6 +16,7 @@
|
|
#define UADK_V1_H
|
|
#include "async/async_poll.h"
|
|
#include "utils/engine_fork.h"
|
|
+#include "utils/engine_log.h"
|
|
|
|
extern void sec_ciphers_free_ciphers(void);
|
|
extern int cipher_module_init(void);
|
|
--
|
|
2.24.4
|
|
|