x86/sev: Fix __reserved field in sev_config
Subsystems (2)
PATCH 1/1 x86/sev: Fix __reserved field in sev_config
sev_config currently has debug, ghcbs_initialized, and use_cas fields. However, __reserved count has not been updated. Fix this.
--- arch/x86/coco/sev/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/coco/sev/core.c +1 -1
@@ -163,7 +163,7 @@ struct sev_config {*/ use_cas :1 , - __reserved : 62; + __reserved : 61; };static struct sev_config sev_cfg__read_mostly ;
Signature · 1 line
2.34.1
Borislav Petkov
maintainerQuoted 5 lines · Pavan Kumar Paluri
sev_configcurrently has debug,ghcbs_initialized, anduse_casfields. However,__reservedcount has not been updated. Fix this.Fixes 34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas")
stable because?
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteHi Boris,
Quoted 9 lines · Borislav Petkov
Quoted 5 lines · Pavan Kumar Paluri
sev_configcurrently has debug,ghcbs_initialized, anduse_casfields. However,__reservedcount has not been updated. Fix this.Fixes 34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas")stable because?
Thanks for noticing this.
I shall remove Cc tag since:
1. The commit that introduced the bug is only part of 6.11-rc1. So there is no stable kernel fix needed here.
2. An incorrect __reserved field did not cause any hang/data corruption or a build-error.
I will re-spin a v2.
Thanks,
Pavan
Quoted 1 line
Borislav Petkov
maintainerQuoted 1 line · PavanKumar
I will re-spin a v2.
You don't have to - I'll fix it up.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteThe following commit has been merged into the x86/urgent branch of tip:
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: c14e4114582c20276467226387d5bae7310a849e Gitweb: https://git.kernel.org/tip/c14e4114582c20276467226387d5bae7310a849e Author: Pavan Kumar Paluri <[email protected]> AuthorDate: Mon, 29 Jul 2024 13:08:08 -05:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jul 2024 10:07:26 +02:00
x86/sev: Fix __reserved field in sev_config
sev_config currently has debug, ghcbs_initialized, and use_cas fields. However, __reserved count has not been updated. Fix this.
--- arch/x86/coco/sev/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/coco/sev/core.c +1 -1
@@ -163,7 +163,7 @@ struct sev_config {*/ use_cas :1 , - __reserved : 62; + __reserved : 61; };static struct sev_config sev_cfg__read_mostly ;
Quoted 6 lines · Pavan Kumar Paluri
sev_configcurrently has debug,ghcbs_initialized, anduse_casfields. However,__reservedcount has not been updated. Fix this.Fixes 34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas")Signed-off-by Pavan Kumar Paluri <[email protected]>
You'd think the compiler would spit out some kind of warning when this happens, but I guess it just happily adds another u64 to the struct.
Thanks,
Tom
Quoted 17 lines
--- arch/x86/coco/sev/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/coco/sev/core.c +1
-1@@ -163,7 +163,7 @@ struct sev_config {*/ use_cas :1 , - __reserved : 62; + __reserved : 61; };static struct sev_config sev_cfg__read_mostly ;