[PATCH v2] crypto: ccp - Make ccp_dev_suspend and ccp_dev_resume void functions

2021-04-15 Thread Tian Tao
Since ccp_dev_suspend() and ccp_dev_resume() only return 0 which causes ret to equal 0 in sp_suspend and sp_resume, making the if condition impossible to use. it might be a more appropriate fix to have these be void functions and eliminate the if condition in sp_suspend() and sp_resume(). Signed-o

Re: [PATCH v2 0/8] ccp: KVM: SVM: Use stack for SEV command buffers

2021-04-15 Thread Herbert Xu
On Thu, Apr 15, 2021 at 01:15:59PM -0500, Tom Lendacky wrote: > On 4/15/21 11:09 AM, Paolo Bonzini wrote: > > On 07/04/21 20:00, Tom Lendacky wrote: > >> For the series: > >> > >> Acked-by: Tom Lendacky > > > > Shall I take this as a request (or permission, whatever :)) to merge it > > through the

Re: [RFC Part2 PATCH 02/30] x86/sev-snp: add RMP entry lookup helpers

2021-04-15 Thread Brijesh Singh
On 4/15/21 2:50 PM, Borislav Petkov wrote: > On Thu, Apr 15, 2021 at 01:08:09PM -0500, Brijesh Singh wrote: >> This is from Family 19h Model 01h Rev B01. The processor which >> introduces the SNP feature. Yes, I have already upload the PPR on the BZ. >> >> The PPR is also available at AMD: >> ht

Re: [PATCH v8 1/1] use crc32 instead of md5 for hibernation e820 integrity check

2021-04-15 Thread Eric Biggers
On Thu, Apr 15, 2021 at 03:46:46PM -0400, Chris von Recklinghausen wrote: > Hibernation fails on a system in fips mode because md5 is used for the e820 > integrity check and is not available. Use crc32 instead. > > This patch changes the integrity check algorithm from md5 to crc32. The second par

Re: [RFC Part2 PATCH 02/30] x86/sev-snp: add RMP entry lookup helpers

2021-04-15 Thread Borislav Petkov
On Thu, Apr 15, 2021 at 01:08:09PM -0500, Brijesh Singh wrote: > This is from Family 19h Model 01h Rev B01. The processor which > introduces the SNP feature. Yes, I have already upload the PPR on the BZ. > > The PPR is also available at AMD: https://www.amd.com/en/support/tech-docs Please add the

[PATCH v8 1/1] use crc32 instead of md5 for hibernation e820 integrity check

2021-04-15 Thread Chris von Recklinghausen
Hibernation fails on a system in fips mode because md5 is used for the e820 integrity check and is not available. Use crc32 instead. This patch changes the integrity check algorithm from md5 to crc32. The check is intended to detect whether the E820 memory map provided by the firmware after cold

Re: [PATCH v2 0/8] ccp: KVM: SVM: Use stack for SEV command buffers

2021-04-15 Thread Tom Lendacky
On 4/15/21 11:09 AM, Paolo Bonzini wrote: > On 07/04/21 20:00, Tom Lendacky wrote: >> For the series: >> >> Acked-by: Tom Lendacky > > Shall I take this as a request (or permission, whatever :)) to merge it > through the KVM tree? Adding Herbert. Here's a link to the series: https://lore.kernel.

Re: [RFC Part2 PATCH 03/30] x86: add helper functions for RMPUPDATE and PSMASH instruction

2021-04-15 Thread Brijesh Singh
On 4/15/21 1:00 PM, Borislav Petkov wrote: > On Wed, Mar 24, 2021 at 12:04:09PM -0500, Brijesh Singh wrote: >> diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c >> index 06394b6d56b2..7a0138cb3e17 100644 >> --- a/arch/x86/mm/mem_encrypt.c >> +++ b/arch/x86/mm/mem_encrypt.c >> @@

Re: [RFC Part2 PATCH 02/30] x86/sev-snp: add RMP entry lookup helpers

2021-04-15 Thread Brijesh Singh
On 4/15/21 12:03 PM, Borislav Petkov wrote: > On Wed, Mar 24, 2021 at 12:04:08PM -0500, Brijesh Singh wrote: >> diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c > Also, why is all this SNP stuff landing in this file instead of in sev.c > or so which is AMD-specific? > I don't ha

