Add a safe static_cpu_has variant
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | x86, cpu: Add a synthetic cpu featurearch/ arch/ | +3 | 0 replies | |
| 2/5 | x86, debug: Add a collect-all misc debug checks optionarch/ | +12 | 0 replies | |
| 3/5 | x86: Sanity-check static_cpu_has usagearch/ arch/ | +36 | 0 replies | |
| 4/5 | x86: Add a static_cpu_has_safe variantarch/ arch/ | +91 | 0 replies | |
| 5/5 | x86, FPU: Use static_cpu_has_safe before alternativesarch/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] Add a safe static_cpu_has variant
From: Borislav Petkov <[email protected]>
As recently experienced, using static_cpu_has too early (before alternatives have run) causes some obscure bugs and decyphering those doesn't simply point to such premature usage.
Therefore, let's add a static_cpu_has_safe variant which always works and can be used in early code.
Also, 2/5 adds a debugging option, the idea behind it being to enable all sensible debugging code which we want to enable on x86 in order to catch build and runtime issues. The idea is to save a bunch of time of wading through "Kernel hacking" and staring at options. We'll see how that actually pans out though.
Borislav Petkov (5):
x86, cpu: Add a synthetic cpu feature
x86, debug: Add a collect-all misc debug checks option
x86: Sanity-check static_cpu_has usage
x86: Add a static_cpu_has_safe variant
x86, FPU: Use static_cpu_has_safe before alternatives
arch/x86/Kconfig.debug | 12 ++++ arch/x86/include/asm/cpufeature.h | 118 ++++++++++++++++++++++++++++++++++-- arch/x86/include/asm/fpu-internal.h | 2 +- arch/x86/kernel/cpu/common.c | 16 +++++ 4 files changed, 143 insertions(+), 5 deletions(-)
Signature · 1 line
1.8.3