Skip to content

Commit f3be0fd

Browse files
author
CKI KWF Bot
committed
Merge: crypto: ccp: update ccp drivers to v6.18
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7363 ``` JIRA: https://issues.redhat.com/browse/RHEL-106910 Upstream Status: 23 commits are merged into the linux.git 1 commit is in the herbert/crypto-2.6 10 commit are in the herbert/cryptodev-2.6.git CVE: CVE-2025-38581 CVE: CVE-2025-39729 Bring in the latest CCP drivers bugfixes and updates. All the commits apply cleanly, no conflicts, except 2 small context differences. Signed-off-by: Vladis Dronov <vdronov@redhat.com> ``` Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: Herbert Xu <zxu@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 14636b0 + 9cbaff1 commit f3be0fd

File tree

14 files changed

+548
-213
lines changed

14 files changed

+548
-213
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/amd,ccp-seattle-v1a.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: AMD Cryptographic Coprocessor (ccp)
8+
9+
maintainers:
10+
- Tom Lendacky <thomas.lendacky@amd.com>
11+
12+
properties:
13+
compatible:
14+
const: amd,ccp-seattle-v1a
15+
16+
reg:
17+
maxItems: 1
18+
19+
interrupts:
20+
maxItems: 1
21+
22+
dma-coherent: true
23+
24+
required:
25+
- compatible
26+
- reg
27+
- interrupts
28+
29+
additionalProperties: false
30+
31+
examples:
32+
- |
33+
crypto@e0100000 {
34+
compatible = "amd,ccp-seattle-v1a";
35+
reg = <0xe0100000 0x10000>;
36+
interrupts = <0 3 4>;
37+
dma-coherent;
38+
};

Documentation/devicetree/bindings/crypto/amd-ccp.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

arch/x86/kvm/svm/sev.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2903,6 +2903,7 @@ void __init sev_set_cpu_caps(void)
29032903
void __init sev_hardware_setup(void)
29042904
{
29052905
unsigned int eax, ebx, ecx, edx, sev_asid_count, sev_es_asid_count;
2906+
struct sev_platform_init_args init_args = {0};
29062907
bool sev_snp_supported = false;
29072908
bool sev_es_supported = false;
29082909
bool sev_supported = false;
@@ -3019,6 +3020,15 @@ void __init sev_hardware_setup(void)
30193020
sev_supported_vmsa_features = 0;
30203021
if (sev_es_debug_swap_enabled)
30213022
sev_supported_vmsa_features |= SVM_SEV_FEAT_DEBUG_SWAP;
3023+
3024+
if (!sev_enabled)
3025+
return;
3026+
3027+
/*
3028+
* Do both SNP and SEV initialization at KVM module load.
3029+
*/
3030+
init_args.probe = true;
3031+
sev_platform_init(&init_args);
30223032
}
30233033

30243034
void sev_hardware_unsetup(void)
@@ -3034,6 +3044,8 @@ void sev_hardware_unsetup(void)
30343044

30353045
misc_cg_set_capacity(MISC_CG_RES_SEV, 0);
30363046
misc_cg_set_capacity(MISC_CG_RES_SEV_ES, 0);
3047+
3048+
sev_platform_shutdown();
30373049
}
30383050

30393051
int sev_cpu_init(struct svm_cpu_data *sd)

drivers/crypto/ccp/ccp-crypto-aes.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
* Author: Tom Lendacky <thomas.lendacky@amd.com>
88
*/
99

10-
#include <linux/module.h>
11-
#include <linux/sched.h>
12-
#include <linux/delay.h>
13-
#include <linux/scatterlist.h>
14-
#include <linux/crypto.h>
15-
#include <crypto/algapi.h>
1610
#include <crypto/aes.h>
1711
#include <crypto/ctr.h>
18-
#include <crypto/scatterwalk.h>
12+
#include <crypto/internal/skcipher.h>
13+
#include <linux/err.h>
14+
#include <linux/kernel.h>
15+
#include <linux/list.h>
16+
#include <linux/module.h>
17+
#include <linux/scatterlist.h>
18+
#include <linux/slab.h>
19+
#include <linux/string.h>
1920

2021
#include "ccp-crypto.h"
2122

drivers/crypto/ccp/ccp-crypto-des3.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
* Author: Gary R Hook <ghook@amd.com>
88
*/
99

10+
#include <crypto/internal/des.h>
11+
#include <crypto/internal/skcipher.h>
12+
#include <linux/err.h>
13+
#include <linux/kernel.h>
14+
#include <linux/list.h>
1015
#include <linux/module.h>
11-
#include <linux/sched.h>
12-
#include <linux/delay.h>
1316
#include <linux/scatterlist.h>
14-
#include <linux/crypto.h>
15-
#include <crypto/algapi.h>
16-
#include <crypto/scatterwalk.h>
17-
#include <crypto/internal/des.h>
17+
#include <linux/slab.h>
18+
#include <linux/string.h>
1819

1920
#include "ccp-crypto.h"
2021

drivers/crypto/ccp/ccp-crypto-main.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
* Author: Tom Lendacky <thomas.lendacky@amd.com>
88
*/
99

10-
#include <linux/module.h>
11-
#include <linux/moduleparam.h>
10+
#include <crypto/internal/akcipher.h>
11+
#include <crypto/internal/hash.h>
12+
#include <crypto/internal/skcipher.h>
13+
#include <linux/ccp.h>
14+
#include <linux/err.h>
1215
#include <linux/kernel.h>
1316
#include <linux/list.h>
14-
#include <linux/ccp.h>
17+
#include <linux/module.h>
1518
#include <linux/scatterlist.h>
16-
#include <crypto/internal/hash.h>
17-
#include <crypto/internal/akcipher.h>
19+
#include <linux/slab.h>
20+
#include <linux/spinlock.h>
1821

1922
#include "ccp-crypto.h"
2023

drivers/crypto/ccp/ccp-debugfs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,5 +319,8 @@ void ccp5_debugfs_setup(struct ccp_device *ccp)
319319

320320
void ccp5_debugfs_destroy(void)
321321
{
322+
mutex_lock(&ccp_debugfs_lock);
322323
debugfs_remove_recursive(ccp_debugfs_dir);
324+
ccp_debugfs_dir = NULL;
325+
mutex_unlock(&ccp_debugfs_lock);
323326
}

0 commit comments

Comments
 (0)