sev_config currently has debug, ghcbs_initialized, and use_cas fields. However, __reserved count has not been updated. Fix this.
Fixes: 34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas") Cc: stable@vger.kernel.org Signed-off-by: Pavan Kumar Paluri papaluri@amd.com --- arch/x86/coco/sev/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/coco/sev/core.c b/arch/x86/coco/sev/core.c index 082d61d85dfc..de1df0cb45da 100644 --- a/arch/x86/coco/sev/core.c +++ b/arch/x86/coco/sev/core.c @@ -163,7 +163,7 @@ struct sev_config { */ use_cas : 1,
- __reserved : 62; + __reserved : 61; };
static struct sev_config sev_cfg __read_mostly;
On Mon, Jul 29, 2024 at 01:08:08PM -0500, Pavan Kumar Paluri wrote:
sev_config currently has debug, ghcbs_initialized, and use_cas fields. However, __reserved count has not been updated. Fix this.
Fixes: 34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas") Cc: stable@vger.kernel.org
stable because?
Hi Boris,
On 7/29/2024 2:32 PM, Borislav Petkov wrote:
On Mon, Jul 29, 2024 at 01:08:08PM -0500, Pavan Kumar Paluri wrote:
sev_config currently has debug, ghcbs_initialized, and use_cas fields. However, __reserved count has not been updated. Fix this.
Fixes: 34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas") Cc: stable@vger.kernel.org
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
On Mon, Jul 29, 2024 at 06:45:21PM -0500, Paluri, PavanKumar wrote:
I will re-spin a v2.
You don't have to - I'll fix it up.
On 7/29/24 13:08, Pavan Kumar Paluri wrote:
sev_config currently has debug, ghcbs_initialized, and use_cas fields. However, __reserved count has not been updated. Fix this.
Fixes: 34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas") Cc: stable@vger.kernel.org Signed-off-by: Pavan Kumar Paluri papaluri@amd.com
Reviewed-by: Tom Lendacky thomas.lendacky@amd.com
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
arch/x86/coco/sev/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/coco/sev/core.c b/arch/x86/coco/sev/core.c index 082d61d85dfc..de1df0cb45da 100644 --- a/arch/x86/coco/sev/core.c +++ b/arch/x86/coco/sev/core.c @@ -163,7 +163,7 @@ struct sev_config { */ use_cas : 1,
__reserved : 62;
__reserved : 61;
}; static struct sev_config sev_cfg __read_mostly;
linux-stable-mirror@lists.linaro.org