Re: [PATCH] hwrng: ba431 - Add dependency on HAS_IOMEM

2020-06-29 Thread Olivier Sobrie
On Tue, Jun 30, 2020 at 02:20:37PM +1000, Herbert Xu wrote: > On Mon, Jun 29, 2020 at 08:46:38PM +0800, kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > > master > > head: c28e58ee9dadc99f79cf16ca805221feddd432ad > > commit: 0289e9be5dc26

Re: [PATCHv4 3/7] crypto: sa2ul: add sha1/sha256/sha512 support

2020-06-29 Thread Herbert Xu
On Fri, Jun 26, 2020 at 12:15:42PM +0300, Tero Kristo wrote: > > I have been experimenting with an alternate approach, where I have a small > buffer within the context, this would be more like the way other drivers do > this. If the buffer is closed before running out of space, I can push this > to

[PATCH] hwrng: ba431 - Add dependency on HAS_IOMEM

2020-06-29 Thread Herbert Xu
On Mon, Jun 29, 2020 at 08:46:38PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > master > head: c28e58ee9dadc99f79cf16ca805221feddd432ad > commit: 0289e9be5dc26d84dda6fc5492f08ca1ff599744 [1846/4145] hwrng: ba431 - > add support

Re: [PATCH 1/1] crypto: ux500: hash: Add namespacing to hash_init()

2020-06-29 Thread Herbert Xu
On Mon, Jun 29, 2020 at 01:30:03PM +0100, Lee Jones wrote: > A recent change to the Regulator consumer API (which this driver > utilises) add prototypes for the some suspend functions. These > functions require including header file include/linux/suspend.h. > > The following tree of includes affe

Re: [GIT PULL] Crypto Fixes for 5.8

2020-06-29 Thread pr-tracker-bot
The pull request you sent on Mon, 29 Jun 2020 12:16:27 +1000: > git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/2cfa46dadd203eef88cc70131df7a81ebc34b8ff Thank you! -- Deet-doot-dot, I am a bot

[PATCH 5/5] crypto: arm/ghash - use variably sized key struct

2020-06-29 Thread Ard Biesheuvel
Of the two versions of GHASH that the ARM driver implements, only one performs aggregation, and so the other one has no use for the powers of H to be precomputed, or space to be allocated for them in the key struct. So make the context size dependent on which version is being selected, and while at

[PATCH 3/5] crypto: arm64/gcm - use variably sized key struct

2020-06-29 Thread Ard Biesheuvel
Now that the ghash and gcm drivers are split, we no longer need to allocate a key struct for the former that carries powers of H that are only used by the latter. Also, take this opportunity to clean up the code a little bit. Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/ghash-ce-glue.c |

[PATCH 4/5] crypto: arm64/gcm - use inline helper to suppress indirect calls

2020-06-29 Thread Ard Biesheuvel
Introduce an inline wrapper for ghash_do_update() that incorporates the indirect call to the asm routine that is passed as an argument, and keep the non-SIMD fallback code out of line. This ensures that all references to the function pointer are inlined where the address is taken, removing the need

[PATCH 2/5] crypto: arm64/gcm - disentangle ghash and gcm setkey() routines

2020-06-29 Thread Ard Biesheuvel
The remaining ghash implementation does not support aggregation, and so there is no point in including the precomputed powers of H in the key struct. So move that into the GCM setkey routine, and get rid of the shared sub-routine entirely. Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/ghas

[PATCH 1/5] crypto: arm64/ghash - drop PMULL based shash

2020-06-29 Thread Ard Biesheuvel
There are two ways to implement SIMD accelerated GCM on arm64: - using the PMULL instructions for carryless 64x64->128 multiplication, in which case the architecture guarantees that the AES instructions are available as well, and so we can use the AEAD implementation that combines both, - usi

[PATCH 0/5] crypto: clean up ARM/arm64 glue code for GHASH and GCM

2020-06-29 Thread Ard Biesheuvel
Get rid of pointless indirect calls where the target of the call is decided at boot and never changes. Also, make the size of the key struct variable, and only carry the extra keys needed for aggregation when using a version of the algorithm that makes use of them. Ard Biesheuvel (5): crypto: ar

[PATCH 0/9] crypto: hisilicon/qm - misc fixes

2020-06-29 Thread Yang Shen
This patchset fix some qm bugs: patch 1: store the string address before pass to 'strsep' patch 2: clear 'qp_status->used' when init the qp patch 3: use 'dev_info_ratelimited' to avoid printk flooding. patch 4: fix the judgement of queue is full patch 7: save the vf configuration space to make sure

[PATCH 1/9] crypto: hisilicon/qm - fix wrong release after using strsep

2020-06-29 Thread Yang Shen
From: Sihang Chen Save the string address before pass to strsep, release it at end. Because strsep will update the string address to point after the token. Fixes: c31dc9fe165d("crypto: hisilicon/qm - add DebugFS for xQC and...") Signed-off-by: Sihang Chen Signed-off-by: Shukun Tan --- drivers

