Re: [RFC Part2 PATCH v3 03/26] crypto: ccp: Add Secure Encrypted Virtualization (SEV) device support

2017-09-13 Thread Brijesh Singh
On 09/13/2017 09:17 AM, Borislav Petkov wrote: ... + +unlock: + mutex_unlock(_cmd_mutex); + print_hex_dump_debug("(out): ", DUMP_PREFIX_OFFSET, 16, 2, data, + sev_cmd_buffer_len(cmd), false); + return ret; ... and here you return psp_ret == 0 even

Re: [PATCH 06/10] drivers:ethernet: return -ENOMEM on allocation failure.

2017-09-13 Thread David Miller
From: Allen Pais Date: Wed, 13 Sep 2017 13:02:15 +0530 > Signed-off-by: Allen Pais This is quite pointless as the caller doesn't do anything with the value, it just tests whether a negative value is returned or not.

Re: [PATCH 10/10] fs:btrfs: return -ENOMEM on allocation failure.

2017-09-13 Thread David Sterba
On Wed, Sep 13, 2017 at 01:02:19PM +0530, Allen Pais wrote: > Signed-off-by: Allen Pais > --- > fs/btrfs/check-integrity.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c > index

Re: Announce loop-AES-v3.7l file/swap crypto package

2017-09-13 Thread Markus Reichelt
* Jari Ruusu wrote: > loop-AES changes since previous release: > - Worked around kernel interface changes on 4.13 kernels. > - Added second util-linux patch to work around gpg 2 pinentry-mode bug. Thank you!

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

2017-09-13 Thread Mathieu Malaterre
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 the seed() function pointer is optional in header. Signed-off-by: Mathieu Malaterre --- The PRNG as found on Ingenic JZ4780 is

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

2017-09-13 Thread Josh Poimboeuf
On Fri, Sep 08, 2017 at 10:57:05AM -0700, Eric Biggers wrote: > On Thu, Sep 07, 2017 at 11:26:47PM +0200, Ingo Molnar wrote: > > > > * Eric Biggers wrote: > > > > > On Thu, Sep 07, 2017 at 09:15:34AM +0200, Ingo Molnar wrote: > > > > > > > > * Eric Biggers

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

2017-09-13 Thread Josh Poimboeuf
On Wed, Sep 13, 2017 at 04:24:28PM -0500, Josh Poimboeuf wrote: > On Fri, Sep 08, 2017 at 10:57:05AM -0700, Eric Biggers wrote: > > On Thu, Sep 07, 2017 at 11:26:47PM +0200, Ingo Molnar wrote: > > > > > > * Eric Biggers wrote: > > > > > > > On Thu, Sep 07, 2017 at

Re: [PATCH 01/10] arch:powerpc: return -ENOMEM on failed allocation

2017-09-13 Thread Allen
> I think the changelog for this series of conversions > should show that you've validated the change by > inspecting the return call chain at each modified line. > > Also, it seems you've cc'd the same mailing lists for > all of the patches modified by this series. > > It would be better to

[PATCH 01/10] arch:powerpc: return -ENOMEM on failed allocation

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- arch/powerpc/platforms/cell/spider-pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/cell/spider-pci.c b/arch/powerpc/platforms/cell/spider-pci.c index d1e61e2..82aa3f7 100644 ---

[PATCH 03/10] driver:gpu: return -ENOMEM on allocation failure.

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- drivers/gpu/drm/gma500/mid_bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/mid_bios.c b/drivers/gpu/drm/gma500/mid_bios.c index d75ecb3..1fa1633 100644 --- a/drivers/gpu/drm/gma500/mid_bios.c

[PATCH 08/10] driver:cxgbit: return -NOMEM on allocation failure.

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- drivers/target/iscsi/cxgbit/cxgbit_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/iscsi/cxgbit/cxgbit_target.c b/drivers/target/iscsi/cxgbit/cxgbit_target.c index 514986b..47127d6 100644 ---

[PATCH 09/10] driver:video: return -ENOMEM on allocation failure.

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- drivers/video/fbdev/matrox/matroxfb_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c index f6a0b9a..5cd238d 100644 ---

[PATCH 10/10] fs:btrfs: return -ENOMEM on allocation failure.

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- fs/btrfs/check-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c index 7d5a9b5..efa4c23 100644 --- a/fs/btrfs/check-integrity.c +++

[PATCH 06/10] drivers:ethernet: return -ENOMEM on allocation failure.

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- drivers/net/ethernet/sun/cassini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c index 382993c..fc0ea3a 100644 ---

[PATCH 04/10] drivers:mpt: return -ENOMEM on allocation failure.

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- drivers/message/fusion/mptbase.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 84eab28..7920b2b 100644 ---

[PATCH 02/10] drivers:crypto: return -ENOMEM on allocation failure.

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- drivers/crypto/omap-aes-gcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/omap-aes-gcm.c b/drivers/crypto/omap-aes-gcm.c index 7d4f8a4..2542224 100644 --- a/drivers/crypto/omap-aes-gcm.c +++

