Question about padata's callback cpu

2019-05-28 Thread Daniel Jordan
Hi Steffen, I'm working on some padata patches and stumbled across this thread about the purpose of the callback CPU in padata_do_parallel. https://lore.kernel.org/lkml/20100402112326.ga19...@secunet.com/ The relevant part is, andrew> - Why would I want to specify which CPU the parallel c

Re: [PATCH v10 09/12] ima: Implement support for module-style appended signatures

2019-05-28 Thread Mimi Zohar
On Tue, 2019-05-28 at 16:23 -0300, Thiago Jung Bauermann wrote: > Mimi Zohar writes: > > > Hi Thiago, > > > >> diff --git a/security/integrity/ima/ima_policy.c > >> b/security/integrity/ima/ima_policy.c > >> index fca7a3f23321..a7a20a8c15c1 100644 > >> --- a/security/integrity/ima/ima_policy.c >

Re: [PATCH v10 09/12] ima: Implement support for module-style appended signatures

2019-05-28 Thread Thiago Jung Bauermann
Mimi Zohar writes: > Hi Thiago, > > On Thu, 2019-04-18 at 00:51 -0300, Thiago Jung Bauermann wrote: >> >> @@ -326,6 +356,10 @@ int ima_appraise_measurement(enum ima_hooks func, >> case INTEGRITY_UNKNOWN: >> break; >> case INTEGRITY_NOXATTRS:/* No EVM protected xattrs. */ >> +/* It's fine not t

Re: [PATCH v10 09/12] ima: Implement support for module-style appended signatures

2019-05-28 Thread Thiago Jung Bauermann
Mimi Zohar writes: > Hi Thiago, > >> diff --git a/security/integrity/ima/ima_policy.c >> b/security/integrity/ima/ima_policy.c >> index fca7a3f23321..a7a20a8c15c1 100644 >> --- a/security/integrity/ima/ima_policy.c >> +++ b/security/integrity/ima/ima_policy.c >> @@ -1144,6 +1144,12 @@ void ima

Re: [PATCH v10 12/12] ima: Store the measurement again when appraising a modsig

2019-05-28 Thread Thiago Jung Bauermann
Mimi Zohar writes: > Hi Thiago, > > On Thu, 2019-04-18 at 00:51 -0300, Thiago Jung Bauermann wrote: >> If the IMA template contains the "modsig" or "d-modsig" field, then the >> modsig should be added to the measurement list when the file is appraised. >> >> And that is what normally happens, b

Re: [PATCH v10 11/12] ima: Define ima-modsig template

2019-05-28 Thread Thiago Jung Bauermann
Mimi Zohar writes: > On Thu, 2019-04-18 at 00:51 -0300, Thiago Jung Bauermann wrote: >> Define new "d-modsig" template field which holds the digest that is >> expected to match the one contained in the modsig, and also new "modsig" >> template field which holds the appended file signature. >> >

Re: [PATCH v10 01/12] MODSIGN: Export module signature definitions

2019-05-28 Thread Thiago Jung Bauermann
Mimi Zohar writes: > On Thu, 2019-04-18 at 00:51 -0300, Thiago Jung Bauermann wrote: >> IMA will use the module_signature format for append signatures, so export >> the relevant definitions and factor out the code which verifies that the >> appended signature trailer is valid. >> >> Also, crea

RE: Conding style question regarding configuration

2019-05-28 Thread Pascal Van Leeuwen
> > Quick question regarding how to configure out code depending on a > CONFIG_xxx > > switch. As far as I understood so far, the proper way to do this is > not by > > doing an #ifdef but by using a regular if with IS_ENABLED like so: > > > > if (IS_ENABLED(CONFIG_PCI)) { > > } > > > > Such that th

Re: [PATCH] crypto: testmgr - test the shash API

2019-05-28 Thread Ard Biesheuvel
On Tue, 28 May 2019 at 18:42, Eric Biggers wrote: > > From: Eric Biggers > > For hash algorithms implemented using the "shash" algorithm type, test > both the ahash and shash APIs, not just the ahash API. > > Testing the ahash API already tests the shash API indirectly, which is > normally good e

Re: [PATCH v2] crypto: xxhash - Implement xxhash support

2019-05-28 Thread Eric Biggers
On Tue, May 28, 2019 at 07:49:58PM +0300, Nikolay Borisov wrote: > > > On 28.05.19 г. 18:22 ч., Eric Biggers wrote: > > On Tue, May 28, 2019 at 03:14:51PM +0300, Nikolay Borisov wrote: > >> xxhash is currently implemented as a self-contained module in /lib. > >> This patch enables that module to

Re: [PATCH v2] crypto: xxhash - Implement xxhash support

2019-05-28 Thread Nikolay Borisov
On 28.05.19 г. 18:22 ч., Eric Biggers wrote: > On Tue, May 28, 2019 at 03:14:51PM +0300, Nikolay Borisov wrote: >> xxhash is currently implemented as a self-contained module in /lib. >> This patch enables that module to be used as part of the generic kernel >> crypto framework. It adds a simple

Re: [PATCH v1 00/15] Fixing selftests failure on Talitos driver

2019-05-28 Thread Christophe Leroy
Horia Geanta a écrit : On 5/21/2019 4:34 PM, Christophe Leroy wrote: Several test failures have popped up following recent changes to crypto selftests. This series fixes (most of) them. The last three patches are trivial cleanups. Thanks Christophe. For the series: Reviewed-by: Horia Gean

Purchase_rfq

2019-05-28 Thread aishatu
INQUIRY_4178916..xlsx Description: Binary data

[PATCH] crypto: testmgr - test the shash API

2019-05-28 Thread Eric Biggers
From: Eric Biggers For hash algorithms implemented using the "shash" algorithm type, test both the ahash and shash APIs, not just the ahash API. Testing the ahash API already tests the shash API indirectly, which is normally good enough. However, there have been corner cases where there have be

Re: Conding style question regarding configuration

2019-05-28 Thread Sandy Harris
Pascal Van Leeuwen wrote: > ... the proper way to do this is not by > doing an #ifdef but by using a regular if with IS_ENABLED like so: > > if (IS_ENABLED(CONFIG_PCI)) {} See also: http://doc.cat-v.org/henry_spencer/ifdef_considered_harmful

Re: Conding style question regarding configuration

2019-05-28 Thread Ard Biesheuvel
On Tue, 28 May 2019 at 17:47, Pascal Van Leeuwen wrote: > > Hi, > > Quick question regarding how to configure out code depending on a CONFIG_xxx > switch. As far as I understood so far, the proper way to do this is not by > doing an #ifdef but by using a regular if with IS_ENABLED like so: > > if

Conding style question regarding configuration

2019-05-28 Thread Pascal Van Leeuwen
Hi, Quick question regarding how to configure out code depending on a CONFIG_xxx switch. As far as I understood so far, the proper way to do this is not by doing an #ifdef but by using a regular if with IS_ENABLED like so: if (IS_ENABLED(CONFIG_PCI)) { } Such that the compiler can still check

Re: [PATCH v2] crypto: xxhash - Implement xxhash support

2019-05-28 Thread Eric Biggers
On Tue, May 28, 2019 at 03:14:51PM +0300, Nikolay Borisov wrote: > xxhash is currently implemented as a self-contained module in /lib. > This patch enables that module to be used as part of the generic kernel > crypto framework. It adds a simple wrapper to the 64bit version. > Thanks, this looks

Re: [PATCH] arm64 sha2-ce finup: correct digest for empty data

2019-05-28 Thread Ard Biesheuvel
On Tue, 28 May 2019 at 16:35, Elena Petrova wrote: > > The sha256-ce finup implementation for ARM64 produces wrong digest > for empty input (len=0). Expected: the actual digest, result: initial > value of SHA internal state. The error is in sha256_ce_finup: > for empty data `finalize` will be 1, s

[PATCH] arm64 sha2-ce finup: correct digest for empty data

2019-05-28 Thread Elena Petrova
The sha256-ce finup implementation for ARM64 produces wrong digest for empty input (len=0). Expected: the actual digest, result: initial value of SHA internal state. The error is in sha256_ce_finup: for empty data `finalize` will be 1, so the code is relying on sha2_ce_transform to make the final r

Re: [PATCH] arm64 sha1-ce finup: correct digest for empty data

2019-05-28 Thread Elena Petrova
Yep, sha2 also has the bug, I'll be sending the fix soon, thanks! On Tue, 28 May 2019 at 14:03, Ard Biesheuvel wrote: > > On Tue, 28 May 2019 at 14:42, Elena Petrova wrote: > > > > The sha1-ce finup implementation for ARM64 produces wrong digest > > for empty input (len=0). Expected: da39a3ee...

Re: [PATCH v10 12/12] ima: Store the measurement again when appraising a modsig

2019-05-28 Thread Mimi Zohar
Hi Thiago, On Thu, 2019-04-18 at 00:51 -0300, Thiago Jung Bauermann wrote: > If the IMA template contains the "modsig" or "d-modsig" field, then the > modsig should be added to the measurement list when the file is appraised. > > And that is what normally happens, but if a measurement rule caused

Re: [PATCH] arm64 sha1-ce finup: correct digest for empty data

2019-05-28 Thread Ard Biesheuvel
On Tue, 28 May 2019 at 14:42, Elena Petrova wrote: > > The sha1-ce finup implementation for ARM64 produces wrong digest > for empty input (len=0). Expected: da39a3ee..., result: 67452301... > (initial value of SHA internal state). The error is in sha1_ce_finup: > for empty data `finalize` will be

Re: crypto: inside_secure - call for volunteers

2019-05-28 Thread antoine.ten...@bootlin.com
Hello Pascal, On Mon, May 27, 2019 at 09:06:48PM +, Pascal Van Leeuwen wrote: > > From: antoine.ten...@bootlin.com [mailto:antoine.ten...@bootlin.com] > > - You added use of PCI helpers, but this new dependency wasn't described > > in Kconfig (leading to have build issues). > > > Ah OK, to b

[PATCH] arm64 sha1-ce finup: correct digest for empty data

2019-05-28 Thread Elena Petrova
The sha1-ce finup implementation for ARM64 produces wrong digest for empty input (len=0). Expected: da39a3ee..., result: 67452301... (initial value of SHA internal state). The error is in sha1_ce_finup: for empty data `finalize` will be 1, so the code is relying on sha1_ce_transform to make the fin

[PATCH v2] crypto: xxhash - Implement xxhash support

2019-05-28 Thread Nikolay Borisov
xxhash is currently implemented as a self-contained module in /lib. This patch enables that module to be used as part of the generic kernel crypto framework. It adds a simple wrapper to the 64bit version. I've also added test vectors (with help from Nick Terrell). The upstream xxhash code is teste

[bug report] crypto: qat - Intel(R) QAT driver framework

2019-05-28 Thread Dan Carpenter
Hello Tadeusz Struk, The patch d8cba25d2c68: "crypto: qat - Intel(R) QAT driver framework" from Jun 5, 2014, leads to the following static checker warning: drivers/crypto/qat/qat_common/adf_ctl_drv.c:159 adf_add_key_value_data() warn: 'adf_cfg_add_key_value_param' unterminated use

Re: [PATCH v5 1/2] crypto: caam - fix pkcs1pad(rsa-caam, sha256) failure because of invalid input

2019-05-28 Thread Horia Geanta
On 5/28/2019 12:52 PM, Iuliana Prodan wrote: > The problem is with the input data size sent to CAAM for encrypt/decrypt. > Pkcs1pad is failing due to pkcs1 padding done in SW starting with0x01 > instead of 0x00 0x01. > CAAM expects an input of modulus size. For this we strip the leading > zeros in

[PATCH v5 1/2] crypto: caam - fix pkcs1pad(rsa-caam, sha256) failure because of invalid input

2019-05-28 Thread Iuliana Prodan
The problem is with the input data size sent to CAAM for encrypt/decrypt. Pkcs1pad is failing due to pkcs1 padding done in SW starting with0x01 instead of 0x00 0x01. CAAM expects an input of modulus size. For this we strip the leading zeros in case the size is more than modulus or pad the input wit

[PATCH v5 2/2] crypto: caam - strip input without changing crypto request

2019-05-28 Thread Iuliana Prodan
For rsa and pkcs1pad, CAAM expects an input of modulus size. For this we strip the leading zeros in case the size is more than modulus. This commit avoids modifying the crypto request while stripping zeros from input, to comply with the crypto API requirement. This is done by adding a fixup input p

Re: [PATCH v1 00/15] Fixing selftests failure on Talitos driver

2019-05-28 Thread Horia Geanta
On 5/21/2019 4:34 PM, Christophe Leroy wrote: > Several test failures have popped up following recent changes to crypto > selftests. > > This series fixes (most of) them. > > The last three patches are trivial cleanups. > Thanks Christophe. For the series: Reviewed-by: Horia Geantă Have you v

Re: [PATCH v1 08/15] crypto: talitos - Do not modify req->cryptlen on decryption.

2019-05-28 Thread Horia Geanta
On 5/21/2019 4:34 PM, Christophe Leroy wrote: > For decrypt, req->cryptlen includes the size of the authentication > part while all functions of the driver expect cryptlen to be > the size of the encrypted data. > > As it is not expected to change req->cryptlen, this patch > implements local calcu