mbox for MDSv6
Subsystems (248)
attached.
-Andi
From bec0d3681fe131dd9275328e410dad95a2a70c5c Mon Sep 17 00:00:00 2001
From: Andi Kleen <[email protected]>
Date: Wed, 7 Nov 2018 16:08:39 -0800
Subject: [PATCH 01/43] x86/speculation/mds: Add basic bug infrastructure for
MDS
MDS is micro architectural data sampling, which is a side channel attack on internal buffers in Intel CPUs.
MDS consists of multiple sub-vulnerabilities:
Microarchitectural Store Buffer Data Sampling (MSBDS) (CVE-2018-12126) Microarchitectual Fill Buffer Data Sampling (MFBDS) (CVE-2018-12130) Microarchitectual Load Port Data (MLPDS) (CVE-2018-12127), with the first leaking store data, and the second loads and sometimes store data, and the third load data.
They all have the same mitigations for single thread, so we lump them all together as a single MDS issue.
This patch adds the basic infrastructure to detect if the current CPU is affected by MDS, and if yes set the right BUG bits.
--- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/msr-index.h | 1 + arch/x86/kernel/cpu/common.c | 13 +++++++++++++ 3 files changed, 15 insertions(+)
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -381,5 +381,6 @@#define X86_BUG_SPECTRE_V2 X86_BUG(16)/* CPU is affected by Spectre variant 2 attack with indirect branches */ #define X86_BUG_SPEC_STORE_BYPASS X86_BUG(17)/* CPU is affected by speculative store bypass attack */ #define X86_BUG_L1TF X86_BUG(18)/* CPU is affected by L1 Terminal Fault */ +#define X86_BUG_MDS X86_BUG(19)/* CPU is affected by Microarchitectural data sampling */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/include/asm/msr-index.h +1 -0
@@ -77,6 +77,7 @@* attack, so no Speculative Store Bypass * control required. */ +#define ARCH_CAP_MDS_NO (1 << 5)/* No Microarchitectural data sampling */ #define MSR_IA32_FLUSH_CMD 0x0000010b#define L1D_FLUSH (1 << 0)/*
arch/x86/kernel/cpu/common.c +13 -0
@@ -998,6 +998,14 @@ static const __initconst struct x86_cpu_id cpu_no_l1tf[] = { {} }; +static const __initconst struct x86_cpu_id cpu_no_mds[] = { +/* in addition to cpu_no_speculation */ + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_GOLDMONT }, + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_GOLDMONT_X }, + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_GOLDMONT_PLUS }, + {} +}; +static void __init cpu_set_bug_bits (struct cpuinfo_x86 *c) {u64 ia32_cap =0 ;
@@ -1019,6 +1027,11 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)if (ia32_cap &ARCH_CAP_IBRS_ALL )setup_force_cpu_cap (X86_FEATURE_IBRS_ENHANCED ); +if ((boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL && + !x86_match_cpu (cpu_no_mds)) && + !(ia32_cap &ARCH_CAP_MDS_NO )) +setup_force_cpu_bug (X86_BUG_MDS ); +if (x86_match_cpu (cpu_no_meltdown))return ;
Signature · 24 lines
2.17.2 From 73fc1e305dd1a511a311a899f9a1859964c29c5f Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 7 Nov 2018 16:12:17 -0800 Subject: [PATCH 02/43] x86/speculation/mds: Clear CPU on every kernel exit Add basic code to clear unconditonally on every kernel exit. The flushing is provided by new microcode as a new side effect of the otherwise unused VERW instruction. Future patches will provide more sophisticated policies on when to clear. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/entry/common.c | 3 +++ arch/x86/include/asm/clearcpu.h | 23 +++++++++++++++++++++++ arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/nmi.c | 5 ++++- 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 arch/x86/include/asm/clearcpu.h
arch/x86/entry/common.c +3 -0
@@ -29,6 +29,7 @@#include <asm/desc.h> #include <asm/traps.h> #include <asm/vdso.h> +#include <asm/clearcpu.h> #include <linux/uaccess.h> #include <asm/cpufeature.h>
@@ -211,6 +212,8 @@ __visible inline void prepare_exit_to_usermode(struct pt_regs *regs) ti->status &= ~(TS_COMPAT |TS_I386_REGS_POKED );#endif +clear_cpu (); +user_enter_irqoff (); }
arch/x86/include/asm/clearcpu.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_CLEARCPU_H +#define _ASM_CLEARCPU_H 1 + +#include <linux/jump_label.h> +#include <linux/sched/smt.h> +#include <asm/alternative.h> +#include <linux/thread_info.h> + +/* +* Clear CPU buffers to avoid side channels. +* We use microcode as a side effect of the obsolete VERW instruction +*/ + +static inline void clear_cpu (void ) +{ +unsigned kernel_ds = __KERNEL_DS; +/* Has to be memory form, don't modify to use an register */ + alternative_input("", "verw %[kernelds]", X86_BUG_MDS, + [kernelds] "m" (kernel_ds)); +} + +#endif
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -344,6 +344,7 @@/* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */ #define X86_FEATURE_AVX512_4VNNIW (18*32+ 2)/* AVX-512 Neural Network Instructions */ #define X86_FEATURE_AVX512_4FMAPS (18*32+ 3)/* AVX-512 Multiply Accumulation Single precision */ +#define X86_FEATURE_MD_CLEAR (18*32+10)/* Flush state on VERW */ #define X86_FEATURE_PCONFIG (18*32+18)/* Intel PCONFIG */ #define X86_FEATURE_SPEC_CTRL (18*32+26)/* "" Speculation Control (IBRS + IBPB) */ #define X86_FEATURE_INTEL_STIBP (18*32+27)/* "" Single Thread Indirect Branch Predictors */
arch/x86/kernel/nmi.c +4 -1
@@ -494,7 +494,7 @@ do_nmi(struct pt_regs *regs, long error_code) {if (this_cpu_read (nmi_state) !=NMI_NOT_RUNNING ) {this_cpu_write (nmi_state,NMI_LATCHED ); -return ; + goto out; }this_cpu_write (nmi_state,NMI_EXECUTING );this_cpu_write (nmi_cr2,read_cr2 ());
@@ -533,6 +533,9 @@ do_nmi(struct pt_regs *regs, long error_code)write_cr2 (this_cpu_read (nmi_cr2));if (this_cpu_dec_return (nmi_state)) goto nmi_restart; + +out: +clear_cpu (); }NOKPROBE_SYMBOL (do_nmi);
Signature · 34 lines
2.17.2 From ba53f06ef4568defaa43c14c87f28ea9e8b62d84 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 7 Nov 2018 16:15:28 -0800 Subject: [PATCH 03/43] x86/speculation/mds: Clear CPU buffers on entering idle When entering idle the internal state of the current CPU might become visible to the thread sibling because the CPU "frees" some internal resources. To ensure there is no MDS leakage always clear the CPU state before doing any idling. We only do this if SMT is enabled, as otherwise there is no leakage possible. Not needed for idle poll because it does not share resources. In a Hypervisor we might not know the true SMT state, but in this case idle does exit, and we assume the hypervisor takes care of any needed clears during the next entry. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/include/asm/clearcpu.h | 18 ++++++++++++++++++ arch/x86/kernel/acpi/cstate.c | 2 ++ arch/x86/kernel/kvm.c | 3 +++ arch/x86/kernel/process.c | 5 +++++ arch/x86/kernel/smpboot.c | 3 +++ drivers/acpi/acpi_pad.c | 2 ++ drivers/acpi/processor_idle.c | 3 +++ drivers/idle/intel_idle.c | 5 +++++ 8 files changed, 41 insertions(+)
arch/x86/include/asm/clearcpu.h +18 -0
@@ -20,4 +20,22 @@ static inline void clear_cpu(void) [kernelds] "m" (kernel_ds)); } +/* +* Clear CPU buffers before going idle, so that no state is leaked to SMT +* siblings taking over thread resources. +* Out of line to avoid include hell. +* +* Assumes that interrupts are disabled and only get reenabled +* before idle, otherwise the data from a racing interrupt might not +* get cleared. There are some callers who violate this, +* but they are only used in unattackable cases, like CPU +* offlining. +*/ + +static inline void clear_cpu_idle (void ) +{ +if (sched_smt_active ()) +clear_cpu (); +} +#endif
arch/x86/kernel/acpi/cstate.c +2 -0
@@ -14,6 +14,7 @@#include <acpi/processor.h> #include <asm/mwait.h> #include <asm/special_insns.h> +#include <asm/clearcpu.h> /* * Initialize bm_flags based on the CPU cache properties
@@ -157,6 +158,7 @@ void __cpuidle acpi_processor_ffh_cstate_enter(struct acpi_processor_cx *cx)unsigned int cpu =smp_processor_id ();struct cstate_entry *percpu_entry; +clear_cpu_idle (); percpu_entry =per_cpu_ptr (cpu_cstate_entry, cpu);mwait_idle_with_hints (percpu_entry->states[cx->index].eax, percpu_entry->states[cx->index].ecx);
arch/x86/kernel/kvm.c +3 -0
@@ -159,6 +159,7 @@ void kvm_async_pf_task_wait(u32 token, int interrupt_kernel)/* * We cannot reschedule. So halt. */ +clear_cpu_idle ();native_safe_halt ();local_irq_disable (); }
@@ -788,6 +789,8 @@ static void kvm_wait(u8 *ptr, u8 val)if (READ_ONCE (*ptr) != val) goto out; +clear_cpu_idle (); +/* * halt until it's our turn and kicked. Note that we do safe halt * for irq enabled case to avoid hang when lock info is overwritten
arch/x86/kernel/process.c +5 -0
@@ -42,6 +42,7 @@#include <asm/prctl.h> #include <asm/spec-ctrl.h> #include <asm/proto.h> +#include <asm/clearcpu.h> #include "process.h"
@@ -589,6 +590,8 @@ void stop_this_cpu(void *dummy)disable_local_APIC ();mcheck_cpu_clear (this_cpu_ptr (&cpu_info)); +clear_cpu_idle (); +/* * Use wbinvd on processors that support SME. This provides support * for performing a successful kexec when going from SME inactive
@@ -675,6 +678,8 @@ static __cpuidle void mwait_idle(void)mb ();/* quirk */ } +clear_cpu_idle (); +__monitor ((void *)¤t_thread_info ()->flags,0 ,0 );if (!need_resched ())__sti_mwait (0 ,0 );
arch/x86/kernel/smpboot.c +3 -0
@@ -81,6 +81,7 @@#include <asm/cpu_device_id.h> #include <asm/spec-ctrl.h> #include <asm/hw_irq.h> +#include <asm/clearcpu.h> /* representing HT siblings of each logical CPU */ DEFINE_PER_CPU_READ_MOSTLY (cpumask_var_t, cpu_sibling_map);
@@ -1635,6 +1636,7 @@ static inline void mwait_play_dead(void)wbinvd ();while (1 ) { +clear_cpu_idle ();/* * The CLFLUSH is a workaround for erratum AAI65 for * the Xeon 7400 series. It's not clear it is actually
@@ -1662,6 +1664,7 @@ void hlt_play_dead(void)wbinvd ();while (1 ) { +clear_cpu_idle ();native_halt ();/* * If NMI wants to wake up CPU0, start CPU0.
drivers/acpi/acpi_pad.c +2 -0
@@ -26,6 +26,7 @@#include <linux/tick.h> #include <linux/slab.h> #include <linux/acpi.h> +#include <linux/clearcpu.h> #include <asm/mwait.h> #include <xen/xen.h>
@@ -175,6 +176,7 @@ static int power_saving_thread(void *data)tick_broadcast_enable ();tick_broadcast_enter ();stop_critical_timings (); +clear_cpu_idle ();mwait_idle_with_hints (power_saving_mwait_eax,1 );
drivers/acpi/processor_idle.c +3 -0
@@ -33,6 +33,7 @@#include <linux/cpuidle.h> #include <linux/cpu.h> #include <acpi/processor.h> +#include <asm/clearcpu.h> /* * Include the apic definitions for x86 to have the APIC timer related defines
@@ -121,6 +122,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = { static void __cpuidle acpi_safe_halt(void) {if (!tif_need_resched ()) { +clear_cpu_idle ();safe_halt ();local_irq_disable (); }
@@ -681,6 +683,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)ACPI_FLUSH_CPU_CACHE (); +clear_cpu_idle ();while (1 ) {if (cx->entry_method ==ACPI_CSTATE_HALT )
drivers/idle/intel_idle.c +5 -0
@@ -65,6 +65,7 @@#include <asm/intel-family.h> #include <asm/mwait.h> #include <asm/msr.h> +#include <asm/clearcpu.h> #define INTEL_IDLE_VERSION "0.4.1"
@@ -933,6 +934,8 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev, } } +clear_cpu_idle (); +mwait_idle_with_hints (eax, ecx);if (!static_cpu_has (X86_FEATURE_ARAT ) && tick)
@@ -953,6 +956,8 @@ static void intel_idle_s2idle(struct cpuidle_device *dev,unsigned long ecx =1 ;/* break on interrupt flag */ unsigned long eax =flg2MWAIT (drv->states[index].flags); +clear_cpu_idle (); +mwait_idle_with_hints (eax, ecx); }
Signature · 21 lines
2.17.2 From bcc4cdd785744de024acfc5e171fe5dc44282384 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 11 Jan 2019 16:44:15 -0800 Subject: [PATCH 04/43] x86/speculation/mds: Add command line options to control mds Parse mds=off / mds=auto / mds=full on the kernel command line. Only mds=off has an effect, mds=auto is equal to mds=full and is default currently. Signed-off-by: Andi Kleen <[email protected]> --- .../admin-guide/kernel-parameters.txt | 11 +++++++ arch/x86/include/asm/clearcpu.h | 2 +- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/bugs.c | 31 +++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-)
Documentation/admin-guide/kernel-parameters.txt +11 -0
@@ -2356,6 +2356,17 @@ Format: <first>,<last> Specifies range of consoles to be captured by the MDA. + mds=off [X86, Intel] + Disable workarounds for Micro-architectural Data Sampling. + + mds=auto [X86, Intel] + Automatically select default for MDS mitigation. + Currently this always flushes on kernel exit. + + mds=full [X86, Intel] + Always flush cpu buffers when exiting kernel for MDS + without any heuristics. + mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory Amount of memory to be used when the kernel is not able to see the whole system memory or for test.
arch/x86/include/asm/clearcpu.h +1 -1
@@ -16,7 +16,7 @@ static inline void clear_cpu(void) {unsigned kernel_ds = __KERNEL_DS;/* Has to be memory form, don't modify to use an register */ - alternative_input("", "verw %[kernelds]", X86_BUG_MDS, + alternative_input("", "verw %[kernelds]", X86_FEATURE_VERW, [kernelds] "m" (kernel_ds)); }
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -221,6 +221,7 @@#define X86_FEATURE_ZEN ( 7*32+28)/* "" CPU is AMD family 0x17 (Zen) */ #define X86_FEATURE_L1TF_PTEINV ( 7*32+29)/* "" L1TF workaround PTE inversion */ #define X86_FEATURE_IBRS_ENHANCED ( 7*32+30)/* Enhanced IBRS */ +#define X86_FEATURE_VERW ( 7*32+31)/* "" VERW for MDS on kernel exit */ /* Virtualization flags: Linux defined, word 8 */ #define X86_FEATURE_TPR_SHADOW ( 8*32+ 0)/* Intel TPR Shadow */
arch/x86/kernel/cpu/bugs.c +31 -0
@@ -37,6 +37,7 @@static void __init spectre_v2_select_mitigation (void );static void __init ssb_select_mitigation (void );static void __init l1tf_select_mitigation (void ); +static void __init mds_select_mitigation (void );/* The base value of the SPEC_CTRL MSR that always has to be preserved. */ u64 x86_spec_ctrl_base;
@@ -101,6 +102,8 @@ void __init check_bugs(void)l1tf_select_mitigation (); +mds_select_mitigation (); +#ifdef CONFIG_X86_32 /* * Check whether we are able to run this kernel safely on SMP.
@@ -1058,6 +1061,34 @@ early_param("l1tf", l1tf_cmdline);#undef pr_fmt +static void mds_select_mitigation (void ) +{ +if (!boot_cpu_has (X86_BUG_MDS )) +return ; + +/* +* Use VERW even if the CPUID does not report MD_CLEAR, +* in case we're running in a legacy hypervisor that +* doesn't pass through CPUID properly. +* +* This causes some extra overhead on CPUs that don't need +* VERW. +* +* This is supposed to handle the slow release cycle +* of VMware who doesn't update CPUIDs timely in 2019. +* If the year is 2020 and you still see this please +* guard this with +* if (boot_cpu_has(X86_FEATURE_MD_CLEAR)) setup_force ... VERW +*/ +setup_force_cpu_cap (X86_FEATURE_VERW ); +if (cmdline_find_option_bool (boot_command_line,"mds=off" )) +setup_clear_cpu_cap (X86_FEATURE_VERW ); +/* Nop currently because this is default for now. */ +if (cmdline_find_option_bool (boot_command_line,"mds=full" ) || +cmdline_find_option_bool (boot_command_line,"mds=auto" )) +setup_force_cpu_cap (X86_FEATURE_VERW ); +} +#ifdef CONFIG_SYSFS #define L1TF_DEFAULT_MSG "Mitigation: PTE Inversion"
Signature · 16 lines
2.17.2 From ca0b1c957af072baa73614989a035098c96deb77 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 7 Nov 2018 16:17:11 -0800 Subject: [PATCH 05/43] x86/speculation/mds: Add sysfs reporting Report mds mitigation state in sysfs vulnerabilities. Signed-off-by: Andi Kleen <[email protected]> --- .../ABI/testing/sysfs-devices-system-cpu | 1 + arch/x86/kernel/cpu/bugs.c | 24 +++++++++++++++++++ drivers/base/cpu.c | 8 +++++++ 3 files changed, 33 insertions(+)
Documentation/ABI/testing/sysfs-devices-system-cpu +1 -0
@@ -484,6 +484,7 @@ What: /sys/devices/system/cpu/vulnerabilities /sys/devices/system/cpu/vulnerabilities/spectre_v2 /sys/devices/system/cpu/vulnerabilities/spec_store_bypass /sys/devices/system/cpu/vulnerabilities/l1tf + /sys/devices/system/cpu/vulnerabilities/mds Date: January 2018 Contact: Linux kernel mailing list <[email protected]> Description: Information about CPU vulnerabilities
arch/x86/kernel/cpu/bugs.c +24 -0
@@ -1192,6 +1192,24 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attrif (boot_cpu_has (X86_FEATURE_L1TF_PTEINV ))return l1tf_show_state (buf);break ; + +case X86_BUG_MDS : +if (boot_cpu_has (X86_FEATURE_VERW ) && +boot_cpu_has (X86_FEATURE_MD_CLEAR )) { +if (cpu_smt_control !=CPU_SMT_ENABLED ) { +/* +* Avoid lying when a hypervisor didn't export +* the SMT state. +*/ +if (boot_cpu_has (X86_FEATURE_HYPERVISOR )) +return sprintf (buf, +"Mitigation: microcode, SMT potentially vulnerable\n" ); +return sprintf (buf,"Mitigation: microcode\n" ); + } +return sprintf (buf,"Mitigation: microcode, SMT vulnerable\n" ); + } +return sprintf (buf,"Vulnerable\n" ); +default :break ; }
@@ -1223,4 +1241,10 @@ ssize_t cpu_show_l1tf(struct device *dev, struct device_attribute *attr, char *b {return cpu_show_common (dev, attr, buf,X86_BUG_L1TF ); } + +ssize_t cpu_show_mds (struct device *dev,struct device_attribute *attr,char *buf) +{ +return cpu_show_common (dev, attr, buf,X86_BUG_MDS ); +} +#endif
drivers/base/cpu.c +8 -0
@@ -546,11 +546,18 @@ ssize_t __weak cpu_show_l1tf(struct device *dev,return sprintf (buf,"Not affected\n" ); } +ssize_t __weak cpu_show_mds (struct device *dev, +struct device_attribute *attr,char *buf) +{ +return sprintf (buf,"Not affected\n" ); +} + static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL); static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL); static DEVICE_ATTR(spectre_v2, 0444, cpu_show_spectre_v2, NULL); static DEVICE_ATTR(spec_store_bypass, 0444, cpu_show_spec_store_bypass, NULL); static DEVICE_ATTR(l1tf, 0444, cpu_show_l1tf, NULL); +static DEVICE_ATTR(mds, 0444, cpu_show_mds, NULL);static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_meltdown.attr,
@@ -558,6 +565,7 @@ static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_spectre_v2.attr, &dev_attr_spec_store_bypass.attr, &dev_attr_l1tf.attr, + &dev_attr_mds.attr, NULL };
Signature · 18 lines
2.17.2 From b2bb3840a33a9b0871f786a89ae7c3f98586ab94 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Tue, 18 Dec 2018 16:40:41 -0800 Subject: [PATCH 06/43] mds: Add some administrator documentation Add a Documentation file for administrators that describes MDS on a high level. Needs updates later for public URLs of supporting documentation. Signed-off-by: Andi Kleen <[email protected]> --- Documentation/admin-guide/mds.rst | 95 +++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Documentation/admin-guide/mds.rst
Documentation/admin-guide/mds.rst new file +95 -0
95 lines not on this page · raw message
Signature · 19 lines
2.17.2 From 78426163329c5a6012f28751d06979d9e8880118 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 12 Dec 2018 16:50:07 -0800 Subject: [PATCH 07/43] x86/speculation/mds: Export MD_CLEAR CPUID to KVM guests. Export the MD_CLEAR CPUID set by new microcode to signal that VERW implements the clear cpu side effect to KVM guests. Also requires corresponding qemu patches Tested-by: Neelima Krishnan <[email protected]> Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/kvm/cpuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kvm/cpuid.c +2 -1
@@ -409,7 +409,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,/* cpuid 7.0.edx*/ const u32 kvm_cpuid_7_0_edx_x86_features =F (AVX512_4VNNIW ) |F (AVX512_4FMAPS ) |F (SPEC_CTRL ) | -F (SPEC_CTRL_SSBD ) |F (ARCH_CAPABILITIES ) |F (INTEL_STIBP ); +F (SPEC_CTRL_SSBD ) |F (ARCH_CAPABILITIES ) |F (INTEL_STIBP ) | +F (MD_CLEAR );/* all calls to cpuid_count() should be made on the same cpu */ get_cpu ();
Signature · 18 lines
2.17.2 From 189284e6b2c7e12b9573645ab1c8903c66a72f0a Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 11:50:59 -0800 Subject: [PATCH 08/43] x86/cpufeatures: Add word 20 for additional features We're running out of bits for Linux CPU features, so add a features word 20 for new features. Used in later patches. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/include/asm/cpufeature.h | 6 ++++-- arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/include/asm/disabled-features.h | 3 ++- arch/x86/include/asm/required-features.h | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-)
arch/x86/include/asm/cpufeature.h +4 -2
@@ -81,8 +81,9 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 16, feature_bit) || \ CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 17, feature_bit) || \ CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 18, feature_bit) || \ + CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 19, feature_bit) || \ REQUIRED_MASK_CHECK || \ - BUILD_BUG_ON_ZERO(NCAPINTS != 19)) + BUILD_BUG_ON_ZERO(NCAPINTS != 20))#define DISABLED_MASK_BIT_SET (feature_bit) \ ( CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 0, feature_bit) || \
@@ -104,8 +105,9 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 16, feature_bit) || \ CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 17, feature_bit) || \ CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 18, feature_bit) || \ + CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 19, feature_bit) || \ DISABLED_MASK_CHECK || \ - BUILD_BUG_ON_ZERO(NCAPINTS != 19)) + BUILD_BUG_ON_ZERO(NCAPINTS != 20))#define cpu_has (c, bit) \ (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \
arch/x86/include/asm/cpufeatures.h +1 -1
@@ -13,7 +13,7 @@/* * Defines x86 CPU feature bits */ -#define NCAPINTS 19/* N 32-bit words worth of info */ +#define NCAPINTS 20/* N 32-bit words worth of info */ #define NBUGINTS 1/* N 32-bit bug flags */ /*
arch/x86/include/asm/disabled-features.h +2 -1
@@ -84,6 +84,7 @@#define DISABLED_MASK16 (DISABLE_PKU|DISABLE_OSPKE|DISABLE_LA57|DISABLE_UMIP)#define DISABLED_MASK17 0#define DISABLED_MASK18 0 -#define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 19) +#define DISABLED_MASK19 0 +#define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 20)#endif /* _ASM_X86_DISABLED_FEATURES_H */
arch/x86/include/asm/required-features.h +2 -1
@@ -101,6 +101,7 @@#define REQUIRED_MASK16 0#define REQUIRED_MASK17 0#define REQUIRED_MASK18 0 -#define REQUIRED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 19) +#define REQUIRED_MASK19 0 +#define REQUIRED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 20)#endif /* _ASM_X86_REQUIRED_FEATURES_H */
Signature · 26 lines
2.17.2 From 01242a891f23111fa2ef4831ff49dddb38bc0636 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 12:11:27 -0800 Subject: [PATCH 09/43] x86/speculation/mds: Handle VMENTRY clear for CPUs without l1tf Some Atom CPUs don't have L1TF, but have (parts of) MDS. Normally we rely on the L1TF L1D clear on vm entry to avoid leaking data to the guest. But these Atom CPUs don't support the L1D clear MSR. Add special code to trigger VERW explicitly on KVM guest entry. We use similar logic as the conditional l1d flush, which is default and currently cannot be overriden. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/include/asm/cpufeatures.h | 4 ++++ arch/x86/kernel/cpu/bugs.c | 3 +++ arch/x86/kernel/cpu/common.c | 14 +++++++++++++- arch/x86/kvm/vmx/vmx.c | 20 +++++++++++++++----- 4 files changed, 35 insertions(+), 6 deletions(-)
arch/x86/include/asm/cpufeatures.h +4 -0
@@ -353,6 +353,9 @@#define X86_FEATURE_ARCH_CAPABILITIES (18*32+29)/* IA32_ARCH_CAPABILITIES MSR (Intel) */ #define X86_FEATURE_SPEC_CTRL_SSBD (18*32+31)/* "" Speculative Store Bypass Disable */ +/* Linux defined features, word 19 */ +#define X86_FEATURE_MDS_VMENTRY_FLUSH (19*32+0)/* MDS needs extra flush for vmentry */ +/* * BUG word(s) */
@@ -384,5 +387,6 @@#define X86_BUG_SPEC_STORE_BYPASS X86_BUG(17)/* CPU is affected by speculative store bypass attack */ #define X86_BUG_L1TF X86_BUG(18)/* CPU is affected by L1 Terminal Fault */ #define X86_BUG_MDS X86_BUG(19)/* CPU is affected by Microarchitectural data sampling */ +#define X86_BUG_MDS_NO_L1TF X86_BUG(20)/* MDS but no L1TF L1D flush */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/kernel/cpu/bugs.c +3 -0
@@ -1087,6 +1087,9 @@ static void mds_select_mitigation(void)if (cmdline_find_option_bool (boot_command_line,"mds=full" ) ||cmdline_find_option_bool (boot_command_line,"mds=auto" ))setup_force_cpu_cap (X86_FEATURE_VERW ); + +if (boot_cpu_has (X86_FEATURE_VERW ) &&boot_cpu_has_bug (X86_BUG_MDS_NO_L1TF )) +setup_force_cpu_cap (X86_FEATURE_MDS_VMENTRY_FLUSH ); }#ifdef CONFIG_SYSFS
arch/x86/kernel/cpu/common.c +13 -1
@@ -1006,6 +1006,15 @@ static const __initconst struct x86_cpu_id cpu_no_mds[] = { {} }; +/* CPUs with MDS, but not L1TF, that don't have L1D flush */ +static const __initconst struct x86_cpu_id cpu_mds_no_l1d[] = { + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_AIRMONT }, + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_AIRMONT_MID }, + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_SILVERMONT }, + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_SILVERMONT_X }, + {} +}; +static void __init cpu_set_bug_bits (struct cpuinfo_x86 *c) {u64 ia32_cap =0 ;
@@ -1029,8 +1038,11 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)if ((boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL && !x86_match_cpu (cpu_no_mds)) && - !(ia32_cap &ARCH_CAP_MDS_NO )) + !(ia32_cap &ARCH_CAP_MDS_NO )) {setup_force_cpu_bug (X86_BUG_MDS ); +if (x86_match_cpu (cpu_mds_no_l1d)) +setup_force_cpu_bug (X86_BUG_MDS_NO_L1TF ); + }if (x86_match_cpu (cpu_no_meltdown))return ;
arch/x86/kvm/vmx/vmx.c +15 -5
@@ -5866,27 +5866,36 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)static void vmx_l1d_flush (struct kvm_vcpu *vcpu) {int size =PAGE_SIZE <<L1D_CACHE_ORDER ; +bool flush_l1d = vcpu->arch.l1tf_flush_l1d; + + flush_l1d |=kvm_get_cpu_l1tf_flush_l1d (); + +/* CPUs with MDS_VMENTRY_FLUSH never use the L1D flush below. */ +if (static_cpu_has (X86_FEATURE_MDS_VMENTRY_FLUSH )) { + vcpu->arch.l1tf_flush_l1d = false; +kvm_clear_cpu_l1tf_flush_l1d (); +if (!flush_l1d && !static_key_enabled (&force_cpu_clear)) +return ; +clear_cpu (); +return ; + }/* * This code is only executed when the the flush mode is 'cond' or * 'always' */ if (static_branch_likely (&vmx_l1d_flush_cond)) { -bool flush_l1d; -/* * Clear the per-vcpu flush bit, it gets set again * either from vcpu_run() or from one of the unsafe * VMEXIT handlers. */ - flush_l1d = vcpu->arch.l1tf_flush_l1d; vcpu->arch.l1tf_flush_l1d = false;/* * Clear the per-cpu flush bit, it gets set again from * the interrupt handlers. */ - flush_l1d |=kvm_get_cpu_l1tf_flush_l1d ();kvm_clear_cpu_l1tf_flush_l1d ();if (!flush_l1d)
@@ -6369,7 +6378,8 @@ static void __vmx_vcpu_run(struct kvm_vcpu *vcpu, struct vcpu_vmx *vmx) evmcs_rsp =static_branch_unlikely (&enable_evmcs) ? (unsigned long )¤t_evmcs->host_rsp :0 ; -if (static_branch_unlikely (&vmx_l1d_should_flush)) +if (static_branch_unlikely (&vmx_l1d_should_flush) || +static_cpu_has (X86_FEATURE_MDS_VMENTRY_FLUSH ))vmx_l1d_flush (vcpu); asm(
Signature · 16 lines
2.17.2 From fd985a6564dd500cf316665c5de823cb13843a1d Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 14 Dec 2018 12:55:54 -0800 Subject: [PATCH 10/43] mds: Add documentation for clear cpu usage Including the theory, and some guide lines for subsystem/driver maintainers. Signed-off-by: Andi Kleen <[email protected]> --- Documentation/clearcpu.txt | 261 +++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 Documentation/clearcpu.txt
Documentation/clearcpu.txt new file +261 -0
261 lines not on this page · raw message
Signature · 30 lines
2.17.2 From 070a815f4c3a38e70f39f95b782b90d93be295f3 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 12 Dec 2018 16:43:43 -0800 Subject: [PATCH 11/43] x86/speculation/mds: Introduce lazy_clear_cpu Add basic infrastructure for code to request CPU buffer clearing on the next kernel exit. We have two functions lazy_clear_cpu to request clearing, and lazy_clear_cpu_interrupt to request clearing if running in an interrupt. Non architecture specific code can include linux/clearcpu.h and use lazy_clear_cpu / lazy_clear_interrupt. On x86 we provide low level implementations that sets a per cpu flag to request cpu clearing on the next kernel exit. Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Andi Kleen <[email protected]> --- arch/Kconfig | 3 +++ arch/x86/Kconfig | 1 + arch/x86/include/asm/clearcpu.h | 12 +++++++++-- arch/x86/kernel/cpu/bugs.c | 3 +++ include/linux/clearcpu.h | 36 +++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 include/linux/clearcpu.h
arch/Kconfig +3 -0
@@ -808,6 +808,9 @@ config VMAP_STACK the stack to map directly to the KASAN shadow map using a formula that is incorrect if the stack is in vmalloc space. +config ARCH_HAS_CLEAR_CPU + def_bool n + config ARCH_OPTIONAL_KERNEL_RWX def_bool n
arch/x86/Kconfig +1 -0
@@ -84,6 +84,7 @@ config X86 select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH select ARCH_WANTS_DYNAMIC_TASK_STRUCT select ARCH_WANTS_THP_SWAP if X86_64 + select ARCH_HAS_CLEAR_CPU select BUILDTIME_EXTABLE_SORT select CLKEVT_I8253 select CLOCKSOURCE_VALIDATE_LAST_CYCLE
arch/x86/include/asm/clearcpu.h +10 -2
@@ -5,7 +5,8 @@#include <linux/jump_label.h> #include <linux/sched/smt.h> #include <asm/alternative.h> -#include <linux/thread_info.h> + +DECLARE_PER_CPU (bool, clear_cpu_flag);/* * Clear CPU buffers to avoid side channels.
@@ -34,8 +35,15 @@ static inline void clear_cpu(void)static inline void clear_cpu_idle (void ) { -if (sched_smt_active ()) +if (sched_smt_active ()) { +__this_cpu_write (clear_cpu_flag, false);clear_cpu (); + } +} + +static inline void lazy_clear_cpu (void ) +{ +__this_cpu_write (clear_cpu_flag, true); }#endif
arch/x86/kernel/cpu/bugs.c +3 -0
@@ -1061,6 +1061,9 @@ early_param("l1tf", l1tf_cmdline);#undef pr_fmt +DEFINE_PER_CPU (bool, clear_cpu_flag); +EXPORT_PER_CPU_SYMBOL (clear_cpu_flag); +static void mds_select_mitigation (void ) {if (!boot_cpu_has (X86_BUG_MDS ))
include/linux/clearcpu.h new file +36 -0
@@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_CLEARCPU_H +#define _LINUX_CLEARCPU_H 1 + +#include <linux/preempt.h> + +#ifdef CONFIG_ARCH_HAS_CLEAR_CPU +#include <asm/clearcpu.h> +#else +static inline void lazy_clear_cpu (void ) +{ +} +#endif + +/* +* Use this function when potentially touching (reading or writing) +* user data in an interrupt. In this case schedule to clear the +* CPU buffers on kernel exit to avoid any potential side channels. +* +* If not in an interrupt we assume the touched data belongs to the +* current process and doesn't need to be cleared. +* +* This version is for code who might be in an interrupt. +* If you know for sure you're in interrupt context call +* lazy_clear_cpu directly. +* +* lazy_clear_cpu is reasonably cheap (just sets a bit) and +* can be used in fast paths. +*/ +static inline void lazy_clear_cpu_interrupt (void ) +{ +if (in_interrupt ()) +lazy_clear_cpu (); +} + +#endif
Signature · 23 lines
2.17.2 From 854f25147a77e328f2eedb3437b8a89d58c32e6f Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 12:09:06 -0800 Subject: [PATCH 12/43] x86/speculation/mds: Add basic implementation of mds=full Add a static key to guard clear_cpus on kernel exit and vm entry, so that we can implement a mds=full implementation later, once we have a new lazy policy. Right now the static key is enabled by default, so there is no behavior change. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/entry/common.c | 3 ++- arch/x86/include/asm/clearcpu.h | 2 ++ arch/x86/kernel/cpu/bugs.c | 10 ++++++++-- arch/x86/kernel/nmi.c | 3 ++- 4 files changed, 14 insertions(+), 4 deletions(-)
arch/x86/entry/common.c +2 -1
@@ -212,7 +212,8 @@ __visible inline void prepare_exit_to_usermode(struct pt_regs *regs) ti->status &= ~(TS_COMPAT |TS_I386_REGS_POKED );#endif -clear_cpu (); +if (static_key_enabled (&force_cpu_clear)) +clear_cpu ();user_enter_irqoff (); }
arch/x86/include/asm/clearcpu.h +2 -0
@@ -46,4 +46,6 @@ static inline void lazy_clear_cpu(void) __this_cpu_write(clear_cpu_flag, true); } +DECLARE_STATIC_KEY_FALSE (force_cpu_clear); +#endif
arch/x86/kernel/cpu/bugs.c +8 -2
@@ -1064,6 +1064,9 @@ early_param("l1tf", l1tf_cmdline);DEFINE_PER_CPU (bool, clear_cpu_flag);EXPORT_PER_CPU_SYMBOL (clear_cpu_flag); +DEFINE_STATIC_KEY_FALSE (force_cpu_clear); +EXPORT_SYMBOL (force_cpu_clear); +static void mds_select_mitigation (void ) {if (!boot_cpu_has (X86_BUG_MDS ))
@@ -1086,9 +1089,12 @@ static void mds_select_mitigation(void)setup_force_cpu_cap (X86_FEATURE_VERW );if (cmdline_find_option_bool (boot_command_line,"mds=off" ))setup_clear_cpu_cap (X86_FEATURE_VERW ); -/* Nop currently because this is default for now. */ +/* Default to old behavior for now */ if (cmdline_find_option_bool (boot_command_line,"mds=full" ) || -cmdline_find_option_bool (boot_command_line,"mds=auto" )) + true) +static_branch_enable (&force_cpu_clear); +/* Nop currently because this is default for now. */ +if (cmdline_find_option_bool (boot_command_line,"mds=auto" ))setup_force_cpu_cap (X86_FEATURE_VERW );if (boot_cpu_has (X86_FEATURE_VERW ) &&boot_cpu_has_bug (X86_BUG_MDS_NO_L1TF ))
arch/x86/kernel/nmi.c +2 -1
@@ -535,7 +535,8 @@ do_nmi(struct pt_regs *regs, long error_code) goto nmi_restart; out: -clear_cpu (); +if (static_key_enabled (&force_cpu_clear)) +clear_cpu (); }NOKPROBE_SYMBOL (do_nmi);
Signature · 18 lines
2.17.2 From eb9e95594d366283027574e5e19463be78dcf70b Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 17:02:01 -0800 Subject: [PATCH 13/43] x86/speculation/mds: Check lazy clear in kernel exit Add support for only clearing on kernel exit when the per cpu clear flag is set. This will be the base of lazy clearing. Right now this is a nop because mds=full is still default. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/entry/common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/x86/entry/common.c +5 -1
@@ -212,8 +212,12 @@ __visible inline void prepare_exit_to_usermode(struct pt_regs *regs) ti->status &= ~(TS_COMPAT |TS_I386_REGS_POKED );#endif -if (static_key_enabled (&force_cpu_clear)) +if (static_cpu_has (X86_BUG_MDS ) && + (static_key_enabled (&force_cpu_clear) || +__this_cpu_read (clear_cpu_flag))) {clear_cpu (); +__this_cpu_write (clear_cpu_flag, false); + }user_enter_irqoff (); }
Signature · 24 lines
2.17.2 From 4ff65f2e0b2e00d8658d7514831ce40e1f9ddcaf Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 14 Dec 2018 13:33:03 -0800 Subject: [PATCH 14/43] x86/speculation/mds: Add tracing for clear_cpu Add trace points for clear_cpu and lazy_clear_cpu. This is useful for debugging and performance testing. The trace points have to be partially out of line to avoid include loops, but the fast path jump labels are inlined. The idle case cannot be traced because trace points don't like idle context. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/include/asm/clearcpu.h | 36 +++++++++++++++++++++++++-- arch/x86/include/asm/trace/clearcpu.h | 27 ++++++++++++++++++++ arch/x86/kernel/cpu/bugs.c | 17 +++++++++++++ 3 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 arch/x86/include/asm/trace/clearcpu.h
arch/x86/include/asm/clearcpu.h +34 -2
@@ -6,6 +6,29 @@#include <linux/sched/smt.h> #include <asm/alternative.h> +/* +* We cannot directly include the trace point header here +* because it leads to include loops with other trace point +* files pulling this one in. Define the static +* key manually here, which handles noping the fast path, +* and the actual tracing is done out of line. +*/ +#ifdef CONFIG_TRACEPOINTS +#include <asm/atomic.h> +#include <linux/tracepoint-defs.h> + +extern struct tracepoint __tracepoint_clear_cpu; +extern struct tracepoint __tracepoint_lazy_clear_cpu; +#define cc_tracepoint_active (t) static_key_false(&(t).key) + +extern void do_trace_clear_cpu (void ); +extern void do_trace_lazy_clear_cpu (void ); +#else +#define cc_tracepoint_active (t) false +static inline void do_trace_clear_cpu (void ) {} +static inline void do_trace_lazy_clear_cpu (void ) {} +#endif +DECLARE_PER_CPU (bool, clear_cpu_flag);/*
@@ -13,7 +36,7 @@ DECLARE_PER_CPU(bool, clear_cpu_flag);* We use microcode as a side effect of the obsolete VERW instruction */ -static inline void clear_cpu (void ) +static inline void __clear_cpu (void ) {unsigned kernel_ds = __KERNEL_DS;/* Has to be memory form, don't modify to use an register */
@@ -21,6 +44,13 @@ static inline void clear_cpu(void) [kernelds] "m" (kernel_ds)); } +static inline void clear_cpu (void ) +{ +if (cc_tracepoint_active (__tracepoint_clear_cpu)) +do_trace_clear_cpu (); +__clear_cpu (); +} +/* * Clear CPU buffers before going idle, so that no state is leaked to SMT * siblings taking over thread resources.
@@ -37,12 +67,14 @@ static inline void clear_cpu_idle(void) {if (sched_smt_active ()) {__this_cpu_write (clear_cpu_flag, false); -clear_cpu (); +__clear_cpu (); } }static inline void lazy_clear_cpu (void ) { +if (cc_tracepoint_active (__tracepoint_lazy_clear_cpu)) +do_trace_lazy_clear_cpu ();__this_cpu_write (clear_cpu_flag, true); }
arch/x86/include/asm/trace/clearcpu.h new file +27 -0
@@ -0,0 +1,27 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM clearcpu + +#if !defined(_TRACE_CLEARCPU_H) || defined(TRACE_HEADER_MULTI_READ ) + +#include <linux/tracepoint.h> + +DECLARE_EVENT_CLASS (clear_cpu, + TP_PROTO(int dummy), +TP_ARGS (dummy), +TP_STRUCT__entry (__field (int, dummy)), +TP_fast_assign (), +TP_printk ("%d" , __entry->dummy)); + +DEFINE_EVENT(clear_cpu, clear_cpu, TP_PROTO(int dummy), TP_ARGS(dummy)); +DEFINE_EVENT(clear_cpu, lazy_clear_cpu, TP_PROTO(int dummy), TP_ARGS(dummy)); + +#define _TRACE_CLEARCPU_H + +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH asm/trace/ +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE clearcpu +#endif /* _TRACE_CLEARCPU_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h>
arch/x86/kernel/cpu/bugs.c +17 -0
@@ -1061,6 +1061,23 @@ early_param("l1tf", l1tf_cmdline);#undef pr_fmt +#define CREATE_TRACE_POINTS +#include <asm/trace/clearcpu.h> + +void do_trace_clear_cpu (void ) +{ +trace_clear_cpu (0 ); +} +EXPORT_SYMBOL (do_trace_clear_cpu); +EXPORT_TRACEPOINT_SYMBOL (clear_cpu); + +void do_trace_lazy_clear_cpu (void ) +{ +trace_lazy_clear_cpu (0 ); +} +EXPORT_SYMBOL (do_trace_lazy_clear_cpu); +EXPORT_TRACEPOINT_SYMBOL (lazy_clear_cpu); +DEFINE_PER_CPU (bool, clear_cpu_flag);EXPORT_PER_CPU_SYMBOL (clear_cpu_flag);
Signature · 28 lines
2.17.2 From 80f966f2e8e5c82fa364c2ae1969712a497faad7 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 12 Dec 2018 16:49:56 -0800 Subject: [PATCH 15/43] x86/speculation/mds: Schedule cpu clear on context switch On context switch we need to schedule a cpu clear on the next kernel exit when: - We're switching between different processes - We're switching from a kernel thread For kernel threads like work queue assume they might contain sensitive (other user's or crypto) data. switch_mm already distinguishes these cases. We either schedule a flush when the mm is different, or we were in lazy mm mode, which means a kernel thread ran before. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/kernel/process.h | 1 + arch/x86/mm/tlb.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+)
arch/x86/kernel/process.h +1 -0
@@ -2,6 +2,7 @@// // Code shared between 32 and 64 bit +#include <linux/clearcpu.h> #include <asm/spec-ctrl.h> void __switch_to_xtra (struct task_struct *prev_p,struct task_struct *next_p);
arch/x86/mm/tlb.c +14 -0
@@ -342,6 +342,13 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next, !cpumask_test_cpu(cpu, mm_cpumask(next))))cpumask_set_cpu (cpu,mm_cpumask (next)); +/* +* We switched through a kernel thread, so schedule +* a cpu clear to protect the thread. +*/ +if (static_cpu_has_bug (X86_BUG_MDS ) && was_lazy) +lazy_clear_cpu (); +/* * If the CPU is not in lazy TLB mode, we are just switching * from one thread in a process to another thread in the same
@@ -376,6 +383,13 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,*/ cond_ibpb (tsk); +/* +* We're switching to a different process, so schedule +* a cpu clear. +*/ +if (static_cpu_has_bug (X86_BUG_MDS )) +lazy_clear_cpu (); +if (IS_ENABLED (CONFIG_VMAP_STACK )) {/* * If our current stack is in vmalloc space and isn't
Signature · 21 lines
2.17.2 From 0baa13e0fdc84704648a70a15408eb543a6b5158 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 14 Dec 2018 17:26:14 -0800 Subject: [PATCH 16/43] mds: Force clear cpu on kernel preemption When the kernel is preempted we need to force a cpu clear, because the preemption might happen before the code has a chance to set TIF_CPU_CLEAR later. We cannot rely on kernel code setting the flag before touching sensitive data: the flag setting could be implicit, like in memzero_explicit, which is always called later. Signed-off-by: Andi Kleen <[email protected]> --- kernel/sched/core.c | 9 +++++++++ 1 file changed, 9 insertions(+)
kernel/sched/core.c +9 -0
@@ -11,6 +11,8 @@#include <linux/kcov.h> +#include <linux/clearcpu.h> +#include <asm/switch_to.h> #include <asm/tlb.h>
@@ -3632,6 +3634,13 @@ asmlinkage __visible void __sched notrace preempt_schedule(void)if (likely (!preemptible ()))return ; +/* +* For kernel preemption we need to force a cpu clear +* because it could happen before the code has a chance +* to set TIF_CLEAR_CPU. +*/ +lazy_clear_cpu (); +preempt_schedule_common (); }NOKPROBE_SYMBOL (preempt_schedule);
Signature · 22 lines
2.17.2 From 1b68758ce8fb90ccdb63c1d3e7198e3d0e2356b0 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 12 Dec 2018 16:44:52 -0800 Subject: [PATCH 17/43] mds: Clear cpu in memzero_explicit and kzfree Assume that any code using these functions is sensitive and shouldn't leak any data. This handles clearing for key and cryptographic data used in the kernel. It also schedules a clear after each get_random_bytes, which while being slightly overkill, may protect some hash table key secrets. Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Andi Kleen <[email protected]> --- lib/string.c | 6 ++++++ mm/slab_common.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-)
lib/string.c +6 -0
@@ -28,6 +28,7 @@#include <linux/bug.h> #include <linux/errno.h> #include <linux/slab.h> +#include <linux/clearcpu.h> #include <asm/byteorder.h> #include <asm/word-at-a-time.h>
@@ -715,12 +716,17 @@ EXPORT_SYMBOL(memset);* necessary, memzero_explicit() should be used instead in * order to prevent the compiler from optimising away zeroing. * +* As a side effect this may also trigger extra cleaning +* of CPU state before the next kernel exit to avoid +* side channels. +* * memzero_explicit() doesn't need an arch-specific version as * it just invokes the one of memset() implicitly. */ void memzero_explicit (void *s,size_t count) {memset (s,0 , count); +lazy_clear_cpu ();barrier_data (s); }EXPORT_SYMBOL (memzero_explicit);
mm/slab_common.c +4 -1
@@ -1576,6 +1576,9 @@ EXPORT_SYMBOL(krealloc);* Note: this function zeroes the whole allocated buffer which can be a good * deal bigger than the requested buffer size passed to kmalloc(). So be * careful when using this function in performance sensitive code. +* +* As a side effect this may also clear CPU state later before the +* next kernel exit to avoid side channels. */ void kzfree (const void *p) {
@@ -1585,7 +1588,7 @@ void kzfree(const void *p)if (unlikely (ZERO_OR_NULL_PTR (mem)))return ; ks =ksize (mem); -memset (mem,0 , ks); +memzero_explicit (mem, ks);kfree (mem); }EXPORT_SYMBOL (kzfree);
Signature · 23 lines
2.17.2 From aacc7f4f028bef818e6fc46efaa234bec22f66bf Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 12 Dec 2018 16:51:44 -0800 Subject: [PATCH 18/43] mds: Support cpu clear in interrupts According to an audit the majority of interrupt handlers do not touch user data. But some do. Add a IRQ_F_USER_DATA flag to enable clearing after an interrupt. Future patches will add this flag to interrupts that need it. Signed-off-by: Andi Kleen <[email protected]> --- include/linux/interrupt.h | 2 ++ kernel/irq/handle.c | 4 ++++ kernel/irq/manage.c | 1 + 3 files changed, 7 insertions(+)
include/linux/interrupt.h +2 -0
@@ -61,6 +61,7 @@* interrupt handler after suspending interrupts. For system * wakeup devices users need to implement wakeup detection in * their interrupt handlers. +* IRQF_USER_DATA - Interrupt does touch user data */ #define IRQF_SHARED 0x00000080#define IRQF_PROBE_SHARED 0x00000100
@@ -74,6 +75,7 @@#define IRQF_NO_THREAD 0x00010000#define IRQF_EARLY_RESUME 0x00020000#define IRQF_COND_SUSPEND 0x00040000 +#define IRQF_USER_DATA 0x00080000#define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD)
kernel/irq/handle.c +4 -0
@@ -13,6 +13,7 @@#include <linux/sched.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> +#include <linux/clearcpu.h> #include <trace/events/irq.h>
@@ -149,6 +150,9 @@ irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc, unsigned int *flags res = action->handler (irq, action->dev_id);trace_irq_handler_exit (irq, action, res); +if (action->flags &IRQF_USER_DATA ) +lazy_clear_cpu (); +if (WARN_ONCE (!irqs_disabled (),"irq %u handler %pF enabled interrupts\n" , irq, action->handler))local_irq_disable ();
kernel/irq/manage.c +1 -0
@@ -1796,6 +1796,7 @@ EXPORT_SYMBOL(free_irq);* * IRQF_SHARED Interrupt is shared * IRQF_TRIGGER_* Specify active edge(s) or level +* IRQF_USER_DATA Handler touches user data with CPU. * */ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
Signature · 20 lines
2.17.2 From cbc899cd4eeb4ea9acc843ea5eaffcaaba8d6f9e Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Thu, 13 Dec 2018 11:28:55 -0800 Subject: [PATCH 19/43] mds: Support cpu clear after tasklets tasklets run asynchronously to user processes. Most tasklets don't touch user data, but some do. Add a per tasklet flag to request CPU clearing after the tasklet executes. Later patches will use this to mark tasklets that need it. Signed-off-by: Andi Kleen <[email protected]> --- include/linux/interrupt.h | 16 +++++++++++++++- kernel/softirq.c | 25 +++++++++++++++++++------ 2 files changed, 34 insertions(+), 7 deletions(-)
include/linux/interrupt.h +15 -1
@@ -572,11 +572,22 @@ struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data }#define DECLARE_TASKLET_DISABLED (name, func, data) \ struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data } +#define DECLARE_TASKLET_USERDATA (name, func, data) \ +struct tasklet_struct name = { NULL, TASKLET_USER_DATA, ATOMIC_INIT(0), func, data } + +#define DECLARE_TASKLET_USERDATA_DISABLED (name, func, data) \ +struct tasklet_struct name = { NULL, TASKLET_USER_DATA, ATOMIC_INIT(1), func, data }enum {TASKLET_STATE_SCHED ,/* Tasklet is scheduled for execution */ -TASKLET_STATE_RUN /* Tasklet is running (SMP only) */ +TASKLET_STATE_RUN ,/* Tasklet is running (SMP only) */ + +/* +* Set this flag when the tasklet is known to touch user data, +* so needs extra CPU state clearing. +*/ +TASKLET_USER_DATA =1 <<5 , };#ifdef CONFIG_SMP
@@ -640,6 +651,9 @@ extern void tasklet_kill(struct tasklet_struct *t);extern void tasklet_kill_immediate (struct tasklet_struct *t,unsigned int cpu);extern void tasklet_init (struct tasklet_struct *t,void (*func)(unsigned long ),unsigned long data); +extern void tasklet_init_flags (struct tasklet_struct *t, +void (*func)(unsigned long ),unsigned long data, +unsigned flags);struct tasklet_hrtimer {struct hrtimer timer;
kernel/softirq.c +19 -6
@@ -26,6 +26,7 @@#include <linux/smpboot.h> #include <linux/tick.h> #include <linux/irq.h> +#include <linux/clearcpu.h> #define CREATE_TRACE_POINTS #include <trace/events/irq.h>
@@ -522,6 +523,8 @@ static void tasklet_action_common(struct softirq_action *a,BUG (); t->func (t->data);tasklet_unlock (t); +if (t->state &TASKLET_USER_DATA ) +lazy_clear_cpu ();continue ; }tasklet_unlock (t);
@@ -546,15 +549,23 @@ static __latent_entropy void tasklet_hi_action(struct softirq_action *a)tasklet_action_common (a,this_cpu_ptr (&tasklet_hi_vec),HI_SOFTIRQ ); } -void tasklet_init (struct tasklet_struct *t, -void (*func)(unsigned long ),unsigned long data) +void tasklet_init_flags (struct tasklet_struct *t, +void (*func)(unsigned long ),unsigned long data, +unsigned flags) { t->next =NULL ; - t->state =0 ; + t->state = flags;atomic_set (&t->count,0 ); t->func = func; t->data = data; } +EXPORT_SYMBOL (tasklet_init_flags); + +void tasklet_init (struct tasklet_struct *t, +void (*func)(unsigned long ),unsigned long data) +{ +tasklet_init_flags (t, func, data,0 ); +}EXPORT_SYMBOL (tasklet_init);void tasklet_kill (struct tasklet_struct *t)
@@ -609,7 +620,8 @@ static void __tasklet_hrtimer_trampoline(unsigned long data)* @ttimer: tasklet_hrtimer which is initialized * @function: hrtimer callback function which gets called from softirq context * @which_clock: clock id (CLOCK_MONOTONIC/CLOCK_REALTIME) -* @mode: hrtimer mode (HRTIMER_MODE_ABS/HRTIMER_MODE_REL) +* @mode: hrtimer mode (HRTIMER_MODE_ABS/HRTIMER_MODE_REL), +* HRTIMER_MODE_NO_USER */ void tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer, enum hrtimer_restart (*function)(struct hrtimer *),
@@ -617,8 +629,9 @@ void tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer, {hrtimer_init (&ttimer->timer, which_clock, mode); ttimer->timer.function = __hrtimer_tasklet_trampoline; -tasklet_init (&ttimer->tasklet, __tasklet_hrtimer_trampoline, - (unsigned long )ttimer); +tasklet_init_flags (&ttimer->tasklet, __tasklet_hrtimer_trampoline, + (unsigned long )ttimer, + (mode &HRTIMER_MODE_USER_DATA ) ?TASKLET_USER_DATA :0 ); ttimer->function = function; }EXPORT_SYMBOL_GPL (tasklet_hrtimer_init);
Signature · 29 lines
2.17.2 From bc943dbde5fed39fe2bfb0d6a3710f44ba6ffad5 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 12 Dec 2018 16:46:09 -0800 Subject: [PATCH 20/43] mds: Support cpu clearing in timers Timers run asynchronously to user processes. According to an audit most timer handlers do not touch user data, so don't need to clear. But some do. Add flags to normal and hrtimers to request clearing. Future patches will use these flags to mark timers that touch user data. Note this takes one bit from the timer wheel index field away, but it seems there are less wheels available anyways, so that should be ok. Signed-off-by: Andi Kleen <[email protected]> --- include/linux/hrtimer.h | 4 ++++ include/linux/timer.h | 14 +++++++++++--- kernel/time/hrtimer.c | 5 +++++ kernel/time/timer.c | 8 ++++++++ 4 files changed, 28 insertions(+), 3 deletions(-)
include/linux/hrtimer.h +4 -0
@@ -32,6 +32,7 @@ struct hrtimer_cpu_base;* when starting the timer) * HRTIMER_MODE_SOFT - Timer callback function will be executed in * soft irq context +* HRTIMER_MODE_USER_DATA - Handler does touch user data. */ enum hrtimer_mode {HRTIMER_MODE_ABS =0x00 ,
@@ -48,6 +49,7 @@ enum hrtimer_mode {HRTIMER_MODE_ABS_PINNED_SOFT =HRTIMER_MODE_ABS_PINNED |HRTIMER_MODE_SOFT ,HRTIMER_MODE_REL_PINNED_SOFT =HRTIMER_MODE_REL_PINNED |HRTIMER_MODE_SOFT , + HRTIMER_MODE_USER_DATA = 0x08, };/*
@@ -101,6 +103,7 @@ enum hrtimer_restart {* @state: state information (See bit values above) * @is_rel: Set if the timer was armed relative * @is_soft: Set if hrtimer will be expired in soft interrupt context. +* @user_data: function does touch user data. * * The hrtimer structure must be initialized by hrtimer_init() */
@@ -112,6 +115,7 @@ struct hrtimer {u8 state;u8 is_rel;u8 is_soft; +u8 user_data; };/**
include/linux/timer.h +11 -3
@@ -56,10 +56,13 @@ struct timer_list {#define TIMER_DEFERRABLE 0x00080000#define TIMER_PINNED 0x00100000#define TIMER_IRQSAFE 0x00200000 -#define TIMER_ARRAYSHIFT 22 -#define TIMER_ARRAYMASK 0xFFC00000 +#define TIMER_USER_DATA 0x00400000 +#define TIMER_ARRAYSHIFT 23 +#define TIMER_ARRAYMASK 0xFF800000 -#define TIMER_TRACE_FLAGMASK (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE) +#define TIMER_TRACE_FLAGMASK \ + (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE | \ + TIMER_USER_DATA)#define __TIMER_INITIALIZER (_function, _flags) { \ .entry = { .next = TIMER_ENTRY_STATIC }, \
@@ -73,6 +76,11 @@ struct timer_list {struct timer_list _name = \ __TIMER_INITIALIZER(_function, 0) +#define DEFINE_TIMER_USERDATA (_name, _function) \ + struct timer_list _name = \ + __TIMER_INITIALIZER(_function, TIMER_USER_DATA) + +/* * LOCKDEP and DEBUG timer interfaces. */
kernel/time/hrtimer.c +5 -0
@@ -42,6 +42,7 @@#include <linux/timer.h> #include <linux/freezer.h> #include <linux/compat.h> +#include <linux/clearcpu.h> #include <linux/uaccess.h>
@@ -1276,6 +1277,7 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, clock_id =CLOCK_MONOTONIC ; base +=hrtimer_clockid_to_base (clock_id); + timer->user_data = !!(mode &HRTIMER_MODE_USER_DATA ); timer->is_soft = softtimer; timer->base = &cpu_base->clock_base[base];timerqueue_init (&timer->node);
@@ -1390,6 +1392,9 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,trace_hrtimer_expire_exit (timer);raw_spin_lock_irq (&cpu_base->lock); +if (timer->user_data) +lazy_clear_cpu (); +/* * Note: We clear the running state after enqueue_hrtimer and * we do not reprogram the event hardware. Happens either in
kernel/time/timer.c +8 -0
@@ -43,6 +43,7 @@#include <linux/sched/debug.h> #include <linux/slab.h> #include <linux/compat.h> +#include <linux/clearcpu.h> #include <linux/uaccess.h> #include <asm/unistd.h>
@@ -1338,6 +1339,13 @@ static void call_timer_fn(struct timer_list *timer, void (*fn)(struct timer_list*/ preempt_count_set (count); } + +/* +* The timer might have touched user data. Schedule +* a cpu clear on the next kernel exit. +*/ +if (timer->flags &TIMER_USER_DATA ) +lazy_clear_cpu (); }static void expire_timers (struct timer_base *base,struct hlist_head *head)
Signature · 21 lines
2.17.2 From 98f7c0f06b1e36a30b1f45e92890bd1ac84cd4e8 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Thu, 13 Dec 2018 11:28:23 -0800 Subject: [PATCH 21/43] mds: Clear cpu for string io/memcpy_*io in interrupts Schedule a clear cpu on next kernel exit for string PIO or memcpy_from/to_io calls, when they are called in interrupts. The PIO case is likely already handled by old drivers not opting in their interrupt handlers to not clear, but let's do it just to be sure. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/include/asm/io.h | 3 +++ include/asm-generic/io.h | 3 +++ 2 files changed, 6 insertions(+)
arch/x86/include/asm/io.h +3 -0
@@ -40,6 +40,7 @@#include <linux/string.h> #include <linux/compiler.h> +#include <linux/clearcpu.h> #include <asm/page.h> #include <asm/early_ioremap.h> #include <asm/pgtable_types.h>
@@ -321,6 +322,7 @@ static inline void outs##bwl(int port, const void *addr, unsigned long count) \ : "+S"(addr), "+c"(count) \ : "d"(port) : "memory"); \ } \ +lazy_clear_cpu_interrupt (); \ } \ \ static inline void ins##bwl(int port, void *addr, unsigned long count) \
@@ -337,6 +339,7 @@ static inline void ins##bwl(int port, void *addr, unsigned long count) \ : "+D"(addr), "+c"(count) \ : "d"(port) : "memory"); \ } \ +lazy_clear_cpu_interrupt (); \ }BUILDIO (b, b, char)
include/asm-generic/io.h +3 -0
@@ -14,6 +14,7 @@#include <asm/page.h> /* I/O is all done through memory accesses */ #include <linux/string.h> /* for memset() and memcpy() */ #include <linux/types.h> +#include <linux/clearcpu.h> #ifdef CONFIG_GENERIC_IOMAP #include <asm-generic/iomap.h>
@@ -1115,6 +1116,7 @@ static inline void memcpy_fromio(void *buffer, size_t size) {memcpy (buffer,__io_virt (addr), size); +lazy_clear_cpu_interrupt (); }#endif
@@ -1132,6 +1134,7 @@ static inline void memcpy_toio(volatile void __iomem *addr, const void *buffer, size_t size) {memcpy (__io_virt (addr), buffer, size); +lazy_clear_cpu_interrupt (); }#endif
Signature · 15 lines
2.17.2 From 8ac686596e570cf68000220b07fd4053545e09a9 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Thu, 13 Dec 2018 11:29:09 -0800 Subject: [PATCH 22/43] mds: Schedule clear cpu in swiotlb Schedule a cpu clear on next kernel exit for swiotlb running in interrupt context, since it touches user data with the CPU. Signed-off-by: Andi Kleen <[email protected]> --- kernel/dma/swiotlb.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/dma/swiotlb.c +2 -0
@@ -34,6 +34,7 @@#include <linux/scatterlist.h> #include <linux/mem_encrypt.h> #include <linux/set_memory.h> +#include <linux/clearcpu.h> #include <asm/io.h> #include <asm/dma.h>
@@ -422,6 +423,7 @@ static void swiotlb_bounce(phys_addr_t orig_addr, phys_addr_t tlb_addr, }else {memcpy (phys_to_virt (orig_addr), vaddr, size); } +lazy_clear_cpu_interrupt (); } phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,
Signature · 27 lines
2.17.2 From f189101338e9ff243f5137270691253da8d6fcbb Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 12 Dec 2018 16:44:07 -0800 Subject: [PATCH 23/43] mds: Instrument skb functions to clear cpu automatically Instrument some strategic skbuff functions that either touch packet data directly, or are likely followed by a user data touch like a memcpy, to schedule a cpu clear on next kernel exit. This is only done inside interrupts, outside we assume it only touches the current processes' data. In principle network data should be encrypted anyways, but it's better to not leak it. This provides protection for the network softirq. Needs more auditing. Signed-off-by: Andi Kleen <[email protected]> --- include/linux/skbuff.h | 2 ++ net/core/skbuff.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+)
include/linux/skbuff.h +2 -0
@@ -40,6 +40,7 @@#include <linux/in6.h> #include <linux/if_packet.h> #include <net/flow.h> +#include <linux/clearcpu.h> /* The interface for checksum offload between the stack and networking drivers * is as follows...
@@ -2093,6 +2094,7 @@ static inline void *__skb_put(struct sk_buff *skb, unsigned int len)SKB_LINEAR_ASSERT (skb); skb->tail += len; skb->len += len; +lazy_clear_cpu_interrupt ();return tmp; }
net/core/skbuff.c +32 -0
@@ -63,6 +63,7 @@#include <linux/errqueue.h> #include <linux/prefetch.h> #include <linux/if_vlan.h> +#include <linux/clearcpu.h> #include <net/protocol.h> #include <net/dst.h>
@@ -1189,6 +1190,9 @@ int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask)if (!num_frags) goto release; +/* Likely to copy user data */ +lazy_clear_cpu_interrupt (); + new_frags = (__skb_pagelen (skb) +PAGE_SIZE -1 ) >>PAGE_SHIFT ;for (i =0 ; i < new_frags; i++) { page =alloc_page (gfp_mask);
@@ -1353,6 +1357,9 @@ struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask)if (!n)return NULL ; +/* Copies user data */ +lazy_clear_cpu_interrupt (); +/* Set the data pointer */ skb_reserve (n, headerlen);/* Set the tail pointer and length */
@@ -1460,6 +1467,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, size =SKB_DATA_ALIGN (size); +lazy_clear_cpu_interrupt ();if (skb_pfmemalloc (skb)) gfp_mask |= __GFP_MEMALLOC; data = kmalloc_reserve(size + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
@@ -1524,6 +1532,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,if (!skb->sk || skb->destructor == sock_edemux) skb->truesize += size - osize; +return 0 ; nofrags:
@@ -1588,6 +1597,9 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb,if (!n)return NULL ; +/* May copy user data */ +lazy_clear_cpu_interrupt (); +skb_reserve (n, newheadroom);/* Set the tail pointer and length */
@@ -1676,6 +1688,8 @@ EXPORT_SYMBOL(__skb_pad);void *pskb_put (struct sk_buff *skb,struct sk_buff *tail,int len) { +/* Likely to be followed by a user data copy */ +lazy_clear_cpu_interrupt ();if (tail != skb) { skb->data_len += len; skb->len += len;
@@ -1701,6 +1715,8 @@ void *skb_put(struct sk_buff *skb, unsigned int len) skb->len += len;if (unlikely (skb->tail > skb->end))skb_over_panic (skb, len,__builtin_return_address (0 )); +/* Likely to be followed by a user data copy */ +lazy_clear_cpu_interrupt ();return tmp; }EXPORT_SYMBOL (skb_put);
@@ -1720,6 +1736,7 @@ void *skb_push(struct sk_buff *skb, unsigned int len) skb->len += len;if (unlikely (skb->data < skb->head))skb_under_panic (skb, len,__builtin_return_address (0 )); +/* No clear cpu, assume this is only header data */ return skb->data; }EXPORT_SYMBOL (skb_push);
@@ -2026,6 +2043,9 @@ int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len)struct sk_buff *frag_iter;int i, copy; +/* Copies user data */ +lazy_clear_cpu_interrupt (); +if (offset > (int )skb->len - len) goto fault;
@@ -2113,6 +2133,8 @@ static struct page *linear_to_page(struct page *page, unsigned int *len, {struct page_frag *pfrag =sk_page_frag (sk); +lazy_clear_cpu_interrupt (); +if (!sk_page_frag_refill (sk, pfrag))return NULL ;
@@ -2387,6 +2409,9 @@ int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len)struct sk_buff *frag_iter;int i, copy; +/* Copies user data */ +lazy_clear_cpu_interrupt (); +if (offset > (int )skb->len - len) goto fault;
@@ -2467,6 +2492,9 @@ __wsum __skb_checksum(const struct sk_buff *skb, int offset, int len,struct sk_buff *frag_iter;int pos =0 ; +/* Reads packet data */ +lazy_clear_cpu_interrupt (); +/* Checksum header. */ if (copy >0 ) {if (copy > len)
@@ -2559,6 +2587,9 @@ __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,struct sk_buff *frag_iter;int pos =0 ; +/* Reads packet data */ +lazy_clear_cpu_interrupt (); +/* Copy header. */ if (copy >0 ) {if (copy > len)
@@ -3445,6 +3476,7 @@ void *skb_pull_rcsum(struct sk_buff *skb, unsigned int len)BUG_ON (len > skb->len);__skb_pull (skb, len);skb_postpull_rcsum (skb, data, len); +lazy_clear_cpu_interrupt ();return skb->data; }EXPORT_SYMBOL_GPL (skb_pull_rcsum);
Signature · 17 lines
2.17.2 From 31a680f05623b84c19ea4fc6dc2b0694cd19f7d4 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 13:14:15 -0800 Subject: [PATCH 24/43] mds: Clear cpu for kmap_atomic in interrupts Some block drivers do kmap_atomic to access user data in interrupts. Add lazy_clear_cpu_interrupt to kmap_atomic to avoid having to patch these drivers. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/mm/highmem_32.c | 3 +++ include/linux/highmem.h | 2 ++ 2 files changed, 5 insertions(+)
arch/x86/mm/highmem_32.c +3 -0
@@ -2,6 +2,7 @@#include <linux/export.h> #include <linux/swap.h> /* for totalram_pages */ #include <linux/memblock.h> +#include <linux/clearcpu.h> void *kmap (struct page *page) {
@@ -38,6 +39,8 @@ void *kmap_atomic_prot(struct page *page, pgprot_t prot)preempt_disable ();pagefault_disable (); +lazy_clear_cpu_interrupt (); +if (!PageHighMem (page))return page_address (page);
include/linux/highmem.h +2 -0
@@ -8,6 +8,7 @@#include <linux/mm.h> #include <linux/uaccess.h> #include <linux/hardirq.h> +#include <linux/clearcpu.h> #include <asm/cacheflush.h>
@@ -92,6 +93,7 @@ static inline void *kmap_atomic(struct page *page) {preempt_disable ();pagefault_disable (); +lazy_clear_cpu_interrupt ();return page_address (page); }#define kmap_atomic_prot (page, prot) kmap_atomic(page)
Signature · 65 lines
2.17.2 From c5dc8a58910fc59fdd90c2dcd0a61d0c049ff814 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Tue, 18 Dec 2018 16:46:10 -0800 Subject: [PATCH 25/43] mds: Support cpu clearing for BPF BPF allows the user to run untrusted code in the kernel. Normally MDS would allow some information leakage either from other processes or sensitive kernel code to the user controlled BPF code. We cannot rule out that BPF code contains an MDS exploit and it is difficult to pattern match gadgets. The patch aims to add limited number of clear cpus before BPF executions to guarantee EBPF executions cannot leak data. Assume BPF execution does not touch other user's data, so does not need to schedule a clear for itself. For EBPF programs loaded privileged (by root) we never clear, because we already assume they are trusted. When the BPF program was loaded unprivileged clear the CPU before the BPF execution, depending on the context it is running in: We only do this when running in an interrupt, or if an clear cpu is already scheduled (which means for example there was a context switch, or crypto operation before) In process context we check if the current process context has the same userns+euid as the process who created the BPF. This handles the common seccomp filter case without any extra clears, but still adds clears when e.g. a socket filter runs on a socket inherited to a process with different user id. It also handles various other common cases. Technically we would only need to do this if the BPF program contains conditional branches and loads dominated by them, but let's assume that near all do. For example for running chromium with seccomp filters I see only 15-18% of all sandbox system calls have a clear, most are likely caused by context switches Unprivileged EBPF usages in interrupts currently always clear. This could be further optimized by allowing callers that do a lot of individual BPF runs and are sure they don't touch other user's data (that is not accessible to the EBPF anyways) inbetween to do the clear only once at the beginning. We can add such optimizations later based on profile data. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/include/asm/clearbpf.h | 29 +++++++++++++++++++++++++++++ include/linux/filter.h | 21 +++++++++++++++++++-- kernel/bpf/core.c | 2 ++ kernel/bpf/cpumap.c | 3 +++ 4 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 arch/x86/include/asm/clearbpf.h
arch/x86/include/asm/clearbpf.h new file +29 -0
@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_CLEARBPF_H +#define _ASM_CLEARBPF_H 1 + +#include <linux/clearcpu.h> +#include <linux/cred.h> +#include <asm/cpufeatures.h> + +/* +* When the BPF program was loaded unprivileged, clear the CPU +* to prevent any exploits written in BPF using side channels to read +* data leaked from other kernel code. In some cases, like +* process context with the same uid, we can avoid it. +* +* See Documentation/clearcpu.txt for more details. +*/ +static inline void arch_bpf_prepare_nonpriv (kuid_t uid) +{ +if (!static_cpu_has (X86_BUG_MDS )) +return ; +if (in_interrupt () || +__this_cpu_read (clear_cpu_flag) || + !uid_eq (current_euid (), uid)) { +clear_cpu (); +__this_cpu_write (clear_cpu_flag,0 ); + } +} + +#endif
include/linux/filter.h +19 -2
@@ -20,12 +20,21 @@#include <linux/set_memory.h> #include <linux/kallsyms.h> #include <linux/if_vlan.h> +#include <linux/clearcpu.h> #include <net/sch_generic.h> #include <uapi/linux/filter.h> #include <uapi/linux/bpf.h> +#ifdef CONFIG_ARCH_HAS_CLEAR_CPU +#include <asm/clearbpf.h> +#else +static inline void arch_bpf_prepare_nonpriv (kuid_t uid) +{ +} +#endif +struct sk_buff ;struct sock ;struct seccomp_data ;
@@ -490,7 +499,9 @@ struct bpf_prog { blinded:1, /* Was blinded */ is_func:1, /* program is a bpf function */ kprobe_override:1, /* Do we override a kprobe? */ - has_callchain_buf:1; /* callchain buffer allocated? */ + has_callchain_buf:1, /* callchain buffer allocated? */ + priv:1; /* Was loaded privileged */ +kuid_t uid;/* Original uid who created it */ enum bpf_prog_type type;/* Type of BPF program */ enum bpf_attach_type expected_attach_type;/* For some prog types */ u32 len;/* Number of filter blocks */
@@ -513,7 +524,13 @@ struct sk_filter {struct bpf_prog *prog; }; -#define BPF_PROG_RUN (filter, ctx) (*(filter)->bpf_func)(ctx, (filter)->insnsi) +static inline unsigned _bpf_prog_run (const struct bpf_prog *bp,const void *ctx) +{ +if (!bp->priv) +arch_bpf_prepare_nonpriv (bp->uid); +return bp->bpf_func (ctx, bp->insnsi); +} +#define BPF_PROG_RUN (filter, ctx) _bpf_prog_run(filter, ctx)#define BPF_SKB_CB_LEN QDISC_CB_PRIV_LEN
kernel/bpf/core.c +2 -0
@@ -99,6 +99,8 @@ struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags) fp->aux = aux; fp->aux->prog = fp; fp->jit_requested =ebpf_jit_enabled (); + fp->priv = !!capable (CAP_SYS_ADMIN ); + fp->uid =current_euid ();INIT_LIST_HEAD_RCU (&fp->aux->ksym_lnode);
kernel/bpf/cpumap.c +3 -0
@@ -376,6 +376,9 @@ static void __cpu_map_entry_free(struct rcu_head *rcu)/* No concurrent bq_enqueue can run at this point */ bq_flush_to_queue (rcpu, bq, false); + +/* Do lazy_clear_cpu_interrupt here? */ + }free_percpu (rcpu->bulkq);/* Cannot kthread_stop() here, last put free rcpu resources */
Signature · 19 lines
2.17.2 From 02a0655507109dd2acc287940445dae36554e0a4 Mon Sep 17 00:00:00 2001 From: Mark Gross <[email protected]> Date: Wed, 6 Feb 2019 15:35:43 -0800 Subject: [PATCH 26/43] mds sweep: Clear cpu in sg_copy_from_buffer for SCSI Whenever a driver isr touches memory that is likely to go to some user mode process, there is a slight risk of a speculative exploit leaking the last read or write to an attacker. This patch adds a call to set the flag to clear the exploitable buffer upon return to user mode to handle drivers using scatter gather DMA processing from their ISR. Signed-off-by: Mark Gross <[email protected]> Signed-off-by: Andi Kleen <[email protected]> --- lib/scatterlist.c | 2 ++ 1 file changed, 2 insertions(+)
lib/scatterlist.c +2 -0
@@ -11,6 +11,7 @@#include <linux/scatterlist.h> #include <linux/highmem.h> #include <linux/kmemleak.h> +#include <linux/clearcpu.h> /** * sg_next - return the next scatterlist entry in a list
@@ -831,6 +832,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, offset += len; } +lazy_clear_cpu_interrupt ();sg_miter_stop (&miter);
Signature · 18 lines
2.17.2 From ffefd2ebf41576be17f4fb4f674027592f5b0ce7 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 12:18:24 -0800 Subject: [PATCH 27/43] mds sweep: Schedule clear cpus in sound core Add lazy_clear_cpu_interrupt() in sound core functions that are generally associated with touching user data in interrupt handlers. We consider all actual sound data as user data. Signed-off-by: Andi Kleen <[email protected]> --- sound/core/pcm_lib.c | 3 +++ sound/core/rawmidi.c | 3 +++ sound/core/timer.c | 3 +++ 3 files changed, 9 insertions(+)
sound/core/pcm_lib.c +3 -0
@@ -25,6 +25,7 @@#include <linux/time.h> #include <linux/math64.h> #include <linux/export.h> +#include <linux/clearcpu.h> #include <sound/core.h> #include <sound/control.h> #include <sound/tlv.h>
@@ -1801,6 +1802,8 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)return ; runtime = substream->runtime; +lazy_clear_cpu (); +snd_pcm_stream_lock_irqsave (substream, flags);if (!snd_pcm_running (substream) ||snd_pcm_update_hw_ptr0 (substream,1 ) <0 )
sound/core/rawmidi.c +3 -0
@@ -30,6 +30,7 @@#include <linux/module.h> #include <linux/delay.h> #include <linux/mm.h> +#include <linux/clearcpu.h> #include <sound/rawmidi.h> #include <sound/info.h> #include <sound/control.h>
@@ -946,6 +947,7 @@ int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,wake_up (&runtime->sleep); }spin_unlock_irqrestore (&runtime->lock, flags); +lazy_clear_cpu ();return result; }EXPORT_SYMBOL (snd_rawmidi_receive);
@@ -1232,6 +1234,7 @@ int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream, result =__snd_rawmidi_transmit_ack (substream, count); }spin_unlock_irqrestore (&runtime->lock, flags); +lazy_clear_cpu ();return result; }EXPORT_SYMBOL (snd_rawmidi_transmit);
sound/core/timer.c +3 -0
@@ -27,6 +27,7 @@#include <linux/device.h> #include <linux/module.h> #include <linux/string.h> +#include <linux/clearcpu.h> #include <linux/sched/signal.h> #include <sound/core.h> #include <sound/timer.h>
@@ -863,6 +864,8 @@ void snd_timer_interrupt(struct snd_timer * timer, unsigned long ticks_left)if (use_tasklet)tasklet_schedule (&timer->task_queue); + +lazy_clear_cpu (); }EXPORT_SYMBOL (snd_timer_interrupt);
Signature · 15 lines
2.17.2 From 7e319456bedf2c10e13de79738835772eef8af49 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 20 Feb 2019 10:43:23 -0800 Subject: [PATCH 28/43] mds sweep: Make MPU401 interrupts clear cpu A lot of mpu401 based sound cards use PIO or copying. Make the common interrupt handler schedule a CPU clear. Signed-off-by: Andi Kleen <[email protected]> --- sound/drivers/mpu401/mpu401_uart.c | 2 ++ 1 file changed, 2 insertions(+)
sound/drivers/mpu401/mpu401_uart.c +2 -0
@@ -36,6 +36,7 @@#include <linux/module.h> #include <linux/interrupt.h> #include <linux/errno.h> +#include <linux/clearcpu.h> #include <sound/core.h> #include <sound/mpu401.h>
@@ -139,6 +140,7 @@ irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id)if (!mpu)return IRQ_NONE ;_snd_mpu401_uart_interrupt (mpu); +lazy_clear_cpu ();return IRQ_HANDLED ; }
Signature · 18 lines
2.17.2 From be3c72dad9a46b412581aeddce4ca8d3f9dc916a Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 12:26:59 -0800 Subject: [PATCH 29/43] mds sweep: Clear cpu on processing input layer data Schedule a clear cpu if input layer data is processed from an interrupt or timer. User key presses and mouse data is considered sensitive. We patch some strategic places in the input subsystem to avoid touching a lot of drivers. Signed-off-by: Andi Kleen <[email protected]> --- drivers/input/input.c | 3 +++ drivers/input/serio/serio.c | 3 +++ 2 files changed, 6 insertions(+)
drivers/input/input.c +3 -0
@@ -27,6 +27,7 @@#include <linux/device.h> #include <linux/mutex.h> #include <linux/rcupdate.h> +#include <linux/clearcpu.h> #include "input-compat.h" MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>" );
@@ -436,6 +437,7 @@ void input_event(struct input_dev *dev,input_handle_event (dev, type, code, value);spin_unlock_irqrestore (&dev->event_lock, flags); } +lazy_clear_cpu_interrupt (); }EXPORT_SYMBOL (input_event);
@@ -468,6 +470,7 @@ void input_inject_event(struct input_handle *handle,spin_unlock_irqrestore (&dev->event_lock, flags); } +lazy_clear_cpu_interrupt (); }EXPORT_SYMBOL (input_inject_event);
drivers/input/serio/serio.c +3 -0
@@ -32,6 +32,7 @@#include <linux/slab.h> #include <linux/workqueue.h> #include <linux/mutex.h> +#include <linux/clearcpu.h> MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>" );MODULE_DESCRIPTION ("Serio abstraction core" );
@@ -1017,6 +1018,8 @@ irqreturn_t serio_interrupt(struct serio *serio, ret =IRQ_HANDLED ; } +lazy_clear_cpu_interrupt (); +spin_unlock_irqrestore (&serio->lock, flags);return ret;
Signature · 17 lines
2.17.2 From 933005cfe327ac4e32e8a4686bcdc979f43e45f2 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 13:16:11 -0800 Subject: [PATCH 30/43] mds sweep: Clear cpu for tty input Schedule a clear cpu when input data is passed to the tty layer in a interrupt. We consider tty data sensitive. This avoids patching lots of serial drivers. Signed-off-by: Andi Kleen <[email protected]> --- drivers/tty/tty_buffer.c | 5 ++++- include/linux/tty_flip.h | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/tty/tty_buffer.c +4 -1
@@ -17,6 +17,7 @@#include <linux/delay.h> #include <linux/module.h> #include <linux/ratelimit.h> +#include <linux/clearcpu.h> #define MIN_TTYB_SIZE 256
@@ -328,6 +329,7 @@ int tty_insert_flip_string_fixed_flag(struct tty_port *port,/* There is a small chance that we need to split the data over several buffers. If this is the case we must loop */ }while (unlikely (size > copied)); +lazy_clear_cpu_interrupt ();return copied; }EXPORT_SYMBOL (tty_insert_flip_string_fixed_flag);
@@ -363,6 +365,7 @@ int tty_insert_flip_string_flags(struct tty_port *port,/* There is a small chance that we need to split the data over several buffers. If this is the case we must loop */ }while (unlikely (size > copied)); +lazy_clear_cpu_interrupt ();return copied; }EXPORT_SYMBOL (tty_insert_flip_string_flags);
@@ -388,7 +391,7 @@ int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag)if (~tb->flags &TTYB_NORMAL ) *flag_buf_ptr (tb, tb->used) = flag; *char_buf_ptr (tb, tb->used++) = ch; - +lazy_clear_cpu_interrupt ();return 1 ; }EXPORT_SYMBOL (__tty_insert_flip_char);
include/linux/tty_flip.h +4 -0
@@ -2,6 +2,8 @@#ifndef _LINUX_TTY_FLIP_H#define _LINUX_TTY_FLIP_H +#include <linux/clearcpu.h> +extern int tty_buffer_set_limit (struct tty_port *port,int limit);extern int tty_buffer_space_avail (struct tty_port *port);extern int tty_buffer_request_room (struct tty_port *port,size_t size);
@@ -21,6 +23,8 @@ static inline int tty_insert_flip_char(struct tty_port *port,struct tty_buffer *tb = port->buf.tail;int change; +lazy_clear_cpu_interrupt (); + change = (tb->flags &TTYB_NORMAL ) && (flag !=TTY_NORMAL );if (!change && tb->used < tb->size) {if (~tb->flags &TTYB_NORMAL )
Signature · 16 lines
2.17.2 From 8d04705a73208de4bb4a4062bf3d977b5ee5c5f4 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 13:18:33 -0800 Subject: [PATCH 31/43] mds sweep: Clear cpu for usbmon intercepts usbmon touches user data in interrupts that otherwise don't touch user data. Automatically schedule a clear cpu if usbmon is called from an interrupt. Signed-off-by: Andi Kleen <[email protected]> --- include/linux/usb/hcd.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
include/linux/usb/hcd.h +4 -1
@@ -25,6 +25,7 @@#include <linux/rwsem.h> #include <linux/interrupt.h> #include <linux/idr.h> +#include <linux/clearcpu.h> #define MAX_TOPO_LEVEL 6
@@ -688,8 +689,10 @@ static inline void usbmon_urb_submit_error(struct usb_bus *bus, struct urb *urb,static inline void usbmon_urb_complete (struct usb_bus *bus,struct urb *urb,int status) { -if (bus->monitored) +if (bus->monitored) { (*mon_ops->urb_complete)(bus, urb, status); +lazy_clear_cpu_interrupt (); + } }int usb_mon_register (const struct usb_mon_operations *ops);
Signature · 20 lines
2.17.2 From 891da9847b013eddae132a7cac4f9b243cd44323 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 13:21:59 -0800 Subject: [PATCH 32/43] mds sweep: Clear cpu in some Xen drivers Xen has its own call back system that multiplexes a single interrupt. Most Xen handlers do not touch user data, but a few non performance critical ones do. Add explicit clearing to those. The fast paths for block and network IO are not impacted. Signed-off-by: Andi Kleen <[email protected]> --- drivers/input/misc/xen-kbdfront.c | 3 ++- drivers/video/fbdev/xen-fbfront.c | 2 ++ drivers/xen/pvcalls-front.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-)
drivers/input/misc/xen-kbdfront.c +2 -1
@@ -19,6 +19,7 @@#include <linux/input.h> #include <linux/input/mt.h> #include <linux/slab.h> +#include <linux/clearcpu.h> #include <asm/xen/hypervisor.h>
@@ -193,7 +194,7 @@ static irqreturn_t input_handler(int rq, void *dev_id)mb ();/* ensure we got ring contents */ page->in_cons = cons;notify_remote_via_irq (info->irq); - +lazy_clear_cpu ();return IRQ_HANDLED ; }
drivers/video/fbdev/xen-fbfront.c +2 -0
@@ -28,6 +28,7 @@#include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/mm.h> +#include <linux/clearcpu.h> #include <asm/xen/hypervisor.h>
@@ -358,6 +359,7 @@ static irqreturn_t xenfb_event_handler(int rq, void *dev_id)/* Flush dirty rectangle: */ xenfb_refresh (info,INT_MAX ,INT_MAX , -INT_MAX , -INT_MAX ); +lazy_clear_cpu ();return IRQ_HANDLED ; }
drivers/xen/pvcalls-front.c +2 -0
@@ -15,6 +15,7 @@#include <linux/module.h> #include <linux/net.h> #include <linux/socket.h> +#include <linux/clearcpu.h> #include <net/sock.h>
@@ -219,6 +220,7 @@ static irqreturn_t pvcalls_front_event_handler(int irq, void *dev_id)*/ smp_wmb (); bedata->rsp[req_id].req_id = req_id; +lazy_clear_cpu (); } done =1 ;
Signature · 18 lines
2.17.2 From b55d86f176ff5304293a0d2ba7aa46b458190049 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 13:23:19 -0800 Subject: [PATCH 33/43] mds sweep: Clear cpu in DVB software filters For DVB we consider image data sensitive. Most DVB drivers do not touch user data in interrupts / timers, but when the software filter is active it might. Schedule a clear cpu from the filter code. Signed-off-by: Andi Kleen <[email protected]> --- drivers/media/dvb-core/dvb_demux.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/media/dvb-core/dvb_demux.c +3 -0
@@ -28,6 +28,7 @@#include <linux/string.h> #include <linux/crc32.h> #include <linux/uaccess.h> +#include <linux/clearcpu.h> #include <asm/div64.h> #include <media/dvb_demux.h>
@@ -515,6 +516,8 @@ void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, }spin_unlock_irqrestore (&demux->lock, flags); + +lazy_clear_cpu_interrupt (); }EXPORT_SYMBOL (dvb_dmx_swfilter_packets);
Signature · 15 lines
2.17.2 From d19f8ec14432ea65f15637df3491046a5f12d383 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 20 Feb 2019 10:36:55 -0800 Subject: [PATCH 34/43] mds sweep: Mark all DRM interrupts to clear cpu These interrupts are all complicated, and should be not performance critical, so mark them to clear the CPU. Signed-off-by: Andi Kleen <[email protected]> --- drivers/gpu/drm/drm_irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_irq.c +2 -1
@@ -128,7 +128,8 @@ int drm_irq_install(struct drm_device *dev, int irq) sh_flags =IRQF_SHARED ; ret =request_irq (irq, dev->driver->irq_handler, - sh_flags, dev->driver->name, dev); + sh_flags |IRQF_USER_DATA , + dev->driver->name, dev);if (ret <0 ) { dev->irq_enabled = false;
Signature · 16 lines
2.17.2 From de9d650ed3f8fa52a4672fdc82ce815b11daf2df Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 20 Feb 2019 10:37:46 -0800 Subject: [PATCH 35/43] mds sweep: Make all old style IDE driver interrupts clear cpu Old style IDE drivers sometimes do PIO, and are really slow anyways, so default them all the clear the CPU. Signed-off-by: Andi Kleen <[email protected]> --- drivers/ide/ide-probe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ide/ide-probe.c +2 -1
@@ -881,7 +881,8 @@ static int init_irq (ide_hwif_t *hwif) irq_handler = ide_intr;if (!host->get_lock) -if (request_irq (hwif->irq, irq_handler, sa, hwif->name, hwif)) +if (request_irq (hwif->irq, irq_handler, sa |IRQF_USER_DATA , + hwif->name, hwif)) goto out_up;#if !defined(__mc68000__)
Signature · 20 lines
2.17.2 From 97fbde3b02f4348f0add0944368db2479ce54bd4 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 20 Feb 2019 10:39:28 -0800 Subject: [PATCH 36/43] mds sweep: Make Amazon ena driver management interrupt clear cpu Most of the Amazon ena interrupt handlers do not touch user data, but the management interrupt does complicated things and should not be performance critical. Mark the management interrupt only as clear cpu. This needs some minor changes to the table driven interrupt setup. Signed-off-by: Andi Kleen <[email protected]> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 +++-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/amazon/ena/ena_netdev.c +3 -2
@@ -1357,6 +1357,7 @@ static void ena_setup_mgmnt_intr(struct ena_adapter *adapter)snprintf (adapter->irq_tbl[ENA_MGMNT_IRQ_IDX ].name,ENA_IRQNAME_SIZE ,"ena-mgmnt@pci:%s" ,pci_name (adapter->pdev)); + adapter->irq_tbl[ENA_MGMNT_IRQ_IDX ].flags =IRQF_USER_DATA ; adapter->irq_tbl[ENA_MGMNT_IRQ_IDX ].handler = ena_intr_msix_mgmnt; adapter->irq_tbl[ENA_MGMNT_IRQ_IDX ].data = adapter;
@@ -1381,6 +1382,7 @@ static void ena_setup_io_intr(struct ena_adapter *adapter)snprintf (adapter->irq_tbl[irq_idx].name,ENA_IRQNAME_SIZE ,"%s-Tx-Rx-%d" , netdev->name, i); + adapter->irq_tbl[irq_idx].flags =0 ; adapter->irq_tbl[irq_idx].handler = ena_intr_msix_io; adapter->irq_tbl[irq_idx].data = &adapter->ena_napi[i]; adapter->irq_tbl[irq_idx].vector =
@@ -1394,12 +1396,11 @@ static void ena_setup_io_intr(struct ena_adapter *adapter)static int ena_request_mgmnt_irq (struct ena_adapter *adapter) { -unsigned long flags =0 ;struct ena_irq *irq;int rc; irq = &adapter->irq_tbl[ENA_MGMNT_IRQ_IDX ]; - rc =request_irq (irq->vector, irq->handler, flags, irq->name, + rc =request_irq (irq->vector, irq->handler, irq->flags, irq->name, irq->data);if (rc) { netif_err(adapter, probe, adapter->netdev,
drivers/net/ethernet/amazon/ena/ena_netdev.h +1 -0
@@ -140,6 +140,7 @@struct ena_irq {irq_handler_t handler; +unsigned flags;void *data;int cpu;u32 vector;
Signature · 15 lines
2.17.2 From ed469580e05d31236621c79550b9471aed5c5cc6 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 20 Feb 2019 10:40:54 -0800 Subject: [PATCH 37/43] mds sweep: Make all PCMCIA interrupts clear cpu PCMCIA devices are usually slow, and sometimes do PIO, so mark them all as clearing the cpu. Signed-off-by: Andi Kleen <[email protected]> --- drivers/pcmcia/pcmcia_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pcmcia/pcmcia_resource.c +1 -1
@@ -702,7 +702,7 @@ int __must_check pcmcia_request_irq(struct pcmcia_device *p_dev,if (!p_dev->irq)return -EINVAL ; - ret =request_irq (p_dev->irq, handler,IRQF_SHARED , + ret =request_irq (p_dev->irq, handler,IRQF_SHARED |IRQF_USER_DATA , p_dev->devname, p_dev->priv);if (!ret) p_dev->_irq =1 ;
Signature · 16 lines
2.17.2 From e9efb685cb3d473da317b0574f94d1c069ea7056 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 20 Feb 2019 10:41:55 -0800 Subject: [PATCH 38/43] mds sweep: Mark common functions in comedi as clear cpu The comedi drivers have a lot of interrupt handlers, many of them touching user data in some form. But they all use common library functions, so we can schedule a CPU clear in them. Signed-off-by: Andi Kleen <[email protected]> --- drivers/staging/comedi/comedi_buf.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/staging/comedi/comedi_buf.c +5 -0
@@ -9,6 +9,7 @@#include <linux/vmalloc.h> #include <linux/slab.h> +#include <linux/clearcpu.h> #include "comedidev.h" #include "comedi_internal.h"
@@ -597,6 +598,8 @@ unsigned int comedi_buf_write_samples(struct comedi_subdevice *s,comedi_inc_scan_progress (s, nbytes); s->async->events |=COMEDI_CB_BLOCK ; +lazy_clear_cpu_interrupt (); +return nbytes; }EXPORT_SYMBOL_GPL (comedi_buf_write_samples);
@@ -637,6 +640,8 @@ unsigned int comedi_buf_read_samples(struct comedi_subdevice *s,comedi_inc_scan_progress (s, nbytes); s->async->events |=COMEDI_CB_BLOCK ; +lazy_clear_cpu_interrupt (); +return nbytes; }EXPORT_SYMBOL_GPL (comedi_buf_read_samples);
Signature · 17 lines
2.17.2 From 4e5e24fd0c2111686f32a55581efa5070cf0a160 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Wed, 20 Feb 2019 10:43:15 -0800 Subject: [PATCH 39/43] mds sweep: Make usb hcd poll clear cpu Most USB interrupt handlers do not touch user data, except in some cases hcd poll is called which can copy a user buffer. Instead of marking all the USB interrupts and timers as clear cpu only clear it when the user data touching actually happens. Signed-off-by: Andi Kleen <[email protected]> --- drivers/usb/core/hcd.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/core/hcd.c +3 -0
@@ -29,6 +29,7 @@#include <linux/workqueue.h> #include <linux/pm_runtime.h> #include <linux/types.h> +#include <linux/clearcpu.h> #include <linux/phy/phy.h> #include <linux/usb.h>
@@ -770,6 +771,8 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd) urb->actual_length = length;memcpy (urb->transfer_buffer, buffer, length); +lazy_clear_cpu_interrupt (); +usb_hcd_unlink_urb_from_ep (hcd, urb);usb_hcd_giveback_urb (hcd, urb,0 ); }else {
Signature · 14 lines
2.17.2 From 55de5a18b490cb4315b227e01fd7cb0a221825aa Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Fri, 15 Feb 2019 16:55:06 -0800 Subject: [PATCH 40/43] x86/speculation/mds: Switch mds=auto to lazy Turn on lazy mode as default, make mds=full active as an option. Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/kernel/cpu/bugs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/x86/kernel/cpu/bugs.c +1 -3
@@ -1106,9 +1106,7 @@ static void mds_select_mitigation(void)setup_force_cpu_cap (X86_FEATURE_VERW );if (cmdline_find_option_bool (boot_command_line,"mds=off" ))setup_clear_cpu_cap (X86_FEATURE_VERW ); -/* Default to old behavior for now */ -if (cmdline_find_option_bool (boot_command_line,"mds=full" ) || - true) +if (cmdline_find_option_bool (boot_command_line,"mds=full" ))static_branch_enable (&force_cpu_clear);/* Nop currently because this is default for now. */ if (cmdline_find_option_bool (boot_command_line,"mds=auto" ))
Signature · 597 lines
2.17.2 From 7a86b7bce4934b2200f609c8192ae5ccbba77026 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Tue, 19 Feb 2019 15:00:31 -0800 Subject: [PATCH 41/43] mds sweep: Mark interrupts that touch user data Mark interrupt handlers that touch user data or might touch it with IRQF_USER_DATA to schedule cpu clears. This has been generated with a tree wide audit and the following coccinelle script. In general it erred on the conservative. Either interrupt handlers directly touched user data (e.g. with PIO), or were too complicated to audit and for slow devices anyways. A lot of interrupt handlers are also handled by the strategic clear cpus added to functions that touch user data directly. This patch only marks handlers that don't call any such functions. Some auditing from Mark Gross. // request_irq(irq, handler, flags, name, arg) -> // request_irq(irq, handler, flags | IRQF_USER_DATA, name, arg) @@ expression irq, handler, name, arg; @@ - request_irq(irq, handler, 0, name, arg) + request_irq(irq, handler, IRQF_USER_DATA, name, arg) @@ expression irq, handler, flags, name, arg; @@ - request_irq(irq, handler, flags, name, arg) + request_irq(irq, handler, flags | IRQF_USER_DATA, name, arg) // clean up after previous rules combined // XXX better way to do this? @@ expression irq, handler, name, arg; @@ - request_irq(irq, handler, IRQF_USER_DATA | IRQF_CLEAR_CPU, name, arg) + request_irq(irq, handler, IRQF_USER_DATA, name, arg) // devm_request_irq(dev, irq, handler, flags, name, arg) -> // devm_request_irq(dev, irq, handler, flags | IRQF_USER_DATA, name, arg) @@ expression irq, handler, name, arg, dev; @@ - devm_request_irq(dev, irq, handler, 0, name, arg) + devm_request_irq(dev, irq, handler, IRQF_USER_DATA, name, arg) @@ expression irq, handler, flags, name, arg, dev; @@ - devm_request_irq(dev, irq, handler, flags, name, arg) + devm_request_irq(dev, irq, handler, flags | IRQF_USER_DATA, name, arg) // clean up after previous rules combined // XXX better way to do this? @@ expression irq, handler, name, arg, dev; @@ - devm_request_irq(dev, irq, handler, IRQF_USER_DATA | IRQF_CLEAR_CPU, name, arg) + devm_request_irq(dev, irq, handler, IRQF_USER_DATA, name, arg) // request_any_context_irq(irq, handler, flags, name, arg) -> // request_any_context_irq(irq, handler, flags | IRQF_USER_DATA, name, arg) @@ expression irq, handler, name, arg; @@ - request_any_context_irq(irq, handler, 0, name, arg) + request_any_context_irq(irq, handler, IRQF_USER_DATA, name, arg) @@ expression irq, handler, flags, name, arg; @@ - request_any_context_irq(irq, handler, flags, name, arg) + request_any_context_irq(irq, handler, flags | IRQF_USER_DATA, name, arg) // clean up after previous rules combined // XXX better way to do this? @@ expression irq, handler, name, arg; @@ - request_any_context_irq(irq, handler, IRQF_USER_DATA | IRQF_CLEAR_CPU, name, arg) + request_any_context_irq(irq, handler, IRQF_USER_DATA, name, arg) // devm_request_any_context_irq(dev, irq, handler, flags, name, arg) -> // devm_request_any_context_irq(dev, irq, handler, flags | IRQF_USER_DATA, name, arg) @@ expression irq, handler, name, arg, dev; @@ - devm_request_any_context_irq(dev, irq, handler, 0, name, arg) + devm_request_any_context_irq(dev, irq, handler, IRQF_USER_DATA, name, arg) @@ expression irq, handler, flags, name, arg, dev; @@ - devm_request_any_context_irq(dev, irq, handler, flags, name, arg) + devm_request_any_context_irq(dev, irq, handler, flags | IRQF_USER_DATA, name, arg) // clean up after previous rules combined // XXX better way to do this? @@ expression irq, handler, name, arg, dev; @@ - devm_request_any_context_irq(dev, irq, handler, IRQF_USER_DATA | IRQF_CLEAR_CPU, name, arg) + devm_request_any_context_irq(dev, irq, handler, IRQF_USER_DATA, name, arg) Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/include/asm/floppy.h | 6 ++-- drivers/atm/lanai.c | 4 +-- drivers/atm/nicstar.c | 4 +-- drivers/char/ipmi/ipmi_si_intf.c | 6 ++-- drivers/char/sonypi.c | 3 +- drivers/firewire/nosy.c | 3 +- drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c | 3 +- .../gpu/drm/nouveau/nvkm/subdev/pci/base.c | 3 +- drivers/i2c/busses/i2c-emev2.c | 5 +-- drivers/i2c/busses/i2c-i801.c | 2 +- drivers/i2c/busses/i2c-pxa.c | 4 +-- drivers/i2c/busses/i2c-rk3x.c | 3 +- drivers/ide/ide-probe.c | 2 +- drivers/infiniband/hw/mthca/mthca_eq.c | 14 ++++---- drivers/input/serio/i8042.c | 13 +++---- drivers/ipack/carriers/tpci200.c | 6 ++-- drivers/isdn/hardware/avm/b1isa.c | 4 ++- drivers/isdn/hardware/avm/b1pci.c | 6 ++-- drivers/isdn/hardware/avm/b1pcmcia.c | 3 +- drivers/isdn/hardware/avm/c4.c | 3 +- drivers/isdn/hardware/avm/t1isa.c | 4 ++- drivers/isdn/hardware/avm/t1pci.c | 3 +- drivers/isdn/hardware/mISDN/avmfritz.c | 4 +-- drivers/isdn/hardware/mISDN/hfcmulti.c | 3 +- drivers/isdn/hardware/mISDN/hfcpci.c | 2 +- drivers/isdn/hardware/mISDN/mISDNinfineon.c | 3 +- drivers/isdn/hardware/mISDN/netjet.c | 2 +- drivers/isdn/hardware/mISDN/speedfax.c | 3 +- drivers/isdn/hardware/mISDN/w6692.c | 2 +- drivers/isdn/hisax/config.c | 2 +- drivers/isdn/hisax/hfc4s8s_l1.c | 3 +- drivers/isdn/hisax/hisax_fcpcipnp.c | 13 ++++--- drivers/media/common/saa7146/saa7146_core.c | 4 +-- drivers/media/pci/b2c2/flexcop-pci.c | 3 +- drivers/media/pci/cobalt/cobalt-driver.c | 3 +- drivers/media/pci/cx18/cx18-driver.c | 3 +- drivers/media/pci/cx25821/cx25821-core.c | 2 +- drivers/media/pci/cx88/cx88-alsa.c | 3 +- drivers/media/pci/cx88/cx88-mpeg.c | 2 +- drivers/media/pci/cx88/cx88-video.c | 2 +- drivers/media/pci/dt3155/dt3155.c | 2 +- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +- drivers/media/pci/ivtv/ivtv-driver.c | 3 +- drivers/media/pci/meye/meye.c | 3 +- drivers/media/pci/ngene/ngene-core.c | 5 ++- drivers/media/pci/pluto2/pluto2.c | 3 +- drivers/media/pci/saa7134/saa7134-alsa.c | 4 +-- drivers/media/pci/saa7134/saa7134-core.c | 2 +- drivers/media/pci/saa7164/saa7164-core.c | 7 ++-- drivers/media/pci/solo6x10/solo6x10-core.c | 4 +-- drivers/media/pci/sta2x11/sta2x11_vip.c | 5 ++- drivers/media/pci/tw68/tw68-core.c | 2 +- drivers/media/pci/tw686x/tw686x-core.c | 4 +-- drivers/media/platform/aspeed-video.c | 5 +-- .../media/platform/marvell-ccic/cafe-driver.c | 3 +- drivers/media/rc/fintek-cir.c | 3 +- drivers/media/rc/gpio-ir-recv.c | 2 +- drivers/media/rc/ir-hix5hd2.c | 3 +- drivers/media/rc/ite-cir.c | 3 +- drivers/media/rc/nuvoton-cir.c | 3 +- drivers/media/rc/serial_ir.c | 2 +- drivers/media/rc/sir_ir.c | 3 +- drivers/media/rc/winbond-cir.c | 2 +- drivers/memstick/host/jmb38x_ms.c | 3 +- drivers/message/fusion/mptbase.c | 3 +- drivers/mfd/ezx-pcap.c | 4 +-- drivers/misc/ibmasm/module.c | 4 ++- drivers/misc/sgi-gru/grufile.c | 7 ++-- drivers/misc/sgi-xp/xpc_uv.c | 3 +- drivers/mmc/host/mtk-sd.c | 3 +- drivers/net/arcnet/arc-rimi.c | 2 +- drivers/net/arcnet/com20020.c | 3 +- drivers/net/arcnet/com90io.c | 3 +- drivers/net/arcnet/com90xx.c | 2 +- drivers/net/can/cc770/cc770.c | 4 +-- drivers/net/can/peak_canfd/peak_pciefd_main.c | 8 ++--- drivers/net/can/sja1000/ems_pcmcia.c | 4 +-- drivers/net/can/sja1000/peak_pcmcia.c | 3 +- drivers/net/can/sja1000/sja1000.c | 5 +-- drivers/net/ethernet/3com/3c509.c | 3 +- drivers/net/ethernet/3com/3c515.c | 6 ++-- drivers/net/ethernet/8390/axnet_cs.c | 3 +- drivers/net/ethernet/8390/ne.c | 3 +- drivers/net/ethernet/8390/ne2k-pci.c | 3 +- drivers/net/ethernet/8390/pcnet_cs.c | 3 +- drivers/net/ethernet/8390/smc-ultra.c | 3 +- drivers/net/ethernet/8390/wd.c | 3 +- drivers/net/ethernet/agere/et131x.c | 4 +-- drivers/net/ethernet/amd/lance.c | 2 +- drivers/net/ethernet/amd/ni65.c | 5 +-- drivers/net/ethernet/atheros/atlx/atl1.c | 4 +-- drivers/net/ethernet/atheros/atlx/atl2.c | 4 +-- .../net/ethernet/chelsio/cxgb3/cxgb3_main.c | 16 +++------ drivers/net/ethernet/micrel/ks8851_mll.c | 3 +- drivers/net/ethernet/microchip/lan743x_main.c | 7 ++-- drivers/net/ethernet/realtek/atp.c | 3 +- drivers/net/fddi/skfp/skfddi.c | 4 +-- drivers/net/hamradio/baycom_ser_fdx.c | 3 +- drivers/net/hamradio/baycom_ser_hdx.c | 3 +- drivers/net/hamradio/scc.c | 4 +-- drivers/net/hamradio/yam.c | 2 +- drivers/net/ieee802154/at86rf230.c | 3 +- drivers/net/ieee802154/ca8210.c | 10 ++---- drivers/net/ieee802154/mcr20a.c | 3 +- drivers/net/ieee802154/mrf24j40.c | 3 +- drivers/net/wan/cosa.c | 2 +- drivers/net/wan/farsync.c | 2 +- drivers/net/wan/hostess_sv11.c | 3 +- drivers/net/wan/sbni.c | 2 +- drivers/net/wan/sdla.c | 2 +- drivers/net/wan/sealevel.c | 3 +- .../net/wireless/broadcom/b43legacy/main.c | 2 +- .../broadcom/brcm80211/brcmfmac/bcmsdh.c | 7 ++-- .../broadcom/brcm80211/brcmsmac/mac80211_if.c | 3 +- drivers/net/wireless/cisco/airo.c | 4 +-- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 4 +-- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 3 +- .../net/wireless/intel/iwlegacy/3945-mac.c | 3 +- .../net/wireless/intel/iwlegacy/4965-mac.c | 3 +- .../net/wireless/intersil/hostap/hostap_pci.c | 3 +- .../net/wireless/intersil/hostap/hostap_plx.c | 3 +- .../intersil/orinoco/orinoco_nortel.c | 4 +-- .../wireless/intersil/orinoco/orinoco_pci.c | 4 +-- .../wireless/intersil/orinoco/orinoco_plx.c | 4 +-- .../wireless/intersil/orinoco/orinoco_tmd.c | 4 +-- drivers/net/wireless/intersil/p54/p54pci.c | 2 +- drivers/net/wireless/intersil/p54/p54spi.c | 4 +-- .../intersil/prism54/islpci_hotplug.c | 2 +- drivers/net/wireless/marvell/libertas/if_cs.c | 2 +- .../net/wireless/marvell/libertas/if_spi.c | 3 +- drivers/net/wireless/marvell/mwifiex/main.c | 5 +-- drivers/net/wireless/marvell/mwifiex/pcie.c | 8 +++-- drivers/net/wireless/marvell/mwl8k.c | 4 +-- .../net/wireless/mediatek/mt76/mt76x0/pci.c | 3 +- .../net/wireless/mediatek/mt76/mt76x2/pci.c | 3 +- .../quantenna/qtnfmac/pcie/pearl_pcie.c | 3 +- .../quantenna/qtnfmac/pcie/topaz_pcie.c | 3 +- .../net/wireless/ralink/rt2x00/rt2x00mmio.c | 6 ++-- .../wireless/realtek/rtl818x/rtl8180/dev.c | 6 ++-- drivers/net/wireless/realtek/rtlwifi/pci.c | 4 +-- drivers/net/wireless/ti/wl1251/sdio.c | 4 ++- drivers/net/wireless/ti/wl1251/spi.c | 5 +-- drivers/ntb/hw/amd/ntb_hw_amd.c | 12 ++++--- drivers/ntb/hw/intel/ntb_hw_gen1.c | 12 ++++--- drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 8 ++--- drivers/parport/parport_ax88796.c | 3 +- drivers/parport/parport_pc.c | 3 +- drivers/pci/controller/pcie-xilinx.c | 2 +- drivers/pci/controller/vmd.c | 11 +++--- drivers/pci/hotplug/cpci_hotplug_core.c | 6 +--- drivers/pci/hotplug/cpqphp_core.c | 3 +- drivers/pci/hotplug/shpchp_hpc.c | 5 +-- drivers/pci/pcie/pme.c | 3 +- drivers/pci/switch/switchtec.c | 10 +++--- drivers/pcmcia/i82092.c | 2 +- drivers/pcmcia/i82365.c | 9 ++--- drivers/pcmcia/pcmcia_resource.c | 9 ++--- drivers/pcmcia/pd6729.c | 8 +++-- drivers/pcmcia/tcic.c | 7 ++-- drivers/pcmcia/yenta_socket.c | 4 +-- drivers/pinctrl/intel/pinctrl-intel.c | 2 +- drivers/pinctrl/pinctrl-amd.c | 3 +- drivers/pinctrl/pinctrl-single.c | 3 +- drivers/platform/goldfish/goldfish_pipe.c | 6 ++-- drivers/platform/mellanox/mlxreg-hotplug.c | 5 +-- drivers/platform/x86/fujitsu-tablet.c | 3 +- drivers/platform/x86/intel_int0002_vgpio.c | 2 +- drivers/platform/x86/intel_ips.c | 3 +- drivers/platform/x86/intel_pmc_ipc.c | 8 ++--- drivers/platform/x86/intel_punit_ipc.c | 4 +-- drivers/platform/x86/intel_scu_ipc.c | 5 +-- drivers/platform/x86/sony-laptop.c | 3 +- drivers/pnp/resource.c | 3 +- drivers/power/reset/ltc2952-poweroff.c | 6 +--- drivers/power/supply/act8945a_charger.c | 6 ++-- drivers/power/supply/goldfish_battery.c | 5 +-- .../power/supply/max14656_charger_detector.c | 2 +- drivers/power/supply/pda_power.c | 6 ++-- drivers/power/supply/wm97xx_battery.c | 5 +-- drivers/pps/clients/pps-gpio.c | 3 +- drivers/ptp/ptp_pch.c | 3 +- drivers/rapidio/devices/tsi721.c | 25 +++++++------ drivers/rapidio/devices/tsi721_dma.c | 8 +++-- drivers/regulator/qcom_spmi-regulator.c | 5 +-- drivers/rpmsg/qcom_glink_native.c | 5 ++- drivers/rtc/rtc-cmos.c | 5 +-- drivers/rtc/rtc-ds1305.c | 3 +- drivers/rtc/rtc-ds1374.c | 5 +-- drivers/rtc/rtc-ds1511.c | 3 +- drivers/rtc/rtc-ds1553.c | 4 +-- drivers/rtc/rtc-ds1685.c | 3 +- drivers/rtc/rtc-ftrtc010.c | 2 +- drivers/rtc/rtc-m48t59.c | 5 +-- drivers/rtc/rtc-mrst.c | 3 +- drivers/rtc/rtc-pcap.c | 10 +++--- drivers/rtc/rtc-r7301.c | 3 +- drivers/rtc/rtc-snvs.c | 3 +- drivers/rtc/rtc-stk17ta8.c | 5 +-- drivers/rtc/rtc-zynqmp.c | 6 ++-- drivers/scsi/3w-9xxx.c | 6 ++-- drivers/scsi/3w-sas.c | 6 ++-- drivers/scsi/3w-xxxx.c | 3 +- drivers/scsi/BusLogic.c | 3 +- drivers/scsi/a100u2w.c | 4 +-- drivers/scsi/aacraid/commsup.c | 8 ++--- drivers/scsi/aacraid/rx.c | 3 +- drivers/scsi/aacraid/sa.c | 3 +- drivers/scsi/aacraid/src.c | 3 +- drivers/scsi/advansys.c | 4 +-- drivers/scsi/aha152x.c | 4 +-- drivers/scsi/aha1542.c | 2 +- drivers/scsi/aha1740.c | 3 +- drivers/scsi/aic7xxx/aic7770_osm.c | 3 +- drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 2 +- drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 2 +- drivers/scsi/aic94xx/aic94xx_init.c | 5 +-- drivers/scsi/am53c974.c | 4 +-- drivers/scsi/arcmsr/arcmsr_hba.c | 3 +- drivers/scsi/atp870u.c | 3 +- drivers/scsi/be2iscsi/be_main.c | 12 ++++--- drivers/scsi/bfa/bfad.c | 9 +++-- drivers/scsi/csiostor/csio_isr.c | 16 +++++---- drivers/scsi/dpt_i2o.c | 2 +- drivers/scsi/esas2r/esas2r_init.c | 8 +---- drivers/scsi/fnic/fnic_isr.c | 13 ++++--- drivers/scsi/g_NCR5380.c | 7 ++-- drivers/scsi/gdth.c | 8 +++-- drivers/scsi/hpsa.c | 19 +++++----- drivers/scsi/hptiop.c | 3 +- drivers/scsi/initio.c | 3 +- drivers/scsi/ipr.c | 23 ++++++------ drivers/scsi/ips.c | 4 +-- drivers/scsi/isci/init.c | 8 +++-- drivers/scsi/lpfc/lpfc_init.c | 35 ++++++++++++------- drivers/scsi/megaraid.c | 4 +-- drivers/scsi/megaraid/megaraid_mbox.c | 3 +- drivers/scsi/megaraid/megaraid_sas_base.c | 8 ++--- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/mvsas/mv_init.c | 4 +-- drivers/scsi/mvumi.c | 8 ++--- drivers/scsi/myrb.c | 2 +- drivers/scsi/myrs.c | 2 +- drivers/scsi/nsp32.c | 3 +- drivers/scsi/pcmcia/qlogic_stub.c | 2 +- drivers/scsi/pcmcia/sym53c500_cs.c | 2 +- drivers/scsi/pm8001/pm8001_init.c | 10 +++--- drivers/scsi/pmcraid.c | 5 +-- drivers/scsi/qedf/qedf_main.c | 4 ++- drivers/scsi/qedi/qedi_main.c | 3 +- drivers/scsi/qla1280.c | 3 +- drivers/scsi/qla2xxx/qla_isr.c | 22 +++++++----- drivers/scsi/qla4xxx/ql4_isr.c | 5 +-- drivers/scsi/qla4xxx/ql4_nx.c | 10 +++--- drivers/scsi/qlogicfas.c | 2 +- drivers/scsi/sim710.c | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 11 +++--- drivers/scsi/snic/snic_isr.c | 5 ++- drivers/scsi/stex.c | 4 +-- drivers/scsi/sym53c8xx_2/sym_glue.c | 3 +- drivers/scsi/ufs/ufshcd.c | 7 ++-- drivers/scsi/vmw_pvscsi.c | 9 +++-- drivers/scsi/wd719x.c | 4 +-- drivers/slimbus/qcom-ctrl.c | 3 +- drivers/spi/spi-altera.c | 3 +- drivers/spi/spi-axi-spi-engine.c | 3 +- drivers/spi/spi-cadence.c | 3 +- drivers/spi/spi-dw.c | 4 +-- drivers/spi/spi-fsl-spi.c | 3 +- drivers/spi/spi-oc-tiny.c | 3 +- drivers/spi/spi-pxa2xx.c | 4 +-- drivers/spi/spi-topcliff-pch.c | 5 +-- drivers/spi/spi-xilinx.c | 5 +-- drivers/spi/spi-zynqmp-gqspi.c | 3 +- drivers/staging/android/vsoc.c | 3 +- drivers/staging/axis-fifo/axis-fifo.c | 3 +- .../staging/comedi/drivers/addi_apci_1032.c | 3 +- .../staging/comedi/drivers/addi_apci_1500.c | 3 +- .../staging/comedi/drivers/addi_apci_1564.c | 3 +- .../staging/comedi/drivers/addi_apci_2032.c | 3 +- .../staging/comedi/drivers/addi_apci_3120.c | 3 +- .../staging/comedi/drivers/addi_apci_3xxx.c | 3 +- drivers/staging/comedi/drivers/adl_pci9111.c | 3 +- drivers/staging/comedi/drivers/adl_pci9118.c | 3 +- drivers/staging/comedi/drivers/adv_pci1710.c | 3 +- drivers/staging/comedi/drivers/aio_iiro_16.c | 3 +- .../comedi/drivers/amplc_dio200_common.c | 3 +- .../comedi/drivers/amplc_pc236_common.c | 3 +- drivers/staging/comedi/drivers/amplc_pci224.c | 3 +- drivers/staging/comedi/drivers/amplc_pci230.c | 3 +- drivers/staging/comedi/drivers/cb_pcidas.c | 4 +-- drivers/staging/comedi/drivers/cb_pcidas64.c | 5 +-- .../staging/comedi/drivers/comedi_parport.c | 3 +- drivers/staging/comedi/drivers/das16m1.c | 3 +- drivers/staging/comedi/drivers/das1800.c | 3 +- drivers/staging/comedi/drivers/das6402.c | 3 +- drivers/staging/comedi/drivers/das800.c | 5 +-- drivers/staging/comedi/drivers/dmm32at.c | 3 +- drivers/staging/comedi/drivers/dt2811.c | 3 +- drivers/staging/comedi/drivers/dt2814.c | 3 +- drivers/staging/comedi/drivers/dt282x.c | 2 +- drivers/staging/comedi/drivers/dt3000.c | 3 +- drivers/staging/comedi/drivers/gsc_hpdi.c | 3 +- drivers/staging/comedi/drivers/me4000.c | 3 +- drivers/staging/comedi/drivers/ni_6527.c | 4 +-- drivers/staging/comedi/drivers/ni_65xx.c | 3 +- drivers/staging/comedi/drivers/ni_660x.c | 4 +-- drivers/staging/comedi/drivers/ni_at_a2150.c | 2 +- drivers/staging/comedi/drivers/ni_atmio.c | 3 +- drivers/staging/comedi/drivers/ni_atmio16d.c | 3 +- .../staging/comedi/drivers/ni_labpc_common.c | 5 +-- drivers/staging/comedi/drivers/ni_pcidio.c | 3 +- drivers/staging/comedi/drivers/ni_pcimio.c | 3 +- drivers/staging/comedi/drivers/pcl711.c | 3 +- drivers/staging/comedi/drivers/pcl726.c | 3 +- drivers/staging/comedi/drivers/pcl812.c | 3 +- drivers/staging/comedi/drivers/pcl816.c | 2 +- drivers/staging/comedi/drivers/pcl818.c | 3 +- drivers/staging/comedi/drivers/pcmmio.c | 3 +- drivers/staging/comedi/drivers/pcmuio.c | 6 ++-- drivers/staging/comedi/drivers/rtd520.c | 3 +- drivers/staging/comedi/drivers/s626.c | 3 +- drivers/staging/gasket/gasket_interrupt.c | 3 +- drivers/staging/goldfish/goldfish_audio.c | 5 +-- drivers/staging/iio/adc/ad7606.c | 3 +- drivers/staging/media/bcm2048/radio-bcm2048.c | 4 +-- drivers/staging/media/zoran/zoran_card.c | 2 +- drivers/staging/most/dim2/dim2.c | 6 ++-- drivers/staging/most/i2c/i2c.c | 3 +- drivers/staging/olpc_dcon/olpc_dcon_xo_1.c | 2 +- drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | 2 +- drivers/staging/pi433/pi433_if.c | 6 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +- drivers/staging/rtlwifi/pci.c | 4 +-- drivers/staging/rts5208/rtsx.c | 4 +-- drivers/staging/speakup/serialio.c | 5 +-- drivers/staging/vt6655/device_main.c | 2 +- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 6 ++-- drivers/thunderbolt/nhi.c | 6 ++-- drivers/tty/cyclades.c | 9 ++--- drivers/tty/goldfish.c | 4 +-- drivers/tty/hvc/hvc_irq.c | 4 +-- drivers/tty/isicom.c | 2 +- drivers/tty/mxser.c | 4 +-- drivers/tty/serial/8250/8250_core.c | 3 +- drivers/tty/serial/8250/8250_exar.c | 2 +- drivers/tty/serial/altera_jtaguart.c | 4 +-- drivers/tty/serial/altera_uart.c | 5 +-- drivers/tty/serial/arc_uart.c | 2 +- drivers/tty/serial/digicolor-usart.c | 3 +- drivers/tty/serial/fsl_lpuart.c | 12 ++++--- drivers/tty/serial/ifx6x60.c | 7 ++-- drivers/tty/serial/jsm/jsm_driver.c | 3 +- drivers/tty/serial/max3100.c | 3 +- drivers/tty/serial/men_z135_uart.c | 4 +-- drivers/tty/serial/pch_uart.c | 4 +-- drivers/tty/serial/rp2.c | 2 +- drivers/tty/serial/sc16is7xx.c | 2 +- drivers/tty/serial/timbuart.c | 4 +-- drivers/tty/serial/uartlite.c | 3 +- drivers/tty/serial/xilinx_uartps.c | 4 ++- drivers/tty/synclink.c | 3 +- drivers/tty/synclink_gt.c | 6 +--- drivers/tty/synclinkmp.c | 7 ++-- drivers/uio/uio.c | 3 +- drivers/usb/c67x00/c67x00-drv.c | 3 +- drivers/usb/chipidea/core.c | 5 +-- drivers/usb/core/hcd.c | 5 +-- drivers/usb/dwc2/gadget.c | 3 +- drivers/usb/dwc2/platform.c | 3 +- drivers/usb/gadget/udc/amd5536udc_pci.c | 2 +- drivers/usb/gadget/udc/bdc/bdc_udc.c | 3 +- drivers/usb/gadget/udc/fotg210-udc.c | 4 +-- drivers/usb/gadget/udc/fusb300_udc.c | 6 ++-- drivers/usb/gadget/udc/goku_udc.c | 3 +- drivers/usb/gadget/udc/m66592-udc.c | 4 +-- drivers/usb/gadget/udc/mv_u3d_core.c | 3 +- drivers/usb/gadget/udc/mv_udc_core.c | 3 +- drivers/usb/gadget/udc/net2272.c | 3 +- drivers/usb/gadget/udc/net2280.c | 3 +- drivers/usb/gadget/udc/pch_udc.c | 8 +++-- drivers/usb/gadget/udc/pxa27x_udc.c | 3 +- drivers/usb/gadget/udc/r8a66597-udc.c | 5 +-- drivers/usb/gadget/udc/snps_udc_plat.c | 4 +-- drivers/usb/gadget/udc/udc-xilinx.c | 3 +- drivers/usb/host/max3421-hcd.c | 3 +- drivers/usb/host/xhci.c | 12 ++++--- drivers/usb/isp1760/isp1760-udc.c | 3 +- drivers/usb/musb/musb_core.c | 2 +- drivers/usb/phy/phy-gpio-vbus-usb.c | 4 +-- drivers/uwb/whc-rc.c | 5 +-- drivers/vfio/pci/vfio_pci_intrs.c | 5 +-- drivers/video/fbdev/arcfb.c | 3 +- drivers/video/fbdev/aty/atyfb_base.c | 2 +- drivers/video/fbdev/goldfishfb.c | 4 +-- drivers/video/fbdev/matrox/matroxfb_base.c | 3 +- drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 7 ++-- drivers/video/fbdev/via/via-core.c | 3 +- drivers/virt/vboxguest/vboxguest_linux.c | 5 +-- drivers/virtio/virtio_mmio.c | 4 +-- drivers/virtio/virtio_pci_common.c | 20 ++++++----- drivers/vme/bridges/vme_ca91cx42.c | 5 +-- drivers/vme/bridges/vme_tsi148.c | 7 ++-- drivers/w1/masters/ds1wm.c | 3 +- drivers/xen/events/events_base.c | 12 ++++--- drivers/xen/platform-pci.c | 4 +-- drivers/xen/xen-pciback/pciback_ops.c | 6 ++-- samples/v4l/v4l2-pci-skeleton.c | 5 +-- sound/drivers/mpu401/mpu401_uart.c | 3 +- sound/drivers/mtpav.c | 2 +- sound/drivers/serial-u16550.c | 3 +- sound/isa/ad1816a/ad1816a_lib.c | 2 +- sound/isa/es1688/es1688_lib.c | 4 ++- sound/isa/es18xx.c | 3 +- sound/isa/gus/gus_main.c | 2 +- sound/isa/gus/gusmax.c | 2 +- sound/isa/gus/interwave.c | 3 +- sound/isa/msnd/msnd_pinnacle.c | 3 +- sound/isa/opl3sa2.c | 4 +-- sound/isa/opti9xx/opti92x-ad1848.c | 3 +- sound/isa/sb/sb_common.c | 6 +--- sound/isa/wavefront/wavefront.c | 3 +- sound/isa/wss/wss_lib.c | 3 +- sound/pci/ad1889.c | 3 +- sound/pci/ali5451/ali5451.c | 3 +- sound/pci/als300.c | 3 +- sound/pci/asihpi/hpioctl.c | 3 +- sound/pci/atiixp.c | 3 +- sound/pci/atiixp_modem.c | 3 +- sound/pci/aw2/aw2-alsa.c | 3 +- sound/pci/azt3328.c | 3 +- sound/pci/bt87x.c | 4 +-- sound/pci/ca0106/ca0106_main.c | 3 +- sound/pci/cmipci.c | 3 +- sound/pci/cs4281.c | 3 +- sound/pci/cs46xx/cs46xx_lib.c | 3 +- sound/pci/cs5535audio/cs5535audio.c | 3 +- sound/pci/ctxfi/cthw20k1.c | 3 +- sound/pci/ctxfi/cthw20k2.c | 3 +- sound/pci/emu10k1/emu10k1_main.c | 3 +- sound/pci/emu10k1/emu10k1x.c | 3 +- sound/pci/ens1370.c | 3 +- sound/pci/es1938.c | 6 ++-- sound/pci/es1968.c | 3 +- sound/pci/fm801.c | 3 +- sound/pci/hda/hda_intel.c | 4 +-- sound/pci/ice1712/ice1712.c | 3 +- sound/pci/ice1712/ice1724.c | 3 +- sound/pci/intel8x0.c | 6 ++-- sound/pci/intel8x0m.c | 6 ++-- sound/pci/korg1212/korg1212.c | 4 +-- sound/pci/lola/lola.c | 3 +- sound/pci/maestro3.c | 3 +- sound/pci/nm256/nm256.c | 3 +- sound/pci/oxygen/oxygen_lib.c | 4 +-- sound/pci/riptide/riptide.c | 3 +- sound/pci/rme32.c | 3 +- sound/pci/rme96.c | 3 +- sound/pci/rme9652/hdsp.c | 3 +- sound/pci/rme9652/hdspm.c | 3 +- sound/pci/rme9652/rme9652.c | 3 +- sound/pci/sis7019.c | 7 ++-- sound/pci/sonicvibes.c | 3 +- sound/pci/trident/trident_main.c | 3 +- sound/pci/via82xx.c | 6 +--- sound/pci/via82xx_modem.c | 3 +- sound/pci/ymfpci/ymfpci_main.c | 3 +- sound/soc/amd/acp-pcm-dma.c | 3 +- sound/soc/amd/raven/acp3x-pcm-dma.c | 3 +- sound/soc/codecs/rt5640.c | 4 +-- sound/soc/codecs/rt5651.c | 4 +-- sound/soc/codecs/rt5663.c | 4 +-- sound/soc/dwc/dwc-i2s.c | 5 +-- sound/soc/fsl/fsl_asrc.c | 3 +- sound/soc/fsl/fsl_esai.c | 3 +- sound/soc/fsl/fsl_sai.c | 3 +- sound/soc/fsl/fsl_spdif.c | 3 +- sound/soc/fsl/fsl_ssi.c | 3 +- sound/x86/intel_hdmi_audio.c | 5 +-- 478 files changed, 1084 insertions(+), 966 deletions(-)
arch/x86/include/asm/floppy.h +4 -2
@@ -145,10 +145,12 @@ static int fd_request_irq(void) {if (can_use_virtual_dma)return request_irq (FLOPPY_IRQ , floppy_hardint, -0 ,"floppy" ,NULL ); +IRQF_USER_DATA ,"floppy" , +NULL );else return request_irq (FLOPPY_IRQ , floppy_interrupt, -0 ,"floppy" ,NULL ); +IRQF_USER_DATA ,"floppy" , +NULL ); }static unsigned long dma_mem_alloc (unsigned long size)
drivers/atm/lanai.c +2 -2
@@ -2198,8 +2198,8 @@ static int lanai_dev_open(struct atm_dev *atmdev)conf2_write (lanai);reg_write (lanai,TX_FIFO_DEPTH , TxDepth_Reg);reg_write (lanai,0 , CBR_ICG_Reg);/* CBR defaults to no limit */ -if ((result =request_irq (lanai->pci->irq, lanai_int,IRQF_SHARED , -DEV_LABEL , lanai)) !=0 ) { +if ((result =request_irq (lanai->pci->irq, lanai_int, +IRQF_SHARED |IRQF_USER_DATA ,DEV_LABEL , lanai)) !=0 ) { printk(KERN_ERR DEV_LABEL ": can't allocate interrupt\n"); goto error_vcctable; }
drivers/atm/nicstar.c +2 -2
@@ -751,8 +751,8 @@ static int ns_init_card(int i, struct pci_dev *pcidev) card->efbie =1 ; card->intcnt =0 ; -if (request_irq - (pcidev->irq, &ns_irq_handler,IRQF_SHARED ,"nicstar" , card) !=0 ) { +if (request_irq (pcidev->irq, &ns_irq_handler, +IRQF_SHARED |IRQF_USER_DATA ,"nicstar" , card) !=0 ) {printk ("nicstar%d: can't allocate IRQ %d.\n" , i, pcidev->irq); error =9 ;ns_init_card_error (card, error);
drivers/char/ipmi/ipmi_si_intf.c +2 -4
@@ -1266,10 +1266,8 @@ int ipmi_std_irq_setup(struct si_sm_io *io)if (!io->irq)return 0 ; - rv =request_irq (io->irq, - ipmi_si_irq_handler, -IRQF_SHARED , -DEVICE_NAME , + rv =request_irq (io->irq, ipmi_si_irq_handler, +IRQF_SHARED |IRQF_USER_DATA ,DEVICE_NAME , io->irq_handler_data);if (rv) { dev_warn(io->dev, "%s unable to claim interrupt %d,"
drivers/char/sonypi.c +1 -2
@@ -1265,8 +1265,7 @@ static int sonypi_setup_irq(struct sonypi_device *dev, {while (irq_list->irq) { -if (!request_irq (irq_list->irq, sonypi_irq, -IRQF_SHARED ,"sonypi" , sonypi_irq)) { +if (!request_irq (irq_list->irq, sonypi_irq,IRQF_SHARED |IRQF_USER_DATA ,"sonypi" , sonypi_irq)) { dev->irq = irq_list->irq; dev->bits = irq_list->bits;return 0 ;
drivers/firewire/nosy.c +1 -2
@@ -641,8 +641,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)run_pcl (lynx, lynx->rcv_start_pcl_bus,0 ); -if (request_irq (dev->irq, irq_handler,IRQF_SHARED , - driver_name, lynx)) { +if (request_irq (dev->irq, irq_handler,IRQF_SHARED |IRQF_USER_DATA , driver_name, lynx)) {dev_err (&dev->dev,"Failed to allocate shared interrupt %d\n" , dev->irq); ret = -EIO ;
drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c +2 -1
@@ -296,7 +296,8 @@ int oaktrail_hdmi_i2c_init(struct pci_dev *dev)oaktrail_hdmi_i2c_gpio_fix ();/* request irq */ - ret =request_irq (dev->irq, oaktrail_hdmi_i2c_handler,IRQF_SHARED , + ret =request_irq (dev->irq, oaktrail_hdmi_i2c_handler, +IRQF_SHARED |IRQF_USER_DATA , oaktrail_hdmi_i2c_adapter.name, hdmi_dev);if (ret) {DRM_ERROR ("Failed to request IRQ for I2C controller\n" );
drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c +2 -1
@@ -116,7 +116,8 @@ nvkm_pci_oneinit(struct nvkm_subdev *subdev)return ret; } - ret =request_irq (pdev->irq, nvkm_pci_intr,IRQF_SHARED ,"nvkm" , pci); + ret =request_irq (pdev->irq, nvkm_pci_intr, +IRQF_SHARED |IRQF_USER_DATA ,"nvkm" , pci);if (ret)return ret;
drivers/i2c/busses/i2c-emev2.c +3 -2
@@ -391,8 +391,9 @@ static int em_i2c_probe(struct platform_device *pdev)em_i2c_reset (&priv->adap); irq =platform_get_irq (pdev,0 ); - ret =devm_request_irq (&pdev->dev, irq, em_i2c_irq_handler,0 , -"em_i2c" , priv); + ret =devm_request_irq (&pdev->dev, irq, em_i2c_irq_handler, +IRQF_USER_DATA ,"em_i2c" , + priv);if (ret) goto err_clk;
drivers/i2c/busses/i2c-i801.c +1 -1
@@ -1659,7 +1659,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)init_waitqueue_head (&priv->waitq); err =devm_request_irq (&dev->dev, dev->irq, i801_isr, -IRQF_SHARED , +IRQF_SHARED |IRQF_USER_DATA ,dev_driver_string (&dev->dev), priv);if (err) { dev_err(&dev->dev, "Failed to allocate irq %d: %d\n",
drivers/i2c/busses/i2c-pxa.c +2 -2
@@ -1297,8 +1297,8 @@ static int i2c_pxa_probe(struct platform_device *dev) }else { i2c->adap.algo = &i2c_pxa_algorithm; ret =devm_request_irq (&dev->dev, irq, i2c_pxa_handler, -IRQF_SHARED |IRQF_NO_SUSPEND , -dev_name (&dev->dev), i2c); +IRQF_SHARED |IRQF_NO_SUSPEND |IRQF_USER_DATA , +dev_name (&dev->dev), i2c);if (ret) {dev_err (&dev->dev,"failed to request irq: %d\n" , ret); goto ereqirq;
drivers/i2c/busses/i2c-rk3x.c +2 -1
@@ -1271,7 +1271,8 @@ static int rk3x_i2c_probe(struct platform_device *pdev) } ret =devm_request_irq (&pdev->dev, irq, rk3x_i2c_irq, -0 ,dev_name (&pdev->dev), i2c); +IRQF_USER_DATA , +dev_name (&pdev->dev), i2c);if (ret <0 ) {dev_err (&pdev->dev,"cannot request IRQ\n" );return ret;
drivers/ide/ide-probe.c +1 -1
@@ -882,7 +882,7 @@ static int init_irq (ide_hwif_t *hwif)if (!host->get_lock)if (request_irq (hwif->irq, irq_handler, sa |IRQF_USER_DATA , - hwif->name, hwif)) + hwif->name, hwif)) goto out_up;#if !defined(__mc68000__)
drivers/infiniband/hw/mthca/mthca_eq.c +6 -8
@@ -825,10 +825,9 @@ int mthca_init_eq_table(struct mthca_dev *dev)"%s@pci:%s" , eq_name[i], pci_name(dev->pdev)); err =request_irq (dev->eq_table.eq[i].msi_x_vector, -mthca_is_memfree (dev) ? - mthca_arbel_msi_x_interrupt : - mthca_tavor_msi_x_interrupt, -0 , dev->eq_table.eq[i].irq_name, +mthca_is_memfree (dev) ? mthca_arbel_msi_x_interrupt : mthca_tavor_msi_x_interrupt, +IRQF_USER_DATA , + dev->eq_table.eq[i].irq_name, dev->eq_table.eq + i);if (err) goto err_out_cmd;
@@ -838,10 +837,9 @@ int mthca_init_eq_table(struct mthca_dev *dev)snprintf (dev->eq_table.eq[0 ].irq_name,IB_DEVICE_NAME_MAX ,DRV_NAME "@pci:%s" ,pci_name (dev->pdev)); err =request_irq (dev->pdev->irq, -mthca_is_memfree (dev) ? - mthca_arbel_interrupt : - mthca_tavor_interrupt, -IRQF_SHARED , dev->eq_table.eq[0 ].irq_name, dev); +mthca_is_memfree (dev) ? mthca_arbel_interrupt : mthca_tavor_interrupt, +IRQF_SHARED |IRQF_USER_DATA , + dev->eq_table.eq[0 ].irq_name, dev);if (err) goto err_out_cmd; dev->eq_table.have_irq =1 ;
drivers/input/serio/i8042.c +7 -6
@@ -865,8 +865,7 @@ static int __init i8042_check_aux(void) goto out; } -if (request_irq (I8042_AUX_IRQ , i8042_aux_test_irq,IRQF_SHARED , -"i8042" , i8042_platform_device)) +if (request_irq (I8042_AUX_IRQ , i8042_aux_test_irq,IRQF_SHARED |IRQF_USER_DATA ,"i8042" , i8042_platform_device)) goto out; irq_registered = true;
@@ -1463,8 +1462,9 @@ static int __init i8042_setup_aux(void) aux_enable = i8042_enable_mux_ports; } - error =request_irq (I8042_AUX_IRQ , i8042_interrupt,IRQF_SHARED , -"i8042" , i8042_platform_device); + error =request_irq (I8042_AUX_IRQ , i8042_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"i8042" , + i8042_platform_device);if (error) goto err_free_ports;
@@ -1489,8 +1489,9 @@ static int __init i8042_setup_kbd(void)if (error)return error; - error =request_irq (I8042_KBD_IRQ , i8042_interrupt,IRQF_SHARED , -"i8042" , i8042_platform_device); + error =request_irq (I8042_KBD_IRQ , i8042_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"i8042" , + i8042_platform_device);if (error) goto err_free_port;
drivers/ipack/carriers/tpci200.c +3 -3
@@ -340,9 +340,9 @@ static int tpci200_register(struct tpci200_board *tpci200)for (i =0 ; i <TPCI200_NB_SLOT ; i++)writew (slot_ctrl, &tpci200->info->interface_regs->control[i]); - res =request_irq (tpci200->info->pdev->irq, - tpci200_interrupt,IRQF_SHARED , -KBUILD_MODNAME , (void *) tpci200); + res =request_irq (tpci200->info->pdev->irq, tpci200_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,KBUILD_MODNAME , + (void *)tpci200);if (res) { dev_err(&tpci200->info->pdev->dev, "(bn 0x%X, sn 0x%X) unable to register IRQ !",
drivers/isdn/hardware/avm/b1isa.c +3 -1
@@ -97,7 +97,9 @@ static int b1isa_probe(struct pci_dev *pdev) retval = -EBUSY ; goto err_free; } - retval =request_irq (card->irq, b1_interrupt,0 , card->name, card); + retval =request_irq (card->irq, b1_interrupt, +IRQF_USER_DATA , card->name, + card);if (retval) {printk (KERN_ERR "b1isa: unable to get IRQ %d.\n" , card->irq); goto err_release_region;
drivers/isdn/hardware/avm/b1pci.c +4 -2
@@ -97,7 +97,8 @@ static int b1pci_probe(struct capicardparams *p, struct pci_dev *pdev)b1_reset (card->port);b1_getrevision (card); - retval =request_irq (card->irq, b1_interrupt,IRQF_SHARED , card->name, card); + retval =request_irq (card->irq, b1_interrupt, +IRQF_SHARED |IRQF_USER_DATA , card->name, card);if (retval) {printk (KERN_ERR "b1pci: unable to get IRQ %d.\n" , card->irq); retval = -EBUSY ;
@@ -234,7 +235,8 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev)b1dma_reset (card);b1_getrevision (card); - retval =request_irq (card->irq, b1dma_interrupt,IRQF_SHARED , card->name, card); + retval =request_irq (card->irq, b1dma_interrupt, +IRQF_SHARED |IRQF_USER_DATA , card->name, card);if (retval) {printk (KERN_ERR "b1pci: unable to get IRQ %d.\n" , card->irq);
drivers/isdn/hardware/avm/b1pcmcia.c +2 -1
@@ -82,7 +82,8 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq, card->irq = irq; card->cardtype = cardtype; - retval =request_irq (card->irq, b1_interrupt,IRQF_SHARED , card->name, card); + retval =request_irq (card->irq, b1_interrupt, +IRQF_SHARED |IRQF_USER_DATA , card->name, card);if (retval) {printk (KERN_ERR "b1pcmcia: unable to get IRQ %d.\n" , card->irq);
drivers/isdn/hardware/avm/c4.c +2 -1
@@ -1180,7 +1180,8 @@ static int c4_add_card(struct capicardparams *p, struct pci_dev *dev, }c4_reset (card); - retval =request_irq (card->irq, c4_interrupt,IRQF_SHARED , card->name, card); + retval =request_irq (card->irq, c4_interrupt, +IRQF_SHARED |IRQF_USER_DATA , card->name, card);if (retval) {printk (KERN_ERR "c4: unable to get IRQ %d.\n" , card->irq); retval = -EBUSY ;
drivers/isdn/hardware/avm/t1isa.c +3 -1
@@ -405,7 +405,9 @@ static int t1isa_probe(struct pci_dev *pdev, int cardnr) retval = -EBUSY ; goto err_free; } - retval =request_irq (card->irq, t1isa_interrupt,0 , card->name, card); + retval =request_irq (card->irq, t1isa_interrupt, +IRQF_USER_DATA , card->name, + card);if (retval) {printk (KERN_INFO "t1isa: unable to get IRQ %d.\n" , card->irq); retval = -EBUSY ;
drivers/isdn/hardware/avm/t1pci.c +2 -1
@@ -103,7 +103,8 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev) }b1dma_reset (card); - retval =request_irq (card->irq, b1dma_interrupt,IRQF_SHARED , card->name, card); + retval =request_irq (card->irq, b1dma_interrupt, +IRQF_SHARED |IRQF_USER_DATA , card->name, card);if (retval) {printk (KERN_ERR "t1pci: unable to get IRQ %d.\n" , card->irq); retval = -EBUSY ;
drivers/isdn/hardware/mISDN/avmfritz.c +2 -2
@@ -794,10 +794,10 @@ init_card(struct fritzcard *fc)reset_avm (fc);/* disable IRQ */ if (fc->type ==AVM_FRITZ_PCIV2 ) ret =request_irq (fc->irq, avm_fritzv2_interrupt, -IRQF_SHARED , fc->name, fc); +IRQF_SHARED |IRQF_USER_DATA , fc->name, fc);else ret =request_irq (fc->irq, avm_fritz_interrupt, -IRQF_SHARED , fc->name, fc); +IRQF_SHARED |IRQF_USER_DATA , fc->name, fc);if (ret) {pr_info ("%s: couldn't get interrupt %d\n" , fc->name, fc->irq);
drivers/isdn/hardware/mISDN/hfcmulti.c +1 -2
@@ -4271,8 +4271,7 @@ init_card(struct hfc_multi *hc)disable_hwirq (hc);spin_unlock_irqrestore (&hc->lock, flags); -if (request_irq (hc->irq, hfcmulti_interrupt,IRQF_SHARED , -"HFC-multi" , hc)) { +if (request_irq (hc->irq, hfcmulti_interrupt,IRQF_SHARED |IRQF_USER_DATA ,"HFC-multi" , hc)) {printk (KERN_WARNING "mISDN: Could not get interrupt %d.\n" , hc->irq); hc->irq =0 ;
drivers/isdn/hardware/mISDN/hfcpci.c +1 -1
@@ -1738,7 +1738,7 @@ init_card(struct hfc_pci *hc)spin_lock_irqsave (&hc->lock, flags);disable_hwirq (hc);spin_unlock_irqrestore (&hc->lock, flags); -if (request_irq (hc->irq, hfcpci_int,IRQF_SHARED ,"HFC PCI" , hc)) { +if (request_irq (hc->irq, hfcpci_int,IRQF_SHARED |IRQF_USER_DATA ,"HFC PCI" , hc)) {printk (KERN_WARNING "mISDN: couldn't get interrupt %d\n" , hc->irq);return -EIO ;
drivers/isdn/hardware/mISDN/mISDNinfineon.c +2 -1
@@ -611,7 +611,8 @@ init_irq(struct inf_hw *hw)if (!hw->ci->irqfunc)return -EINVAL ; - ret =request_irq (hw->irq, hw->ci->irqfunc,IRQF_SHARED , hw->name, hw); + ret =request_irq (hw->irq, hw->ci->irqfunc, +IRQF_SHARED |IRQF_USER_DATA , hw->name, hw);if (ret) {pr_info ("%s: couldn't get interrupt %d\n" , hw->name, hw->irq);return ret;
drivers/isdn/hardware/mISDN/netjet.c +1 -1
@@ -929,7 +929,7 @@ nj_init_card(struct tiger_hw *card)spin_unlock_irqrestore (&card->lock, flags); card->irq = card->pdev->irq; -if (request_irq (card->irq, nj_irq,IRQF_SHARED , card->name, card)) { +if (request_irq (card->irq, nj_irq,IRQF_SHARED |IRQF_USER_DATA , card->name, card)) {pr_info ("%s: couldn't get interrupt %d\n" , card->name, card->irq); card->irq =-1 ;
drivers/isdn/hardware/mISDN/speedfax.c +2 -1
@@ -288,7 +288,8 @@ init_card(struct sfax_hw *sf)int ret, cnt =3 ;u_long flags; - ret =request_irq (sf->irq, speedfax_irq,IRQF_SHARED , sf->name, sf); + ret =request_irq (sf->irq, speedfax_irq,IRQF_SHARED |IRQF_USER_DATA , + sf->name, sf);if (ret) {pr_info ("%s: couldn't get interrupt %d\n" , sf->name, sf->irq);return ret;
drivers/isdn/hardware/mISDN/w6692.c +1 -1
@@ -917,7 +917,7 @@ init_card(struct w6692_hw *card)spin_lock_irqsave (&card->lock, flags);disable_hwirq (card);spin_unlock_irqrestore (&card->lock, flags); -if (request_irq (card->irq, w6692_irq,IRQF_SHARED , card->name, card)) { +if (request_irq (card->irq, w6692_irq,IRQF_SHARED |IRQF_USER_DATA , card->name, card)) {pr_info ("%s: couldn't get interrupt %d\n" , card->name, card->irq);return -EIO ;
drivers/isdn/hisax/config.c +1 -1
@@ -822,7 +822,7 @@ static int init_card(struct IsdnCardState *cs) irq_cnt = cs->irq_cnt =0 ;printk (KERN_INFO "%s: IRQ %d count %d\n" , CardType[cs->typ], cs->irq, irq_cnt); -if (request_irq (cs->irq, card_irq, cs->irq_flags,"HiSax" , cs)) { +if (request_irq (cs->irq, card_irq, cs->irq_flags |IRQF_USER_DATA ,"HiSax" , cs)) {printk (KERN_WARNING "HiSax: couldn't get interrupt %d\n" , cs->irq);return 1 ;
drivers/isdn/hisax/hfc4s8s_l1.c +1 -2
@@ -1440,8 +1440,7 @@ setup_instance(hfc4s8s_hw *hw)INIT_WORK (&hw->tqueue, hfc4s8s_bh); -if (request_irq - (hw->irq, hfc4s8s_interrupt,IRQF_SHARED , hw->card_name, hw)) { +if (request_irq (hw->irq, hfc4s8s_interrupt,IRQF_SHARED |IRQF_USER_DATA , hw->card_name, hw)) {printk (KERN_INFO "HFC-4S/8S: unable to alloc irq %d, card ignored\n" , hw->irq);
drivers/isdn/hisax/hisax_fcpcipnp.c +8 -5
@@ -780,15 +780,18 @@ static int fcpcipnp_setup(struct fritz_adapter *adapter)switch (adapter->type) {case AVM_FRITZ_PCIV2 : - retval =request_irq (adapter->irq, fcpci2_irq,IRQF_SHARED , -"fcpcipnp" , adapter); + retval =request_irq (adapter->irq, fcpci2_irq, +IRQF_SHARED |IRQF_USER_DATA ,"fcpcipnp" , + adapter);break ;case AVM_FRITZ_PCI : - retval =request_irq (adapter->irq, fcpci_irq,IRQF_SHARED , -"fcpcipnp" , adapter); + retval =request_irq (adapter->irq, fcpci_irq, +IRQF_SHARED |IRQF_USER_DATA ,"fcpcipnp" , + adapter);break ;case AVM_FRITZ_PNP : - retval =request_irq (adapter->irq, fcpci_irq,0 , + retval =request_irq (adapter->irq, fcpci_irq, +IRQF_USER_DATA ,"fcpcipnp" , adapter);break ; }
drivers/media/common/saa7146/saa7146_core.c +2 -2
@@ -414,8 +414,8 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *entsaa7146_write (dev,MC2 ,0xf8000000 );/* request an interrupt for the saa7146 */ - err =request_irq (pci->irq, interrupt_hw,IRQF_SHARED , - dev->name, dev); + err =request_irq (pci->irq, interrupt_hw, +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (err <0 ) {ERR ("request_irq() failed\n" ); goto err_unmap;
drivers/media/pci/b2c2/flexcop-pci.c +1 -2
@@ -309,8 +309,7 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci)pci_set_drvdata (fc_pci->pdev, fc_pci);spin_lock_init (&fc_pci->irq_lock); -if ((ret =request_irq (fc_pci->pdev->irq, flexcop_pci_isr, -IRQF_SHARED ,DRIVER_NAME , fc_pci)) !=0 ) +if ((ret =request_irq (fc_pci->pdev->irq, flexcop_pci_isr,IRQF_SHARED |IRQF_USER_DATA ,DRIVER_NAME , fc_pci)) !=0 ) goto err_pci_iounmap; fc_pci->init_state |=FC_PCI_INIT ;
drivers/media/pci/cobalt/cobalt-driver.c +1 -2
@@ -383,8 +383,7 @@ static int cobalt_setup_pci(struct cobalt *cobalt, struct pci_dev *pci_dev,msi_config_show (cobalt, pci_dev);/* Register IRQ */ -if (request_irq (pci_dev->irq, cobalt_irq_handler,IRQF_SHARED , - cobalt->v4l2_dev.name, (void *)cobalt)) { +if (request_irq (pci_dev->irq, cobalt_irq_handler,IRQF_SHARED |IRQF_USER_DATA , cobalt->v4l2_dev.name, (void *)cobalt)) {cobalt_err ("Failed to register irq %d\n" , pci_dev->irq); ret = -EIO ; goto err_msi;
drivers/media/pci/cx18/cx18-driver.c +2 -1
@@ -1026,7 +1026,8 @@ static int cx18_probe(struct pci_dev *pci_dev,/* Register IRQ */ retval =request_irq (cx->pci_dev->irq, cx18_irq_handler, -IRQF_SHARED , cx->v4l2_dev.name, (void *)cx); +IRQF_SHARED |IRQF_USER_DATA , cx->v4l2_dev.name, + (void *)cx);if (retval) {CX18_ERR ("Failed to register irq %d\n" , retval); goto free_i2c;
drivers/media/pci/cx25821/cx25821-core.c +1 -1
@@ -1319,7 +1319,7 @@ static int cx25821_initdev(struct pci_dev *pci_dev, } err =request_irq (pci_dev->irq, cx25821_irq, -IRQF_SHARED , dev->name, dev); +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (err <0 ) {pr_err ("%s: can't get IRQ %d\n" , dev->name, pci_dev->irq);
drivers/media/pci/cx88/cx88-alsa.c +2 -1
@@ -895,7 +895,8 @@ static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci,/* get irq */ err =request_irq (chip->pci->irq, cx8801_irq, -IRQF_SHARED , chip->core->name, chip); +IRQF_SHARED |IRQF_USER_DATA , chip->core->name, + chip);if (err <0 ) {dprintk (0 ,"%s: can't get IRQ %d\n" , chip->core->name, chip->pci->irq);
drivers/media/pci/cx88/cx88-mpeg.c +1 -1
@@ -416,7 +416,7 @@ static int cx8802_init_common(struct cx8802_dev *dev)/* get irq */ err =request_irq (dev->pci->irq, cx8802_irq, -IRQF_SHARED , dev->core->name, dev); +IRQF_SHARED |IRQF_USER_DATA , dev->core->name, dev);if (err <0 ) {pr_err ("can't get IRQ %d\n" , dev->pci->irq);return err;
drivers/media/pci/cx88/cx88-video.c +1 -1
@@ -1342,7 +1342,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,/* get irq */ err =request_irq (pci_dev->irq, cx8800_irq, -IRQF_SHARED , core->name, dev); +IRQF_SHARED |IRQF_USER_DATA , core->name, dev);if (err <0 ) {pr_err ("can't get IRQ %d\n" , pci_dev->irq); goto fail_core;
drivers/media/pci/dt3155/dt3155.c +1 -1
@@ -565,7 +565,7 @@ static int dt3155_probe(struct pci_dev *pdev, const struct pci_device_id *id)if (err) goto err_iounmap; err =request_irq (pd->pdev->irq, dt3155_irq_handler_even, -IRQF_SHARED ,DT3155_NAME , pd); +IRQF_SHARED |IRQF_USER_DATA ,DT3155_NAME , pd);if (err) goto err_iounmap; err =video_register_device (&pd->vdev,VFL_TYPE_GRABBER ,-1 );
drivers/media/pci/intel/ipu3/ipu3-cio2.c +1 -1
@@ -1814,7 +1814,7 @@ static int cio2_pci_probe(struct pci_dev *pci_dev, goto fail_cio2_queue_exit; r =devm_request_irq (&pci_dev->dev, pci_dev->irq, cio2_irq, -IRQF_SHARED ,CIO2_NAME , cio2); +IRQF_SHARED |IRQF_USER_DATA ,CIO2_NAME , cio2);if (r) {dev_err (&pci_dev->dev,"failed to request IRQ (%d)\n" , r); goto fail;
drivers/media/pci/ivtv/ivtv-driver.c +2 -1
@@ -1249,7 +1249,8 @@ static int ivtv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)/* Register IRQ */ retval =request_irq (itv->pdev->irq, ivtv_irq_handler, -IRQF_SHARED , itv->v4l2_dev.name, (void *)itv); +IRQF_SHARED |IRQF_USER_DATA , itv->v4l2_dev.name, + (void *)itv);if (retval) {IVTV_ERR ("Failed to register irq %d\n" , retval); goto free_i2c;
drivers/media/pci/meye/meye.c +1 -2
@@ -1674,8 +1674,7 @@ static int meye_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) } meye.mchip_irq = pcidev->irq; -if (request_irq (meye.mchip_irq, meye_irq, -IRQF_SHARED ,"meye" , meye_irq)) { +if (request_irq (meye.mchip_irq, meye_irq,IRQF_SHARED |IRQF_USER_DATA ,"meye" , meye_irq)) {v4l2_err (v4l2_dev,"request_irq failed\n" ); goto outreqirq; }
drivers/media/pci/ngene/ngene-core.c +2 -3
@@ -1332,8 +1332,7 @@ static int ngene_start(struct ngene *dev)ngene_init (dev); stat =request_irq (dev->pci_dev->irq, irq_handler, -IRQF_SHARED ,"nGene" , - (void *)dev); +IRQF_SHARED |IRQF_USER_DATA ,"nGene" , (void *)dev);if (stat <0 )return stat;
@@ -1372,7 +1371,7 @@ static int ngene_start(struct ngene *dev) dev->msi_enabled = true; } stat =request_irq (dev->pci_dev->irq, irq_handler, - flags,"nGene" , dev); + flags |IRQF_USER_DATA ,"nGene" , dev);if (stat <0 ) goto fail2;ngwritel (1 ,NGENE_INT_ENABLE );
drivers/media/pci/pluto2/pluto2.c +2 -1
@@ -623,7 +623,8 @@ static int pluto2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)pci_set_drvdata (pdev, pluto); - ret =request_irq (pdev->irq, pluto_irq,IRQF_SHARED ,DRIVER_NAME , pluto); + ret =request_irq (pdev->irq, pluto_irq,IRQF_SHARED |IRQF_USER_DATA , +DRIVER_NAME , pluto);if (ret <0 ) goto err_pci_iounmap;
drivers/media/pci/saa7134/saa7134-alsa.c +2 -2
@@ -1157,8 +1157,8 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) err =request_irq (dev->pci->irq, saa7134_alsa_irq, -IRQF_SHARED , dev->name, - (void *) &dev->dmasound); +IRQF_SHARED |IRQF_USER_DATA , dev->name, + (void *)&dev->dmasound);if (err <0 ) { pr_err("%s: can't get IRQ %d for ALSA\n",
drivers/media/pci/saa7134/saa7134-core.c +1 -1
@@ -1158,7 +1158,7 @@ static int saa7134_initdev(struct pci_dev *pci_dev,/* get irq */ err =request_irq (pci_dev->irq, saa7134_irq, -IRQF_SHARED , dev->name, dev); +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (err <0 ) {pr_err ("%s: can't get IRQ %d\n" , dev->name,pci_dev->irq);
drivers/media/pci/saa7164/saa7164-core.c +4 -3
@@ -1188,8 +1188,8 @@ static bool saa7164_enable_msi(struct pci_dev *pci_dev, struct saa7164_dev *dev) }/* no error - so request an msi interrupt */ - err =request_irq (pci_dev->irq, saa7164_irq,0 , - dev->name, dev); + err =request_irq (pci_dev->irq, saa7164_irq, +IRQF_USER_DATA , dev->name, dev);if (err) {/* fall back to legacy interrupt */
@@ -1256,7 +1256,8 @@ static int saa7164_initdev(struct pci_dev *pci_dev,or msi is not enabled - fallback to shared interrupt */ err =request_irq (pci_dev->irq, saa7164_irq, -IRQF_SHARED , dev->name, dev); +IRQF_SHARED |IRQF_USER_DATA , dev->name, + dev);if (err <0 ) { printk(KERN_ERR "%s: can't get IRQ %d\n", dev->name,
drivers/media/pci/solo6x10/solo6x10-core.c +2 -2
@@ -559,8 +559,8 @@ static int solo_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)/* PLL locking time of 1ms */ mdelay (1 ); - ret =request_irq (pdev->irq, solo_isr,IRQF_SHARED ,SOLO6X10_NAME , - solo_dev); + ret =request_irq (pdev->irq, solo_isr,IRQF_SHARED |IRQF_USER_DATA , +SOLO6X10_NAME , solo_dev);if (ret) goto fail_probe;
drivers/media/pci/sta2x11/sta2x11_vip.c +2 -3
@@ -1073,9 +1073,8 @@ static int sta2x11_vip_init_one(struct pci_dev *pdev,spin_lock_init (&vip->slock); - ret =request_irq (pdev->irq, - (irq_handler_t ) vip_irq, -IRQF_SHARED ,KBUILD_MODNAME , vip); + ret =request_irq (pdev->irq, (irq_handler_t )vip_irq, +IRQF_SHARED |IRQF_USER_DATA ,KBUILD_MODNAME , vip);if (ret) {dev_err (&pdev->dev,"request_irq failed\n" ); ret = -ENODEV ;
drivers/media/pci/tw68/tw68-core.c +1 -1
@@ -307,7 +307,7 @@ static int tw68_initdev(struct pci_dev *pci_dev,/* get irq */ err =devm_request_irq (&pci_dev->dev, pci_dev->irq, tw68_irq, -IRQF_SHARED , dev->name, dev); +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (err <0 ) {pr_err ("%s: can't get IRQ %d\n" , dev->name, pci_dev->irq);
drivers/media/pci/tw686x/tw686x-core.c +2 -2
@@ -318,8 +318,8 @@ static int tw686x_probe(struct pci_dev *pci_dev,spin_lock_init (&dev->lock); - err =request_irq (pci_dev->irq, tw686x_irq,IRQF_SHARED , - dev->name, dev); + err =request_irq (pci_dev->irq, tw686x_irq, +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (err <0 ) {dev_err (&pci_dev->dev,"unable to request interrupt\n" ); goto iounmap;
drivers/media/platform/aspeed-video.c +3 -2
@@ -1600,8 +1600,9 @@ static int aspeed_video_init(struct aspeed_video *video)return -ENODEV ; } - rc =devm_request_irq (dev, irq, aspeed_video_irq,IRQF_SHARED , -DEVICE_NAME , video); + rc =devm_request_irq (dev, irq, aspeed_video_irq, +IRQF_SHARED |IRQF_USER_DATA ,DEVICE_NAME , + video);if (rc <0 ) {dev_err (dev,"Unable to request IRQ %d\n" , irq);return rc;
drivers/media/platform/marvell-ccic/cafe-driver.c +2 -1
@@ -508,7 +508,8 @@ static int cafe_pci_probe(struct pci_dev *pdev, goto out_disable; } mcam->regs_size =pci_resource_len (pdev,0 ); - ret =request_irq (pdev->irq, cafe_irq,IRQF_SHARED ,"cafe-ccic" , cam); + ret =request_irq (pdev->irq, cafe_irq,IRQF_SHARED |IRQF_USER_DATA , +"cafe-ccic" , cam);if (ret) goto out_iounmap;
drivers/media/rc/fintek-cir.c +1 -2
@@ -552,8 +552,7 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id fintek->cir_port_len, FINTEK_DRIVER_NAME)) goto exit_free_dev_rdev; -if (request_irq (fintek->cir_irq, fintek_cir_isr,IRQF_SHARED , -FINTEK_DRIVER_NAME , (void *)fintek)) +if (request_irq (fintek->cir_irq, fintek_cir_isr,IRQF_SHARED |IRQF_USER_DATA ,FINTEK_DRIVER_NAME , (void *)fintek)) goto exit_free_cir_addr; ret =rc_register_device (rdev);
drivers/media/rc/gpio-ir-recv.c +1 -1
@@ -101,7 +101,7 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)platform_set_drvdata (pdev, gpio_dev);return devm_request_irq (dev, gpio_dev->irq, gpio_ir_recv_irq, -IRQF_TRIGGER_FALLING |IRQF_TRIGGER_RISING , +IRQF_TRIGGER_FALLING |IRQF_TRIGGER_RISING |IRQF_USER_DATA ,"gpio-ir-recv-irq" , gpio_dev); }
drivers/media/rc/ir-hix5hd2.c +1 -2
@@ -275,8 +275,7 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)if (ret <0 ) goto clkerr; -if (devm_request_irq (dev, priv->irq, hix5hd2_ir_rx_interrupt, -0 , pdev->name, priv) <0 ) { +if (devm_request_irq (dev, priv->irq, hix5hd2_ir_rx_interrupt,IRQF_USER_DATA , pdev->name, priv) <0 ) {dev_err (dev,"IRQ %d register failed\n" , priv->irq); ret = -EINVAL ; goto regerr;
drivers/media/rc/ite-cir.c +1 -2
@@ -1593,8 +1593,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id dev_desc->io_region_size, ITE_DRIVER_NAME)) goto exit_unregister_device; -if (request_irq (itdev->cir_irq, ite_cir_isr,IRQF_SHARED , -ITE_DRIVER_NAME , (void *)itdev)) +if (request_irq (itdev->cir_irq, ite_cir_isr,IRQF_SHARED |IRQF_USER_DATA ,ITE_DRIVER_NAME , (void *)itdev)) goto exit_release_cir_addr;ite_pr (KERN_NOTICE ,"driver has been successfully loaded\n" );
drivers/media/rc/nuvoton-cir.c +2 -1
@@ -1049,7 +1049,8 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id)return -EBUSY ; ret =devm_request_irq (&pdev->dev, nvt->cir_irq, nvt_cir_isr, -IRQF_SHARED ,NVT_DRIVER_NAME , nvt); +IRQF_SHARED |IRQF_USER_DATA ,NVT_DRIVER_NAME , + nvt);if (ret)return ret;
drivers/media/rc/serial_ir.c +1 -1
@@ -543,7 +543,7 @@ static int serial_ir_probe(struct platform_device *dev)timer_setup (&serial_ir.timeout_timer, serial_ir_timeout,0 ); result =devm_request_irq (&dev->dev, irq, serial_ir_irq_handler, - share_irq ?IRQF_SHARED :0 , + (share_irq ?IRQF_SHARED :0 ) |IRQF_USER_DATA ,KBUILD_MODNAME , &hardware);if (result <0 ) {if (result == -EBUSY )
drivers/media/rc/sir_ir.c +2 -1
@@ -355,7 +355,8 @@ static int sir_ir_probe(struct platform_device *dev)pr_err ("i/o port 0x%.4x already in use.\n" , io);return -EBUSY ; } - retval =devm_request_irq (&sir_ir_dev->dev, irq, sir_interrupt,0 , + retval =devm_request_irq (&sir_ir_dev->dev, irq, sir_interrupt, +IRQF_USER_DATA ,KBUILD_MODNAME ,NULL );if (retval <0 ) {pr_err ("IRQ %d already in use.\n" , irq);
drivers/media/rc/winbond-cir.c +1 -1
@@ -1123,7 +1123,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) } err =request_irq (data->irq, wbcir_irq_handler, -0 ,DRVNAME , device); +IRQF_USER_DATA ,DRVNAME , device);if (err) {dev_err (dev,"Failed to claim IRQ %u\n" , data->irq); err = -EBUSY ;
drivers/memstick/host/jmb38x_ms.c +1 -2
@@ -901,8 +901,7 @@ static struct memstick_host *jmb38x_ms_alloc_host(struct jmb38x_ms *jm, int cnt)timer_setup (&host->timer, jmb38x_ms_abort,0 ); -if (!request_irq (host->irq, jmb38x_ms_isr,IRQF_SHARED , host->host_id, - msh)) +if (!request_irq (host->irq, jmb38x_ms_isr,IRQF_SHARED |IRQF_USER_DATA , host->host_id, msh))return msh;iounmap (host->addr);
drivers/message/fusion/mptbase.c +2 -1
@@ -2425,7 +2425,8 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)else ioc->msi_enable =0 ; rc =request_irq (ioc->pcidev->irq, mpt_interrupt, -IRQF_SHARED , ioc->name, ioc); +IRQF_SHARED |IRQF_USER_DATA , + ioc->name, ioc);if (rc <0 ) { printk(MYIOC_s_ERR_FMT "Unable to allocate " "interrupt %d!\n",
drivers/mfd/ezx-pcap.c +2 -2
@@ -479,8 +479,8 @@ static int ezx_pcap_probe(struct spi_device *spi) adc_irq =pcap_to_irq (pcap, (pdata->config &PCAP_SECOND_PORT ) ?PCAP_IRQ_ADCDONE2 :PCAP_IRQ_ADCDONE ); - ret =devm_request_irq (&spi->dev, adc_irq, pcap_adc_irq,0 ,"ADC" , - pcap); + ret =devm_request_irq (&spi->dev, adc_irq, pcap_adc_irq, +IRQF_USER_DATA ,"ADC" , pcap);if (ret) goto free_irqchip;
drivers/misc/ibmasm/module.c +3 -1
@@ -114,7 +114,9 @@ static int ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id) goto error_ioremap; } - result =request_irq (sp->irq, ibmasm_interrupt_handler,IRQF_SHARED , sp->devname, (void *)sp); + result =request_irq (sp->irq, ibmasm_interrupt_handler, +IRQF_SHARED |IRQF_USER_DATA , sp->devname, + (void *)sp);if (result) {dev_err (sp->dev,"Failed to register interrupt handler\n" ); goto error_request_irq;
drivers/misc/sgi-gru/grufile.c +5 -2
@@ -385,7 +385,9 @@ static int gru_chiplet_setup_tlb_irq(int chiplet, char *irq_name,return ret; } - ret =request_irq (irq, irq_handler,0 , irq_name,NULL ); + ret =request_irq (irq, irq_handler, +IRQF_USER_DATA , irq_name, +NULL );if (ret) {printk (KERN_ERR "%s: request_irq failed, errno=%d\n" ,GRU_DRIVER_ID_STR , -ret);
@@ -433,7 +435,8 @@ static int gru_chiplet_setup_tlb_irq(int chiplet, char *irq_name,return irq; } - ret =request_irq (irq, irq_handler,0 , irq_name,NULL ); + ret =request_irq (irq, irq_handler,IRQF_USER_DATA , + irq_name,NULL );if (ret) {uv_teardown_irq (irq); printk(KERN_ERR "%s: request_irq failed, errno=%d\n",
drivers/misc/sgi-xp/xpc_uv.c +2 -1
@@ -259,7 +259,8 @@ xpc_create_gru_mq_uv(unsigned int mq_size, int cpu, char *irq_name,if (ret !=0 ) goto out_4; - ret =request_irq (mq->irq, irq_handler,0 , irq_name,NULL ); + ret =request_irq (mq->irq, irq_handler, +IRQF_USER_DATA , irq_name,NULL );if (ret !=0 ) {dev_err (xpc_part,"request_irq(irq=%d) returned error=%d\n" , mq->irq, -ret);
drivers/mmc/host/mtk-sd.c +2 -1
@@ -2227,7 +2227,8 @@ static int msdc_drv_probe(struct platform_device *pdev)msdc_init_hw (host); ret =devm_request_irq (&pdev->dev, host->irq, msdc_irq, -IRQF_TRIGGER_LOW |IRQF_ONESHOT , pdev->name, host); +IRQF_TRIGGER_LOW |IRQF_ONESHOT |IRQF_USER_DATA , + pdev->name, host);if (ret) goto release;
drivers/net/arcnet/arc-rimi.c +1 -1
@@ -136,7 +136,7 @@ static int __init arcrimi_found(struct net_device *dev) }/* reserve the irq */ -if (request_irq (dev->irq, arcnet_interrupt,0 ,"arcnet (RIM I)" , dev)) { +if (request_irq (dev->irq, arcnet_interrupt,IRQF_USER_DATA ,"arcnet (RIM I)" , dev)) {iounmap (p);release_mem_region (dev->mem_start,MIRROR_SIZE );arc_printk (D_NORMAL , dev,"Can't get IRQ %d!\n" , dev->irq);
drivers/net/arcnet/com20020.c +1 -2
@@ -240,8 +240,7 @@ int com20020_found(struct net_device *dev, int shared)arcnet_outb (dev->dev_addr[0 ], ioaddr,COM20020_REG_W_XREG );/* reserve the irq */ -if (request_irq (dev->irq, arcnet_interrupt, shared, -"arcnet (COM20020)" , dev)) { +if (request_irq (dev->irq, arcnet_interrupt, shared |IRQF_USER_DATA ,"arcnet (COM20020)" , dev)) {arc_printk (D_NORMAL , dev,"Can't get IRQ %d!\n" , dev->irq);return -ENODEV ; }
drivers/net/arcnet/com90io.c +1 -2
@@ -225,8 +225,7 @@ static int __init com90io_found(struct net_device *dev)int err;/* Reserve the irq */ -if (request_irq (dev->irq, arcnet_interrupt,0 , -"arcnet (COM90xx-IO)" , dev)) { +if (request_irq (dev->irq, arcnet_interrupt,IRQF_USER_DATA ,"arcnet (COM90xx-IO)" , dev)) {arc_printk (D_NORMAL , dev,"Can't get IRQ %d!\n" , dev->irq);return -ENODEV ; }
drivers/net/arcnet/com90xx.c +1 -1
@@ -508,7 +508,7 @@ static int __init com90xx_found(int ioaddr, int airq, u_long shmem, goto err_free_dev;/* reserve the irq */ -if (request_irq (airq, arcnet_interrupt,0 ,"arcnet (90xx)" , dev)) { +if (request_irq (airq, arcnet_interrupt,IRQF_USER_DATA ,"arcnet (90xx)" , dev)) {arc_printk (D_NORMAL , dev,"Can't get IRQ %d!\n" , airq); goto err_release_mem; }
drivers/net/can/cc770/cc770.c +2 -2
@@ -782,8 +782,8 @@ static int cc770_open(struct net_device *dev)if (err)return err; - err =request_irq (dev->irq, &cc770_interrupt, priv->irq_flags, - dev->name, dev); + err =request_irq (dev->irq, &cc770_interrupt, + priv->irq_flags |IRQF_USER_DATA , dev->name, dev);if (err) {close_candev (dev);return -EAGAIN ;
drivers/net/can/peak_canfd/peak_pciefd_main.c +3 -5
@@ -415,11 +415,9 @@ static int pciefd_pre_cmd(struct peak_canfd_priv *ucan)break ;/* going into operational mode: setup IRQ handler */ - err =request_irq (priv->ucan.ndev->irq, - pciefd_irq_handler, -IRQF_SHARED , -PCIEFD_DRV_NAME , - priv); + err =request_irq (priv->ucan.ndev->irq, pciefd_irq_handler, +IRQF_SHARED |IRQF_USER_DATA , +PCIEFD_DRV_NAME , priv);if (err)return err;
drivers/net/can/sja1000/ems_pcmcia.c +2 -2
@@ -243,8 +243,8 @@ static int ems_pcmcia_add_card(struct pcmcia_device *pdev, unsigned long base)free_sja1000dev (dev); } - err =request_irq (dev->irq, &ems_pcmcia_interrupt,IRQF_SHARED , -DRV_NAME , card); + err =request_irq (dev->irq, &ems_pcmcia_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,DRV_NAME , card);if (!err)return 0 ;
drivers/net/can/sja1000/peak_pcmcia.c +2 -1
@@ -695,7 +695,8 @@ static int pcan_probe(struct pcmcia_device *pdev)timer_setup (&card->led_timer, pcan_led_timer,0 );/* request the given irq */ - err =request_irq (pdev->irq, &pcan_isr,IRQF_SHARED ,PCC_NAME , card); + err =request_irq (pdev->irq, &pcan_isr,IRQF_SHARED |IRQF_USER_DATA , +PCC_NAME , card);if (err) {dev_err (&pdev->dev,"couldn't request irq%d\n" , pdev->irq); goto probe_err_5;
drivers/net/can/sja1000/sja1000.c +3 -2
@@ -581,8 +581,9 @@ static int sja1000_open(struct net_device *dev)/* register interrupt handler, if not done by the device driver */ if (!(priv->flags &SJA1000_CUSTOM_IRQ_HANDLER )) { - err =request_irq (dev->irq, sja1000_interrupt, priv->irq_flags, - dev->name, (void *)dev); + err =request_irq (dev->irq, sja1000_interrupt, + priv->irq_flags |IRQF_USER_DATA , dev->name, + (void *)dev);if (err) {close_candev (dev);return -EAGAIN ;
drivers/net/ethernet/3com/3c509.c +2 -1
@@ -670,7 +670,8 @@ el3_open(struct net_device *dev)outw (RxReset, ioaddr +EL3_CMD );outw (SetStatusEnb |0x00 , ioaddr +EL3_CMD ); - i =request_irq (dev->irq, el3_interrupt,0 , dev->name, dev); + i =request_irq (dev->irq, el3_interrupt, +IRQF_USER_DATA , dev->name, dev);if (i)return i;
drivers/net/ethernet/3com/3c515.c +2 -4
@@ -764,13 +764,11 @@ static int corkscrew_open(struct net_device *dev)/* Corkscrew: Cannot share ISA resources. */ if (dev->irq ==0 || dev->dma ==0 || -request_irq (dev->irq, corkscrew_interrupt,0 , - vp->product_name, dev)) +request_irq (dev->irq, corkscrew_interrupt,IRQF_USER_DATA , vp->product_name, dev))return -EAGAIN ;enable_dma (dev->dma);set_dma_mode (dev->dma,DMA_MODE_CASCADE ); - }else if (request_irq (dev->irq, corkscrew_interrupt,IRQF_SHARED , - vp->product_name, dev)) { + }else if (request_irq (dev->irq, corkscrew_interrupt,IRQF_SHARED |IRQF_USER_DATA , vp->product_name, dev)) {return -EAGAIN ; }
drivers/net/ethernet/8390/axnet_cs.c +2 -1
@@ -474,7 +474,8 @@ static int axnet_open(struct net_device *dev)return -ENODEV ;outb_p (0xFF , nic_base +EN0_ISR );/* Clear bogus intr. */ - ret =request_irq (dev->irq, ei_irq_wrapper,IRQF_SHARED ,"axnet_cs" , dev);
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/atheros/atlx/atl1.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/atheros/atlx/atl2.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +5 -11
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/micrel/ks8851_mll.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/microchip/lan743x_main.c +3 -4
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/b43legacy/main.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +4 -3
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intel/ipw2x00/ipw2100.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intel/ipw2x00/ipw2200.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intel/iwlegacy/3945-mac.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intel/iwlegacy/4965-mac.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intersil/hostap/hostap_pci.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intersil/hostap/hostap_plx.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intersil/orinoco/orinoco_nortel.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intersil/orinoco/orinoco_pci.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intersil/orinoco/orinoco_plx.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intersil/orinoco/orinoco_tmd.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intersil/p54/p54pci.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intersil/p54/p54spi.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intersil/prism54/islpci_hotplug.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/libertas/if_cs.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/libertas/if_spi.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/mwifiex/main.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/mwifiex/pcie.c +5 -3
Lines of this file are not shown. View the raw message.
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ralink/rt2x00/rt2x00mmio.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/realtek/rtlwifi/pci.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/pci/hotplug/cpci_hotplug_core.c +1 -5
Lines of this file are not shown. View the raw message.
drivers/platform/goldfish/goldfish_pipe.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/platform/mellanox/mlxreg-hotplug.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/platform/x86/intel_int0002_vgpio.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/power/supply/act8945a_charger.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/power/supply/goldfish_battery.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/power/supply/max14656_charger_detector.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/regulator/qcom_spmi-regulator.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/scsi/megaraid/megaraid_sas_base.c +2 -6
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_1032.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_1500.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_1564.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_2032.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_3120.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_3xxx.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/adl_pci9111.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/adl_pci9118.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/adv_pci1710.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/aio_iiro_16.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/amplc_dio200_common.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/amplc_pc236_common.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/amplc_pci224.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/amplc_pci230.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/cb_pcidas.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/cb_pcidas64.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/comedi_parport.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/das16m1.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/das1800.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/das6402.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/das800.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/dmm32at.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/dt2811.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/dt2814.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/dt282x.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/dt3000.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/gsc_hpdi.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/me4000.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_6527.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_65xx.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_660x.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_at_a2150.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_atmio.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_atmio16d.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_labpc_common.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_pcidio.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_pcimio.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcl711.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcl726.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcl812.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcl816.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcl818.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcmmio.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcmuio.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/rtd520.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/gasket/gasket_interrupt.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/goldfish/goldfish_audio.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/staging/media/bcm2048/radio-bcm2048.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/media/zoran/zoran_card.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/olpc_dcon/olpc_dcon_xo_1.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/thermal/ti-soc-thermal/ti-bandgap.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/usb/gadget/udc/amd5536udc_pci.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/video/fbdev/matrox/matroxfb_base.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c +3 -4
Lines of this file are not shown. View the raw message.
drivers/virt/vboxguest/vboxguest_linux.c +3 -2
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 132 lines
2.17.2 From 9c68ac6c4dddd4954637054bcc46850ef56b2035 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Tue, 19 Feb 2019 15:24:54 -0800 Subject: [PATCH 42/43] mds sweep: Mark timer handlers that touch user data This is the result of a large scale tree audit, looking for timer handlers that may touch user data. The audit was on the conservative side, it was either handlers that clearly user data, or were too complicated to audit and not performance critical. There are more timer handlers that touch user data, but these are covered by centralized hooks. The change was done with the following cocci script, except for DEFINE_TIMER, which was done by sed. // SPDX-License-Identifier: GPL-2.0 @@ expression timer, func, flags; @@ - timer_setup(timer, func, flags) + timer_setup(timer, func, flags | TIMER_USER_DATA) @@ expression timer, func, flags; @@ - timer_setup_on_stack(timer, func, flags) + timer_setup_on_stack(timer, func, flags | TIMER_USER_DATA) @@ expression timer, flags1, flags2; @@ - hrtimer_init(timer, flags1, flags2) + hrtimer_init(timer, flags1, flags2 | HRTIMER_MODE_USER_DATA) Signed-off-by: Andi Kleen <[email protected]> --- arch/x86/events/intel/uncore.c | 3 ++- drivers/auxdisplay/img-ascii-lcd.c | 2 +- drivers/block/xsysace.c | 2 +- drivers/firewire/core-transaction.c | 5 +++-- drivers/gpu/drm/i915/i915_pmu.c | 3 ++- drivers/ide/ide-probe.c | 2 +- drivers/iio/trigger/iio-trig-hrtimer.c | 3 ++- drivers/input/ff-memless.c | 2 +- drivers/input/input.c | 2 +- drivers/isdn/capi/capidrv.c | 2 +- drivers/isdn/i4l/isdn_common.c | 2 +- drivers/media/cec/cec-pin.c | 3 ++- drivers/media/pci/bt8xx/bttv-driver.c | 2 +- drivers/media/pci/bt8xx/bttv-input.c | 5 +++-- .../pci/netup_unidvb/netup_unidvb_core.c | 3 ++- drivers/media/pci/saa7134/saa7134-input.c | 3 ++- drivers/media/pci/saa7134/saa7134-ts.c | 3 ++- drivers/media/pci/saa7134/saa7134-vbi.c | 3 ++- drivers/media/pci/saa7134/saa7134-video.c | 3 ++- drivers/media/pci/ttpci/av7110_ir.c | 3 ++- drivers/media/radio/radio-cadet.c | 2 +- drivers/media/radio/wl128x/fmdrv_common.c | 3 ++- drivers/media/rc/img-ir/img-ir-raw.c | 2 +- drivers/media/rc/ir-rx51.c | 3 ++- drivers/media/usb/au0828/au0828-video.c | 6 +++-- drivers/net/appletalk/cops.c | 2 +- drivers/net/caif/caif_hsi.c | 9 +++++--- drivers/net/hamradio/6pack.c | 4 ++-- drivers/net/hamradio/scc.c | 4 ++-- drivers/net/hamradio/yam.c | 4 ++-- drivers/net/hippi/rrunner.c | 2 +- drivers/net/ieee802154/at86rf230.c | 3 ++- drivers/net/slip/slip.c | 4 ++-- drivers/net/wan/sdla.c | 2 +- drivers/net/wireless/ath/ath9k/init.c | 5 +++-- .../net/wireless/intersil/hostap/hostap_ap.c | 2 +- .../wireless/marvell/mwifiex/11n_rxreorder.c | 3 ++- drivers/net/wireless/marvell/mwifiex/usb.c | 2 +- drivers/pcmcia/yenta_socket.c | 3 ++- drivers/platform/x86/sony-laptop.c | 2 +- drivers/staging/comedi/drivers/comedi_test.c | 6 +++-- drivers/staging/comedi/drivers/jr3_pci.c | 2 +- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- drivers/staging/rtl8188eu/os_dep/mlme_linux.c | 17 +++++++++----- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 2 +- .../rtl8192u/ieee80211/ieee80211_module.c | 2 +- .../rtl8192u/ieee80211/ieee80211_softmac.c | 6 +++-- drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 22 ++++++++++++------- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 2 +- drivers/staging/speakup/main.c | 2 +- drivers/tty/isicom.c | 2 +- drivers/tty/moxa.c | 2 +- drivers/tty/n_gsm.c | 5 +++-- drivers/tty/n_r3964.c | 2 +- drivers/tty/rocket.c | 2 +- drivers/tty/serial/8250/8250_core.c | 3 ++- drivers/tty/serial/8250/8250_port.c | 4 ++-- drivers/tty/serial/max3100.c | 2 +- drivers/tty/serial/mux.c | 2 +- drivers/tty/serial/pnx8xxx_uart.c | 3 ++- drivers/tty/serial/sccnxp.c | 2 +- drivers/tty/serial/sh-sci.c | 9 +++++--- drivers/tty/vcc.c | 4 ++-- drivers/tty/vt/keyboard.c | 2 +- drivers/usb/chipidea/otg_fsm.c | 3 ++- drivers/usb/dwc2/hcd_queue.c | 6 +++-- drivers/usb/gadget/function/f_ncm.c | 3 ++- drivers/usb/gadget/udc/dummy_hcd.c | 4 ++-- drivers/usb/gadget/udc/m66592-udc.c | 2 +- drivers/usb/gadget/udc/r8a66597-udc.c | 2 +- drivers/usb/usbip/vudc_transfer.c | 2 +- drivers/uwb/neh.c | 2 +- drivers/uwb/rsv.c | 5 +++-- drivers/visorbus/visorbus_main.c | 2 +- kernel/time/alarmtimer.c | 2 +- lib/random32.c | 2 +- net/wireless/lib80211.c | 2 +- security/keys/gc.c | 2 +- sound/core/hrtimer.c | 3 ++- sound/drivers/mpu401/mpu401_uart.c | 3 ++- sound/drivers/mtpav.c | 3 ++- sound/drivers/pcsp/pcsp.c | 3 ++- sound/drivers/serial-u16550.c | 3 ++- sound/isa/sb/emu8000_pcm.c | 2 +- sound/isa/sb/sb8_midi.c | 3 ++- sound/isa/wavefront/wavefront_midi.c | 4 ++-- sound/pci/echoaudio/midi.c | 2 +- sound/pci/rme9652/hdsp.c | 2 +- sound/pci/rme9652/hdspm.c | 3 ++- sound/usb/midi.c | 3 ++- 90 files changed, 180 insertions(+), 123 deletions(-)
drivers/media/pci/netup_unidvb/netup_unidvb_core.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/media/pci/saa7134/saa7134-input.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/media/pci/saa7134/saa7134-vbi.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/media/pci/saa7134/saa7134-video.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/media/radio/wl128x/fmdrv_common.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/media/usb/au0828/au0828-video.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intersil/hostap/hostap_ap.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/mwifiex/usb.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/comedi_test.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/jr3_pci.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8188eu/core/rtw_recv.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8188eu/os_dep/mlme_linux.c +11 -6
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8188eu/os_dep/recv_linux.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8723bs/os_dep/mlme_linux.c +14 -8
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8723bs/os_dep/recv_linux.c +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 116 lines
2.17.2 From f4debb8df0411abde80d20f400d862c7cc0c8ad2 Mon Sep 17 00:00:00 2001 From: Andi Kleen <[email protected]> Date: Tue, 19 Feb 2019 16:02:22 -0800 Subject: [PATCH 43/43] mds sweep: Mark tasklets that touch user data Mark tasklets that touch user data based on an audit. This was a conservative audit, either the tasklets clearly touched user data, or were too complicated and for slow devices. Some other tasklets that also touch user data have not been marked, instead those rely on hooks in commonly called functions Changes done with the appended cocci.script, and sed for DECLARE_TASKLET // SPDX-License-Identifier: GPL-2.0 @@ expression a, b, c; @@ - tasklet_init(a, b, c) + tasklet_init_flags(a, b, c, TASKLET_USER_DATA) @@ expression a, b, c, d; @@ - tasklet_hrtimer_init(a, b, c, d) + tasklet_hrtimer_init(a, b, c, d | HRTIMER_MODE_USER_DATA) Signed-off-by: Andi Kleen <[email protected]> --- drivers/atm/eni.c | 3 ++- drivers/atm/he.c | 3 ++- drivers/block/xsysace.c | 3 ++- drivers/crypto/ixp4xx_crypto.c | 3 ++- drivers/crypto/qat/qat_common/adf_isr.c | 7 ++++--- drivers/crypto/qat/qat_common/adf_sriov.c | 6 +++--- drivers/crypto/qat/qat_common/adf_vf_isr.c | 10 ++++++---- drivers/dma/dw/core.c | 3 ++- drivers/dma/ioat/init.c | 3 ++- drivers/dma/virt-dma.c | 3 ++- drivers/gpu/drm/i915/intel_lrc.c | 5 +++-- drivers/hv/channel_mgmt.c | 4 ++-- drivers/hv/hv.c | 4 ++-- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 4 ++-- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 4 ++-- drivers/infiniband/hw/i40iw/i40iw_main.c | 9 ++++++--- drivers/infiniband/hw/qib/qib_sdma.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_cq.c | 3 ++- drivers/input/serio/hil_mlc.c | 2 +- drivers/isdn/gigaset/bas-gigaset.c | 8 ++++---- drivers/isdn/gigaset/common.c | 4 ++-- drivers/isdn/gigaset/ser-gigaset.c | 4 ++-- drivers/isdn/gigaset/usb-gigaset.c | 4 ++-- drivers/media/pci/bt8xx/dvb-bt8xx.c | 3 ++- drivers/media/pci/mantis/mantis_dvb.c | 3 ++- drivers/media/pci/smipcie/smipcie-main.c | 3 ++- drivers/media/pci/ttpci/av7110.c | 12 +++++++---- drivers/media/pci/ttpci/budget-ci.c | 9 ++++++--- drivers/media/pci/ttpci/budget-core.c | 3 ++- drivers/media/pci/tw5864/tw5864-video.c | 4 ++-- .../media/platform/marvell-ccic/mcam-core.c | 4 ++-- drivers/media/radio/wl128x/fmdrv_common.c | 6 ++++-- drivers/media/usb/ttusb-dec/ttusb_dec.c | 5 +++-- drivers/memstick/host/jmb38x_ms.c | 3 ++- drivers/misc/vmw_vmci/vmci_guest.c | 8 ++++---- drivers/mmc/host/wbsd.c | 20 +++++++++---------- drivers/net/ethernet/broadcom/cnic.c | 8 ++++---- drivers/net/ethernet/cadence/macb_main.c | 4 ++-- drivers/net/ethernet/micrel/ks8842.c | 7 ++++--- drivers/net/ppp/ppp_async.c | 3 ++- drivers/net/ppp/ppp_synctty.c | 3 ++- drivers/net/usb/cdc_ncm.c | 3 ++- drivers/net/usb/hso.c | 6 +++--- drivers/net/wan/farsync.c | 4 ++-- drivers/net/wireless/ath/carl9170/usb.c | 4 ++-- .../net/wireless/broadcom/b43legacy/main.c | 6 +++--- drivers/net/wireless/broadcom/b43legacy/pio.c | 4 ++-- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 5 +++-- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 5 +++-- .../net/wireless/intel/iwlegacy/3945-mac.c | 6 +++--- .../net/wireless/intel/iwlegacy/4965-mac.c | 6 +++--- drivers/net/wireless/intersil/orinoco/main.c | 4 ++-- drivers/net/wireless/mac80211_hwsim.c | 6 +++--- drivers/net/wireless/marvell/mwl8k.c | 6 ++++-- drivers/net/wireless/realtek/rtlwifi/pci.c | 12 +++++------ drivers/scsi/aic94xx/aic94xx_hwi.c | 4 ++-- drivers/staging/ks7010/ks_hostif.c | 3 ++- .../staging/rtl8188eu/hal/rtl8188eu_recv.c | 6 +++--- .../staging/rtl8188eu/hal/rtl8188eu_xmit.c | 6 +++--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 18 ++++++++--------- drivers/staging/rtl8192e/rtllib_softmac.c | 6 +++--- drivers/staging/rtl8712/rtl8712_recv.c | 6 +++--- drivers/staging/rtl8712/rtl871x_xmit.c | 6 +++--- .../staging/rtl8723bs/hal/rtl8723bs_recv.c | 8 +++----- drivers/tty/ipwireless/hardware.c | 3 ++- drivers/tty/serial/ifx6x60.c | 4 ++-- drivers/usb/atm/usbatm.c | 6 ++++-- drivers/usb/gadget/function/f_midi.c | 3 ++- drivers/usb/serial/mos7720.c | 4 ++-- net/atm/pppoatm.c | 2 +- net/mac80211/main.c | 14 ++++++------- net/rds/ib_cm.c | 8 ++++---- net/xfrm/xfrm_state.c | 3 ++- sound/core/timer.c | 4 ++-- sound/pci/asihpi/asihpi.c | 4 ++-- sound/pci/rme9652/hdsp.c | 3 ++- sound/pci/rme9652/hdspm.c | 4 ++-- sound/usb/midi.c | 3 ++- sound/usb/misc/ua101.c | 4 ++-- 79 files changed, 232 insertions(+), 188 deletions(-)
drivers/crypto/qat/qat_common/adf_isr.c +4 -3
Lines of this file are not shown. View the raw message.
drivers/crypto/qat/qat_common/adf_sriov.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/crypto/qat/qat_common/adf_vf_isr.c +6 -4
Lines of this file are not shown. View the raw message.
drivers/infiniband/hw/bnxt_re/qplib_fp.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/infiniband/hw/i40iw/i40iw_main.c +6 -3
Lines of this file are not shown. View the raw message.
drivers/media/pci/smipcie/smipcie-main.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/media/pci/tw5864/tw5864-video.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/media/platform/marvell-ccic/mcam-core.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/media/radio/wl128x/fmdrv_common.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/media/usb/ttusb-dec/ttusb_dec.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/cadence/macb_main.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ath/carl9170/usb.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/b43legacy/main.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/b43legacy/pio.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intel/ipw2x00/ipw2100.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intel/ipw2x00/ipw2200.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intel/iwlegacy/3945-mac.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intel/iwlegacy/4965-mac.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intersil/orinoco/main.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/realtek/rtlwifi/pci.c +6 -6
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +9 -9
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192e/rtllib_softmac.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +3 -5
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.2
Part of the diff is not shown here. View the raw message.