Re: [PATCH] crypto: hisilicon - fix strncpy warning with strlcpy

2020-06-03 Thread Herbert Xu
On Thu, Jun 04, 2020 at 02:44:16PM +0800, Zhangfei Gao wrote: > > I think it is fine. > 1. Currently the name size is 64, bigger enough. > Simply grep in driver name, 64 should be enough. > We can make it larger when there is a request. > 2. it does not matter what the name is, since it is just an

Re: [PATCH] crypto: hisilicon - fix strncpy warning with strlcpy

2020-06-03 Thread Zhangfei Gao
On 2020/6/4 下午2:18, Herbert Xu wrote: On Thu, Jun 04, 2020 at 02:10:37PM +0800, Zhangfei Gao wrote: Should this even allow truncation? Perhaps it'd be better to fail in case of an overrun? I think we do not need consider overrun, since it at most copy size-1 bytes to dest. From the manual:

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

2020-06-03 Thread Stephan Müller
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: 97f2650e5040 ("crypto: drbg - always seeded with SP800-90B ...") Signed-off-by: St

[PATCH] crc-t10dif: Fix potential crypto notify dead-lock

2020-06-03 Thread Herbert Xu
The crypto notify call occurs with a read mutex held so you must not do any substantial work directly. In particular, you cannot call crypto_alloc_* as they may trigger further notifications which may dead-lock in the presence of another writer. This patch fixes this by postponing the work into a

Re: [PATCH] crypto: hisilicon - fix strncpy warning with strlcpy

2020-06-03 Thread Herbert Xu
On Thu, Jun 04, 2020 at 02:10:37PM +0800, Zhangfei Gao wrote: > > > Should this even allow truncation? Perhaps it'd be better to fail > > in case of an overrun? > I think we do not need consider overrun, since it at most copy size-1 bytes > to dest. > From the manual: strlcpy() >    This  funct

Re: [PATCH] crypto: hisilicon - fix strncpy warning with strlcpy

2020-06-03 Thread Zhangfei Gao
On 2020/6/4 上午11:39, Herbert Xu wrote: On Thu, Jun 04, 2020 at 11:32:04AM +0800, Zhangfei Gao wrote: Use strlcpy to fix the warning warning: 'strncpy' specified bound 64 equals destination size [-Wstringop-truncation] Reported-by: kernel test robot Signed-off-by: Zhangfei Gao ---

Re: [PATCH] crypto: hisilicon - fix strncpy warning with strlcpy

2020-06-03 Thread Herbert Xu
On Thu, Jun 04, 2020 at 11:32:04AM +0800, Zhangfei Gao wrote: > Use strlcpy to fix the warning > warning: 'strncpy' specified bound 64 equals destination size > [-Wstringop-truncation] > > Reported-by: kernel test robot > Signed-off-by: Zhangfei Gao > --- > drivers/crypto/hisilicon/qm.

[PATCH] crypto: hisilicon - fix strncpy warning with strlcpy

2020-06-03 Thread Zhangfei Gao
Use strlcpy to fix the warning warning: 'strncpy' specified bound 64 equals destination size [-Wstringop-truncation] Reported-by: kernel test robot Signed-off-by: Zhangfei Gao --- drivers/crypto/hisilicon/qm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/

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

2020-06-03 Thread Heinrich Schuchardt
%s/suppying/supplying/ Signed-off-by: Heinrich Schuchardt --- drivers/crypto/caam/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/caam/Kconfig b/drivers/crypto/caam/Kconfig index a62f228be6da..bc35aa0ec07a 100644 --- a/drivers/crypto/caam/Kconfig +++ b/

Re: [PATCH 1/4] qat: fix misunderstood -EBUSY return code