[PATCH 7/9] crypto: hisilicon/qm - fix VF not available after PF FLR

2020-06-29 Thread Yang Shen
From: Shukun Tan When PF FLR, the hardware will actively trigger the VF FLR. Configuration space of VF needs to be saved and restored to ensure that it is available after the PF FLR. Fixes: 7ce396fa12a9("crypto: hisilicon - add FLR support") Signed-off-by: Shukun Tan --- drivers/crypto/hisilic

[PATCH 8/9] crypto: hisilicon/qm - fix the process of register algorithms to crypto

2020-06-29 Thread Yang Shen
When the devices are removed or not existing, the corresponding algorithms which are registered by 'hisi-zip' driver can't be used. Move 'hisi_zip_register_to_crypto' from 'hisi_zip_init' to 'hisi_zip_probe'. The algorithms will be registered to crypto only when there is device bind on the driver.

[PATCH 5/9] crypto: hisilicon/qm - fix event queue depth to 2048

2020-06-29 Thread Yang Shen
From: Shukun Tan Increasing depth of 'event queue' from 1024 to 2048, which equals to twice depth of 'completion queue'. It will fix the easily happened 'event queue overflow' as using 1024 queue depth for 'event queue'. Fixes: 263c9959c937("crypto: hisilicon - add queue management driver...") S

[PATCH 1/1] crypto: ux500: hash: Add namespacing to hash_init()

2020-06-29 Thread Lee Jones
A recent change to the Regulator consumer API (which this driver utilises) add prototypes for the some suspend functions. These functions require including header file include/linux/suspend.h. The following tree of includes affecting this driver will be present: In file included from include/

Re: [LKP] Re: [PATCH] crypto: af_alg - Fix regression on empty requests

2020-06-29 Thread Naresh Kamboju
On Sat, 27 Jun 2020 at 14:02, Herbert Xu wrote: > > On Fri, Jun 26, 2020 at 04:29:48PM +1000, Herbert Xu wrote: > > > > Reported-by: Sachin Sant > > Reported-by: Naresh Kamboju > > Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when...") > > Signed-off-by: Herbert Xu > > Reported-by: k

[PATCH v3 0/4] crypto: qat - fixes to aes xts

2020-06-29 Thread Giovanni Cabiddu
This series fixes a few issues with the xts(aes) implementation in the QuickAssist driver: - Requests that are not multiple of the block size are rejected - Input key not validated - xts(aes) requests with key size 192 bits are rejected with -EINVAL Changes from v2: - Patch #4 - removed CRYPTO

[PATCH v3 1/4] crypto: qat - allow xts requests not multiple of block

2020-06-29 Thread Giovanni Cabiddu
Allow AES-XTS requests that are not multiple of the block size. If a request is smaller than the block size, return -EINVAL. This fixes the following issue reported by the crypto testmgr self-test: alg: skcipher: qat_aes_xts encryption failed on test vector "random: len=116 klen=64"; expected_

[PATCH v3 2/4] crypto: qat - validate xts key

2020-06-29 Thread Giovanni Cabiddu
Validate AES-XTS key using the function xts_verify_key() to prevent malformed keys. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat

[PATCH v3 3/4] crypto: qat - remove unused field in skcipher ctx

2020-06-29 Thread Giovanni Cabiddu
Remove tfm field in qat_alg_skcipher_ctx structure. This is not used. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c index 11f

[PATCH v3 4/4] crypto: qat - fallback for xts with 192 bit keys

2020-06-29 Thread Giovanni Cabiddu
Forward requests to another provider if the key length for AES-XTS is 192 bits as this is not supported by the QAT accelerators. This fixes the following issue reported with the option CONFIG_CRYPTO_MANAGER_EXTRA_TESTS: alg: skcipher: qat_aes_xts setkey failed on test vector "random: len=3204

[PATCH 0/7] hwrng: Fix W=1 warnings

2020-06-29 Thread Herbert Xu
This patch series fixes a bunch of warnings encountered with W=1. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH 5/7] hwrng: st - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu --- drivers/char/hw_random/st-rng.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c ind

[PATCH 2/7] hwrng: omap - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. While we're at it this patch also expands the compiler coverage when CONFIG_OF is off by removing all the CONFIG_OF ifdefs. Signed-off-by: Herbert Xu --- drivers/char/hw_random/omap-rng.c | 11 ++--

[PATCH 6/7] hwrng: pic32 - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu --- drivers/char/hw_random/pic32-rng.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/pic32-rng.c b/drivers/char/hw_random/pic32-r

[PATCH 7/7] hwrng: octeon - Fix sparse warnings

