mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 PTI and Spectre related fixes and updates from Ingo Molnar:
"Here's the latest set of Spectre and PTI related fixes and updates:
Spectre:
- Add entry code register clearing to reduce the Spectre attack
surface
- Update the Spectre microcode blacklist
- Inline the KVM Spectre helpers to get close to v4.14 performance
again.
- Fix indirect_branch_prediction_barrier()
- Fix/improve Spectre related kernel messages
- Fix array_index_nospec_mask() asm constraint
- KVM: fix two MSR handling bugs
PTI:
- Fix a paranoid entry PTI CR3 handling bug
- Fix comments
objtool:
- Fix paranoid_entry() frame pointer warning
- Annotate WARN()-related UD2 as reachable
- Various fixes
- Add Add Peter Zijlstra as objtool co-maintainer
Misc:
- Various x86 entry code self-test fixes
- Improve/simplify entry code stack frame generation and handling
after recent heavy-handed PTI and Spectre changes. (There's two
more WIP improvements expected here.)
- Type fix for cache entries
There's also some low risk non-fix changes I've included in this
branch to reduce backporting conflicts:
- rename a confusing x86_cpu field name
- de-obfuscate the naming of single-TLB flushing primitives"
* 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits)
x86/entry/64: Fix CR3 restore in paranoid_exit()
x86/cpu: Change type of x86_cache_size variable to unsigned int
x86/spectre: Fix an error message
x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping
selftests/x86/mpx: Fix incorrect bounds with old _sigfault
x86/mm: Rename flush_tlb_single() and flush_tlb_one() to __flush_tlb_one_[user|kernel]()
x86/speculation: Add <asm/msr-index.h> dependency
nospec: Move array_index_nospec() parameter checking into separate macro
x86/speculation: Fix up array_index_nospec_mask() asm constraint
x86/debug: Use UD2 for WARN()
x86/debug, objtool: Annotate WARN()-related UD2 as reachable
objtool: Fix segfault in ignore_unreachable_insn()
selftests/x86: Disable tests requiring 32-bit support on pure 64-bit systems
selftests/x86: Do not rely on "int $0x80" in single_step_syscall.c
selftests/x86: Do not rely on "int $0x80" in test_mremap_vdso.c
selftests/x86: Fix build bug caused by the 5lvl test which has been moved to the VM directory
selftests/x86/pkeys: Remove unused functions
selftests/x86: Clean up and document sscanf() usage
selftests/x86: Fix vDSO selftest segfault for vsyscall=none
x86/entry/64: Remove the unused 'icebp' macro
...
This commit is contained in:
commit
d4667ca142
69 changed files with 444 additions and 362 deletions
|
|
@ -629,7 +629,7 @@ static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c)
|
|||
if (c->x86_vendor == X86_VENDOR_INTEL) {
|
||||
if ((c->x86 == 15) &&
|
||||
(c->x86_model == 6) &&
|
||||
(c->x86_mask == 8)) {
|
||||
(c->x86_stepping == 8)) {
|
||||
pr_info("Intel(R) Xeon(R) 7100 Errata AL30, processors may lock up on frequency changes: disabling acpi-cpufreq\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -775,7 +775,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)
|
|||
break;
|
||||
|
||||
case 7:
|
||||
switch (c->x86_mask) {
|
||||
switch (c->x86_stepping) {
|
||||
case 0:
|
||||
longhaul_version = TYPE_LONGHAUL_V1;
|
||||
cpu_model = CPU_SAMUEL2;
|
||||
|
|
@ -787,7 +787,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)
|
|||
break;
|
||||
case 1 ... 15:
|
||||
longhaul_version = TYPE_LONGHAUL_V2;
|
||||
if (c->x86_mask < 8) {
|
||||
if (c->x86_stepping < 8) {
|
||||
cpu_model = CPU_SAMUEL2;
|
||||
cpuname = "C3 'Samuel 2' [C5B]";
|
||||
} else {
|
||||
|
|
@ -814,7 +814,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)
|
|||
numscales = 32;
|
||||
memcpy(mults, nehemiah_mults, sizeof(nehemiah_mults));
|
||||
memcpy(eblcr, nehemiah_eblcr, sizeof(nehemiah_eblcr));
|
||||
switch (c->x86_mask) {
|
||||
switch (c->x86_stepping) {
|
||||
case 0 ... 1:
|
||||
cpu_model = CPU_NEHEMIAH;
|
||||
cpuname = "C3 'Nehemiah A' [C5XLOE]";
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
|
|||
#endif
|
||||
|
||||
/* Errata workaround */
|
||||
cpuid = (c->x86 << 8) | (c->x86_model << 4) | c->x86_mask;
|
||||
cpuid = (c->x86 << 8) | (c->x86_model << 4) | c->x86_stepping;
|
||||
switch (cpuid) {
|
||||
case 0x0f07:
|
||||
case 0x0f0a:
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ static int check_powernow(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if ((c->x86_model == 6) && (c->x86_mask == 0)) {
|
||||
if ((c->x86_model == 6) && (c->x86_stepping == 0)) {
|
||||
pr_info("K7 660[A0] core detected, enabling errata workarounds\n");
|
||||
have_a0 = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ struct cpu_id
|
|||
{
|
||||
__u8 x86; /* CPU family */
|
||||
__u8 x86_model; /* model */
|
||||
__u8 x86_mask; /* stepping */
|
||||
__u8 x86_stepping; /* stepping */
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
@ -277,7 +277,7 @@ static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c,
|
|||
{
|
||||
if ((c->x86 == x->x86) &&
|
||||
(c->x86_model == x->x86_model) &&
|
||||
(c->x86_mask == x->x86_mask))
|
||||
(c->x86_stepping == x->x86_stepping))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -272,9 +272,9 @@ unsigned int speedstep_detect_processor(void)
|
|||
ebx = cpuid_ebx(0x00000001);
|
||||
ebx &= 0x000000FF;
|
||||
|
||||
pr_debug("ebx value is %x, x86_mask is %x\n", ebx, c->x86_mask);
|
||||
pr_debug("ebx value is %x, x86_stepping is %x\n", ebx, c->x86_stepping);
|
||||
|
||||
switch (c->x86_mask) {
|
||||
switch (c->x86_stepping) {
|
||||
case 4:
|
||||
/*
|
||||
* B-stepping [M-P4-M]
|
||||
|
|
@ -361,7 +361,7 @@ unsigned int speedstep_detect_processor(void)
|
|||
msr_lo, msr_hi);
|
||||
if ((msr_hi & (1<<18)) &&
|
||||
(relaxed_check ? 1 : (msr_hi & (3<<24)))) {
|
||||
if (c->x86_mask == 0x01) {
|
||||
if (c->x86_stepping == 0x01) {
|
||||
pr_debug("early PIII version\n");
|
||||
return SPEEDSTEP_CPU_PIII_C_EARLY;
|
||||
} else
|
||||
|
|
|
|||
Loading…
Reference in a new issue