mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
Merge tag 'v5.20-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu: "API: - Make proc files report fips module name and version Algorithms: - Move generic SHA1 code into lib/crypto - Implement Chinese Remainder Theorem for RSA - Remove blake2s - Add XCTR with x86/arm64 acceleration - Add POLYVAL with x86/arm64 acceleration - Add HCTR2 - Add ARIA Drivers: - Add support for new CCP/PSP device ID in ccp" * tag 'v5.20-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (89 commits) crypto: tcrypt - Remove the static variable initialisations to NULL crypto: arm64/poly1305 - fix a read out-of-bound crypto: hisilicon/zip - Use the bitmap API to allocate bitmaps crypto: hisilicon/sec - fix auth key size error crypto: ccree - Remove a useless dma_supported() call crypto: ccp - Add support for new CCP/PSP device ID crypto: inside-secure - Add missing MODULE_DEVICE_TABLE for of crypto: hisilicon/hpre - don't use GFP_KERNEL to alloc mem during softirq crypto: testmgr - some more fixes to RSA test vectors cyrpto: powerpc/aes - delete the rebundant word "block" in comments hwrng: via - Fix comment typo crypto: twofish - Fix comment typo crypto: rmd160 - fix Kconfig "its" grammar crypto: keembay-ocs-ecc - Drop if with an always false condition Documentation: qat: rewrite description Documentation: qat: Use code block for qat sysfs example crypto: lib - add module license to libsha1 crypto: lib - make the sha1 library optional crypto: lib - move lib/sha1.c into lib/crypto/ crypto: fips - make proc files report fips module name and version ...
This commit is contained in:
@@ -366,7 +366,7 @@ struct ccp_device {
|
||||
|
||||
/* Master lists that all cmds are queued on. Because there can be
|
||||
* more than one CCP command queue that can process a cmd a separate
|
||||
* backlog list is neeeded so that the backlog completion call
|
||||
* backlog list is needed so that the backlog completion call
|
||||
* completes before the cmd is available for execution.
|
||||
*/
|
||||
spinlock_t cmd_lock ____cacheline_aligned;
|
||||
|
||||
@@ -503,7 +503,7 @@ static int __sev_platform_shutdown_locked(int *error)
|
||||
struct sev_device *sev = psp_master->sev_data;
|
||||
int ret;
|
||||
|
||||
if (sev->state == SEV_STATE_UNINIT)
|
||||
if (!sev || sev->state == SEV_STATE_UNINIT)
|
||||
return 0;
|
||||
|
||||
ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, NULL, error);
|
||||
@@ -577,6 +577,8 @@ static int sev_ioctl_do_platform_status(struct sev_issue_cmd *argp)
|
||||
struct sev_user_data_status data;
|
||||
int ret;
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
|
||||
ret = __sev_do_cmd_locked(SEV_CMD_PLATFORM_STATUS, &data, &argp->error);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -630,7 +632,7 @@ static int sev_ioctl_do_pek_csr(struct sev_issue_cmd *argp, bool writable)
|
||||
if (input.length > SEV_FW_BLOB_MAX_SIZE)
|
||||
return -EFAULT;
|
||||
|
||||
blob = kmalloc(input.length, GFP_KERNEL);
|
||||
blob = kzalloc(input.length, GFP_KERNEL);
|
||||
if (!blob)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -854,7 +856,7 @@ static int sev_ioctl_do_get_id2(struct sev_issue_cmd *argp)
|
||||
input_address = (void __user *)input.address;
|
||||
|
||||
if (input.address && input.length) {
|
||||
id_blob = kmalloc(input.length, GFP_KERNEL);
|
||||
id_blob = kzalloc(input.length, GFP_KERNEL);
|
||||
if (!id_blob)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -973,14 +975,14 @@ static int sev_ioctl_do_pdh_export(struct sev_issue_cmd *argp, bool writable)
|
||||
if (input.cert_chain_len > SEV_FW_BLOB_MAX_SIZE)
|
||||
return -EFAULT;
|
||||
|
||||
pdh_blob = kmalloc(input.pdh_cert_len, GFP_KERNEL);
|
||||
pdh_blob = kzalloc(input.pdh_cert_len, GFP_KERNEL);
|
||||
if (!pdh_blob)
|
||||
return -ENOMEM;
|
||||
|
||||
data.pdh_cert_address = __psp_pa(pdh_blob);
|
||||
data.pdh_cert_len = input.pdh_cert_len;
|
||||
|
||||
cert_blob = kmalloc(input.cert_chain_len, GFP_KERNEL);
|
||||
cert_blob = kzalloc(input.cert_chain_len, GFP_KERNEL);
|
||||
if (!cert_blob) {
|
||||
ret = -ENOMEM;
|
||||
goto e_free_pdh;
|
||||
|
||||
@@ -427,6 +427,12 @@ static const struct sp_dev_vdata dev_vdata[] = {
|
||||
.bar = 2,
|
||||
#ifdef CONFIG_CRYPTO_DEV_SP_PSP
|
||||
.psp_vdata = &pspv2,
|
||||
#endif
|
||||
},
|
||||
{ /* 6 */
|
||||
.bar = 2,
|
||||
#ifdef CONFIG_CRYPTO_DEV_SP_PSP
|
||||
.psp_vdata = &pspv3,
|
||||
#endif
|
||||
},
|
||||
};
|
||||
@@ -438,6 +444,7 @@ static const struct pci_device_id sp_pci_table[] = {
|
||||
{ PCI_VDEVICE(AMD, 0x15DF), (kernel_ulong_t)&dev_vdata[4] },
|
||||
{ PCI_VDEVICE(AMD, 0x1649), (kernel_ulong_t)&dev_vdata[4] },
|
||||
{ PCI_VDEVICE(AMD, 0x14CA), (kernel_ulong_t)&dev_vdata[5] },
|
||||
{ PCI_VDEVICE(AMD, 0x15C7), (kernel_ulong_t)&dev_vdata[6] },
|
||||
/* Last entry must be zero */
|
||||
{ 0, }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user