Giter Club home page Giter Club logo

kae's People

Contributors

keyizhong avatar liuyangnb avatar martin-g avatar minqian avatar mystery-nobody avatar tuyawangfq avatar yikun avatar yuhongxiao123456 avatar zxh798106 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kae's Issues

how to build kae driver

which kernel should be used? Is it support ubuntu?

I am tried with 5.4 kernel, and 5.10-rc5. with ubuntu system

git clone https://github.com/kunpengcompute/KAEdriver
cd kae_driver/
$ make
make -C /lib/modules/uname -r/build M=/home/linaro/work/KAEdriver/kae_driver modules
CONFIG_CC_STACKPROTECTOR_STRONG=y
CONFIG_UACCE=m
CONFIG_CRYPTO_QM_UACCE=m
CONFIG_CRYPTO_DEV_HISI_SGL=m
CONFIG_CRYPTO_DEV_HISI_QM=m
CONFIG_CRYPTO_DEV_HISI_ZIP=m
CONFIG_CRYPTO_DEV_HISI_HPRE=m
CONFIG_CRYPTO_DEV_HISI_SEC2=m
CONFIG_CRYPTO_DEV_HISI_RDE=m
make[1]: Entering directory '/lib/modules/5.10.0-rc5-dirty/build'
make[1]: *** No rule to make target 'modules'. Stop.
make[1]: Leaving directory '/lib/modules/5.10.0-rc5-dirty/build'
Makefile:16: recipe for target 'defaul' failed
make: *** [defaul] Error 2

5.4 kernel (defconfig)+ ubuntu
make[1]: Entering directory '/lib/modules/5.4.0-dirty/build'
make[1]: *** No rule to make target 'modules'. Stop.
make[1]: Leaving directory '/lib/modules/5.4.0-dirty/build'
Makefile:16: recipe for target 'defaul' failed
make: *** [defaul] Error 2

Running the openssl speed command does not respond.

OS : openEuler 22.03
CPU: Kunpeng920 5250
openssl 1.1.1m
Reproduction Procedure:
1、export OPENSSL_CONF="/home/openssl.cnf"
2、 for i in {1..1000};do taskset -c 0-1 openssl speed -engine kae -evp sm4-cbc -seconds 1 -multi 128;done
Remarks conf:
openssl_conf=openssl_def
[openssl_def]
engines=engine_section
[engine_section]
kae=kae_section
[kae_section]
dynamic_path=/usr/lib64/engines-1.1/kae.so
engine_id=kae

info:
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.34-70.oe2203.aarch64
(gdb) bt
#0 0x0000ffffad92ca3c in ?? () from /usr/lib64/libc.so.6
#1 0x0000ffffad932fac in pthread_mutex_lock () from /usr/lib64/libc.so.6
#2 0x0000ffffad8533ac in kae_queue_pool_destroy () from /usr/lib64/engines-1.1/kae.so
#3 0x0000ffffad841afc in wd_ciphers_init_qnode_pool () from /usr/lib64/engines-1.1/kae.so
#4 0x0000ffffad83aa9c in cipher_module_init () from /usr/lib64/engines-1.1/kae.so
#5 0x0000ffffad8552b4 in engine_init_child_at_fork_handler () from /usr/lib64/engines-1.1/kae.so
#6 0x0000ffffad967d24 in ?? () from /usr/lib64/libc.so.6
#7 0x0000ffffad9675f0 in fork () from /usr/lib64/libc.so.6
#8 0x000000000044e458 in do_multi (size_num=6, multi=128) at apps/speed.c:3550
#9 speed_main (argc=0, argv=) at apps/speed.c:1849
#10 0x000000000042f4b4 in do_cmd (prog=prog@entry=0x38bd3050, argc=argc@entry=9, argv=argv@entry=0xffffe8e4e5e0) at apps/openssl.c:570
#11 0x000000000041c938 in main (argc=9, argv=0xffffe8e4e5e0) at apps/openssl.c:189

Support for Debian based distros ?!

Hi,

Is KAE supported for Debian based distros ? Because the README seems to be about RedHat based ones.

I've tried to install it on Ubuntu 18.04.4 LTS aarch64 with the following changes:

iff --git README.md README.md
index d238959..20bc70e 100644
--- README.md
+++ README.md
@@ -48,6 +48,7 @@ It is licensed under the [APACHE LICENSE, VERSION 2.0](https://www.apache.org/l
   * SuSE 15.1 4.12.14-195-default arch64 version
   * NeoKylin 7.6 4.14.0-115.5.1.el7a.06.aarch64 version
   * EulerOS 2.8 4.19.36-vhulk1907.1.0.h410.eulerosv2r8.aarch64 version
+  * Ubuntu 18.04.4 LTS aarch64 version
 * OpenSSL 1.1.1a  or later OpenSSL
 
 ## Installation Instructions
@@ -58,7 +59,7 @@ Clone OpenSSL from Github at the following location:
 
     git clone https://github.com/openssl/openssl.git
 
-You are advised to check out and build the OpenSSL 1.1.1a git tag specified in the release notes.
+You are advised to check out and build the OpenSSL 1.1.1d git tag specified in the release notes.
 Versions of OpenSSL before OpenSSL 1.1.0 are not supported.
 
 Note: You are not advised to install the accelerated version of OpenSSL as your default system library. Otherwise, acceleration may be used unexpectedly by other applications on the system, resulting in undesired/unsupported behavior. The `--prefix` can be used with the `./config` command to specify the location that `make install` will copy files to. Please see the OpenSSL INSTALL file for full details on usage of the `--prefix` option.
@@ -81,19 +82,19 @@ Download the release version of Kunpeng Accelerator Engine Driver from:
 <https://github.com/kunpengcompute/KAEdriver>
 
 Firstly, build and install the accelerator driver:
-Note: To build the Kunpeng Accelerator Engine Driver, install the `kernel-devel` package first.
+Note: To build the Kunpeng Accelerator Engine Driver, install the `kernel-devel` / `linux-headers-generic` package first.
 
 ``
 tar -zxf Kunpeng_KAE_driver.tar.gz
 cd kae_driver
 make
-make install
-modprobe uacce
-modprobe hisi_qm
-modprobe hisi_sec2
-modprobe hisi_hpre
-modprobe hisi_zip
-modprobe hisi_rde
+sudo make install
+sudo modprobe uacce
+sudo modprobe hisi_qm
+sudo modprobe hisi_sec2
+sudo modprobe hisi_hpre
+sudo modprobe hisi_zip
+sudo modprobe hisi_rde
 ``
 Secondly, install the accelerator library:
 
@@ -102,7 +103,7 @@ cd warpdrive
 sh autogen.sh 
 ./configure 
 make 
-make install
+sudo make install
 
 Then, install the  Kunpeng Accelerator Engine:

But those:

sudo modprobe hisi_sec2
sudo modprobe hisi_zip 
sudo modprobe hisi_rde 

fail with No such device.

I was not able to finish the setup because I've installed OpenSSL in a custom path, so that it does not override the one installed from Ubuntu packages, but now I face some linking errors. I'll report here if I face any issues with KAE!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.