[PATCH v11 2/5] random: conditionally compile code depending on LRNG

2017-05-14 Thread Stephan Müller
When selecting the LRNG for compilation, disable the legacy /dev/random implementation. The LRNG is a drop-in replacement for the legacy /dev/random which implements the same in-kernel and user space API. Only the hooks of /dev/random into other parts of the kernel need to be disabled.

[PATCH v11 3/5] Linux Random Number Generator

2017-05-14 Thread Stephan Müller
The LRNG with the following properties: * noise source: interrupts timing with fast boot time seeding * lockless LFSR to collect raw entropy * use of kernel crypto API DRBG * in case kernel crypto API is not compiled, use standalone ChaCha20 based RNG * used cipher types for hashes and DRBG

[PATCH v11 5/5] LRNG - add ChaCha20 support

2017-05-14 Thread Stephan Müller
In case the kernel crypto API is not compiled, use ChaCha20 stream cipher as DRNG. The LRNG ChaCha20 support provides the DRNG implementation with the generate and update functions. Th DRNG implements enhanced backward secrecy by re-creating the entire internal state after generating random

[PATCH v11 4/5] LRNG - enable compile

2017-05-14 Thread Stephan Müller
Add LRNG compilation support. Signed-off-by: Stephan Mueller --- drivers/char/Kconfig | 10 ++ drivers/char/Makefile | 10 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 31adbeb..ee26190

[PATCH v11 0/5] /dev/random - a new approach

2017-05-14 Thread Stephan Müller
Hi, The following patch set provides a different approach to /dev/random which I call Linux Random Number Generator (LRNG) to collect entropy within the Linux kernel. The main improvements compared to the legacy /dev/random is to provide sufficient entropy during boot time as well as in virtual

[PATCH v11 1/5] crypto: DRBG - externalize DRBG functions for LRNG

2017-05-14 Thread Stephan Müller
This patch allows several DRBG functions to be called by the LRNG kernel code paths outside the drbg.c file. Signed-off-by: Stephan Mueller --- crypto/drbg.c | 11 +-- include/crypto/drbg.h | 7 +++ 2 files changed, 12 insertions(+), 6 deletions(-)

[PATCH v8 1/4] lib/raid6: Add log-of-2 table for RAID6 HW requiring disk position

2017-05-14 Thread Anup Patel
The raid6_gfexp table represents {2}^n values for 0 <= n < 256. The Linux async_tx framework pass values from raid6_gfexp as coefficients for each source to prep_dma_pq() callback of DMA channel with PQ capability. This creates problem for RAID6 offload engines (such as Broadcom SBA) which take

[PATCH v8 3/4] dmaengine: Add Broadcom SBA RAID driver

2017-05-14 Thread Anup Patel
The Broadcom stream buffer accelerator (SBA) provides offloading capabilities for RAID operations. This SBA offload engine is accessible via Broadcom SoC specific ring manager. This patch adds Broadcom SBA RAID driver which provides one DMA device with RAID capabilities using one or more Broadcom

[PATCH v8 2/4] async_tx: Fix DMA_PREP_FENCE usage in do_async_gen_syndrome()

2017-05-14 Thread Anup Patel
The DMA_PREP_FENCE is to be used when preparing Tx descriptor if output of Tx descriptor is to be used by next/dependent Tx descriptor. The DMA_PREP_FENSE will not be set correctly in do_async_gen_syndrome() when calling dma->device_prep_dma_pq() under following conditions: 1. ASYNC_TX_FENCE not

[PATCH v8 4/4] dt-bindings: Add DT bindings document for Broadcom SBA RAID driver

2017-05-14 Thread Anup Patel
This patch adds the DT bindings document for newly added Broadcom SBA RAID driver. Acked-by: Rob Herring Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Anup Patel ---

[PATCH v8 0/4] Broadcom SBA RAID support

2017-05-14 Thread Anup Patel
The Broadcom SBA RAID is a stream-based device which provides RAID5/6 offload. It requires a SoC specific ring manager (such as Broadcom FlexRM ring manager) to provide ring-based programming interface. Due to this, the Broadcom SBA RAID driver (mailbox client) implements DMA device having one