Re: [PATCH v3] crypto: DRBG - always try to free Jitter RNG instance

2020-06-11 Thread Herbert Xu
On Sun, Jun 07, 2020 at 03:20:26PM +0200, Stephan Müller wrote: > The Jitter RNG is unconditionally allocated as a seed source follwoing > the patch 97f2650e5040. Thus, the instance must always be deallocated. > > Reported-by: syzbot+2e635807decef724a...@syzkaller.appspotmail.com > Fixes: 97f2650e

Re: [PATCH] crypto: marvell/octeontx - Fix a potential NULL dereference

2020-06-11 Thread Herbert Xu
On Fri, Jun 05, 2020 at 02:03:39PM +0300, Dan Carpenter wrote: > Smatch reports that: > > drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:132 > otx_cpt_aead_callback() > warn: variable dereferenced before check 'cpt_info' (see line 121) > > This function is called from process_pending_q

Re: [PATCH] crypto: algboss - don't wait during notifier callback

2020-06-11 Thread Herbert Xu
On Thu, Jun 04, 2020 at 11:52:53AM -0700, Eric Biggers wrote: > From: Eric Biggers > > When a crypto template needs to be instantiated, CRYPTO_MSG_ALG_REQUEST > is sent to crypto_chain. cryptomgr_schedule_probe() handles this by > starting a thread to instantiate the template, then waiting for t

Re: [PATCH v2 1/1] crypto: caam - fix typos

2020-06-11 Thread Herbert Xu
On Thu, Jun 04, 2020 at 12:39:47PM +0200, Heinrich Schuchardt wrote: > Fix CAAM related typos. > > Signed-off-by: Heinrich Schuchardt > --- > v2: > fix additional typos as indicated by Horia > replaces https://lkml.org/lkml/2020/6/3/1129 > --- > drivers/crypto/caam/Kconfig | 2 +- >

Re: [PATCH 1/1] crypto: caam - fix typo

2020-06-11 Thread Herbert Xu
On Thu, Jun 04, 2020 at 04:40:13AM +0200, Heinrich Schuchardt wrote: > %s/suppying/supplying/ > > Signed-off-by: Heinrich Schuchardt > --- > drivers/crypto/caam/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondo

Re: [PATCH] [v2] hwrng: ks-sa - Fix runtime PM imbalance on error

2020-06-11 Thread Herbert Xu
On Thu, May 28, 2020 at 03:21:04PM +0800, Dinghao Liu wrote: > pm_runtime_get_sync() increments the runtime PM usage counter even > the call returns an error code. Thus a pairing decrement is needed > on the error handling path to keep the counter balanced. > > Signed-off-by: Dinghao Liu > --- >

[PATCH] crypto: octeontx - Fix sparse warnings

2020-06-11 Thread Herbert Xu
This patch fixes all the sparse warnings in the octeontx driver. Some of these are just trivial type changes. However, some of the changes are non-trivial on little-endian hosts. Obviously the driver appears to be broken on either LE or BE as it was doing different things. I've taken the BE behav

crypto: caam - Fix argument type in handle_imx6_err005766

2020-06-11 Thread Herbert Xu
The function handle_imx6_err005766 needs to take an __iomem argument as otherwise sparse will generate two warnings. Fixes: 33d69455e402 ("crypto: caam - limit AXI pipeline to a...") Signed-off-by: Herbert Xu diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index f3d20b7645e0

Re: [PATCH] crypto: qat - fix parameter check in aead encryption

2020-06-11 Thread Herbert Xu
On Wed, May 27, 2020 at 11:18:52PM +0100, Giovanni Cabiddu wrote: > Return -EINVAL if the input digest size and/or cipher > length is zero or the cipher length is not multiple of a block. > These additional parameter checks prevent an undefined device behaviour. But a zero-length encryption is val

Re: [PATCH V2] crypto: talitos - fix ECB and CBC algs ivsize

2020-06-11 Thread Kang Yin Su
Cool, thanks! yin On Thu, 11 Jun 2020 at 21:57, Greg KH wrote: > > On Thu, Jun 11, 2020 at 07:50:47PM +0800, Su Kang Yin wrote: > > commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize") > > wrongly modified CBC algs ivsize instead of ECB aggs ivsize. > > > > This restore the CBC algs ori

Re: [PATCH] crypto: algapi - Remove skbuff.h inclusion

2020-06-11 Thread kernel test robot
Hi Herbert, I love your patch! Yet something to improve: [auto build test ERROR on cryptodev/master] [also build test ERROR on crypto/master rockchip/for-next v5.7 next-20200611] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also