2020-06-29 Thread Herbert Xu
This patch fixes a bunch of sparse warnings by adding __force tags when casting __iomem poitners to u64. Signed-off-by: Herbert Xu --- drivers/char/hw_random/octeon-rng.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/char/hw_random/octeon-rng.c b/drivers/

[PATCH 3/7] hwrng: hisi - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu --- drivers/char/hw_random/hisi-rng.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/hisi-rng.c b/drivers/char/hw_random/hisi-rng.

[PATCH 1/7] hwrng: npcm - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Reported-by: kernel test robot Signed-off-by: Herbert Xu --- drivers/char/hw_random/npcm-rng.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/npcm-rng.c b/

[PATCH 4/7] hwrng: bcm2835 - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built with CONFIG_OF=n. Signed-off-by: Herbert Xu --- drivers/char/hw_random/bcm2835-rng.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2

Re: [dm-devel] [PATCH 1/3 v2] crypto: introduce the flag CRYPTO_ALG_ALLOCATES_MEMORY

2020-06-29 Thread Mikulas Patocka
On Sun, 28 Jun 2020, Eric Biggers wrote: > On Sun, Jun 28, 2020 at 03:07:49PM -0400, Mikulas Patocka wrote: > > > > > > cryptd_create_skcipher(), cryptd_create_hash(), cryptd_create_aead(), and > > > crypto_rfc4309_create() are also missing setting the mask. > > > > > > pcrypt_create_aead() i

Hello,

2020-06-29 Thread mrs.victoria alexander
Dear friend, I have a business container transaction what that some of( $13million dollars) I would like to discuss with you. If you are interested, please contact my email address (mrs.victoria.alexand...@gmail.com) My WhatsApp number but only message (+19293737780) Please do not reply if y

[PATCH 6/9] crypto: hisilicon/qm - fix no stop reason when use hisi_qm_stop

2020-06-29 Thread Yang Shen
Now, there are three reasons of stopping: 'NORMAL', 'SOFT_RESET' and 'FLR'. In order to keep this, explicitly pass the stop reason as an input parameter of 'hisi_qm_stop' function. Fixes: b67202e8ed30("crypto: hisilicon/qm - add state machine for QM") Signed-off-by: Shukun Tan --- drivers/crypto

[PATCH 2/9] crypto: hisilicon/qm - clear used reference count when start qp

2020-06-29 Thread Yang Shen
From: Shukun Tan The used reference count is used for counting the number of 'sqe' which is under processing. This reference count should be cleared as starting 'qp', otherwise the 'used' will be messy when allocating this 'qp' again. Fixes: 5308f6600a39("crypto: hisilicon - QM memory management

[PATCH 4/9] crypto: hisilicon/qm - fix judgement of queue is full

2020-06-29 Thread Yang Shen
From: Hui Tang The queue depth is 1024, so the condition for judging the queue full should be 1023, otherwise the hardware cannot judge whether the queue is empty or full. Fixes: 263c9959c937("crypto: hisilicon - add queue management driver...") Signed-off-by: Hui Tang Signed-off-by: Shukun Tan

[PATCH 3/9] crypto: hisilicon/qm - fix print frequence in hisi_qp_send

2020-06-29 Thread Yang Shen
Requests will be sent continuously as resetting, which will cause 'printk' flooding. Using 'dev_info_ratelimited' can solve this problem well. Fixes: b67202e8ed30("crypto: hisilicon/qm - add state machine for QM") Signed-off-by: Yang Shen Signed-off-by: Shukun Tan --- drivers/crypto/hisilicon/q

[PATCH 9/9] crypto: hisilicon/qm - register callback function to 'pci_driver.shutdown'

2020-06-29 Thread Yang Shen
Since the drivers such as HPRE/SEC/ZIP do not implement 'pci_driver.shutdow', a RAS will be triggered at OS rebooting or shutting down as the hardware device is processing request. The log looks like this: NOTICE: [NimbusSecNodeType1]:[2372L]This is sec, Base = 0x14180 NOTICE: [Nimbus

Re: [PATCH v2 4/4] crypto: qat - fallback for xts with 192 bit keys

2020-06-29 Thread Giovanni Cabiddu
Thanks for your feedback Ard. On Fri, Jun 26, 2020 at 08:15:16PM +0200, Ard Biesheuvel wrote: > On Fri, 26 Jun 2020 at 10:04, Giovanni Cabiddu > wrote: > > > > +static int qat_alg_skcipher_init_xts_tfm(struct crypto_skcipher *tfm) > > +{ > > + struct qat_alg_skcipher_ctx *ctx = crypto_skcip

Re: [PATCH 1/1] crypto: ux500: hash: Add namespacing to hash_init()

2020-06-29 Thread Linus Walleij
On Mon, Jun 29, 2020 at 2:30 PM Lee Jones wrote: > A recent change to the Regulator consumer API (which this driver > utilises) add prototypes for the some suspend functions. These > functions require including header file include/linux/suspend.h. > > The following tree of includes affecting thi