Re: net/tls(TLS_SW): double free in tls_tx_records

2019-08-28 Thread Eric Biggers
On Wed, Aug 28, 2019 at 11:41:25AM -0400, Pooja Trivedi wrote: > TLS module crash while running SSL record encryption using > klts_send_[file] using crypto accelerator (Nitrox). Does the Nitrox crypto driver pass the extra crypto self-tests, which were added in v5.1 and v5.2? I.e. boot a kernel c

[PATCH v2 2/5] padata: remove reorder_objects

2019-08-28 Thread Daniel Jordan
reorder_objects is unused since the rework of padata's flushing, so remove it. Signed-off-by: Daniel Jordan Cc: Herbert Xu Cc: Sebastian Andrzej Siewior Cc: Steffen Klassert Cc: Thomas Gleixner Cc: linux-crypto@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- include/linux/padata.h | 2 -

[PATCH v2 5/5] padata: validate cpumask without removed CPU during offline

2019-08-28 Thread Daniel Jordan
Configuring an instance's parallel mask without any online CPUs... echo 2 > /sys/kernel/pcrypt/pencrypt/parallel_cpumask echo 0 > /sys/devices/system/cpu/cpu1/online ...makes tcrypt mode=215 crash like this: divide error: [#1] SMP PTI CPU: 4 PID: 287 Comm: modprobe Not tainted 5.3.0

[PATCH v2 4/5] padata: always acquire cpu_hotplug_lock before pinst->lock

2019-08-28 Thread Daniel Jordan
lockdep complains when... # echo 0 > /sys/devices/system/cpu/cpu1/online # echo ff > /sys/kernel/pcrypt/pencrypt/parallel_cpumask == WARNING: possible circular locking dependency detected 5.3.0-rc5-padata-base+ #6 Not tainted ---

[PATCH v2 0/5] padata flushing and CPU hotplug fixes

2019-08-28 Thread Daniel Jordan
Hi, Here are some miscellaneous padata fixes, mostly to do with CPU hotplug. This time around there's a new hotplug state to make the CPU remove path cleaner, and the CC list grew a bit. Daniel v2: - patches 1-3 are new; 4-5 have changed since v1[*] - attempted to fix padata flushing as request

[PATCH v2 1/5] padata: make flushing work with async users

2019-08-28 Thread Daniel Jordan
padata_flush_queues() is broken for an async ->parallel() function because flush_work() can't wait on it: # modprobe tcrypt alg="pcrypt(cryptd(rfc4106(gcm_base(ctr(aes-generic),ghash-generic" type=3 # modprobe tcrypt mode=215 sec=1 & # sleep 5; echo 7 > /sys/kernel/pcrypt/pencrypt/paral

[PATCH v2 3/5] padata: get rid of padata_remove_cpu() for real

2019-08-28 Thread Daniel Jordan
A later patch is going to address a lock ordering issue involving pinst->mutex and the CPU hotplug lock. padata_remove_cpu() needs fixing but it has no callers, so just delete it rather than maintaining unused code. The Fixes commit forgot to do it anyway. While at it remove Documentation refere

[PATCH v1 0/2] hwrng: npcm: add NPCM RNG driver support

2019-08-28 Thread Tomer Maimon
This patch set adds Randon Number Generator (RNG) support for the Nuvoton NPCM Baseboard Management Controller (BMC). The RNG driver we use power consumption when the RNG is not required. The NPCM RNG driver tested on NPCM750 evaluation board. Tomer Maimon (2): dt-binding: hwrng: add NPCM RN

[PATCH v1 2/2] hwrng: npcm: add NPCM RNG driver

2019-08-28 Thread Tomer Maimon
Add Nuvoton NPCM BMC Random Number Generator(RNG) driver. Signed-off-by: Tomer Maimon --- drivers/char/hw_random/Kconfig| 13 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/npcm-rng.c | 207 ++ 3 files changed, 221 insertions(+) create mode

[PATCH v1 1/2] dt-binding: hwrng: add NPCM RNG documentation

2019-08-28 Thread Tomer Maimon
Added device tree binding documentation for Nuvoton BMC NPCM Random Number Generator (RNG). Signed-off-by: Tomer Maimon --- .../bindings/rng/nuvoton,npcm-rng.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 Documentation/devicetree/bindings/rng/nuvoton,n

net/tls(TLS_SW): double free in tls_tx_records

2019-08-28 Thread Pooja Trivedi
TLS module crash while running SSL record encryption using klts_send_[file] using crypto accelerator (Nitrox). Following are the preconditions and steps to reproduce the issue: Preconditions: 1) Installed 5.3-rc4 2) Nitrox5 card plugin (crypto accelerator) Steps to reproduce the issue: 1) Instal

Re: [PATCH v12 00/11] Appended signatures support for IMA appraisal

2019-08-28 Thread Mimi Zohar
Hi Jordan, On Mon, 2019-08-26 at 15:46 -0700, Jordan Hand wrote: > On 6/27/19 7:19 PM, Thiago Jung Bauermann wrote: > > On the OpenPOWER platform, secure boot and trusted boot are being > > implemented using IMA for taking measurements and verifying signatures. > > Since the kernel image on Power

[PATCH v2 -next] crypto: hisilicon: select CRYPTO_LIB_DES while compiling SEC driver

2019-08-28 Thread Mao Wenan
When CRYPTO_DEV_HISI_SEC=y, below compilation error is found after 'commit 894b68d8be4b ("crypto: hisilicon/des - switch to new verification routines")': drivers/crypto/hisilicon/sec/sec_algs.o: In function `sec_alg_skcipher_setkey_des_cbc': sec_algs.c:(.text+0x11f0): undefined reference to `de

Re: [PATCH 5/5] crypto: mediatek: fix incorrect crypto key setting

2019-08-28 Thread John Crispin
On 28/08/2019 08:37, Vic Wu wrote: Record crypto key to context during setkey and set the key to transform state buffer in encrypt/decrypt process. Signed-off-by: Vic Wu Thanks for the fix ! Tested-by: John Crispin --- drivers/crypto/mediatek/mtk-aes.c | 11 ++- 1 file change