[PATCH 05/10] drivers:net: return -ENOMEM on allocation failure.

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- drivers/net/bonding/bond_alb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index c02cc81..89df377 100644 --- a/drivers/net/bonding/bond_alb.c +++

[PATCH 07/10] driver:megaraid: return -ENOMEM on allocation failure.

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- drivers/scsi/megaraid/megaraid_mbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index ec3c438..b09a0a6 100644 ---

[PATCH] crypto: s5p-sss: Add HASH support for Exynos

2017-09-13 Thread Kamil Konieczny
Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. It uses the crypto framework asynchronous hash api. It is based on omap-sham.c driver. S5P has some HW differencies and is not implemented. Modifications in s5p-sss: - Add hash supporting structures and functions. - Modify irq

Re: [PATCH 06/10] drivers:ethernet: return -ENOMEM on allocation failure.

2017-09-13 Thread Allen
> > static int cas_alloc_rxds(struct cas *cp) > { > int i; > > for (i = 0; i < N_RX_DESC_RINGS; i++) { > if (cas_alloc_rx_desc(cp, i) < 0) { > cas_free_rxds(cp); > return -1; > } > } >

Re: [PATCH 05/10] drivers:net: return -ENOMEM on allocation failure.

2017-09-13 Thread Allen
> propagates the -1. That is only called by bond_open() with: > > if (bond_alb_initialize(bond, (BOND_MODE(bond) == BOND_MODE_ALB))) > return -ENOMEM; > > So you might want to also modify this code, to return the return > value, rather than use the hard coded ENOMEM. >

[PATCH] crypto: talitos - fix sha224

2017-09-13 Thread Christophe Leroy
Kernel crypto tests report the following error at startup [2.752626] alg: hash: Test 4 failed for sha224-talitos [2.757907] : 30 e2 86 e2 e7 8a dd 0d d7 eb 9f d5 83 fe f1 b0 0010: 2d 5a 6c a5 f9 55 ea fd 0e 72 05 22 This patch fixes it Signed-off-by: Christophe Leroy

[PATCH] crypto: talitos - fix hashing

2017-09-13 Thread Christophe Leroy
md5sum on some files gives wrong result Exemple: With the md5sum from libkcapi: c15115c05bad51113f81bdaee735dd09 test With the original md5sum: bbdf41d80ba7e8b2b7be3a0772be76cb test This patch fixes this issue Signed-off-by: Christophe Leroy ---

Re: [PATCH] crypto: s5p-sss: Add HASH support for Exynos

2017-09-13 Thread Krzysztof Kozlowski
On Wed, Sep 13, 2017 at 2:44 PM, Kamil Konieczny wrote: > Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. > It uses the crypto framework asynchronous hash api. > It is based on omap-sham.c driver. > S5P has some HW differencies and is not

Re: [PATCH 06/10] drivers:ethernet: return -ENOMEM on allocation failure.

2017-09-13 Thread Andrew Lunn
On Wed, Sep 13, 2017 at 01:02:15PM +0530, Allen Pais wrote: > Signed-off-by: Allen Pais > --- > drivers/net/ethernet/sun/cassini.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/sun/cassini.c >

Re: [PATCH 05/10] drivers:net: return -ENOMEM on allocation failure.

2017-09-13 Thread Andrew Lunn
On Wed, Sep 13, 2017 at 01:02:14PM +0530, Allen Pais wrote: > Signed-off-by: Allen Pais Hi Allen Although correct, if you look higher up the call chain, this appears to be not so useful. rlb_initialize() is only called by bond_alb_initialize(), and it propagates the -1.

[PATCH] crypto: af_alg - Fix chained tsgl construction

2017-09-13 Thread Herbert Xu
When af_alg_pull_tsgl encounters a chained tsgl list, it will produce a bogus SG list because the output index gets incorrectly reset to zero when we move to the next chained list. This patch fixes it by moving the index initialisation outside the loop. Fixes: e870456d8e7c ("crypto:

Re: [RFC Part2 PATCH v3 03/26] crypto: ccp: Add Secure Encrypted Virtualization (SEV) device support

2017-09-13 Thread Borislav Petkov
On Mon, Jul 24, 2017 at 03:02:40PM -0500, Brijesh Singh wrote: > AMDs new Secure Encrypted Virtualization (SEV) feature allows the memory > contents of a virtual machine to be transparently encrypted with a key > unique to the guest VM. The programming and management of the encryption > keys are

Re: [PATCH] crypto: s5p-sss: Add HASH support for Exynos

2017-09-13 Thread Kamil Konieczny
Hi Krzysztof, On 13.09.2017 15:18, Krzysztof Kozlowski wrote: > On Wed, Sep 13, 2017 at 2:44 PM, Kamil Konieczny > wrote: >> Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. >> It uses the crypto framework asynchronous hash api. >> It is based on