2020-06-03 Thread Mikulas Patocka
On Wed, 3 Jun 2020, Giovanni Cabiddu wrote: > > > > +bool adf_should_back_off(struct adf_etr_ring_data *ring) > > > > +{ > > > > + return atomic_read(ring->inflights) > > > > > ADF_MAX_INFLIGHTS(ring->ring_size, ring->msg_size) * 15 / 16; > > > How did you came up with 15/16? > > > > I

Re: [RFC PATCH net 1/1] net/tls(TLS_SW): Add selftest for 'chunked' sendfile test

2020-06-03 Thread Pooja Trivedi
On Tue, Jun 2, 2020 at 3:19 PM Jakub Kicinski wrote: > > On Tue, 2 Jun 2020 14:56:25 + Pooja Trivedi wrote: > > This selftest tests for cases where sendfile's 'count' > > parameter is provided with a size greater than the intended > > file size. > > > > Motivation: When sendfile is provided w

[PATCH 2/3] crypto: qat - replace user types with kernel ABI __u types

2020-06-03 Thread Giovanni Cabiddu
From: Wojciech Ziemba Kernel source code should not contain stdint.h types. This patch replaces uintXX_t types with kernel space ABI types. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu --- .../crypto/qat/qat_common/adf_cfg_common.h| 24 +-- drivers/crypto/qat/qat_common

[PATCH 1/3] crypto: qat - replace user types with kernel u types

2020-06-03 Thread Giovanni Cabiddu
From: Wojciech Ziemba Kernel source code should not include stdint.h types. This patch replaces uintXX_t types with respective ones defined in kernel headers. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu --- .../crypto/qat/qat_common/adf_accel_devices.h | 54

[PATCH 0/3] Replace user types and remove packed

2020-06-03 Thread Giovanni Cabiddu
Remove user types across qat code base and replace packed attribute in etr ring struct which causes a split lock. These changes are on top of "crypto: qat - fix parameter check in aead encryption" (https://patchwork.kernel.org/patch/11574001/) Giovanni Cabiddu (1): crypto: qat - remove packed a

[PATCH 3/3] crypto: qat - remove packed attribute in etr structs

2020-06-03 Thread Giovanni Cabiddu
Remove packed attribute in adf_etr_bank_data and adf_etr_ring_data. Fields in these structures are reordered in order to avoid holes. Signed-off-by: Giovanni Cabiddu --- .../crypto/qat/qat_common/adf_transport_internal.h | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff

Re: [PATCH 1/4] qat: fix misunderstood -EBUSY return code

2020-06-03 Thread Giovanni Cabiddu
Hi Mikulas, On Wed, Jun 03, 2020 at 04:31:54AM -0400, Mikulas Patocka wrote: > On Tue, 2 Jun 2020, Giovanni Cabiddu wrote: > > Hi Mikulas, > > > > thanks for your patch. See below. > > > > > + qat_req->backed_off = backed_off = > > > adf_should_back_off(ctx->inst->sym_tx); > > > +again: > > > +

Re: [PATCH v2 05/15] crypto: inside-secure - Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread kernel test robot
Hi Piotr, Thank you for the patch! Yet something to improve: [auto build test ERROR on pci/next] [also build test ERROR on mkp-scsi/for-next scsi/for-next linus/master v5.7 next-20200603] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we

HELLO: I AM MRS SUSAN JONES

2020-06-03 Thread Mrs.Susan Jones
-- OUR GOLDEN OPPORTUNITY Hello Dear Friend, Complement of the day, i hope you are doing great today. However, I am Mrs.Susan Jones, an auditor with one of the new generation banks here in Burkina Faso. I am writing you this letter based on the latest development at my Department. i discovered

Re: [PATCH 3/4] qat: use GFP_KERNEL allocations

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

Re: [PATCHv3 1/7] dt-bindings: crypto: Add TI SA2UL crypto accelerator documentation

2020-06-03 Thread Herbert Xu
On Wed, Jun 03, 2020 at 03:53:03PM +0300, Tero Kristo wrote: > > Ok np, I will re-post once 5.8-rc1 is out. You can post them now if you want. I'll just apply them after rc1 is out. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au

Re: [PATCHv3 1/7] dt-bindings: crypto: Add TI SA2UL crypto accelerator documentation

2020-06-03 Thread Tero Kristo
On 03/06/2020 15:39, Herbert Xu wrote: On Wed, Jun 03, 2020 at 03:38:03PM +0300, Tero Kristo wrote: Also I guess this should be posted against 5.8-rc1 once it is out, as merge window is already open. Or are you planning to pick it up for 5.8 already? Sorry this is going to be in the next merg

Re: [PATCHv3 1/7] dt-bindings: crypto: Add TI SA2UL crypto accelerator documentation

2020-06-03 Thread Herbert Xu
On Wed, Jun 03, 2020 at 03:38:03PM +0300, Tero Kristo wrote: > > Also I guess this should be posted against 5.8-rc1 once it is out, as merge > window is already open. Or are you planning to pick it up for 5.8 already? Sorry this is going to be in the next merge window. -- Email: Herbert Xu Home

Re: [PATCHv3 1/7] dt-bindings: crypto: Add TI SA2UL crypto accelerator documentation

2020-06-03 Thread Tero Kristo
On 03/06/2020 15:27, Herbert Xu wrote: On Wed, Jun 03, 2020 at 01:01:26PM +0300, Tero Kristo wrote: Herbert, whats the plan with the rest of the series? Do you want me to re-post it? It shows deferred under crypto patchwork currently. Please repost because v3 contains just a single patch. A

Re: [PATCHv3 1/7] dt-bindings: crypto: Add TI SA2UL crypto accelerator documentation

2020-06-03 Thread Herbert Xu
On Wed, Jun 03, 2020 at 01:01:26PM +0300, Tero Kristo wrote: > > Herbert, whats the plan with the rest of the series? Do you want me to > re-post it? It shows deferred under crypto patchwork currently. Please repost because v3 contains just a single patch. Thanks, -- Email: Herbert Xu Home Page

Re: [PATCH 1/4] qat: fix misunderstood -EBUSY return code

2020-06-03 Thread Herbert Xu
On Wed, Jun 03, 2020 at 04:31:54AM -0400, Mikulas Patocka wrote: > > > Should we just retry a number of times and then fail? > > It's better to get stuck in an infinite loop than to cause random I/O > errors. The infinite loop requires reboot, but it doesn't damage data on > disks. > > The prop

[PATCH v2 05/15] crypto: inside-secure - Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko Reviewed-by: Antoine Tenart Acked-by: Herbert Xu --- drivers/crypto/inside-secure/safexce

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

2020-06-03 Thread Stephan Mueller
Am Mittwoch, 3. Juni 2020, 13:09:19 CEST schrieb Dan Carpenter: Hi Dan, > On Wed, Jun 03, 2020 at 10:08:56AM +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. > > > >

Re: Security Random Number Generator support

2020-06-03 Thread Marc Zyngier
On 2020-06-03 08:54, Neal Liu wrote: On Wed, 2020-06-03 at 08:40 +0100, Marc Zyngier wrote: On 2020-06-03 08:29, Neal Liu wrote: [...] > Could you give us a hint how to make this SMC interface more generic in > addition to my approach? > There is no (easy) way to get platform-independent SMC

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

2020-06-03 Thread Dan Carpenter
On Wed, Jun 03, 2020 at 10:08:56AM +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: [PATCHv3 1/7] dt-bindings: crypto: Add TI SA2UL crypto accelerator documentation

2020-06-03 Thread Tero Kristo
On 28/05/2020 18:23, Rob Herring wrote: On Thu, 14 May 2020 15:50:05 +0300, Tero Kristo wrote: From: Keerthy The Security Accelerator Ultra Lite (SA2UL) subsystem provides hardware cryptographic acceleration for the following use cases: * Encryption and authentication for secure boot * Encryp

Re: Security Random Number Generator support

2020-06-03 Thread Sudeep Holla
+ Jose On Wed, Jun 03, 2020 at 03:54:17PM +0800, Neal Liu wrote: > On Wed, 2020-06-03 at 08:40 +0100, Marc Zyngier wrote: [...] > > The idea is simply to have *one* single ID that caters for all > > implementations, just like we did for PSCI at the time. This > > requires ARM to edict a standard

Re: [PATCH v2] crypto: caam/qi2 - add support for dpseci_reset()

2020-06-03 Thread Horia Geantă
On 6/3/2020 11:47 AM, Andrei Botila (OSS) wrote: > From: Andrei Botila > > Add support for dpseci_reset() command for DPSECI objects. > For DPSECI DPAA2 objects with version lower than v5.4 reset command > was broken in MC f/w. > > Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Thanks

Re: Security Random Number Generator support

2020-06-03 Thread Russell King - ARM Linux admin
On Wed, Jun 03, 2020 at 08:40:58AM +0100, Marc Zyngier wrote: > On 2020-06-03 08:29, Neal Liu wrote: > > On Tue, 2020-06-02 at 21:02 +0800, Marc Zyngier wrote: > > > On 2020-06-02 13:14, Ard Biesheuvel wrote: > > > > On Tue, 2 Jun 2020 at 10:15, Neal Liu wrote: > > > >> > > > >> These patch series

[PATCH v2] crypto: caam/qi2 - add support for dpseci_reset()

2020-06-03 Thread Andrei Botila
From: Andrei Botila Add support for dpseci_reset() command for DPSECI objects. For DPSECI DPAA2 objects with version lower than v5.4 reset command was broken in MC f/w. Signed-off-by: Andrei Botila --- Changes since V1: - added, in dpaa2_dpseci_free function an error message in case dpseci_rese

Re: [PATCH 1/4] qat: fix misunderstood -EBUSY return code

2020-06-03 Thread Mikulas Patocka
On Tue, 2 Jun 2020, Giovanni Cabiddu wrote: > Hi Mikulas, > > thanks for your patch. See below. > > > + qat_req->backed_off = backed_off = > > adf_should_back_off(ctx->inst->sym_tx); > > +again: > > + ret = adf_send_message(ctx->inst->sym_tx, (uint32_t *)msg); > > if (ret == -EAGAIN)

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

2020-06-03 Thread Stephan Müller
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: 97f2650e5040 ("crypto: drbg - always seeded with SP800-90B ...") Signed-off-by: St

Re: Security Random Number Generator support

2020-06-03 Thread Neal Liu
On Wed, 2020-06-03 at 08:40 +0100, Marc Zyngier wrote: > On 2020-06-03 08:29, Neal Liu wrote: > > On Tue, 2020-06-02 at 21:02 +0800, Marc Zyngier wrote: > >> On 2020-06-02 13:14, Ard Biesheuvel wrote: > >> > On Tue, 2 Jun 2020 at 10:15, Neal Liu wrote: > >> >> > >> >> These patch series introduce

Re: Security Random Number Generator support

2020-06-03 Thread Marc Zyngier
On 2020-06-03 08:29, Neal Liu wrote: On Tue, 2020-06-02 at 21:02 +0800, Marc Zyngier wrote: On 2020-06-02 13:14, Ard Biesheuvel wrote: > On Tue, 2 Jun 2020 at 10:15, Neal Liu wrote: >> >> These patch series introduce a security random number generator >> which provides a generic interface to ge

Re: Security Random Number Generator support

2020-06-03 Thread Neal Liu
On Tue, 2020-06-02 at 21:02 +0800, Marc Zyngier wrote: > On 2020-06-02 13:14, Ard Biesheuvel wrote: > > On Tue, 2 Jun 2020 at 10:15, Neal Liu wrote: > >> > >> These patch series introduce a security random number generator > >> which provides a generic interface to get hardware rnd from Secure >