Re: [Part2 PATCH v6 13/38] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-27 Thread Borislav Petkov
On Fri, Oct 27, 2017 at 05:59:23PM -0500, Brijesh Singh wrote: > Yes it is typo. PEK_GEN wants FW to be in INIT state hence someone need > to transition from UNINIT -> INIT. Which, once you've done it once on driver init, is there. > That's what I am doing except FACTORY_RESET. Well, not

Re: [Part2 PATCH v6 13/38] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-27 Thread Borislav Petkov
On Fri, Oct 27, 2017 at 04:28:31PM -0500, Brijesh Singh wrote: > This will fail because PEK_GEN require the platform in INIT state and > nobody has done the state transition from INIT -> UINIT. Huh, FW is in INIT state and PEK_GEN wants it to be in INIT state. Typo? Aaanyway, I don't like this

Re: [Part2 PATCH v6 13/38] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-27 Thread Brijesh Singh
On 10/27/17 3:27 PM, Borislav Petkov wrote: > On Fri, Oct 27, 2017 at 03:25:24PM -0500, Brijesh Singh wrote: >> Yep, we are doing state transition only when we really need to. At least >> so far I have tried to avoid making any unnecessary state transitions. > So change all those which do INIT

Re: [Part2 PATCH v6 13/38] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-27 Thread Borislav Petkov
On Fri, Oct 27, 2017 at 03:25:24PM -0500, Brijesh Singh wrote: > Yep, we are doing state transition only when we really need to. At least > so far I have tried to avoid making any unnecessary state transitions. So change all those which do INIT -> CMD -> SHUTDOWN to do only the command as the

Re: [Part2 PATCH v6 13/38] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-27 Thread Brijesh Singh
On 10/27/17 3:15 PM, Borislav Petkov wrote: > On Fri, Oct 27, 2017 at 06:28:38AM -0500, Brijesh Singh wrote: >> ... User can retry the command sometime later when nobody else is >> using the PSP. > That still doesn't prevent you from doing two things: > > * make that fw_init_count a proper kref

Re: [Part2 PATCH v6 13/38] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-27 Thread Borislav Petkov
On Fri, Oct 27, 2017 at 06:28:38AM -0500, Brijesh Singh wrote: > ... User can retry the command sometime later when nobody else is > using the PSP. That still doesn't prevent you from doing two things: * make that fw_init_count a proper kref instead of your homegrown thing * do not preemptively

[PATCH net-next 2/2] chcr: Add support for Inline IPSec

2017-10-27 Thread Atul Gupta
register xfrmdev_ops callbacks, Send IPsec tunneled data to HW for inline processing. The driver use hardware crypto accelerator to encrypt and generate ICV for the transmitted packet in Inline mode. Signed-off-by: Atul Gupta Signed-off-by: Harsh Jain

[PATCH net-next 1/2] cxgb4: Add support for Inline IPSec Tx

2017-10-27 Thread Atul Gupta
Added Tx routine for ULD - define interface for ULD Tx. Export routines used for Tx data - Routines common for data transmit are used by cxgb4 and chcr drivers. - EXPORT routines enable transmit from chcr driver. Signed-off-by: Atul Gupta Signed-off-by: Ganesh Goudar

[PATCH] hw_random: core: Reset user selected rng by writing "" to rng_current

2017-10-27 Thread PrasannaKumar Muralidharan
User is able to select a chosen rng by writing its name to rng_current but there is no way to reset it without unbinding the rng. Let user write "" to rng_current and delesect the chosen rng. Signed-off-by: PrasannaKumar Muralidharan --- drivers/char/hw_random/core.c

[PATCH v2] staging: ccree: Fix indentation in ssi_buffer_mgr.c

2017-10-27 Thread Stephen Brennan
In particular, fixes some over-indented if statement bodies as well as a couple lines indented with spaces. checkpatch.pl now reports no warnings on this file other than 80 character warnings. Signed-off-by: Stephen Brennan --- V2 also fixes an overlooked indentation error

Re: [PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c

2017-10-27 Thread Stephen Brennan
On Fri, Oct 27, 2017 at 07:23:58AM -0700, Joe Perches wrote: > On Fri, 2017-10-27 at 11:32 +0300, Dan Carpenter wrote: > > But then ssi_buffer_mgr_copy_scatterlist_portion() is still not indented > > correctly. Yeah, I don't know how I missed it. I'll send a new version of the patch out

Re: [PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c

2017-10-27 Thread Joe Perches
On Fri, 2017-10-27 at 11:32 +0300, Dan Carpenter wrote: > On Thu, Oct 26, 2017 at 06:53:42PM -0700, Stephen Brennan wrote: > > In particular, fixes some over-indented if statement bodies as well as a > > couple lines indented with spaces. checkpatch.pl now reports no warnings > > on this file

Re: [PATCH 0/4] add CAAM DMA memcpy driver

2017-10-27 Thread Horia Geantă
On 10/27/2017 2:36 PM, Koul, Vinod wrote: >> On 10/26/2017 1:01 PM, Radu Alexe wrote: >>> This patch-set introduces a new DMA memcpy driver based on the DMA >>> capabilities of the CAAM crypto engine. Because of this dependency the >>> included commits target various parts of the kernel tree. >> I

Re: Kernel panic when using ccm(aes) with the Atmel AES HW accelerator

2017-10-27 Thread Romain Izard
2017-10-26 14:34 GMT+02:00 Tudor Ambarus : > Hi, Romain, > > On 10/18/2017 04:32 PM, Romain Izard wrote: >> >> diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c >> index 29e20c37f3a6..f3eabe1f1490 100644 >> --- a/drivers/crypto/atmel-aes.c >> +++

RE: [PATCH 0/4] add CAAM DMA memcpy driver

2017-10-27 Thread Koul, Vinod
> On 10/26/2017 1:01 PM, Radu Alexe wrote: > > This patch-set introduces a new DMA memcpy driver based on the DMA > > capabilities of the CAAM crypto engine. Because of this dependency the > > included commits target various parts of the kernel tree. > I don't see the patches on any of the mail

Re: [Part2 PATCH v6 13/38] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-27 Thread Brijesh Singh
On 10/27/17 2:56 AM, Borislav Petkov wrote: > On Thu, Oct 26, 2017 at 03:59:32PM -0500, Brijesh Singh wrote: >> we can workaround #1 by adding some hooks in sp_pci_init() to invoke the PSP >> initialization routines after pci_register_driver() is done but #2 can get >> painful because it will

Re: [PATCH 0/4] add CAAM DMA memcpy driver

2017-10-27 Thread Horia Geantă
On 10/26/2017 1:01 PM, Radu Alexe wrote: > This patch-set introduces a new DMA memcpy driver based on the DMA > capabilities of the CAAM crypto engine. Because of this dependency the > included commits target various parts of the kernel tree. I don't see the patches on any of the mail lists. If

Re: [PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c

2017-10-27 Thread Dan Carpenter
On Thu, Oct 26, 2017 at 06:53:42PM -0700, Stephen Brennan wrote: > In particular, fixes some over-indented if statement bodies as well as a > couple lines indented with spaces. checkpatch.pl now reports no warnings > on this file other than 80 character warnings. > > Signed-off-by: Stephen

Re: [Part2 PATCH v6 13/38] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-27 Thread Borislav Petkov
On Thu, Oct 26, 2017 at 03:59:32PM -0500, Brijesh Singh wrote: > we can workaround #1 by adding some hooks in sp_pci_init() to invoke the PSP > initialization routines after pci_register_driver() is done but #2 can get > painful because it will require us calling the SHUTDOWN outside the >