NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/58370 CVS commit: [netbsd-10] src/sys/arch/x86



The following reply was made to PR kern/58370; it has been noted by GNATS.

From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/58370 CVS commit: [netbsd-10] src/sys/arch/x86
Date: Sat, 20 Jul 2024 14:19:31 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Jul 20 14:19:31 UTC 2024
 
 Modified Files:
 	src/sys/arch/x86/include [netbsd-10]: specialreg.h
 	src/sys/arch/x86/x86 [netbsd-10]: identcpu.c
 
 Log Message:
 Pull up following revision(s) (requested by andvar in ticket #738):
 
 	sys/arch/x86/x86/identcpu.c: revision 1.129
 	sys/arch/x86/include/specialreg.h: revision 1.212
 	sys/arch/x86/x86/identcpu.c: revision 1.130
 
 Disable the VIA Alternate Instructions according the VIA documentation:
 * C7 and above do not support ALTINST, do not check or attempt to disable them.
 * For VIA C3 Nehemiah check extended feature flags for support and status,
   do no attempt to disable when AIS is not supported or enabled.
 * For pre-Nehemiah models explicitly disable, if they are in the range
   of documented models, flags aren't present to check the status on
   these models.
 
 Note: for pre-Nehemiah may be other functional side effects depdending
 on the version and stepping.
 
 Explicit disabling of ALTINST was introduced with rev. 1.84 following
 the discovery of some VIA CPUs having these instructions enabled by default
 leading to the potential backdoor (aka rosenbrindge).
 
 Unfortunately, implementation used a wrong check (ACE supported flag),
 which can be true for the later models, still supporting padlock features.
 
 Setting ALTINST bit on those may have unexpected side effects like VIA C7 CPUID
 instruction for temperature sensor not reporting correct value or
 `cpuctl identify' not reporting certain CPU features. Similar side effects
 can be observed even for Nehemiah models not supporting AIS instructions. This
 change should limit possibility of such issues to only the pre-Nehemiah models,
 not covered at all in the previous implementation.
 
 Feature Control Register (FCR) macros were unified under one group and
 consistent naming while implementing the change. Few comments updated as well.
 patch reviewed by Riastradh@ (thank you)
 
 PR kern/58370
 
 Move determination of the largest VIA CPU extended function value
 to the intended place where the checks are performed.
 Currently the value can be overridden while checking for the padlock features,
 and failing the check for max function value as a result.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.198.2.4 -r1.198.2.5 src/sys/arch/x86/include/specialreg.h
 cvs rdiff -u -r1.123 -r1.123.4.1 src/sys/arch/x86/x86/identcpu.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index