* [PATCH] x86/sev: Fix __reserved field in sev_config
@ 2024-07-29 18:08 Pavan Kumar Paluri
2024-07-29 19:32 ` Borislav Petkov
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Pavan Kumar Paluri @ 2024-07-29 18:08 UTC (permalink / raw)
To: linux-kernel
Cc: Borislav Petkov, Thomas Gleixner, Ingo Molnar, Dave Hansen,
Tom Lendacky, Ashish Kalra, Michael Roth, Pavan Kumar Paluri,
stable
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;
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/sev: Fix __reserved field in sev_config
2024-07-29 18:08 [PATCH] x86/sev: Fix __reserved field in sev_config Pavan Kumar Paluri
@ 2024-07-29 19:32 ` Borislav Petkov
2024-07-29 23:45 ` Paluri, PavanKumar
2024-07-30 8:24 ` [tip: x86/urgent] " tip-bot2 for Pavan Kumar Paluri
2024-07-30 13:22 ` [PATCH] " Tom Lendacky
2 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2024-07-29 19:32 UTC (permalink / raw)
To: Pavan Kumar Paluri
Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, Dave Hansen,
Tom Lendacky, Ashish Kalra, Michael Roth, stable
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?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/sev: Fix __reserved field in sev_config
2024-07-29 19:32 ` Borislav Petkov
@ 2024-07-29 23:45 ` Paluri, PavanKumar
2024-07-30 5:59 ` Borislav Petkov
0 siblings, 1 reply; 6+ messages in thread
From: Paluri, PavanKumar @ 2024-07-29 23:45 UTC (permalink / raw)
To: Borislav Petkov
Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, Dave Hansen,
Tom Lendacky, Ashish Kalra, Michael Roth, stable
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/sev: Fix __reserved field in sev_config
2024-07-29 23:45 ` Paluri, PavanKumar
@ 2024-07-30 5:59 ` Borislav Petkov
0 siblings, 0 replies; 6+ messages in thread
From: Borislav Petkov @ 2024-07-30 5:59 UTC (permalink / raw)
To: Paluri, PavanKumar
Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, Dave Hansen,
Tom Lendacky, Ashish Kalra, Michael Roth, stable
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.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tip: x86/urgent] x86/sev: Fix __reserved field in sev_config
2024-07-29 18:08 [PATCH] x86/sev: Fix __reserved field in sev_config Pavan Kumar Paluri
2024-07-29 19:32 ` Borislav Petkov
@ 2024-07-30 8:24 ` tip-bot2 for Pavan Kumar Paluri
2024-07-30 13:22 ` [PATCH] " Tom Lendacky
2 siblings, 0 replies; 6+ messages in thread
From: tip-bot2 for Pavan Kumar Paluri @ 2024-07-30 8:24 UTC (permalink / raw)
To: linux-tip-commits
Cc: Pavan Kumar Paluri, Borislav Petkov (AMD), x86, linux-kernel
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 <papaluri@amd.com>
AuthorDate: Mon, 29 Jul 2024 13:08:08 -05:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
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.
Fixes: 34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas")
Signed-off-by: Pavan Kumar Paluri <papaluri@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20240729180808.366587-1-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 082d61d..de1df0c 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;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/sev: Fix __reserved field in sev_config
2024-07-29 18:08 [PATCH] x86/sev: Fix __reserved field in sev_config Pavan Kumar Paluri
2024-07-29 19:32 ` Borislav Petkov
2024-07-30 8:24 ` [tip: x86/urgent] " tip-bot2 for Pavan Kumar Paluri
@ 2024-07-30 13:22 ` Tom Lendacky
2 siblings, 0 replies; 6+ messages in thread
From: Tom Lendacky @ 2024-07-30 13:22 UTC (permalink / raw)
To: Pavan Kumar Paluri, linux-kernel
Cc: Borislav Petkov, Thomas Gleixner, Ingo Molnar, Dave Hansen,
Ashish Kalra, Michael Roth, stable
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;
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-07-30 13:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-29 18:08 [PATCH] x86/sev: Fix __reserved field in sev_config Pavan Kumar Paluri
2024-07-29 19:32 ` Borislav Petkov
2024-07-29 23:45 ` Paluri, PavanKumar
2024-07-30 5:59 ` Borislav Petkov
2024-07-30 8:24 ` [tip: x86/urgent] " tip-bot2 for Pavan Kumar Paluri
2024-07-30 13:22 ` [PATCH] " Tom Lendacky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox