[PATCH v8,net-next,12/12] crypto: octeontx2: register with linux crypto framework

2020-10-28 Thread Srujana Challa
CPT offload module utilises the linux crypto framework to offload crypto processing. This patch registers supported algorithms by calling registration functions provided by the kernel crypto API. The module currently supports: - AES block cipher in CBC,ECB,XTS and CFB mode. - 3DES block cipher in

[PATCH v8,net-next,06/12] crypto: octeontx2: enable SR-IOV and mailbox communication with VF

2020-10-28 Thread Srujana Challa
Adds 'sriov_configure' to enable/disable virtual functions (VFs). Also Initializes VF<=>PF mailbox IRQs, register handlers for processing these mailbox messages. Admin function (AF) handles resource allocation and configuration for PFs and their VFs. PFs request the AF directly, via mailboxes. Unl

Re: [PATCH v36 00/13] /dev/random - a new approach

2020-10-28 Thread Greg Kroah-Hartman
On Wed, Oct 28, 2020 at 06:51:17PM +0100, Torsten Duwe wrote: > On Mon, 19 Oct 2020 21:28:50 +0200 > Stephan Müller wrote: > [...] > > * Sole use of crypto for data processing: > [...] > > - The LRNG uses only properly defined and implemented cryptographic > >algorithms unlike the use of the

[PATCH v8,net-next,11/12] crypto: octeontx2: add support to process the crypto request

2020-10-28 Thread Srujana Challa
Attach LFs to CPT VF to process the crypto requests and register LF interrupts. Signed-off-by: Suheil Chandran Signed-off-by: Srujana Challa --- drivers/crypto/marvell/octeontx2/Makefile | 2 +- .../marvell/octeontx2/otx2_cpt_common.h | 3 + .../marvell/octeontx2/otx2_cpt_reqmgr.h

[PATCH v8,net-next,04/12] drivers: crypto: add Marvell OcteonTX2 CPT PF driver

2020-10-28 Thread Srujana Challa
Adds skeleton for the Marvell OcteonTX2 CPT physical function driver which includes probe, PCI specific initialization and hardware register defines. RVU defines are present in AF driver (drivers/net/ethernet/marvell/octeontx2/af), header files from AF driver are included here to avoid duplication.

Re: [PATCH] crypto: arm/aes-neonbs - fix usage of cbc(aes) fallback

2020-10-28 Thread Horia Geantă
On 10/28/2020 11:07 AM, Ard Biesheuvel wrote: > On Wed, 28 Oct 2020 at 10:03, Horia Geantă wrote: >> >> Loading the module deadlocks since: >> -local cbc(aes) implementation needs a fallback and >> -crypto API tries to find one but the request_module() resolves back to >> the same module >> >> Fix

