Re: [Part2 PATCH v5.1 12.1/31] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-08 Thread Borislav Petkov
On Sun, Oct 08, 2017 at 08:30:47AM -0500, Brijesh Singh wrote: > During the device probe, sev_ops_init() will be called for every device > instance which claims to support the SEV.  One of the device will be > 'master' but we don't the master until we probe all the instances. Hence > the probe for

Re: [RFC PATCH] crypto: make the seed() function optional

2017-10-08 Thread PrasannaKumar Muralidharan
Hi Herbert, On 7 October 2017 at 09:03, Herbert Xu wrote: > Mathieu Malaterre wrote: >> This makes it simplier for driver author to not provide the seed() function >> in case of a pseudo RNG where the seed operation is a no-op. >> >> Document that

Re: [Part2 PATCH v5.1 12.1/31] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-08 Thread Brijesh Singh
On 10/7/17 1:40 PM, Borislav Petkov wrote: ... > A bunch of fixes ontop: > > * sev_fops_registered is superfluous if you can use psp->has_sev_fops I am okay with all your fixes except this one. I will add my comment below. ... > static int sev_ops_init(struct psp_device *psp) > { >

[PATCH 0/2] crypto: lrw - Fixes for the 'create()' function

2017-10-08 Thread Christophe JAILLET
The first patch is the same as the one committed for crypto/xts.c applied a few days ago. (commit 5125e4e867ab ("crypto: xts - Fix an error handling path in 'create()'") in /git/herbert/crypto-2.6.git) The 2nd one is a pure speculation from me. The create function in 'crypto/xts.c' and

[PATCH 2/2] crypto: lrw - Check for incorrect cipher name

2017-10-08 Thread Christophe JAILLET
If the cipher name does not start with 'ecb(' we should bail out, as done in the 'create()' function in 'crypto/xts.c'. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Signed-off-by: Christophe JAILLET --- This patch is 100% speculative. It is based on

[PATCH 1/2] crypto: lrw - Fix an error handling path in 'create()'

2017-10-08 Thread Christophe JAILLET
All error handling paths 'goto err_drop_spawn' except this one. In order to avoid some resources leak, we should do it as well here. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Signed-off-by: Christophe JAILLET --- crypto/lrw.c | 6 -- 1 file

[PATCH v2 3/7] crypto:gf128mul: The x8_ble multiplication functions

2017-10-08 Thread Harsh Jain
It multiply GF(2^128) elements in the ble format. It will be used by chelsio driver to speed up gf multiplication. Signed-off-by: Harsh Jain --- crypto/gf128mul.c | 13 + include/crypto/gf128mul.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-)

[PATCH v2 6/7] crypto:chelsio:Move DMA un/mapping to chcr from lld cxgb4 driver

2017-10-08 Thread Harsh Jain
Allow chcr to do DMA mapping/Unmapping instead of lld cxgb4. It moves "Copy AAD to dst buffer" requirement from driver to firmware. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 1645 ++ drivers/crypto/chelsio/chcr_algo.h

[PATCH v2 4/7] crypto:chelsio:Use x8_ble gf multiplication to calculate IV.

2017-10-08 Thread Harsh Jain
gf128mul_x8_ble() will reduce gf Multiplication iteration by 8. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 11 +-- drivers/crypto/chelsio/chcr_crypto.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git

[PATCH v2 2/7] crypto:chelsio: Check error code with IS_ERR macro

2017-10-08 Thread Harsh Jain
From: Yeshaswi M R Gowda Check and return proper error code. Signed-off-by: Jitendra Lulla Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 16 1 file changed, 8 insertions(+), 8 deletions(-)

[PATCH v2 5/7] crypto:chelsio:Remove allocation of sg list to implement 2K limit of dsgl header

2017-10-08 Thread Harsh Jain
Update DMA address index instead of allocating new sg list to impose 2k size limit for each entry. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 237 +++ drivers/crypto/chelsio/chcr_algo.h | 3 +-

[PATCH v2 1/7] crypto:chelsio: Remove unused parameter

2017-10-08 Thread Harsh Jain
From: Yeshaswi M R Gowda Remove unused parameter sent to latest fw. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 43 +++--- drivers/crypto/chelsio/chcr_algo.h | 12 +-- 2 files changed, 23

[PATCH v2 7/7] crypto:chelsio: Fix memory leak

2017-10-08 Thread Harsh Jain
Fix memory leak when device does not support crypto. Reported-by: Dan Carpenter Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [Part2 PATCH v5.1 12.2/31] crypto: ccp: Define SEV userspace ioctl and command id

2017-10-08 Thread Brijesh Singh
On 10/7/17 9:20 AM, Borislav Petkov wrote: > On Fri, Oct 06, 2017 at 08:06:00PM -0500, Brijesh Singh wrote: >> Add a include file which defines the ioctl and command id used for >> issuing SEV platform management specific commands. >> >> Cc: Paolo Bonzini >> Cc: "Radim

Re: [Part2 PATCH v5 11/31] crypto: ccp: Define SEV key management command id

2017-10-08 Thread Brijesh Singh
On 10/5/17 3:56 PM, Borislav Petkov wrote: > On Wed, Oct 04, 2017 at 08:13:52AM -0500, Brijesh Singh wrote: >> Define Secure Encrypted Virtualization (SEV) key management command id >> and structure. The command definition is available in SEV KM [1] spec >> 0.14. >> >> [1]

[PATCH] chacha20-ssse3/avx2: satisfy stack validation 2.0

2017-10-08 Thread Jason A. Donenfeld
The new stack validator in objdump doesn't like directly assigning r11 to rsp, warning with something like: warning: objtool: chacha20_4block_xor_ssse3()+0xa: unsupported stack pointer realignment warning: objtool: chacha20_8block_xor_avx2()+0x6: unsupported stack pointer realignment This

Re: [PATCH] chacha20-ssse3/avx2: satisfy stack validation 2.0

2017-10-08 Thread Jason A. Donenfeld
s/objdump/objtool/g obviously.

Re: [Part2 PATCH v5.1 12.1/31] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-08 Thread Brijesh Singh
On 10/8/17 9:00 AM, Borislav Petkov wrote: > On Sun, Oct 08, 2017 at 08:30:47AM -0500, Brijesh Singh wrote: >> During the device probe, sev_ops_init() will be called for every device >> instance which claims to support the SEV.  One of the device will be >> 'master' but we don't the master until