mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
Merge tag 'v7.1-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu:
"API:
- Replace crypto_get_default_rng with crypto_stdrng_get_bytes
- Remove simd skcipher support
- Allow algorithm types to be disabled when CRYPTO_SELFTESTS is off
Algorithms:
- Remove CPU-based des/3des acceleration
- Add test vectors for authenc(hmac(md5),cbc({aes,des})) and
authenc(hmac({md5,sha1,sha224,sha256,sha384,sha512}),rfc3686(ctr(aes)))
- Replace spin lock with mutex in jitterentropy
Drivers:
- Add authenc algorithms to safexcel
- Add support for zstd in qat
- Add wireless mode support for QAT GEN6
- Add anti-rollback support for QAT GEN6
- Add support for ctr(aes), gcm(aes), and ccm(aes) in dthev2"
* tag 'v7.1-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (129 commits)
crypto: af_alg - use sock_kmemdup in alg_setkey_by_key_serial
crypto: vmx - remove CRYPTO_DEV_VMX from Kconfig
crypto: omap - convert reqctx buffer to fixed-size array
crypto: atmel-sha204a - add Thorsten Blum as maintainer
crypto: atmel-ecc - add Thorsten Blum as maintainer
crypto: qat - fix IRQ cleanup on 6xxx probe failure
crypto: geniv - Remove unused spinlock from struct aead_geniv_ctx
crypto: qce - simplify qce_xts_swapiv()
crypto: hisilicon - Fix dma_unmap_single() direction
crypto: talitos - rename first/last to first_desc/last_desc
crypto: talitos - fix SEC1 32k ahash request limitation
crypto: jitterentropy - replace long-held spinlock with mutex
crypto: hisilicon - remove unused and non-public APIs for qm and sec
crypto: hisilicon/qm - drop redundant variable initialization
crypto: hisilicon/qm - remove else after return
crypto: hisilicon/qm - add const qualifier to info_name in struct qm_cmd_dump_item
crypto: hisilicon - fix the format string type error
crypto: ccree - fix a memory leak in cc_mac_digest()
crypto: qat - add support for zstd
crypto: qat - use swab32 macro
...
This commit is contained in:
@@ -1965,11 +1965,11 @@ static int sev_get_firmware(struct device *dev,
|
||||
/* Don't fail if SEV FW couldn't be updated. Continue with existing SEV FW */
|
||||
static int sev_update_firmware(struct device *dev)
|
||||
{
|
||||
struct sev_data_download_firmware *data;
|
||||
struct sev_data_download_firmware data;
|
||||
const struct firmware *firmware;
|
||||
int ret, error, order;
|
||||
struct page *p;
|
||||
u64 data_size;
|
||||
void *fw_blob;
|
||||
|
||||
if (!sev_version_greater_or_equal(0, 15)) {
|
||||
dev_dbg(dev, "DOWNLOAD_FIRMWARE not supported\n");
|
||||
@@ -1981,16 +1981,7 @@ static int sev_update_firmware(struct device *dev)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* SEV FW expects the physical address given to it to be 32
|
||||
* byte aligned. Memory allocated has structure placed at the
|
||||
* beginning followed by the firmware being passed to the SEV
|
||||
* FW. Allocate enough memory for data structure + alignment
|
||||
* padding + SEV FW.
|
||||
*/
|
||||
data_size = ALIGN(sizeof(struct sev_data_download_firmware), 32);
|
||||
|
||||
order = get_order(firmware->size + data_size);
|
||||
order = get_order(firmware->size);
|
||||
p = alloc_pages(GFP_KERNEL, order);
|
||||
if (!p) {
|
||||
ret = -1;
|
||||
@@ -2001,20 +1992,20 @@ static int sev_update_firmware(struct device *dev)
|
||||
* Copy firmware data to a kernel allocated contiguous
|
||||
* memory region.
|
||||
*/
|
||||
data = page_address(p);
|
||||
memcpy(page_address(p) + data_size, firmware->data, firmware->size);
|
||||
fw_blob = page_address(p);
|
||||
memcpy(fw_blob, firmware->data, firmware->size);
|
||||
|
||||
data->address = __psp_pa(page_address(p) + data_size);
|
||||
data->len = firmware->size;
|
||||
data.address = __psp_pa(fw_blob);
|
||||
data.len = firmware->size;
|
||||
|
||||
ret = sev_do_cmd(SEV_CMD_DOWNLOAD_FIRMWARE, data, &error);
|
||||
ret = sev_do_cmd(SEV_CMD_DOWNLOAD_FIRMWARE, &data, &error);
|
||||
|
||||
/*
|
||||
* A quirk for fixing the committed TCB version, when upgrading from
|
||||
* earlier firmware version than 1.50.
|
||||
*/
|
||||
if (!ret && !sev_version_greater_or_equal(1, 50))
|
||||
ret = sev_do_cmd(SEV_CMD_DOWNLOAD_FIRMWARE, data, &error);
|
||||
ret = sev_do_cmd(SEV_CMD_DOWNLOAD_FIRMWARE, &data, &error);
|
||||
|
||||
if (ret)
|
||||
dev_dbg(dev, "Failed to update SEV firmware: %#x\n", error);
|
||||
|
||||
Reference in New Issue
Block a user