Re: [PATCH 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-28 Thread Gilad Ben-Yossef
On Mon, Oct 26, 2020 at 8:44 PM Herbert Xu wrote: > > On Tue, Oct 27, 2020 at 05:41:55AM +1100, Herbert Xu wrote: > > > > The point is that people rebuilding their kernel can end up with a > > broken system. Just set a default on EBOIV if dm-crypt is on. > > That's not enough as it's an existing

[PATCH v8,net-next,09/12] crypto: octeontx2: add support to get engine capabilities

2020-10-28 Thread Srujana Challa
Adds support to get engine capabilities and adds a new mailbox to share capabilities with VF driver. Signed-off-by: Suheil Chandran Signed-off-by: Srujana Challa --- .../marvell/octeontx2/otx2_cpt_common.h | 36 .../marvell/octeontx2/otx2_cpt_reqmgr.h | 51 ++ drivers/cry

[PATCH] crypto: arm/aes-neonbs - fix usage of cbc(aes) fallback

2020-10-28 Thread Horia Geantă
Loading the module deadlocks since: -local cbc(aes) implementation needs a fallback and -crypto API tries to find one but the request_module() resolves back to the same module Fix this by changing the module alias for cbc(aes) and using the NEED_FALLBACK flag when requesting for a fallback algorit

Re: [RFC] clang tooling cleanups

2020-10-28 Thread Finn Thain
On Tue, 27 Oct 2020, t...@redhat.com wrote: > This rfc will describe > An upcoming treewide cleanup. > How clang tooling was used to programatically do the clean up. > Solicit opinions on how to generally use clang tooling. > This tooling is very impressive. It makes possible an idea that I ha

[PATCH v8,net-next,00/12] Add Support for Marvell OcteonTX2

2020-10-28 Thread Srujana Challa
This series introduces crypto(CPT) drivers(PF & VF) for Marvell OcteonTX2 CN96XX Soc. OcteonTX2 SOC's resource virtualization unit (RVU) supports multiple physical and virtual functions. Each of the PF/VF's functionality is determined by what kind of resources are attached to it. When the CPT bloc

Re: [PATCH v36 00/13] /dev/random - a new approach

2020-10-28 Thread Torsten Duwe
On Mon, 19 Oct 2020 21:28:50 +0200 Stephan Müller wrote: [...] > * Sole use of crypto for data processing: [...] > - The LRNG uses only properly defined and implemented cryptographic >algorithms unlike the use of the SHA-1 transformation in the > existing /dev/random implementation. > > - H

[PATCH resend] hwrng: imx-rngc - irq already prints an error

2020-10-28 Thread Nigel Christian
Clean up the check for irq. dev_err() is superfluous as platform_get_irq() already prints an error. Check for zero would indicate a bug. Remove curly braces to conform to styling requirements. Signed-off-by: Nigel Christian --- drivers/char/hw_random/imx-rngc.c | 4 +--- 1 file changed, 1 inserti

Re: [PATCH] crypto: arm/aes-neonbs - fix usage of cbc(aes) fallback

2020-10-28 Thread Ard Biesheuvel
On Wed, 28 Oct 2020 at 10:03, Horia Geantă wrote: > > Loading the module deadlocks since: > -local cbc(aes) implementation needs a fallback and > -crypto API tries to find one but the request_module() resolves back to > the same module > > Fix this by changing the module alias for cbc(aes) and > u

[PATCH v8,net-next,07/12] crypto: octeontx2: load microcode and create engine groups

2020-10-28 Thread Srujana Challa
CPT includes microcoded GigaCypher symmetric engines(SEs), IPsec symmetric engines(IEs), and asymmetric engines (AEs). Each engine receives CPT instructions from the engine groups it has subscribed to. This patch loads microcode, configures three engine groups(one for SEs, one for IEs and one for A

[PATCH v2 0/4] crypto: switch to crypto API for EBOIV generation

2020-10-28 Thread Gilad Ben-Yossef
This series creates an EBOIV template that produces a skcipher transform which passes through all operations to the skcipher, while using the same skcipher and key to encrypt the input IV, which is assumed to be a sector offset, although this is not enforced. This matches dm-crypt use of EBOIV to

[PATCH v2 2/4] crypto: add eboiv(cbc(aes)) test vectors

2020-10-28 Thread Gilad Ben-Yossef
Add test vectors for the use of the EBOIV template with cbc(aes) modes as it is being used by dm-crypt for BitLocker support. Vectors taken from dm-crypt test suite images. Signed-off-by: Gilad Ben-Yossef --- crypto/tcrypt.c | 9 ++ crypto/testmgr.c | 6 + crypto/testmgr.h | 279 ++

[PATCH v2 3/4] dm crypt: switch to EBOIV crypto API template

2020-10-28 Thread Gilad Ben-Yossef
Replace the explicit EBOIV handling in the dm-crypt driver with calls into the crypto API, which now possesses the capability to perform this processing within the crypto subsystem. Signed-off-by: Gilad Ben-Yossef --- drivers/md/dm-crypt.c | 61 ++- 1 fil

[PATCH v2 1/4] crypto: add eboiv as a crypto API template

2020-10-28 Thread Gilad Ben-Yossef
Encrypted byte-offset initialization vector (EBOIV) is an IV generation method that is used in some cases by dm-crypt for supporting the BitLocker volume encryption used by Windows 8 and onwards as a backwards compatible version in lieu of XTS support. Support for eboiv was added to dm-crypt in 5.6

[PATCH v2 4/4] crypto: ccree: re-introduce ccree eboiv support

2020-10-28 Thread Gilad Ben-Yossef
BitLocker eboiv support, which was removed in commit 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") is reintroduced based on the crypto API new support for eboiv. Signed-off-by: Gilad Ben-Yossef Fixes: 1d8b41ff6991 ("crypto: ccree - remove bitlocker cipher") --- drivers/crypto/ccree/cc

[PATCH v8,net-next,01/12] octeontx2-pf: move lmt flush to include/linux/soc

2020-10-28 Thread Srujana Challa
On OcteonTX2 platform CPT instruction enqueue and NIX packet send are only possible via LMTST operations which uses LDEOR instruction. This patch moves lmt flush function from OcteonTX2 nic driver to include/linux/soc since it will be used by OcteonTX2 CPT and NIC driver for LMTST. Signed-off-by:

[PATCH v8,net-next,05/12] crypto: octeontx2: add mailbox communication with AF

2020-10-28 Thread Srujana Challa
In the resource virtualization unit (RVU) each of the PF and AF (admin function) share a 64KB of reserved memory region for communication. This patch initializes PF <=> AF mailbox IRQs, registers handlers for processing these communication messages. Signed-off-by: Suheil Chandran Signed-off-by: S

[PATCH v8,net-next,08/12] crypto: octeontx2: add LF framework

2020-10-28 Thread Srujana Challa
CPT RVU Local Functions(LFs) needs to be attached to the PF/VF to submit the instructions to CPT. This patch adds the interface to initialize and attach the LFs. It also adds interface to register the LF's interrupts. Signed-off-by: Suheil Chandran Signed-off-by: Srujana Challa --- drivers/cryp

[PATCH v8,net-next,03/12] octeontx2-af: add debugfs entries for CPT block

2020-10-28 Thread Srujana Challa
Add entries to debugfs at /sys/kernel/debug/octeontx2/cpt. cpt_pc: dump cpt performance HW registers. Usage: cat /sys/kernel/debug/octeontx2/cpt/cpt_pc cpt_ae_sts: show cpt asymmetric engines current state Usage: cat /sys/kernel/debug/octeontx2/cpt/cpt_ae_sts cpt_se_sts: show cpt symmetric engin

[PATCH v8,net-next,10/12] crypto: octeontx2: add virtual function driver support

2020-10-28 Thread Srujana Challa
Add support for the Marvell OcteonTX2 CPT virtual function driver. This patch includes probe, PCI specific initialization and interrupt handling. Signed-off-by: Suheil Chandran Signed-off-by: Srujana Challa --- drivers/crypto/marvell/octeontx2/Makefile | 4 +- .../marvell/octeontx2/otx2_c

[PATCH v8,net-next,02/12] octeontx2-af: add mailbox interface for CPT

2020-10-28 Thread Srujana Challa
On OcteonTX2 SoC, the admin function (AF) is the only one with all priviliges to configure HW and alloc resources, PFs and it's VFs have to request AF via mailbox for all their needs. This patch adds a mailbox interface for CPT PFs and VFs to allocate resources for cryptography. Signed-off-by: Suh