Commit 642356cb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull crypto updates from Herbert Xu:
 "API:
   - Add library interfaces of certain crypto algorithms for WireGuard
   - Remove the obsolete ablkcipher and blkcipher interfaces
   - Move add_early_randomness() out of rng_mutex

  Algorithms:
   - Add blake2b shash algorithm
   - Add blake2s shash algorithm
   - Add curve25519 kpp algorithm
   - Implement 4 way interleave in arm64/gcm-ce
   - Implement ciphertext stealing in powerpc/spe-xts
   - Add Eric Biggers's scalar accelerated ChaCha code for ARM
   - Add accelerated 32r2 code from Zinc for MIPS
   - Add OpenSSL/CRYPTOGRAMS poly1305 implementation for ARM and MIPS

  Drivers:
   - Fix entropy reading failures in ks-sa
   - Add support for sam9x60 in atmel
   - Add crypto accelerator for amlogic GXL
   - Add sun8i-ce Crypto Engine
   - Add sun8i-ss cryptographic offloader
   - Add a host of algorithms to inside-secure
   - Add NPCM RNG driver
   - add HiSilicon HPRE accelerator
   - Add HiSilicon TRNG driver"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (285 commits)
  crypto: vmx - Avoid weird build failures
  crypto: lib/chacha20poly1305 - use chacha20_crypt()
  crypto: x86/chacha - only unregister algorithms if registered
  crypto: chacha_generic - remove unnecessary setkey() functions
  crypto: amlogic - enable working on big endian kernel
  crypto: sun8i-ce - enable working on big endian
  crypto: mips/chacha - select CRYPTO_SKCIPHER, not CRYPTO_BLKCIPHER
  hwrng: ks-sa - Enable COMPILE_TEST
  crypto: essiv - remove redundant null pointer check before kfree
  crypto: atmel-aes - Change data type for "lastc" buffer
  crypto: atmel-tdes - Set the IV after {en,de}crypt
  crypto: sun4i-ss - fix big endian issues
  crypto: sun4i-ss - hide the Invalid keylen message
  crypto: sun4i-ss - use crypto_ahash_digestsize
  crypto: sun4i-ss - remove dependency on not 64BIT
  crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c
  MAINTAINERS: Add maintainer for HiSilicon SEC V2 driver
  crypto: hisilicon - add DebugFS for HiSilicon SEC
  Documentation: add DebugFS doc for HiSilicon SEC
  crypto: hisilicon - add SRIOV for HiSilicon SEC
  ...
parents f8387675 4ee812f6
Loading
Loading
Loading
Loading
+57 −0
Original line number Diff line number Diff line
What:           /sys/kernel/debug/hisi_hpre/<bdf>/cluster[0-3]/regs
Date:           Sep 2019
Contact:        linux-crypto@vger.kernel.org
Description:    Dump debug registers from the HPRE cluster.
		Only available for PF.

What:           /sys/kernel/debug/hisi_hpre/<bdf>/cluster[0-3]/cluster_ctrl
Date:           Sep 2019
Contact:        linux-crypto@vger.kernel.org
Description:    Write the HPRE core selection in the cluster into this file,
		and then we can read the debug information of the core.
		Only available for PF.

What:           /sys/kernel/debug/hisi_hpre/<bdf>/rdclr_en
Date:           Sep 2019
Contact:        linux-crypto@vger.kernel.org
Description:    HPRE cores debug registers read clear control. 1 means enable
		register read clear, otherwise 0. Writing to this file has no
		functional effect, only enable or disable counters clear after
		reading of these registers.
		Only available for PF.

What:           /sys/kernel/debug/hisi_hpre/<bdf>/current_qm
Date:           Sep 2019
Contact:        linux-crypto@vger.kernel.org
Description:    One HPRE controller has one PF and multiple VFs, each function
		has a QM. Select the QM which below qm refers to.
		Only available for PF.

What:           /sys/kernel/debug/hisi_hpre/<bdf>/regs
Date:           Sep 2019
Contact:        linux-crypto@vger.kernel.org
Description:    Dump debug registers from the HPRE.
		Only available for PF.

What:           /sys/kernel/debug/hisi_hpre/<bdf>/qm/qm_regs
Date:           Sep 2019
Contact:        linux-crypto@vger.kernel.org
Description:    Dump debug registers from the QM.
		Available for PF and VF in host. VF in guest currently only
		has one debug register.

What:           /sys/kernel/debug/hisi_hpre/<bdf>/qm/current_q
Date:           Sep 2019
Contact:        linux-crypto@vger.kernel.org
Description:    One QM may contain multiple queues. Select specific queue to
		show its debug registers in above qm_regs.
		Only available for PF.

What:           /sys/kernel/debug/hisi_hpre/<bdf>/qm/clear_enable
Date:           Sep 2019
Contact:        linux-crypto@vger.kernel.org
Description:    QM debug registers(qm_regs) read clear control. 1 means enable
		register read clear, otherwise 0.
		Writing to this file has no functional effect, only enable or
		disable counters clear after reading of these registers.
		Only available for PF.
+43 −0
Original line number Diff line number Diff line
What:           /sys/kernel/debug/hisi_sec/<bdf>/sec_dfx
Date:           Oct 2019
Contact:        linux-crypto@vger.kernel.org
Description:    Dump the debug registers of SEC cores.
		Only available for PF.