Re: [RFC Part2 PATCH 02/30] x86/sev-snp: add RMP entry lookup helpers

2021-04-15 Thread Brijesh Singh
Hi Boris, On 4/15/21 11:57 AM, Borislav Petkov wrote: > On Wed, Mar 24, 2021 at 12:04:08PM -0500, Brijesh Singh wrote: >> The lookup_page_in_rmptable() can be used by the host to read the RMP >> entry for a given page. The RMP entry format is documented in PPR >> section 2.1.5.2. > I see > > Tabl

Re: [RFC Part2 PATCH 03/30] x86: add helper functions for RMPUPDATE and PSMASH instruction

2021-04-15 Thread Borislav Petkov
On Wed, Mar 24, 2021 at 12:04:09PM -0500, Brijesh Singh wrote: > diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c > index 06394b6d56b2..7a0138cb3e17 100644 > --- a/arch/x86/mm/mem_encrypt.c > +++ b/arch/x86/mm/mem_encrypt.c > @@ -644,3 +644,44 @@ rmpentry_t *lookup_page_in_rmptabl

Re: [RFC Part2 PATCH 02/30] x86/sev-snp: add RMP entry lookup helpers

2021-04-15 Thread Borislav Petkov
On Wed, Mar 24, 2021 at 12:04:08PM -0500, Brijesh Singh wrote: > diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c Also, why is all this SNP stuff landing in this file instead of in sev.c or so which is AMD-specific? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/n

Re: [RFC Part2 PATCH 02/30] x86/sev-snp: add RMP entry lookup helpers

2021-04-15 Thread Borislav Petkov
On Wed, Mar 24, 2021 at 12:04:08PM -0500, Brijesh Singh wrote: > The lookup_page_in_rmptable() can be used by the host to read the RMP > entry for a given page. The RMP entry format is documented in PPR > section 2.1.5.2. I see Table 15-36. Fields of an RMP Entry in the APM. Which PPR do you me

Re: [PATCH v2 0/8] ccp: KVM: SVM: Use stack for SEV command buffers

2021-04-15 Thread Paolo Bonzini
On 07/04/21 20:00, Tom Lendacky wrote: For the series: Acked-by: Tom Lendacky Shall I take this as a request (or permission, whatever :)) to merge it through the KVM tree? Paolo

Re: [PATCH] crypto: ccp - Make ccp_dev_suspend and ccp_dev_resume void functions

2021-04-15 Thread Tom Lendacky
On 4/15/21 1:03 AM, Tian Tao wrote: > Since ccp_dev_suspend() and ccp_dev_resume() only return 0 which causes > ret to equal 0 in sp_suspend and sp_resume, making the if condition > impossible to use. it might be a more appropriate fix to have these be > void functions and eliminate the if conditio

[PATCH] crypto: octeontx2: add support for OcteonTX2 98xx CPT block.

2021-04-15 Thread Srujana Challa
OcteonTX2 series of silicons have multiple variants, the 98xx variant has two crypto (CPT0 & CPT1) blocks. This patch adds support for firmware load on new CPT block(CPT1). Signed-off-by: Srujana Challa --- .../marvell/octeontx2/otx2_cpt_common.h | 10 +- .../marvell/octeontx2/otx2_cpt_mb

Re: [PATCH 2/4] PKCS#7: Check codeSigning EKU for kernel module and kexec pe verification

2021-04-15 Thread Varad Gautam
Hi Joey, On 4/9/21 4:46 AM, Lee, Chun-Yi wrote: > This patch adds the logic for checking the CodeSigning extended > key usage when verifying signature of kernel module or > kexec PE binary in PKCS#7. > > Signed-off-by: "Lee, Chun-Yi" > --- > certs/system_keyring.c | 2 +- > crypt

[PATCH] chelsio/chcr: Remove useless MODULE_VERSION

2021-04-15 Thread Vinay Kumar Yadav
kernel version describes module state more accurately. hence remove chcr versioning. Signed-off-by: Vinay Kumar Yadav --- drivers/crypto/chelsio/chcr_core.c | 3 +-- drivers/crypto/chelsio/chcr_core.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/chelsio/chc