[PATCH 3/3] crypto: qat - update timeout logic in put admin msg

2020-06-11 Thread Giovanni Cabiddu
From: Wojciech Ziemba Replace timeout logic in adf_put_admin_msg_sync() with existing macro readl_poll_timeout(). Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/adf_admin.c | 34 +-- 1 file changed, 19 insertions(+), 15 del

[PATCH 0/3] crypto: qat - update admin interface

2020-06-11 Thread Giovanni Cabiddu
Refactor and update the admin interface in the qat driver. These changes are on top of "crypto: qat - remove packed attribute in etr structs" (https://patchwork.kernel.org/patch/11586063/) Wojciech Ziemba (3): crypto: qat - update fw init admin msg crypto: qat - send admin messages to set of

[PATCH 2/3] crypto: qat - send admin messages to set of AEs

2020-06-11 Thread Giovanni Cabiddu
From: Wojciech Ziemba Update the logic that sends admin messages to be able to target a subset of Acceleration Engines (AEs) in the device. In future not all admin messages need to be sent to all the AEs. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qa

[PATCH 1/3] crypto: qat - update fw init admin msg

2020-06-11 Thread Giovanni Cabiddu
From: Wojciech Ziemba This patch tidies up the definition of init/admin request and response messages by removing the icp_qat_fw_init_admin_resp_pars structure and embedding it into icp_qat_fw_init_admin_resp. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu --- drivers/crypto/q

Re: [PATCH] crypto: ccp - Fix sparse warnings in sev-dev

2020-06-11 Thread Tom Lendacky
On 6/4/20 4:04 AM, Borislav Petkov wrote: + Tom. On Thu, Jun 04, 2020 at 06:09:41PM +1000, Herbert Xu wrote: This patch fixes a bunch of sparse warnings in sev-dev where the __user marking is incorrectly handled. Reported-by: kbuild test robot Fixes: 7360e4b14350 ("crypto: ccp: Implement SEV_

Re: [PATCH] crypto: ccp - Fix sparse warnings in sev-dev

2020-06-11 Thread Brijesh Singh
On 6/4/20 3:09 AM, Herbert Xu wrote: > This patch fixes a bunch of sparse warnings in sev-dev where the > __user marking is incorrectly handled. > > Reported-by: kbuild test robot > Fixes: 7360e4b14350 ("crypto: ccp: Implement SEV_PEK_CERT_IMPORT...") > Fixes: e799035609e1 ("crypto: ccp: Impleme

Re: [GIT PULL] Crypto Fixes for 5.8

2020-06-11 Thread pr-tracker-bot
The pull request you sent on Thu, 11 Jun 2020 14:05:44 +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/e8de4575cf7601917c2eae9f8ee1a8ee3d9be2a7 Thank you! -- Deet-doot-dot, I am a bot

[PATCH] crypto: caam/qi2: remove redundant assignment to ret

2020-06-11 Thread Colin King
From: Colin Ian King The variable ret is being assigned a value that is never read, the error exit path via label 'unmap' returns -ENOMEM anyhow, so assigning ret with -ENOMEM is redundamt. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/crypto/caam/caamalg_qi2.c

[PATCH] crypto: algapi - Remove skbuff.h inclusion

2020-06-11 Thread Herbert Xu
The header file algapi.h includes skbuff.h unnecessarily since all we need is a forward declaration for struct sk_buff. This patch removes that inclusion. Unfortunately skbuff.h pulls in a lot of things and drivers over the years have come to rely on it so this patch adds a lot of missing inclusi

Re: [PATCH V2] crypto: talitos - fix ECB and CBC algs ivsize

2020-06-11 Thread Greg KH
On Thu, Jun 11, 2020 at 07:50:47PM +0800, Su Kang Yin wrote: > commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize") > wrongly modified CBC algs ivsize instead of ECB aggs ivsize. > > This restore the CBC algs original ivsize of removes ECB's ones. > > Fixes: e1de42fdfc6a ("crypto: talito

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-06-11 Thread Bjorn Helgaas
On Thu, Jun 11, 2020 at 10:54:45AM +0800, Zhangfei Gao wrote: > On 2020/6/10 上午12:49, Bjorn Helgaas wrote: > > On Tue, Jun 09, 2020 at 11:15:06AM +0200, Arnd Bergmann wrote: > > > On Tue, Jun 9, 2020 at 6:02 AM Zhangfei Gao > > > wrote: > > > > On 2020/6/9 上午12:41, Bjorn Helgaas wrote: > > > > >

Re: [PATCH V2] crypto: talitos - fix ECB and CBC algs ivsize

2020-06-11 Thread Christophe Leroy
Le 11/06/2020 à 13:50, Su Kang Yin a écrit : commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize") wrongly modified CBC algs ivsize instead of ECB aggs ivsize. This restore the CBC algs original ivsize of removes ECB's ones. Fixes: e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize

[PATCH V2] crypto: talitos - fix ECB and CBC algs ivsize

2020-06-11 Thread Su Kang Yin
commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize") wrongly modified CBC algs ivsize instead of ECB aggs ivsize. This restore the CBC algs original ivsize of removes ECB's ones. Fixes: e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize") Signed-off-by: Su Kang Yin --- Patch for 4.9 u

Re: [PATCH] crypto: talitos - fix ECB and CBC algs ivsize

2020-06-11 Thread Greg KH
On Thu, Jun 11, 2020 at 01:09:38PM +0200, Christophe Leroy wrote: > > > Le 11/06/2020 à 13:03, Greg KH a écrit : > > On Thu, Jun 11, 2020 at 12:50:24PM +0200, Christophe Leroy wrote: > > > Hi, > > > > > > Le 11/06/2020 à 12:07, Su Kang Yin a écrit : > > > > Patch for 4.9 upstream: > > > > > > >

Re: [PATCH] crypto: talitos - fix ECB and CBC algs ivsize

2020-06-11 Thread Christophe Leroy
Le 11/06/2020 à 13:03, Greg KH a écrit : On Thu, Jun 11, 2020 at 12:50:24PM +0200, Christophe Leroy wrote: Hi, Le 11/06/2020 à 12:07, Su Kang Yin a écrit : Patch for 4.9 upstream: commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize") wrongly modified CBC algs ivsize instead of ECB

Re: [PATCH] crypto: talitos - fix ECB and CBC algs ivsize

2020-06-11 Thread Greg KH
On Thu, Jun 11, 2020 at 12:50:24PM +0200, Christophe Leroy wrote: > Hi, > > Le 11/06/2020 à 12:07, Su Kang Yin a écrit : > > Patch for 4.9 upstream: > > > > commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize") > > wrongly modified CBC algs ivsize instead of ECB aggs ivsize. > > To make

Re: [PATCH] crypto: talitos - fix ECB and CBC algs ivsize

2020-06-11 Thread Greg KH
On Thu, Jun 11, 2020 at 06:07:45PM +0800, Su Kang Yin wrote: > Patch for 4.9 upstream: > > commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize") > wrongly modified CBC algs ivsize instead of ECB aggs ivsize. > > This restore the CBC algs original ivsize of removes ECB's ones. > > Signed-

Re: [PATCH] crypto: talitos - fix ECB and CBC algs ivsize

2020-06-11 Thread Christophe Leroy
Hi, Le 11/06/2020 à 12:07, Su Kang Yin a écrit : Patch for 4.9 upstream: commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize") wrongly modified CBC algs ivsize instead of ECB aggs ivsize. To make it clear and avoid this problem to happen again, please generate your patch with option

[PATCH] crypto: talitos - fix ECB and CBC algs ivsize

2020-06-11 Thread Su Kang Yin
Patch for 4.9 upstream: commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize") wrongly modified CBC algs ivsize instead of ECB aggs ivsize. This restore the CBC algs original ivsize of removes ECB's ones. Signed-off-by: Su Kang Yin --- drivers/crypto/talitos.c | 4 +--- 1 file changed,

Re: [PATCH] crypto: drbg - Fix memleak in drbg_prepare_hrng

2020-06-11 Thread Stephan Mueller
Am Donnerstag, 11. Juni 2020, 10:33:56 CEST schrieb Zheng Bin: Hi Zheng, Thank you for the note, but I think this is handled, albeit differently. Search for patch "[PATCH v3] crypto: DRBG - always try to free Jitter RNG instance" that is sent to the list (but not yet applied). Thanks > drbg

[PATCH] crypto: drbg - Fix memleak in drbg_prepare_hrng

2020-06-11 Thread Zheng Bin
drbg_prepare_hrng drbg->jent = crypto_alloc_rng err = add_random_ready_callback default: drbg->random_ready.func = NULL -->set NULL, if fail drbg_uninstantiate if (drbg->random_ready.func) -->If NULL, will not free drbg->jent crypto_free_rng(drbg->jent) Need to free drbg->je