What:           /sys/kernel/debug/hisi_sec/<bdf>/clear_enable
Date:           Oct 2019
Contact:        linux-crypto@vger.kernel.org
Description:    Enabling/disabling of clear action after reading
		the SEC debug registers.
		0: disable, 1: enable.
		Only available for PF, and take no other effect on SEC.

What:           /sys/kernel/debug/hisi_sec/<bdf>/current_qm
Date:           Oct 2019
Contact:        linux-crypto@vger.kernel.org
Description:    One SEC controller has one PF and multiple VFs, each function
		has a QM. This file can be used to select the QM which below
		qm refers to.
		Only available for PF.

What:           /sys/kernel/debug/hisi_sec/<bdf>/qm/qm_regs
Date:           Oct 2019
Contact:        linux-crypto@vger.kernel.org
Description:    Dump of QM related debug registers.
		Available for PF and VF in host. VF in guest currently only
		has one debug register.

What:           /sys/kernel/debug/hisi_sec/<bdf>/qm/current_q
Date:           Oct 2019
Contact:        linux-crypto@vger.kernel.org
Description:    One QM of SEC may contain multiple queues. Select specific
		queue to show its debug registers in above 'qm_regs'.
		Only available for PF.

What:           /sys/kernel/debug/hisi_sec/<bdf>/qm/clear_enable
Date:           Oct 2019
Contact:        linux-crypto@vger.kernel.org
Description:    Enabling/disabling of clear action after reading
		the SEC's QM debug registers.
		0: disable, 1: enable.
		Only available for PF, and take no other effect on SEC.
+1 −28
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ Block Cipher Algorithm Definitions
   :doc: Block Cipher Algorithm Definitions

.. kernel-doc:: include/linux/crypto.h
   :functions: crypto_alg ablkcipher_alg blkcipher_alg cipher_alg compress_alg
   :functions: crypto_alg cipher_alg compress_alg

Symmetric Key Cipher API
------------------------
@@ -33,30 +33,3 @@ Single Block Cipher API

.. kernel-doc:: include/linux/crypto.h
   :functions: crypto_alloc_cipher crypto_free_cipher crypto_has_cipher crypto_cipher_blocksize crypto_cipher_setkey crypto_cipher_encrypt_one crypto_cipher_decrypt_one

Asynchronous Block Cipher API - Deprecated
------------------------------------------

.. kernel-doc:: include/linux/crypto.h
   :doc: Asynchronous Block Cipher API

.. kernel-doc:: include/linux/crypto.h
   :functions: crypto_free_ablkcipher crypto_has_ablkcipher crypto_ablkcipher_ivsize crypto_ablkcipher_blocksize crypto_ablkcipher_setkey crypto_ablkcipher_reqtfm crypto_ablkcipher_encrypt crypto_ablkcipher_decrypt

Asynchronous Cipher Request Handle - Deprecated
-----------------------------------------------

.. kernel-doc:: include/linux/crypto.h
   :doc: Asynchronous Cipher Request Handle

.. kernel-doc:: include/linux/crypto.h
   :functions: crypto_ablkcipher_reqsize ablkcipher_request_set_tfm ablkcipher_request_alloc ablkcipher_request_free ablkcipher_request_set_callback ablkcipher_request_set_crypt

Synchronous Block Cipher API - Deprecated
-----------------------------------------

.. kernel-doc:: include/linux/crypto.h
   :doc: Synchronous Block Cipher API

.. kernel-doc:: include/linux/crypto.h
   :functions: crypto_alloc_blkcipher crypto_free_blkcipher crypto_has_blkcipher crypto_blkcipher_name crypto_blkcipher_ivsize crypto_blkcipher_blocksize crypto_blkcipher_setkey crypto_blkcipher_encrypt crypto_blkcipher_encrypt_iv crypto_blkcipher_decrypt crypto_blkcipher_decrypt_iv crypto_blkcipher_set_iv crypto_blkcipher_get_iv
+0 −4
Original line number Diff line number Diff line
@@ -201,10 +201,6 @@ the aforementioned cipher types:
-  CRYPTO_ALG_TYPE_AEAD Authenticated Encryption with Associated Data
   (MAC)

-  CRYPTO_ALG_TYPE_BLKCIPHER Synchronous multi-block cipher

-  CRYPTO_ALG_TYPE_ABLKCIPHER Asynchronous multi-block cipher

-  CRYPTO_ALG_TYPE_KPP Key-agreement Protocol Primitive (KPP) such as
   an ECDH or DH implementation

+0 −4
Original line number Diff line number Diff line
@@ -63,8 +63,6 @@ request by using:
When your driver receives a crypto_request, you must to transfer it to
the crypto engine via one of:

* crypto_transfer_ablkcipher_request_to_engine()

* crypto_transfer_aead_request_to_engine()

* crypto_transfer_akcipher_request_to_engine()
@@ -75,8 +73,6 @@ the crypto engine via one of:

At the end of the request process, a call to one of the following functions is needed:

* crypto_finalize_ablkcipher_request()

* crypto_finalize_aead_request()

* crypto_finalize_akcipher_request()
Loading