x86/ucode: Exclude Zen6 from entrysign digest checking
PATCH 1/1 x86/ucode: Exclude Zen6 from entrysign digest checking
There is a 3rd path which should have gained an is_zen6_uarch() check to exclude Zen6 from entrysign mitigations.
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>
CC: Oleksii Kurochko <[email protected]>
For 4.22. This wants backporting too.
--- xen/arch/x86/cpu/microcode/amd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
xen/arch/x86/cpu/microcode/amd.c +2 -1
@@ -128,7 +128,8 @@ static bool check_digest(const struct container_microcode *mc)* the digest of the patch against a list of known provenance. */ if ( boot_cpu_data.family <0x17 || boot_cpu_data.family >0x1a || - entrysign_mitigated_in_firmware || !opt_digest_check ) +is_zen6_uarch () || entrysign_mitigated_in_firmware || + !opt_digest_check )return true; pd = bsearch(&patch->patch_id, patch_digests, ARRAY_SIZE(patch_digests),
base-commit: 1cfceee62d8b086a1713d04522f741a09d50cbb3
Signature · 1 line
2.39.5
Le 16/06/2026 à 12:47, Andrew Cooper a écrit :
Quoted 31 lines
There is a 3rd path which should have gained an
is_zen6_uarch()check to exclude Zen6 from entrysign mitigations.Fixes bd15fdedafb3 ("x86/ucode: Exclude Zen6 from entrysign mitigations")Signed-off-by Andrew Cooper <[email protected]>---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>
CC: Oleksii Kurochko <[email protected]>For 4.22. This wants backporting too.
--- xen/arch/x86/cpu/microcode/amd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)xen/arch/x86/cpu/microcode/amd.c +2
-1@@ -128,7 +128,8 @@ static bool check_digest(const struct container_microcode *mc)* the digest of the patch against a list of known provenance. */ if ( boot_cpu_data.family <0x17 || boot_cpu_data.family >0x1a || - entrysign_mitigated_in_firmware || !opt_digest_check ) +is_zen6_uarch () || entrysign_mitigated_in_firmware || + !opt_digest_check )return true; pd = bsearch(&patch->patch_id, patch_digests, ARRAY_SIZE(patch_digests),
Quoted 1 line
base-commit:
1cfceee62d8b086a1713d04522f741a09d50cbb3
Teddy
xen/arch/x86/cpu/microcode/amd.c static bool check_digest(const struct container_microcode *mc) · line 133
Quoted 10 lines · Andrew Cooper
xen/arch/x86/cpu/microcode/amd.c +2
-1@@ -128,7 +128,8 @@ static bool check_digest(const struct container_microcode *mc)* the digest of the patch against a list of known provenance. */ if ( boot_cpu_data.family <0x17 || boot_cpu_data.family >0x1a || - entrysign_mitigated_in_firmware || !opt_digest_check ) +is_zen6_uarch () || entrysign_mitigated_in_firmware || + !opt_digest_check )return true;
Besides being somewhat fragile towards future changes (to the family range covered), this also sets a bad precedent towards the comment ahead is is_zen<N>_uarch() saying "The caller is required to perform the appropriate vendor/family checks first." My understanding was that a single family should be checked for in all such cases, not - as is the case here - a range of families. Using the (seemingly) opposite is_zen5_uarch() wouldn't be correct here, after all.
Jan
Quoted 10 lines · Jan Beulich
Quoted 9 lines · Andrew Cooper
xen/arch/x86/cpu/microcode/amd.c +2
-1@@ -128,7 +128,8 @@ static bool check_digest(const struct container_microcode *mc)* the digest of the patch against a list of known provenance. */ if ( boot_cpu_data.family <0x17 || boot_cpu_data.family >0x1a || - entrysign_mitigated_in_firmware || !opt_digest_check ) +is_zen6_uarch () || entrysign_mitigated_in_firmware || + !opt_digest_check )
Quoted 8 lines
xen/arch/x86/cpu/microcode/amd.c static bool check_digest(const struct container_microcode *mc) · line 133
Quoted 1 line
xen/arch/x86/cpu/microcode/amd.c +0
-0return true;Besides being somewhat fragile towards future changes (to the family range covered), this also sets a bad precedent towards the comment ahead is is_zen<N>_uarch() saying "The caller is required to perform the appropriate vendor/family checks first." My understanding was that a single family should be checked for in all such cases, not - as is the case here - a range of families. Using the (seemingly) opposite
is_zen5_uarch()wouldn't be correct here, after all.
It is true that they're not symmetric when used with ranges.
But "appropriate checks" doesn't mean single family. I suppose it really means "know what you're doing".
Entrysign is weird. All other uses of is_zen?_uarch() come with single family checks.
~Andrew
Jan Beulich
Acked-byQuoted 20 lines · Andrew Cooper
Quoted 10 lines · Jan Beulich
Quoted 9 lines · Andrew Cooper
xen/arch/x86/cpu/microcode/amd.c +2
-1@@ -128,7 +128,8 @@ static bool check_digest(const struct container_microcode *mc)* the digest of the patch against a list of known provenance. */ if ( boot_cpu_data.family <0x17 || boot_cpu_data.family >0x1a || - entrysign_mitigated_in_firmware || !opt_digest_check ) +is_zen6_uarch () || entrysign_mitigated_in_firmware || + !opt_digest_check )Quoted 8 lines
xen/arch/x86/cpu/microcode/amd.c static bool check_digest(const struct container_microcode *mc) · line 133
Quoted 1 line
xen/arch/x86/cpu/microcode/amd.c +0
-0return true;Besides being somewhat fragile towards future changes (to the family range covered), this also sets a bad precedent towards the comment ahead is is_zen<N>_uarch() saying "The caller is required to perform the appropriate vendor/family checks first." My understanding was that a single family should be checked for in all such cases, not - as is the case here - a range of families. Using the (seemingly) opposite
is_zen5_uarch()wouldn't be correct here, after all.
Quoted 7 lines
It is true that they're not symmetric when used with ranges.
But "appropriate checks" doesn't mean single family. I suppose it really means "know what you're doing".
Entrysign is weird. All other uses of is_zen?_uarch() come with single family checks.
If you're not afraid of building ourselves a trap here:
Jan
Quoted 5 lines · Andrew Cooper
There is a 3rd path which should have gained an
is_zen6_uarch()check to exclude Zen6 from entrysign mitigations.Fixes bd15fdedafb3 ("x86/ucode: Exclude Zen6 from entrysign mitigations")Signed-off-by Andrew Cooper <[email protected]>
Quoted 7 lines
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>
CC: Oleksii Kurochko <[email protected]>For 4.22. This wants backporting too.
Thanks.
~ Oleksii