Skip to contentSkip to conversation

x86/CPU/AMD: Terminate the erratum_1386_microcode array.

PATCH Applied Sebastian Andrzej Siewior 3 participants 3 messages Nov 26, 2024 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/CPU/AMD: Terminate the erratum_1386_microcode array.

The erratum_1386_microcode array requires an empty entry at the end. Otherwise x86_match_cpu_with_stepping() will continue iterrate the array after it ended.

Add an empty entry to erratum_1386_microcode to its end.

Fixes 29ba89f189528 ("x86/CPU/AMD: Improve the erratum 1386 workaround")
---
 arch/x86/kernel/cpu/amd.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/cpu/amd.c +1 -0
index 823f44f7bc946..d8408aafeed98 100644
@@ -798,6 +798,7 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
 static const struct x86_cpu_desc erratum_1386_microcode[] = {
 	AMD_CPU_DESC(0x17,  0x1, 0x2, 0x0800126e),
 	AMD_CPU_DESC(0x17, 0x31, 0x0, 0x08301052),
+	{},
 };
 
 static void fix_erratum_1386(struct cpuinfo_x86 *c)
Signature · 1 line
2.45.2
maintainer
#1 lore raw
Quoted 3 lines · Sebastian Andrzej Siewior

The erratum_1386_microcode array requires an empty entry at the end. Otherwise x86_match_cpu_with_stepping() will continue iterrate the array after it ended.

Whoops, true story.

Thanks for catching, lemme queue that.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
#2 lore raw

[tip: x86/urgent] x86/CPU/AMD: Terminate the erratum_1386_microcode array

In reply to Sebastian Andrzej Siewior
The 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:     ff6cdc407f4179748f4673c39b0921503199a0ad
Gitweb:        https://git.kernel.org/tip/ff6cdc407f4179748f4673c39b0921503199a0ad
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Tue, 26 Nov 2024 14:47:22 +01:00
Committer:     Borislav Petkov (AMD) <[email protected]>
CommitterDate: Tue, 26 Nov 2024 15:12:00 +01:00

x86/CPU/AMD: Terminate the erratum_1386_microcode array

The erratum_1386_microcode array requires an empty entry at the end. Otherwise x86_match_cpu_with_stepping() will continue iterate the array after it ended.

Add an empty entry to erratum_1386_microcode to its end.

Fixes 29ba89f189528 ("x86/CPU/AMD: Improve the erratum 1386 workaround")
---
 arch/x86/kernel/cpu/amd.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/cpu/amd.c +1 -0
index 823f44f..d8408aa 100644
@@ -798,6 +798,7 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
 static const struct x86_cpu_desc erratum_1386_microcode[] = {
 	AMD_CPU_DESC(0x17,  0x1, 0x2, 0x0800126e),
 	AMD_CPU_DESC(0x17, 0x31, 0x0, 0x08301052),
+	{},
 };
 
 static void fix_erratum_1386(struct cpuinfo_x86 *c)