Re: [PATCH] crypto: caam - properly set IV after {en,de}crypt

2017-09-06 Thread Gilad Ben-Yossef
On Tue, Sep 5, 2017 at 6:33 PM, Horia Geantă wrote: > On 8/14/2017 10:59 AM, Gilad Ben-Yossef wrote: >> Hi, >> >> On Thu, Jun 29, 2017 at 1:19 PM, Horia Geantă wrote: >>> On 6/28/2017 4:42 PM, Horia Geantă wrote: On 6/28/2017 4:27 PM, David Gstir

[RFC] tpm: Register RNG device only on tpm chip init

2017-09-06 Thread PrasannaKumar Muralidharan
RNG device is registered as soon as tpm-rng module is loaded even if there are no TPM chip available. Call hwrng_register once tpm chip has registered. Signed-off-by: PrasannaKumar Muralidharan --- drivers/char/hw_random/tpm-rng.c | 50

[PATCH] crypto: axis - hide an unused variable

2017-09-06 Thread Arnd Bergmann
Without CONFIG_DEBUG_FS, we get a harmless warning: drivers/crypto/axis/artpec6_crypto.c:352:23: error: 'dbgfs_root' defined but not used [-Werror=unused-variable] This moves it into the #ifdef that hides the only user. Fixes: a21eb94fc4d3 ("crypto: axis - add ARTPEC-6/7 crypto accelerator

Re: [PATCH 8/8] staging: ccree: remove BUG macro usage

2017-09-06 Thread Dan Carpenter
On Sun, Sep 03, 2017 at 11:56:50AM +0300, Gilad Ben-Yossef wrote: > @@ -1154,7 +1150,8 @@ static inline int ssi_buffer_mgr_aead_chain_data( > //if have reached the end of the sgl, then this is unexpected > if (!areq_ctx->src_sgl) { >

Re: [PATCH] crypto: authenc - cryptlen must be at least AAD len

2017-09-06 Thread Stephan Müller
Am Mittwoch, 6. September 2017, 21:22:44 CEST schrieb Stephan Müller: Hi Herbert, > With AF_ALG, AAD len and cryptlen can be set freely by unprivileged > user space. The cipher implementation must therefore validate the input > data for sanity. For AEAD ciphers, this implies that cryptlen must

Re: [RFC Part2 PATCH v3 02/26] crypto: ccp: Add Platform Security Processor (PSP) device support

2017-09-06 Thread Brijesh Singh
Hi Boris, On 09/06/2017 12:00 PM, Borislav Petkov wrote: ... -- |diff --git a/drivers/crypto/ccp/sp-dev.c b/drivers/crypto/ccp/sp-dev.c |index a017233..d263ba4 100644 |--- a/drivers/crypto/ccp/sp-dev.c |+++ b/drivers/crypto/ccp/sp-dev.c --

Re: [Outreachy kernel] [PATCH v2] Staging: ccree: ssi_cipher.c: Make comment more comprehensible.

2017-09-06 Thread Julia Lawall
On Thu, 7 Sep 2017, Srishti Sharma wrote: > Edited comment to make it more comprehensible. > > Signed-off-by: Srishti Sharma > --- > Changes in v2: > - Make comment more comprehensible , instead of just correcting typos. > drivers/staging/ccree/ssi_cipher.c | 4 +++- >

[PATCH v3] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Srishti Sharma
Remove local variable inflight_counter ,as it is never used. Signed-off-by: Srishti Sharma --- Changes in v3: - There was no longer a need to make the comment more comprehensible as I have deleted the variable associated with it because it is unused .

Re: [Outreachy kernel] Re: [PATCH] Staging: ccree: ssi_cipher.c: Correct spelling mistake.

2017-09-06 Thread Julia Lawall
On Wed, 6 Sep 2017, Srishti Sharma wrote: > > > On Thursday, September 7, 2017 at 12:54:49 AM UTC+5:30, Srishti Sharma > wrote: > Correct spelling of counter in comment . > > Signed-off-by: Srishti Sharma > --- >  

[PATCH] crypto: authenc - cryptlen must be at least AAD len

2017-09-06 Thread Stephan Müller
With AF_ALG, AAD len and cryptlen can be set freely by unprivileged user space. The cipher implementation must therefore validate the input data for sanity. For AEAD ciphers, this implies that cryptlen must be at least as large as AAD size. This fixes a kernel crash that can be triggered via

[PATCH] Staging: ccree: ssi_cipher.c: Correct spelling mistake.

2017-09-06 Thread Srishti Sharma
Correct spelling of counter in comment . Signed-off-by: Srishti Sharma --- drivers/staging/ccree/ssi_cipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index

Re: [Outreachy kernel] [PATCH v2] Staging: ccree: ssi_cipher.c: Make comment more comprehensible.

2017-09-06 Thread Srishti Sharma
On Thu, Sep 7, 2017 at 2:28 AM, Julia Lawall wrote: > > > On Thu, 7 Sep 2017, Srishti Sharma wrote: > >> Edited comment to make it more comprehensible. >> >> Signed-off-by: Srishti Sharma >> --- >> Changes in v2: >> - Make comment more comprehensible

Re: [PATCH 00/12] x86/crypto: Fix RBP usage in several crypto .S files

2017-09-06 Thread Josh Poimboeuf
On Fri, Sep 01, 2017 at 05:09:19PM -0700, Eric Biggers wrote: > Hi Josh, > > On Tue, Aug 29, 2017 at 01:05:33PM -0500, Josh Poimboeuf wrote: > > Many of the x86 crypto functions use RBP as a temporary register. This > > breaks frame pointer convention, and breaks stack traces when unwinding > >

Re: [Outreachy kernel] [PATCH v3] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Srishti Sharma
On Thu, Sep 7, 2017 at 2:47 AM, Julia Lawall wrote: > > > On Thu, 7 Sep 2017, Srishti Sharma wrote: > >> Remove local variable inflight_counter ,as it is never used. > > "counter ,as" -> "counter, as" > >> Signed-off-by: Srishti Sharma >> --- >>

Re: [Outreachy kernel] [PATCH v3] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Srishti Sharma
On Thu, Sep 7, 2017 at 2:56 AM, Julia Lawall wrote: > > > On Thu, 7 Sep 2017, Srishti Sharma wrote: > >> On Thu, Sep 7, 2017 at 2:47 AM, Julia Lawall wrote: >> > >> > >> > On Thu, 7 Sep 2017, Srishti Sharma wrote: >> > >> >> Remove local variable

Re: [Outreachy kernel] [PATCH v3] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Julia Lawall
On Thu, 7 Sep 2017, Srishti Sharma wrote: > On Thu, Sep 7, 2017 at 2:47 AM, Julia Lawall wrote: > > > > > > On Thu, 7 Sep 2017, Srishti Sharma wrote: > > > >> Remove local variable inflight_counter ,as it is never used. > > > > "counter ,as" -> "counter, as" > > > >>

Re: [PATCH v3] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Srishti Sharma
On Thu, Sep 7, 2017 at 3:02 AM, Dan Carpenter wrote: > Always compile your patches. > > CC [M] drivers/staging/ccree/ssi_cipher.o > drivers/staging/ccree/ssi_cipher.c: In function ‘ssi_blkcipher_complete’: > drivers/staging/ccree/ssi_cipher.c:700:6: warning: unused

[PATCH v4] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Srishti Sharma
Remove local variable inflight_counter, as it is never used. Signed-off-by: Srishti Sharma --- Change in v4: -There is no longer a need to make the comment more comprehensible, as I have deleted the variable associated with it. The v3 of this patch was not based on

Re: [Outreachy kernel] [PATCH v3] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Julia Lawall
On Thu, 7 Sep 2017, Srishti Sharma wrote: > Remove local variable inflight_counter ,as it is never used. "counter ,as" -> "counter, as" > Signed-off-by: Srishti Sharma > --- > Changes in v3: > - There was no longer a need to make the comment more comprehensible as >

Re: [PATCH v3] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Dan Carpenter
Always compile your patches. CC [M] drivers/staging/ccree/ssi_cipher.o drivers/staging/ccree/ssi_cipher.c: In function ‘ssi_blkcipher_complete’: drivers/staging/ccree/ssi_cipher.c:700:6: warning: unused variable ‘inflight_counter’ [-Wunused-variable] u32 inflight_counter;

Re: [PATCH] crypto: authenc - cryptlen must be at least AAD len

2017-09-06 Thread Herbert Xu
On Wed, Sep 06, 2017 at 10:10:08PM +0200, Stephan Müller wrote: > Am Mittwoch, 6. September 2017, 21:22:44 CEST schrieb Stephan Müller: > > Hi Herbert, > > > With AF_ALG, AAD len and cryptlen can be set freely by unprivileged > > user space. The cipher implementation must therefore validate the

Re: [PATCH 06/12] x86/crypto: Fix RBP usage in sha1_avx2_x86_64_asm.S

2017-09-06 Thread Tim Chen
On 08/29/2017 11:05 AM, Josh Poimboeuf wrote: > Using RBP as a temporary register breaks frame pointer convention and > breaks stack traces when unwinding from an interrupt in the crypto code. > > Use R11 instead of RBP. Since R11 isn't a callee-saved register, it > doesn't need to be saved and

Re: [PATCH] crypto: authenc - cryptlen must be at least AAD len

2017-09-06 Thread Stephan Müller
Am Donnerstag, 7. September 2017, 05:54:05 CEST schrieb Herbert Xu: Hi Herbert, > > > > What is your opinion: should this check be rather added to > > crypto_aead_encrypt (similar to a sanity check found in > > crypto_aead_decrypt)? > > Doesn't this apply to decryption as well? There is

Re: [RFC Part2 PATCH v3 02/26] crypto: ccp: Add Platform Security Processor (PSP) device support

2017-09-06 Thread Borislav Petkov
On Mon, Jul 24, 2017 at 03:02:39PM -0500, Brijesh Singh wrote: > Platform Security Processor (PSP) is part of AMD Secure Processor (AMD-SP), > PSP is a dedicated processor that provides the support for key management > commands in a Secure Encrypted Virtualiztion (SEV) mode, along with >