TaNGSoFT

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

TaNGSoFT's Achievements

  1. For whatever reason, I cannot get any kernel message of detecting eip engine. According to marvell docs (https://raw.githubusercontent.com/MarvellEmbeddedProcessors/linux-marvell/linux-4.4.52-armada-17.10/Documentation/devicetree/bindings/crypto/inside_secure_eip.txt) , no firmware needed for eip97. root@espressobin:~# cat /proc/interrupts CPU0 CPU1 3: 22916 68315 GICv3 30 Level arch_timer 6: 0 0 GICv3 23 Level arm-pmu 7: 1636 0 GICv3 32 Level d0010600.spi 9: 9797 0 GICv3 43 Level serial 10: 259 0 GICv3 74 Level eth0 11: 1842 0 GICv3 35 Level xhci-hcd:usb2 12: 0 0 GICv3 49 Level ehci_hcd:usb1 14: 73244 0 GICv3 52 Level d0090000.eip97 15: 63031 0 GICv3 53 Level d0090000.eip97 16: 111785 0 GICv3 54 Level d0090000.eip97 17: 67682 0 GICv3 55 Level d0090000.eip97 19: 1284 0 GICv3 57 Level mmc0 20: 1714 0 GICv3 59 Level ahci-mvebu[d00e0000.sata] 21: 280650 0 GICv3 61 Level advk-pcie 39: 2 0 GICv3 79 Level d0060900.xor 40: 2 0 GICv3 80 Level d0060900.xor 42: 280651 0 d0070000.pcie-irq 0 Level mwlwifi IPI0: 324162 297117 Rescheduling interrupts IPI1: 100 1521 Function call interrupts IPI2: 0 0 CPU stop interrupts IPI3: 0 0 CPU stop (for crash dump) interrupts IPI4: 0 0 Timer broadcast interrupts IPI5: 2413 5066 IRQ work interrupts IPI6: 0 0 CPU wake-up interrupts Err: 0 root@espressobin:~# time -v openssl speed -elapsed -evp aes-256-cbc -engine cryp todev engine "cryptodev" set. You have chosen to measure elapsed time instead of user CPU time. Doing aes-256-cbc for 3s on 16 size blocks: 73679 aes-256-cbc's in 3.00s Doing aes-256-cbc for 3s on 64 size blocks: 70972 aes-256-cbc's in 3.00s Doing aes-256-cbc for 3s on 256 size blocks: 66822 aes-256-cbc's in 3.00s Doing aes-256-cbc for 3s on 1024 size blocks: 63928 aes-256-cbc's in 3.00s Doing aes-256-cbc for 3s on 8192 size blocks: 28820 aes-256-cbc's in 3.00s OpenSSL 1.0.2n 7 Dec 2017 built on: reproducible build, date unspecified options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) blowfish(ptr) compiler: aarch64-openwrt-linux-musl-gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/xbuild/espressobin/staging_dir/target-aarch64_cortex-a53_musl/usr/include -I/xbuild/espressobin/staging_dir/target-aarch64_cortex-a53_musl/include -I/xbuild/espressobin/staging_dir/toolchain-aarch64_cortex-a53_gcc-7.3.0_musl/usr/include -I/xbuild/espressobin/staging_dir/toolchain-aarch64_cortex-a53_gcc-7.3.0_musl/include/fortify -I/xbuild/espressobin/staging_dir/toolchain-aarch64_cortex-a53_gcc-7.3.0_musl/include -znow -zrelro -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DOPENSSL_NO_ERR -DTERMIOS -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/xbuild/espressobin/build_dir/target-aarch64_cortex-a53_musl/openssl-1.0.2n:openssl-1.0.2n -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -fpic -I/xbuild/espressobin/package/libs/openssl/include -ffunction-sections -fdata-sections -fomit-frame-pointer -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-256-cbc 392.95k 1514.07k 5702.14k 21820.76k 78697.81k Command being timed: "openssl speed -elapsed -evp aes-256-cbc -engine cryptodev" User time (seconds): 0.52 System time (seconds): 4.14 Percent of CPU this job got: 29% Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 15.65s Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 11824 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 152 Voluntary context switches: 304387 Involuntary context switches: 604 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 root@espressobin:~# openssl engine (cryptodev) BSD cryptodev engine (dynamic) Dynamic engine loading support root@espressobin:~# egrep '^module|^name' /proc/crypto name : ecdh module : ecdh_generic name : hmac(sha1) module : crypto_safexcel name : sha256 module : crypto_safexcel name : sha224 module : crypto_safexcel name : sha1 module : crypto_safexcel name : cbc(aes) module : crypto_safexcel name : ecb(aes) module : crypto_safexcel name : lzo module : kernel name : lzo module : kernel name : crc32 module : kernel name : crc32c module : kernel name : zlib-deflate module : kernel name : deflate module : kernel name : deflate module : kernel name : ecb(arc4) module : kernel name : arc4 module : kernel name : aes module : kernel name : des3_ede module : kernel name : des module : kernel name : sha384 module : kernel name : sha512 module : kernel name : sha224 module : kernel name : sha256 module : kernel name : sha1 module : kernel name : digest_null module : kernel name : compress_null module : kernel name : ecb(cipher_null) module : kernel name : cipher_null module : kernel You can find from above output: 1. interrupts increase 2. cryptodev engine set 3. aes is accelerated by crypto-safexcel module 4. crypto is offload and cpu time is about 29 Let me know what else we can do?
  2. openssl speed -elapsed -evp aes-256-cbc You have chosen to measure elapsed time instead of user CPU time. Doing aes-256-cbc for 3s on 16 size blocks: 16324336 aes-256-cbc's in 3.00s Doing aes-256-cbc for 3s on 64 size blocks: 9558658 aes-256-cbc's in 3.00s Doing aes-256-cbc for 3s on 256 size blocks: 3542371 aes-256-cbc's in 3.00s Doing aes-256-cbc for 3s on 1024 size blocks: 1034291 aes-256-cbc's in 3.00s Doing aes-256-cbc for 3s on 8192 size blocks: 135914 aes-256-cbc's in 3.00s OpenSSL 1.0.2n 7 Dec 2017 built on: reproducible build, date unspecified options:bn(64,64) rc4(ptr,char) des(idx,cisc,2,int) aes(partial) blowfish(ptr) compiler: aarch64-openwrt-linux-musl-gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/xbuild/espressobin/staging_dir/target-aarch64_cortex-a53_musl/usr/include -I/xbuild/espressobin/staging_dir/target-aarch64_cortex-a53_musl/include -I/xbuild/espressobin/staging_dir/toolchain-aarch64_cortex-a53_gcc-7.3.0_musl/usr/include -I/xbuild/espressobin/staging_dir/toolchain-aarch64_cortex-a53_gcc-7.3.0_musl/include/fortify -I/xbuild/espressobin/staging_dir/toolchain-aarch64_cortex-a53_gcc-7.3.0_musl/include -znow -zrelro -DOPENSSL_SMALL_FOOTPRINT -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DOPENSSL_NO_ERR -DTERMIOS -Os -pipe -mcpu=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/xbuild/espressobin/build_dir/target-aarch64_cortex-a53_musl/openssl-1.0.2n:openssl-1.0.2n -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fpic -I/xbuild/espressobin/package/libs/openssl/include -ffunction-sections -fdata-sections -fomit-frame-pointer -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-256-cbc 87063.13k 203918.04k 302282.33k 353037.99k 371135.83k trying to compile cryptographic API module :crypto-safexcel in openwrt, and get the above openssl benchmark, I don't know the number is good or not.
  3. https://github.com/MarvellEmbeddedProcessors/linux-marvell/blob/linux-4.4.52-armada-17.10/drivers/crypto/inside-secure/user-guide.txt the above url shows the reference document of using crypto-safexcel engine in 3720 and 7K/8K SOCs. Basic Usage ----------- Currently EIP197/97 are avaialble on several Marvell SoC: Armada8040 - 2 EIP197 engines. Armada7040 - 1 EIP197 engine. Armada3700 - 1 EIP97 engine.
  4. look at this: https://patchwork.kernel.org/patch/10133165/ This patch adds a crypto node describing the EIP97 engine found in Armada 37xx SoCs. The cryptographic engine is enabled by default. I checked the mainline linux kernel, the above code is already there in the DTS file. is there any plan to port crypto-safexcel engine?