Skip to contentSkip to conversation

mbox for MDSv6

MODERATED Andi Kleen 1 participant 1 message Feb 24, 2019

Subsystems (248)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

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
index 6d6122524711..9ef6c5dc00dc 100644
@@ -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
index 8e40c2446fd1..3e486d9d6e6c 100644
@@ -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
index cb28e98a0659..bac5a3a38f0d 100644
@@ -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
index 7bc105f47d21..dfd51d97d683 100644
@@ -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
new file mode 100644
index 000000000000..1da885793805
@@ -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
index 9ef6c5dc00dc..233ca598826f 100644
@@ -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
index 18bc9b51ac9b..1c5507400089 100644
@@ -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
index 1da885793805..d4a5e43311a8 100644
@@ -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
index 158ad1483c43..48adea5afacf 100644
@@ -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
index 5c93a65ee1e5..5352a60a3b9b 100644
@@ -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
index 90ae0ca51083..9d9f2d2b209d 100644
@@ -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 *)&current_thread_info()->flags, 0, 0);
 		if (!need_resched())
 			__sti_mwait(0, 0);
arch/x86/kernel/smpboot.c +3 -0
index ccd1f2a8e557..c7fff6b09253 100644
@@ -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
index a47676a55b84..a9b24637f1a8 100644
@@ -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
index b2131c4ea124..b4406ca1dfd7 100644
@@ -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
index 8b5d85c91e9d..ddaa7603d53a 100644
@@ -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
index 858b6c0b9a15..753b8982770e 100644
@@ -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
index d4a5e43311a8..88ab27694aa6 100644
@@ -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
index 233ca598826f..27735ae3c3a2 100644
@@ -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
index 01874d54f4fd..b93565ab20b3 100644
@@ -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
index 9605dbd4b5b5..2db5c3407fd6 100644
@@ -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
index b93565ab20b3..4114b4f94c1d 100644
@@ -1192,6 +1192,24 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr
 		if (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
index eb9443d5bae1..2fd6ca1021c2 100644
@@ -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
index bbffa6c54697..d61272f50aed 100644
@@ -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
index ce95b8cbd229..a9e280782d25 100644
@@ -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
index 27735ae3c3a2..9e934626ea88 100644
@@ -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
index a5ea841cc6d2..f0f935f8d917 100644
@@ -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
index 6847d85400a8..fa5700097f64 100644
@@ -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
index 9e934626ea88..80ab5d026157 100644
@@ -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
index 4114b4f94c1d..26b890f18239 100644
@@ -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
index bac5a3a38f0d..94d0eeb0a94b 100644
@@ -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
index 30a6bcd735ec..fb2be25a4aa6 100644
@@ -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)&current_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
index 4cfb6de48f79..e6b7bf9174aa 100644
@@ -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
index 68261430fe6e..1b837b61d07b 100644
@@ -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
index 88ab27694aa6..15d25c2436da 100644
@@ -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
index 26b890f18239..067309190a6a 100644
@@ -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
new file mode 100644
index 000000000000..63a6952b46fa
@@ -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
index dfd51d97d683..ffcc24620ec9 100644
@@ -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
index 15d25c2436da..30e802bae2ca 100644
@@ -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
index 067309190a6a..a756c57979be 100644
@@ -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
index 1c5507400089..eb6e39238d1d 100644
@@ -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
index ffcc24620ec9..cd6e044d6599 100644
@@ -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
index 30e802bae2ca..b6f3a7184531 100644
@@ -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
new file mode 100644
index 000000000000..e742b5cd8ee9
@@ -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
index a756c57979be..146f9abc1931 100644
@@ -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
index 320ab978fb1f..976722d8b537 100644
@@ -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
index 999d6d8f0bef..995420034f57 100644
@@ -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
index d8d76a65cfdd..38e57235f4b7 100644
@@ -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
index 38e4ca08e757..9ce59dd86541 100644
@@ -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
index 81732d05e74a..7b5e2e1318a2 100644
@@ -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
index 4a728dba02e2..0f8ddb7ba09b 100644
@@ -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
index 38554bc35375..46895311e849 100644
@@ -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
index 84b54a17b95d..d1de8d797fc8 100644
@@ -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
index 0f8ddb7ba09b..df795f2f5f34 100644
@@ -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
index d28813306b2c..b2d348cc8b2e 100644
@@ -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
index 2e8957eac4d4..c8e3db15e55b 100644
@@ -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
index 7b066fd38248..78ae3602fbcd 100644
@@ -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
index f5cfa1b73d6f..4d8f419ab55f 100644
@@ -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
index 444156debfa0..caaa87b91268 100644
@@ -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
index 686247db3106..19e2208eaa94 100644
@@ -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
index d356f802945a..cf58bceea042 100644
@@ -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
index 1fb6fd68b9c7..6123174a5f2c 100644
@@ -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
index 95d25b010a25..7cd26e7b15d5 100644
@@ -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
index 26d848484912..bd30d79b894d 100644
@@ -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
index 0d4bdcb84da5..1a0898fa29a9 100644
@@ -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
index ea5cdbd8c2c3..6dd4a719b0c7 100644
@@ -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
new file mode 100644
index 000000000000..3da885e4eb29
@@ -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
index e532fcc6e4b5..2c7f62f8047a 100644
@@ -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
index f908b9356025..67d845229d46 100644
@@ -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
index 8974b3755670..a5c9764168f9 100644
@@ -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
index 9ba349e775ef..8fdcf78efcbe 100644
@@ -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
index 6c0b30391ba9..d05599a8c660 100644
@@ -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
index ee601d7f0926..5edd3f0eb114 100644
@@ -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
index 61a0cec6e1f6..c8a39813f609 100644
@@ -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
index dae26e856b26..85610cdcde9f 100644
@@ -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
index 3304aaaffe87..c22e8e167025 100644
@@ -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
index 2e1fb0649260..9b3af41dc05b 100644
@@ -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
index 77070c2d1240..71f6dd698968 100644
@@ -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
index 767f62086bd9..41ae39e339b9 100644
@@ -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
index 7dc3a411bece..7f37056fe973 100644
@@ -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
index 24bc5c5d876f..e7cf4fffcc8b 100644
@@ -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
index 6a4bbc9e1fb0..55c4cefd6a24 100644
@@ -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
index 8a249c95c193..e01eb88cddfd 100644
@@ -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
index 39a2c6ccf31d..7f0d847ca501 100644
@@ -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
index 45a07652fa00..e075c3fdb81a 100644
@@ -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
index 5aeaca24a28f..17e9f447472c 100644
@@ -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
index a6eacf2099c3..b13611a203c6 100644
@@ -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
index 63870072cbbd..8e8394553dc7 100644
@@ -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
index 41ce410f7f97..99a778b022e5 100644
@@ -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
index f693c2c0bec3..a1e94386f940 100644
@@ -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
index 015b126ce455..be47f96e810d 100644
@@ -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
index 146f9abc1931..1838f4d0aa72 100644
@@ -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
index 7ec59edde154..4bcdde7e5fb8 100644
@@ -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
index 5f8e009b2da1..880dc6af0a36 100644
@@ -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
index ae4aa02e4dc6..0d96c52cd217 100644
@@ -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
index dc8603d34320..0b4f02a446a7 100644
@@ -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
index 186689833231..b923ce92039c 100644
@@ -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
index a128dd1126ae..25c500fb01a2 100644
@@ -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
index e28107061148..e274a60a5887 100644
@@ -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
index ee2431a7804e..656fcae19f2b 100644
@@ -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
index 35b302d983e0..f69979d0b7b7 100644
@@ -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
index c91e145ef5a5..2aa88243db79 100644
@@ -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
index fbf91d383b40..45c4415d67e4 100644
@@ -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
index b8a2728dd4b6..9846859a9b57 100644
@@ -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
index 17e9f447472c..958bf916d096 100644
@@ -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
index 30400ea4808b..e259c148411b 100644
@@ -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
index 95a78ccbd847..6aadc878def2 100644
@@ -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
index 8a9c169b6f99..fa0fd1c5a19c 100644
@@ -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
index cdfea72e0ef6..63a724d5fc02 100644
@@ -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
index b76b57a82c02..0bcc2f8fe1f1 100644
@@ -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
index 3aca16e62902..4421a6a215ec 100644
@@ -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
index ac72cd204c4d..a0ddcf7ae95b 100644
@@ -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
index 2153619c5b31..a00ff6646c9d 100644
@@ -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
index f5ed1d5004c9..c43a57b95524 100644
@@ -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
index 8eb28a83832e..12496f0038e5 100644
@@ -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
index 4d85645c87f7..c6bdad91ff4e 100644
@@ -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
index ebb3fa2e1d00..3da919c1c29e 100644
@@ -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
index 3e01012be4ab..631543dfb025 100644
@@ -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
index 2b317cb63d06..3aafe328e919 100644
@@ -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
index 1f1446ed8d5f..378b9ff9711f 100644
@@ -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
index 6f60aced11c5..5628e9a764b8 100644
@@ -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
index b12e6cae26c2..03feb71c82f0 100644
@@ -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
index e9bb8fb67ad0..be383944e1cb 100644
@@ -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
index 7a7137d8664b..28f734bb18e4 100644
@@ -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
index 9f7c5b0a6b45..67c358d839e0 100644
@@ -414,8 +414,8 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
 	saa7146_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
index cc6527e35537..723e9d1266ef 100644
@@ -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
index 4885e833c052..77b6b1ec77b9 100644
@@ -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
index a6ba4ca5aa91..fce1d506c9d9 100644
@@ -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
index 2f0171134f7e..e0f847d634a0 100644
@@ -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
index b683cbe13dee..00950fcc3468 100644
@@ -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
index 52ff00ebd4bd..34613db7cedb 100644
@@ -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
index e1549d352f70..bd2214ce59c5 100644
@@ -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
index 17d69bd5d7f1..dffc0b43fb64 100644
@@ -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
index cdb79ae2d8dc..d5e80865c2d6 100644
@@ -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
index dd727098daf4..155ac84fa563 100644
@@ -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
index bd870e60c32b..7c600673607b 100644
@@ -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
index 25f16833a475..515f6fb6ab18 100644
@@ -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
index 872c796621d2..e056ffee8ea6 100644
@@ -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
index dc9cdaaee1fb..80adb620e9b4 100644
@@ -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
index aa98ea49558c..b582fdd67c2c 100644
@@ -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
index f33349e16359..d8bcef88c3b2 100644
@@ -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
index 19ffd2ed3cc7..0c46cde4644d 100644
@@ -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
index 411177ec4d72..1f869047e940 100644
@@ -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
index 8474528be91e..034fa832d925 100644
@@ -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
index 7fb3f07bf022..9d4fb3bfd947 100644
@@ -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
index dfec813f50a9..e1fe3bee82ab 100644
@@ -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
index 8d00d9d8adff..689a0f1a95ee 100644
@@ -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
index 601944666b71..07cd3c28b892 100644
@@ -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
index 3d99b51384ac..487157b7a679 100644
@@ -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
index abc4d6c1b323..5fad158e9a39 100644
@@ -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
index cd3c60ba8519..52d82983521a 100644
@@ -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
index 5c2cd8d2d155..98d392188b2b 100644
@@ -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
index ffe2c672d105..ffdd1f5cd194 100644
@@ -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
index c8951650a368..952b1d93960e 100644
@@ -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
index 0f07a2c384fa..d9876f3d5133 100644
@@ -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
index bcdca9fbef51..13b969c106ff 100644
@@ -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
index ba551d8dfba4..73c43c5e06b4 100644
@@ -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
index 542b47c6bcd2..61c36d063792 100644
@@ -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
index e914b8c80943..737bc3f9047b 100644
@@ -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
index 104a05f6b738..e728978286dd 100644
@@ -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
index 0441abe87880..1563fbac9d5b 100644
@@ -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
index 833ef0590af8..1e95f419fb92 100644
@@ -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
index 11c5bad95226..fc5b690b12af 100644
@@ -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
index 78043a9c5981..c9fa16d5d079 100644
@@ -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
index 2c546013a980..d7ed122e9e47 100644
@@ -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
index ca4a57c30bf8..7d564078022b 100644
@@ -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
index da636a22c542..ffdfc65d0bf0 100644
@@ -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
index c458d5fdc8d3..844b9c17b40a 100644
@@ -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
index 381de998d2f1..831b4e962296 100644
@@ -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
index b8c39ede7cd5..ace929c99393 100644
@@ -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
index 9f107798f904..82fc8b74c5b9 100644
@@ -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
index b223769d6a5e..0230d2605b0f 100644
@@ -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
index b648e3f95c01..1ff6190b9ae4 100644
@@ -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
index 0b6bbf63f7ca..01e1756458ea 100644
@@ -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);
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/8390/ne.c +2 -1
index 1c97e39b478e..a1b236fec72e 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/8390/ne2k-pci.c +2 -1
index 42985a82321a..67607c6cea12 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/8390/pcnet_cs.c +2 -1
index 61e43802b9a5..cb7ccae4e84d 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/8390/smc-ultra.c +2 -1
index 3fe3b4dfa7c5..0ab0505a10d9 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/8390/wd.c +2 -1
index c834123560f1..bcfa77e1ed5c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/agere/et131x.c +2 -2
index ea34bcb868b5..b143f7b734f8 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/amd/lance.c +1 -1
index b56d84c7df46..2761fb2fc6ff 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/amd/ni65.c +3 -2
index 8931ce6bab7b..6285977cce73 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/atheros/atlx/atl1.c +2 -2
index 63edc5706c09..d7fe078569df 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/atheros/atlx/atl2.c +2 -2
index bb41becb6609..65b29d484bf1 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +5 -11
index 1e82b9efe447..b54e170ca81c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/micrel/ks8851_mll.c +2 -1
index 35f8c9ef204d..2343c911276f 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/microchip/lan743x_main.c +3 -4
index 310807ef328b..4fd1123173e8 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/realtek/atp.c +2 -1
index 7e011c1c1e6e..03ab879536b7 100644

Lines of this file are not shown. View the raw message.

drivers/net/fddi/skfp/skfddi.c +2 -2
index 5d661f60b101..077c3113418c 100644

Lines of this file are not shown. View the raw message.

drivers/net/hamradio/baycom_ser_fdx.c +1 -2
index 190f66c88479..31a59326c141 100644

Lines of this file are not shown. View the raw message.

drivers/net/hamradio/baycom_ser_hdx.c +1 -2
index 3c823c648cf5..2b98365f27da 100644

Lines of this file are not shown. View the raw message.

drivers/net/hamradio/scc.c +1 -3
index 6c03932d8a6b..1e7ee07887e1 100644

Lines of this file are not shown. View the raw message.

drivers/net/hamradio/yam.c +1 -1
index ba9df430fca6..433695ae5e5c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ieee802154/at86rf230.c +2 -1
index 0253eb502153..50af3e288503 100644

Lines of this file are not shown. View the raw message.

drivers/net/ieee802154/ca8210.c +3 -7
index b2ff903a9cb6..e4915a6810a3 100644

Lines of this file are not shown. View the raw message.

drivers/net/ieee802154/mcr20a.c +2 -1
index c589f5ae75bb..2a7e90769ed2 100644

Lines of this file are not shown. View the raw message.

drivers/net/ieee802154/mrf24j40.c +2 -1
index cf4788d840bf..31b7d8d544bb 100644

Lines of this file are not shown. View the raw message.

drivers/net/wan/cosa.c +1 -1
index f6b000ddcd15..d466bb81f2ab 100644

Lines of this file are not shown. View the raw message.

drivers/net/wan/farsync.c +1 -1
index 2a3f0f1a2b0a..070dee4a1ac6 100644

Lines of this file are not shown. View the raw message.

drivers/net/wan/hostess_sv11.c +1 -2
index 4de0737fbf8a..e4f5e247072f 100644

Lines of this file are not shown. View the raw message.

drivers/net/wan/sbni.c +1 -1
index 8e8c4c0e1b64..4f541c8c3615 100644

Lines of this file are not shown. View the raw message.

drivers/net/wan/sdla.c +1 -1
index 57ed259c8208..0a0cff9228e8 100644

Lines of this file are not shown. View the raw message.

drivers/net/wan/sealevel.c +1 -2
index c56f2c252113..53687a3b703f 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/broadcom/b43legacy/main.c +1 -1
index 55f411925960..e61752e584dd 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +4 -3
index d64bf233b12c..a38d39a52133 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c +1 -2
index 6188275b17e5..f81ec32145c3 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/cisco/airo.c +2 -2
index 3f5a14112c6b..5e85377e1565 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/ipw2x00/ipw2100.c +2 -2
index 52e5ed2d3bc2..0b8c2275ec55 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/ipw2x00/ipw2200.c +2 -1
index fa400f92d7e2..33931a4435e3 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlegacy/3945-mac.c +2 -1
index 57e3b6cca234..48cdce4a6ca0 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlegacy/4965-mac.c +2 -1
index 6b4488a178a7..8132d6964923 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/hostap/hostap_pci.c +1 -2
index c864ef4b0015..9886b9007da3 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/hostap/hostap_plx.c +1 -2
index 4901a99c6c59..f6ba83e95bf3 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/orinoco/orinoco_nortel.c +2 -2
index 048693b6c6c2..d5a5fbd013e7 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/orinoco/orinoco_pci.c +2 -2
index 4938a2208a37..30a5865822eb 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/orinoco/orinoco_plx.c +2 -2
index 221352027779..72379f60f7db 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/orinoco/orinoco_tmd.c +2 -2
index 20ce569b8a43..0ab170de926a 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/p54/p54pci.c +1 -1
index 27a49068d32d..5b4af691fb2a 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/p54/p54spi.c +2 -2
index e41bf042352e..83202723109d 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/prism54/islpci_hotplug.c +1 -1
index 300c846ea087..50ac965c0092 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/libertas/if_cs.c +1 -1
index cebf03c6a622..aed7ad507a2b 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/libertas/if_spi.c +2 -1
index 7c3224b83ef7..3b8c174448c8 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/main.c +3 -2
index 20cee5c397fb..730acbe06c99 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/pcie.c +5 -3
index 3fe81b2a929a..f8ee89d5fa81 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwl8k.c +2 -2
index 8e4e9b6919e0..9a55fe1a2f0d 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/mediatek/mt76/mt76x0/pci.c +2 -1
index d895b6f3dc44..e6f717724f81 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/mediatek/mt76/mt76x2/pci.c +2 -1
index 92432fe97312..3c21e173786a 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c +2 -1
index 1f5facbb8905..7fd8ee3c14b7 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c +2 -1
index 598edb814421..2905fa3d7261 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/ralink/rt2x00/rt2x00mmio.c +3 -3
index 4956a54151cb..bd31eb811f19 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c +4 -2
index 225c1c8851cc..4ae6d1d7bdec 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/realtek/rtlwifi/pci.c +2 -2
index 5d1fda16fc8c..58b64849172a 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/ti/wl1251/sdio.c +3 -1
index b661f896e9fe..f5c3450cf15f 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/ti/wl1251/spi.c +3 -2
index 8de9d4444a6a..1fc0a75d4281 100644

Lines of this file are not shown. View the raw message.

drivers/ntb/hw/amd/ntb_hw_amd.c +7 -5
index efb214fc545a..8de5bd055b66 100644

Lines of this file are not shown. View the raw message.

drivers/ntb/hw/intel/ntb_hw_gen1.c +7 -5
index 2ad263f708da..106f1800c35b 100644

Lines of this file are not shown. View the raw message.

drivers/ntb/hw/mscc/ntb_hw_switchtec.c +4 -4
index f1eaa3c4d46a..e038a6847ae4 100644

Lines of this file are not shown. View the raw message.

drivers/parport/parport_ax88796.c +2 -1
index bfe97c2a8d4c..5a4a87e73d57 100644

Lines of this file are not shown. View the raw message.

drivers/parport/parport_pc.c +1 -2
index 9c8249f74479..512f98234bdd 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/pcie-xilinx.c +1 -1
index 9bd1a35cd5d8..57294e32ab68 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/vmd.c +6 -5
index 3890812cdf87..acf4d9942120 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/cpci_hotplug_core.c +1 -5
index 603eadf3d965..4d45dcc7de58 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/cpqphp_core.c +1 -2
index 16bbb183695a..4fa05ac1a086 100644

Lines of this file are not shown. View the raw message.

drivers/pci/hotplug/shpchp_hpc.c +3 -2
index db047284c291..7f183f687201 100644

Lines of this file are not shown. View the raw message.

drivers/pci/pcie/pme.c +2 -1
index 0dbcf429089f..af231bd42113 100644

Lines of this file are not shown. View the raw message.

drivers/pci/switch/switchtec.c +6 -4
index e22766c79fe9..55fbaa281a5d 100644

Lines of this file are not shown. View the raw message.

drivers/pcmcia/i82092.c +1 -1
index aae7e6df99cd..80f763adc42d 100644

Lines of this file are not shown. View the raw message.

drivers/pcmcia/i82365.c +5 -4
index 891ccea2cccb..9002327b582a 100644

Lines of this file are not shown. View the raw message.

drivers/pcmcia/pcmcia_resource.c +5 -4
index 99a778b022e5..96c292b616fa 100644

Lines of this file are not shown. View the raw message.

drivers/pcmcia/pd6729.c +5 -3
index f0af9985ca09..5af3986c642f 100644

Lines of this file are not shown. View the raw message.

drivers/pcmcia/tcic.c +3 -4
index 1a0e3f098759..666fae3cdedc 100644

Lines of this file are not shown. View the raw message.

drivers/pcmcia/yenta_socket.c +2 -2
index ac6a3f46b1e6..c978a6961578 100644

Lines of this file are not shown. View the raw message.

drivers/pinctrl/intel/pinctrl-intel.c +1 -1
index 3b1818184207..6e39197be8d8 100644

Lines of this file are not shown. View the raw message.

drivers/pinctrl/pinctrl-amd.c +2 -1
index 2a7d638978d8..fbedf886439d 100644

Lines of this file are not shown. View the raw message.

drivers/pinctrl/pinctrl-single.c +1 -2
index 1e0614daee9b..0d46b75b16b5 100644

Lines of this file are not shown. View the raw message.

drivers/platform/goldfish/goldfish_pipe.c +3 -3
index 321bc673c417..35c79464ca98 100644

Lines of this file are not shown. View the raw message.

drivers/platform/mellanox/mlxreg-hotplug.c +3 -2
index b6d44550d98c..e31a659c6117 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/fujitsu-tablet.c +2 -1
index baea077a02cc..9795095421a4 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/intel_int0002_vgpio.c +1 -1
index 4b8f7305fc8a..903ccf5f8d59 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/intel_ips.c +2 -1
index bffe548187ee..3b3847484fa4 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/intel_pmc_ipc.c +4 -4
index 7964ba22ef8d..fc375bf0e49c 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/intel_punit_ipc.c +2 -2
index 79671927f4ef..756eae04c544 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/intel_scu_ipc.c +3 -2
index cdab916fbf92..a7dd4d9c89cb 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/sony-laptop.c +1 -2
index b205b037fd61..c83a8da216ce 100644

Lines of this file are not shown. View the raw message.

drivers/pnp/resource.c +1 -2
index 70d4ba95735a..6fec093aa4ca 100644

Lines of this file are not shown. View the raw message.

drivers/power/reset/ltc2952-poweroff.c +1 -5
index c484584745bc..ec581ff897f5 100644

Lines of this file are not shown. View the raw message.

drivers/power/supply/act8945a_charger.c +3 -3
index 8e117b31ba79..b68b9d759667 100644

Lines of this file are not shown. View the raw message.

drivers/power/supply/goldfish_battery.c +3 -2
index f5c525e4482a..643bf6abcd30 100644

Lines of this file are not shown. View the raw message.

drivers/power/supply/max14656_charger_detector.c +1 -1
index b91b1d2999dc..e73ba28edb50 100644

Lines of this file are not shown. View the raw message.

drivers/power/supply/pda_power.c +3 -3
index 922a86787c5c..b7e8d8f5863f 100644

Lines of this file are not shown. View the raw message.

drivers/power/supply/wm97xx_battery.c +3 -2
index 6754e761778a..246830c06e3b 100644

Lines of this file are not shown. View the raw message.

drivers/pps/clients/pps-gpio.c +2 -1
index dd5d1103e02b..a59a6e2545c3 100644

Lines of this file are not shown. View the raw message.

drivers/ptp/ptp_pch.c +2 -1
index 78ccf936d356..cf4832a54862 100644

Lines of this file are not shown. View the raw message.

drivers/rapidio/devices/tsi721.c +15 -10
index b64c56c33c3b..d22a80107b24 100644

Lines of this file are not shown. View the raw message.

drivers/rapidio/devices/tsi721_dma.c +5 -3
index 7f5d4436f594..f932701225df 100644

Lines of this file are not shown. View the raw message.

drivers/regulator/qcom_spmi-regulator.c +3 -2
index 53a61fb65642..28c1b169330e 100644

Lines of this file are not shown. View the raw message.

drivers/rpmsg/qcom_glink_native.c +2 -3
index f46c787733e8..c72229a2fc80 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-cmos.c +3 -2
index a5a19ff10535..81380c3b3fa7 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-ds1305.c +2 -1
index 2d502fc85698..5ab3759914e8 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-ds1374.c +3 -2
index 38a2e9e684df..9c5bd44571c2 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-ds1511.c +1 -2
index b8b6e51c0461..c90343e4cc65 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-ds1553.c +1 -3
index 34af7a802f43..c69b0b48991e 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-ds1685.c +2 -1
index 2710f2594c42..dc856f4fb7cb 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-ftrtc010.c +1 -1
index 8f1dd88fa827..a7536520d481 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-m48t59.c +3 -2
index 3c8ad1cdfd7c..5566f0a56d54 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-mrst.c +2 -1
index daf354a6a853..01264ed17b08 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-pcap.c +6 -4
index f176cb9d0dbc..2dd631d5f5b1 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-r7301.c +2 -1
index 1943c8151152..f4f87345ecc7 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-snvs.c +2 -1
index b2483a749ac4..4bc1edff3c85 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-stk17ta8.c +1 -4
index fccbecbb2c98..62deb2c871fa 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-zynqmp.c +4 -2
index c532bd13fbe5..e7687aa8ed3a 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/3w-9xxx.c +4 -2
index a3c20e3a8b7c..73d42056212c 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/3w-sas.c +4 -2
index cd096104bcec..11306ca378b5 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/3w-xxxx.c +2 -1
index 2b1e0d503020..86eca9664b53 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/BusLogic.c +1 -2
index e41e51f1da71..66e8231fb283 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/a100u2w.c +2 -2
index 66c514310f3c..263408266f10 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aacraid/commsup.c +2 -6
index d5a6aa9676c8..eadd3bf6119a 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aacraid/rx.c +1 -2
index 576cdf9cc120..6bb11613c7e4 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aacraid/sa.c +1 -2
index efa96c1c6aa3..1bc3c4c93852 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aacraid/src.c +1 -2
index 8377aec0649d..113e5e95c507 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/advansys.c +2 -2
index d37584403c33..1dc63c240c0d 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aha152x.c +2 -2
index 97872838b983..820af5a16dac 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aha1542.c +1 -1
index ba7a5725be04..4e2a66982248 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aha1740.c +1 -2
index da4150c17781..06da04ed2b28 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aic7xxx/aic7770_osm.c +2 -1
index 3d401d02c019..5a1190313f68 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aic7xxx/aic79xx_osm_pci.c +1 -1
index 8466aa784ec1..be821365298d 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +1 -1
index 0fc14dac7070..867ada06c334 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aic94xx/aic94xx_init.c +3 -2
index 07efcb9b5b94..f1d5d9b14d2f 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/am53c974.c +2 -2
index 27c0a4a937d9..b6778db02433 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/arcmsr/arcmsr_hba.c +1 -2
index 57c6fa388bf6..eaf5b63c8023 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/atp870u.c +2 -1
index 1267200380f8..9a31e1ad82b7 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/be2iscsi/be_main.c +8 -4
index 74e260027c7d..b2a797b4aac1 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/bfa/bfad.c +6 -3
index 42a0caf6740d..26c1ac916d6c 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/csiostor/csio_isr.c +9 -7
index 7c8814715711..2897050f8ee1 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/dpt_i2o.c +1 -1
index 70d1a18278af..31acc27f2b29 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/esas2r/esas2r_init.c +1 -7
index 46b2c83ba21f..43e61aaefe9d 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/fnic/fnic_isr.c +9 -4
index 4e3a50202e8c..2f71590be836 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/g_NCR5380.c +2 -5
index 9cdca0625498..c95a9af1fd4f 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/gdth.c +5 -3
index 194c294f9b6c..361f8bd6b863 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/hpsa.c +10 -9
index ff67ef5d5347..38f68b4b4160 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/hptiop.c +1 -2
index 3eedfd4f8f57..b6cf8ed9f111 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/initio.c +2 -1
index eb2778b5c81b..33293ed73424 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/ipr.c +12 -11
index d1b4025a4503..0a55dd02bc6c 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/ips.c +2 -2
index e8bc8d328bab..5d878d646708 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/isci/init.c +5 -3
index 1727d0c71b12..a8245e9c367d 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/lpfc/lpfc_init.c +22 -13
index bede11e16349..f1ded4ebd05c 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/megaraid.c +1 -3
index 4862f65ec3e8..12fb3c35cc08 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/megaraid/megaraid_mbox.c +1 -2
index f112458023ff..b94dcce82042 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/megaraid/megaraid_sas_base.c +2 -6
index fcbff83c0097..b1dccee2bdc1 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/mpt3sas/mpt3sas_base.c +1 -1
index 0a6cb8f0680c..7f9a4d44c605 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/mvsas/mv_init.c +2 -2
index 030d911ee374..4fd2179f3d55 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/mvumi.c +4 -4
index 36f64205ecfa..7520c7740044 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/myrb.c +1 -1
index 539ac8ce4fcd..8a47670a7700 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/myrs.c +1 -1
index b8d54ef8cf6d..4e8fd9480469 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/nsp32.c +2 -1
index 00e3cbee55b8..3477288bad79 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/pcmcia/qlogic_stub.c +1 -1
index 828d53faf09a..e321a9c57c5d 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/pcmcia/sym53c500_cs.c +1 -1
index d1e98a6ea28f..66c96648ecaf 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/pm8001/pm8001_init.c +6 -4
index a36060c23b37..bc9ce9eceaa2 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/pmcraid.c +3 -2
index e338d7a4f571..9f94b2b713dd 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/qedf/qedf_main.c +3 -1
index 9bbc19fc190b..452e8e7db1d1 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/qedi/qedi_main.c +2 -1
index e74a62448ba4..792ead7e468a 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/qla1280.c +1 -2
index 6856dfdfa473..fb0cebb1665f 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/qla2xxx/qla_isr.c +13 -9
index 8507c43b918c..43463db8a0d7 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/qla4xxx/ql4_isr.c +3 -2
index d2cd33d8d67f..236166da1ac8 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/qla4xxx/ql4_nx.c +6 -4
index 5a31877c9d04..4a3e1ce069f8 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/qlogicfas.c +1 -1
index 8f709002f746..c9bd84f4df25 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/sim710.c +1 -1
index 82ed99848378..1838cc163fea 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/smartpqi/smartpqi_init.c +7 -4
index f564af8949e8..10cb10c47b87 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/snic/snic_isr.c +2 -3
index c4da3673f2ae..015ae0bc061b 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/stex.c +2 -2
index f6bef7ad65e7..416a71d13169 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/sym53c8xx_2/sym_glue.c +1 -2
index 57f6d63e4c40..9c38ffd7675f 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/ufs/ufshcd.c +4 -3
index 2ddf24466a62..807fbd94c31f 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/vmw_pvscsi.c +6 -3
index ecee4b3ff073..14885a807d2d 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/wd719x.c +2 -2
index e3310e9488d2..a27d1269736d 100644

Lines of this file are not shown. View the raw message.

drivers/slimbus/qcom-ctrl.c +2 -1
index ad3e2e23f56e..8e7e50676162 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-altera.c +2 -1
index a5adf0d868fc..5ad3eb51e7bd 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-axi-spi-engine.c +2 -1
index 68cfc351b47f..189aa3723ef8 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-cadence.c +2 -1
index 7c88f74f7f47..792af77b42c9 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-dw.c +2 -2
index 2e822a56576a..2acec28544e3 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-fsl-spi.c +2 -1
index 8f2e97857e8b..ae6a34fdc38f 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-oc-tiny.c +2 -1
index 085f580be7ec..ee8dace61752 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-pxa2xx.c +2 -2
index d84b893a64d7..072f49852e3e 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-topcliff-pch.c +3 -2
index 97d137591b18..0b4840f1049b 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-xilinx.c +3 -2
index 63fedc49ae9c..0043addb8d4a 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-zynqmp-gqspi.c +2 -1
index 9f83e1b17aa1..8ff24edd3720 100644

Lines of this file are not shown. View the raw message.

drivers/staging/android/vsoc.c +2 -1
index 22571abcaa4e..43e40f31f9e5 100644

Lines of this file are not shown. View the raw message.

drivers/staging/axis-fifo/axis-fifo.c +2 -1
index 805437fa249a..af010e5dbfc6 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/addi_apci_1032.c +2 -1
index 560649be9d13..6503721d68c8 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/addi_apci_1500.c +2 -1
index 45ad4ba92f94..d9e909f3b9bf 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/addi_apci_1564.c +2 -1
index 10501fe6bb25..3ae718d28c74 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/addi_apci_2032.c +2 -1
index a122f3f3f5ec..f0f56908a809 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/addi_apci_3120.c +2 -1
index d2810fdd5e63..362863489892 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/addi_apci_3xxx.c +2 -1
index 55784f24e2a7..d64987dfdafa 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/adl_pci9111.c +2 -1
index f4dba6271d0d..a6adf1caeb63 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/adl_pci9118.c +2 -1
index 2528ca0ede6d..ca7ed001d7cb 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/adv_pci1710.c +2 -1
index 6a93b04f1fdf..50b74ae9404e 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/aio_iiro_16.c +2 -1
index 41c9c56816ef..9ef45db38500 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/amplc_dio200_common.c +1 -2
index 8697dc02ffb4..d8a15e405087 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/amplc_pc236_common.c +1 -2
index 01b90e4eca8a..b29133e1803d 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/amplc_pci224.c +2 -1
index 657b736ef46d..d463432103c0 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/amplc_pci230.c +2 -1
index 08ffe26c5d43..3def00d21e70 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/cb_pcidas.c +2 -2
index 02ae00c95313..71860c4cd7e0 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/cb_pcidas64.c +3 -2
index e1774e09a320..669d5540f0a9 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/comedi_parport.c +2 -1
index efaa57372aeb..41ef8b705546 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/das16m1.c +2 -1
index 4e36377b592a..b9cf4eb1dfab 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/das1800.c +2 -1
index f16aa7e9f4f3..18684d080e1e 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/das6402.c +2 -1
index f99211ec46de..a008aa26c9da 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/das800.c +3 -2
index 8cf09ef3012f..b304b1beaa01 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/dmm32at.c +2 -1
index 75693cdde313..021323879051 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/dt2811.c +2 -1
index 05207a519755..fd85efad6201 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/dt2814.c +2 -1
index d2c715737361..b52d2003f2fc 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/dt282x.c +1 -1
index 3be927f1d3a9..9e7a8f774f3c 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/dt3000.c +2 -1
index 2edf3ee91300..0d7d59217343 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/gsc_hpdi.c +1 -2
index 4bdf44d82879..73295b0dd890 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/me4000.c +2 -1
index ee53571a8969..cb183b99cbad 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/ni_6527.c +2 -2
index 4d1eccb5041d..5611b3d34564 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/ni_65xx.c +2 -1
index 996074e471d3..06aba4d9fb29 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/ni_660x.c +2 -2
index e70a461e723f..c68a98309ea6 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/ni_at_a2150.c +1 -1
index 76e8d047f71e..98018c27ea26 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/ni_atmio.c +2 -1
index 2b7bfe0dd7f3..1b333b8b85a0 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/ni_atmio16d.c +2 -1
index 68ad9676f962..482516f2a7a3 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/ni_labpc_common.c +3 -2
index 406952f5521d..c7043ef7a767 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/ni_pcidio.c +2 -1
index b9a0dc6eac44..ac7aff073f44 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/ni_pcimio.c +2 -1
index 14b26fffe049..cdbac51a690c 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/pcl711.c +2 -1
index a5937206bf1c..de61ca3abf33 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/pcl726.c +2 -1
index 0963d85873a9..669a13124343 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/pcl812.c +2 -1
index aefc1b849cf7..fe1af6ad4893 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/pcl816.c +1 -1
index d87cf6d4a161..3976db1227af 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/pcl818.c +2 -1
index 0af5315d4357..d207a9048a82 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/pcmmio.c +2 -1
index 72af1776f785..4e08b0c12cf3 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/pcmuio.c +4 -2
index 743fb226e2e4..cdcc5fca7402 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/rtd520.c +2 -1
index bb400e08f0bc..17460b0fb2e2 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/s626.c +2 -1
index f5af6f4069dc..2c6e135b8838 100644

Lines of this file are not shown. View the raw message.

drivers/staging/gasket/gasket_interrupt.c +2 -1
index ad5657d213f0..c0c73b1bad90 100644

Lines of this file are not shown. View the raw message.

drivers/staging/goldfish/goldfish_audio.c +3 -2
index d4520490cf6d..8796e7af3541 100644

Lines of this file are not shown. View the raw message.

drivers/staging/iio/adc/ad7606.c +2 -1
index 7308fa8fbb4c..64140840b4c1 100644

Lines of this file are not shown. View the raw message.

drivers/staging/media/bcm2048/radio-bcm2048.c +2 -2
index d9b02ff66259..063801da275b 100644

Lines of this file are not shown. View the raw message.

drivers/staging/media/zoran/zoran_card.c +1 -1
index 94dadbba7cd5..e3c7b11958dd 100644

Lines of this file are not shown. View the raw message.

drivers/staging/most/dim2/dim2.c +4 -2
index 31fbc1a75b06..d2dbd23c4841 100644

Lines of this file are not shown. View the raw message.

drivers/staging/most/i2c/i2c.c +2 -1
index 4a4fc1005932..60a33ea89b1e 100644

Lines of this file are not shown. View the raw message.

drivers/staging/olpc_dcon/olpc_dcon_xo_1.c +1 -1
index 80b8d4153414..d089114098ef 100644

Lines of this file are not shown. View the raw message.

drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c +1 -1
index 838daa2be3ef..e5efb7421f92 100644

Lines of this file are not shown. View the raw message.

drivers/staging/pi433/pi433_if.c +2 -4
index b2314636dc89..e7240abab54e 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8192e/rtl8192e/rtl_core.c +1 -1
index 96f265eee007..6070e3da1be6 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtlwifi/pci.c +2 -2
index 4bb5703bd715..473d9cac1060 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rts5208/rtsx.c +1 -3
index fa597953e9a0..bf11d96531e6 100644

Lines of this file are not shown. View the raw message.

drivers/staging/speakup/serialio.c +3 -2
index 177a2988641c..49dbedd2be0d 100644

Lines of this file are not shown. View the raw message.

drivers/staging/vt6655/device_main.c +1 -1
index c9097e7367d8..32544b8b75d3 100644

Lines of this file are not shown. View the raw message.

drivers/thermal/ti-soc-thermal/ti-bandgap.c +4 -2
index 097328d8e943..fd1326340b2a 100644

Lines of this file are not shown. View the raw message.

drivers/thunderbolt/nhi.c +4 -2
index 9aa44f9762a3..262bff1e829b 100644

Lines of this file are not shown. View the raw message.

drivers/tty/cyclades.c +5 -4
index 4562c8060d09..b564886c39ac 100644

Lines of this file are not shown. View the raw message.

drivers/tty/goldfish.c +2 -2
index c8c5cdfc5e19..608922f7c22d 100644

Lines of this file are not shown. View the raw message.

drivers/tty/hvc/hvc_irq.c +2 -2
index 4b255dfef2cc..e12dff7e9658 100644

Lines of this file are not shown. View the raw message.

drivers/tty/isicom.c +1 -1
index e04a43e89f6b..803226775c8e 100644

Lines of this file are not shown. View the raw message.

drivers/tty/mxser.c +2 -2
index 9d00ff5ef961..772497d057de 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/8250/8250_core.c +2 -1
index e441221e04b9..2b161a64a0c8 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/8250/8250_exar.c +1 -1
index 0089aa305ef9..4d600c39b518 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/altera_jtaguart.c +2 -2
index c90e503d6b57..4f54bf976dca 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/altera_uart.c +3 -2
index 0e487ce091ac..150c193dfb9c 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/arc_uart.c +1 -1
index d904a3a345e7..63f9d11a93da 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/digicolor-usart.c +2 -1
index f460cca139e2..a19ea82d617e 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/fsl_lpuart.c +8 -4
index debdd1b9e01a..39950a1c45a8 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/ifx6x60.c +4 -3
index ffefd218761e..4d796a82f311 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/jsm/jsm_driver.c +2 -1
index 592e51d8944e..2cf37114dbdd 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/max3100.c +1 -2
index 371569a0fd00..437c22dbc7e9 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/men_z135_uart.c +2 -2
index ef89534dd760..ca87d7c99f76 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/pch_uart.c +2 -2
index 9ed121f08a54..019d58228f55 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/rp2.c +1 -1
index 5690c09cc041..2697acd6bff8 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/sc16is7xx.c +1 -1
index 268098681856..c99e7ce41db4 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/timbuart.c +2 -2
index 19d38b504e27..7febe4bfb676 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/uartlite.c +2 -1
index b8b912b5a8b9..5d5a89b2fa60 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/xilinx_uartps.c +3 -1
index 094f2958cb2b..76ebb8db3d4c 100644

Lines of this file are not shown. View the raw message.

drivers/tty/synclink.c +1 -2
index d55c858d6058..3a885131f45e 100644

Lines of this file are not shown. View the raw message.

drivers/tty/synclink_gt.c +1 -5
index e8a9047de451..4b9d1b347673 100644

Lines of this file are not shown. View the raw message.

drivers/tty/synclinkmp.c +3 -4
index fcb91bf7a15b..50b1e41501cf 100644

Lines of this file are not shown. View the raw message.

drivers/uio/uio.c +2 -1
index 131342280b46..b9f21495141b 100644

Lines of this file are not shown. View the raw message.

drivers/usb/c67x00/c67x00-drv.c +2 -1
index 53838e7d4eef..db2532530953 100644

Lines of this file are not shown. View the raw message.

drivers/usb/chipidea/core.c +3 -2
index 7bfcbb23c2a4..7c8d5edb9819 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/hcd.c +3 -2
index be47f96e810d..29790c4110fe 100644

Lines of this file are not shown. View the raw message.

drivers/usb/dwc2/gadget.c +2 -1
index 55ef3cc2701b..55bf64169647 100644

Lines of this file are not shown. View the raw message.

drivers/usb/dwc2/platform.c +2 -1
index c0b64d483552..153e2dff52ec 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/amd5536udc_pci.c +1 -1
index 57b6f66331cf..8a629e2031ee 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/bdc/bdc_udc.c +2 -1
index 7bfd58c846f7..6ddd31aa7f95 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/fotg210-udc.c +2 -2
index bc6abaea907d..19a0a5449b60 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/fusb300_udc.c +3 -3
index 263804d154a7..94daba652c50 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/goku_udc.c +1 -2
index c3721225b61e..cdad54ba2cd7 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/m66592-udc.c +2 -2
index a8288df6aadf..7f8f97ec63f3 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/mv_u3d_core.c +1 -2
index 35e02a8d0091..4b5b71e916fe 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/mv_udc_core.c +1 -2
index cafde053788b..99f8ab17f39d 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/net2272.c +2 -1
index b77f3126580e..1fc269c98ffd 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/net2280.c +1 -2
index e7dae5379e04..1b2b012fcac8 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/pch_udc.c +5 -3
index 55c8c8abeacd..84e44f14ef5d 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/pxa27x_udc.c +2 -1
index 014233252299..e72c51764c7a 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/r8a66597-udc.c +3 -2
index 11e25a3f4f1f..1370c43c1f79 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/snps_udc_plat.c +2 -2
index 32f1d3e90c26..31d3fbba1932 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/udc-xilinx.c +2 -1
index b1f4104d1283..0b48ddec81c0 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/max3421-hcd.c +2 -1
index afa321ab55fc..b64eaea62e23 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/xhci.c +7 -5
index 005e65922608..3f191e431edf 100644

Lines of this file are not shown. View the raw message.

drivers/usb/isp1760/isp1760-udc.c +2 -1
index 1714b2258b54..fe83ffbc8cdc 100644

Lines of this file are not shown. View the raw message.

drivers/usb/musb/musb_core.c +1 -1
index b7d56272f9d1..445a8520b4e5 100644

Lines of this file are not shown. View the raw message.

drivers/usb/phy/phy-gpio-vbus-usb.c +2 -2
index 553e2573c74f..71d4e46fdac3 100644

Lines of this file are not shown. View the raw message.

drivers/uwb/whc-rc.c +3 -2
index 3ae3c702500d..6591dbaac5eb 100644

Lines of this file are not shown. View the raw message.

drivers/vfio/pci/vfio_pci_intrs.c +3 -2
index 1c46045b0e7f..d928f12708b9 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/arcfb.c +1 -2
index a48741aab240..c873ebc1a551 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/aty/atyfb_base.c +1 -1
index b6fe103df145..0764bb519b83 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/goldfishfb.c +2 -2
index 4377e3442638..4ad3e0cf34ee 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/matrox/matroxfb_base.c +1 -2
index 838869c6490c..f8707365ee67 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/mb862xx/mb862xxfbdrv.c +3 -4
index cd372527c9e4..d74a8a5b4ff9 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/via/via-core.c +2 -1
index b041eb27a9bf..d242edf537a0 100644

Lines of this file are not shown. View the raw message.

drivers/virt/vboxguest/vboxguest_linux.c +3 -2
index 6e2a9619192d..768aa4677c64 100644

Lines of this file are not shown. View the raw message.

drivers/virtio/virtio_mmio.c +2 -2
index d9dd0f789279..c45cfc7a0ddf 100644

Lines of this file are not shown. View the raw message.

drivers/virtio/virtio_pci_common.c +11 -9
index d0584c040c60..04a25f2c208b 100644

Lines of this file are not shown. View the raw message.

drivers/vme/bridges/vme_ca91cx42.c +3 -2
index 53bdc256805f..0afef4408ded 100644

Lines of this file are not shown. View the raw message.

drivers/vme/bridges/vme_tsi148.c +3 -4
index 647d231d4422..73160ddfe675 100644

Lines of this file are not shown. View the raw message.

drivers/w1/masters/ds1wm.c +2 -1
index f661695fb589..c5b0e509f4a8 100644

Lines of this file are not shown. View the raw message.

drivers/xen/events/events_base.c +8 -4
index 117e76b2f939..c849861f3c33 100644

Lines of this file are not shown. View the raw message.

drivers/xen/platform-pci.c +2 -2
index 5d7dcad0b0a0..8416bfa8b0bf 100644

Lines of this file are not shown. View the raw message.

drivers/xen/xen-pciback/pciback_ops.c +3 -3
index ea4a08b83fa0..0ce77cab9cc3 100644

Lines of this file are not shown. View the raw message.

samples/v4l/v4l2-pci-skeleton.c +3 -2
index 27ec30952cfa..b6115d9c0459 100644

Lines of this file are not shown. View the raw message.

sound/drivers/mpu401/mpu401_uart.c +1 -2
index 85610cdcde9f..528bcc670149 100644

Lines of this file are not shown. View the raw message.

sound/drivers/mtpav.c +1 -1
index 547662e02fcc..32b04d8b10e3 100644

Lines of this file are not shown. View the raw message.

sound/drivers/serial-u16550.c +1 -2
index 0a67b8b9f176..6f7315903ce9 100644

Lines of this file are not shown. View the raw message.

sound/isa/ad1816a/ad1816a_lib.c +1 -1
index fba6d22f7f4b..c1740bb3874a 100644

Lines of this file are not shown. View the raw message.

sound/isa/es1688/es1688_lib.c +3 -1
index 50cdce0e8946..d243f6763330 100644

Lines of this file are not shown. View the raw message.

sound/isa/es18xx.c +1 -2
index 0d103d6f805e..85ecf0c7173f 100644

Lines of this file are not shown. View the raw message.

sound/isa/gus/gus_main.c +1 -1
index 3b8a0c880db5..d6e6cf996b8e 100644

Lines of this file are not shown. View the raw message.

sound/isa/gus/gusmax.c +1 -1
index 63309a453140..9e4f8d55522c 100644

Lines of this file are not shown. View the raw message.

sound/isa/gus/interwave.c +1 -2
index a6fc26bf0af2..f09d8198f61f 100644

Lines of this file are not shown. View the raw message.

sound/isa/msnd/msnd_pinnacle.c +2 -1
index 11af9c40bc05..f448872f943e 100644

Lines of this file are not shown. View the raw message.

sound/isa/opl3sa2.c +2 -2
index 7cce4cd4a23b..75ac5916c1e2 100644

Lines of this file are not shown. View the raw message.

sound/isa/opti9xx/opti92x-ad1848.c +2 -1
index 47e0b2820ace..ade2f53fc8c2 100644

Lines of this file are not shown. View the raw message.

sound/isa/sb/sb_common.c +1 -5
index 90b254aaef74..9f7e44c4973c 100644

Lines of this file are not shown. View the raw message.

sound/isa/wavefront/wavefront.c +1 -2
index b1989facd732..abc0e4136030 100644

Lines of this file are not shown. View the raw message.

sound/isa/wss/wss_lib.c +1 -2
index 3a5008837576..a2ec51887db5 100644

Lines of this file are not shown. View the raw message.

sound/pci/ad1889.c +1 -2
index d9c54c08e2db..4234cfe099f6 100644

Lines of this file are not shown. View the raw message.

sound/pci/ali5451/ali5451.c +1 -2
index 9f569379b77e..a1001fe87a6c 100644

Lines of this file are not shown. View the raw message.

sound/pci/als300.c +1 -2
index eaa2d853d922..3a1a1cf54d33 100644

Lines of this file are not shown. View the raw message.

sound/pci/asihpi/hpioctl.c +1 -2
index 7d049569012c..a3b5dbfec973 100644

Lines of this file are not shown. View the raw message.

sound/pci/atiixp.c +1 -2
index 1a41f8c80243..dc7002089fe2 100644

Lines of this file are not shown. View the raw message.

sound/pci/atiixp_modem.c +1 -2
index dc1de860cedf..5fbed10f86ca 100644

Lines of this file are not shown. View the raw message.

sound/pci/aw2/aw2-alsa.c +1 -2
index 9a49e4243a9c..15118f5be53d 100644

Lines of this file are not shown. View the raw message.

sound/pci/azt3328.c +1 -2
index fc18c29a8173..6ff40c762da1 100644

Lines of this file are not shown. View the raw message.

sound/pci/bt87x.c +2 -2
index ba971042f871..230c58b24383 100644

Lines of this file are not shown. View the raw message.

sound/pci/ca0106/ca0106_main.c +1 -2
index cd27b5536654..553f8e50393b 100644

Lines of this file are not shown. View the raw message.

sound/pci/cmipci.c +1 -2
index 452cc79b44af..f058c8d01d01 100644

Lines of this file are not shown. View the raw message.

sound/pci/cs4281.c +1 -2
index ec4247638fa1..9855ce43d187 100644

Lines of this file are not shown. View the raw message.

sound/pci/cs46xx/cs46xx_lib.c +1 -2
index 750eec437a79..88f7a7c5e918 100644

Lines of this file are not shown. View the raw message.

sound/pci/cs5535audio/cs5535audio.c +1 -2
index 4590086d9cd8..db73543eb7c8 100644

Lines of this file are not shown. View the raw message.

sound/pci/ctxfi/cthw20k1.c +2 -1
index 6a051a1c3724..4ef23084d48b 100644

Lines of this file are not shown. View the raw message.

sound/pci/ctxfi/cthw20k2.c +2 -1
index 3c966fafc754..7b470af8f10a 100644

Lines of this file are not shown. View the raw message.

sound/pci/emu10k1/emu10k1_main.c +1 -2
index 61f85ff91cd9..05cad2c2ac92 100644

Lines of this file are not shown. View the raw message.

sound/pci/emu10k1/emu10k1x.c +1 -2
index 611589cbdad6..1513af662fe6 100644

Lines of this file are not shown. View the raw message.

sound/pci/ens1370.c +1 -2
index 727eb3da1fda..afb73016d36f 100644

Lines of this file are not shown. View the raw message.

sound/pci/es1938.c +2 -4
index 9d248eb2e26c..a775bcb1c15b 100644

Lines of this file are not shown. View the raw message.

sound/pci/es1968.c +1 -2
index 0b1845ca6005..b1fea07bdd87 100644

Lines of this file are not shown. View the raw message.

sound/pci/fm801.c +1 -2
index e3fb9c61017c..bbd5c056a412 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/hda_intel.c +1 -3
index e5c49003e75f..5e03b7cde151 100644

Lines of this file are not shown. View the raw message.

sound/pci/ice1712/ice1712.c +1 -2
index f1fe497c2f9d..d1aaf856fd0a 100644

Lines of this file are not shown. View the raw message.

sound/pci/ice1712/ice1724.c +1 -2
index 057c2f394ea7..ec53f2f7b6cc 100644

Lines of this file are not shown. View the raw message.

sound/pci/intel8x0.c +2 -4
index ffddcdfe0c66..ba2d7a64c051 100644

Lines of this file are not shown. View the raw message.

sound/pci/intel8x0m.c +2 -4
index c84629190cba..0ffb23fa00b9 100644

Lines of this file are not shown. View the raw message.

sound/pci/korg1212/korg1212.c +2 -2
index 4e189a93f475..f7608ffce070 100644

Lines of this file are not shown. View the raw message.

sound/pci/lola/lola.c +1 -2
index 254f24366892..b7f8fc1b422e 100644

Lines of this file are not shown. View the raw message.

sound/pci/maestro3.c +1 -2
index 62962178a9d7..2de65a6027b5 100644

Lines of this file are not shown. View the raw message.

sound/pci/nm256/nm256.c +1 -2
index b97f4ea6b56c..2901b32e509f 100644

Lines of this file are not shown. View the raw message.

sound/pci/oxygen/oxygen_lib.c +2 -2
index b4ef5804212d..544457309d33 100644

Lines of this file are not shown. View the raw message.

sound/pci/riptide/riptide.c +1 -2
index 23017e3bc76c..7b94fb792a8c 100644

Lines of this file are not shown. View the raw message.

sound/pci/rme32.c +1 -2
index 3ac8c71d567c..6e69d95a5834 100644

Lines of this file are not shown. View the raw message.

sound/pci/rme96.c +1 -2
index dcfa4d7a73e2..04b9dfe9349b 100644

Lines of this file are not shown. View the raw message.

sound/pci/rme9652/hdsp.c +1 -2
index ba99ff0e93e0..479db0dcb86f 100644

Lines of this file are not shown. View the raw message.

sound/pci/rme9652/hdspm.c +1 -2
index 679ad0415e3b..5cb6248677f7 100644

Lines of this file are not shown. View the raw message.

sound/pci/rme9652/rme9652.c +1 -2
index edd765e22377..cab697211d25 100644

Lines of this file are not shown. View the raw message.

sound/pci/sis7019.c +3 -4
index 964acf302479..33b0ab75060f 100644

Lines of this file are not shown. View the raw message.

sound/pci/sonicvibes.c +1 -2
index 7218f38b59db..5ae258d3b8b4 100644

Lines of this file are not shown. View the raw message.

sound/pci/trident/trident_main.c +1 -2
index 5523e193d556..4e5b48c8745f 100644

Lines of this file are not shown. View the raw message.

sound/pci/via82xx.c +1 -5
index c488c5afa195..0051a94c5030 100644

Lines of this file are not shown. View the raw message.

sound/pci/via82xx_modem.c +1 -2
index b13c8688cc8d..277b44566d47 100644

Lines of this file are not shown. View the raw message.

sound/pci/ymfpci/ymfpci_main.c +1 -2
index a4926fb03991..0e0bdefbee4d 100644

Lines of this file are not shown. View the raw message.

sound/soc/amd/acp-pcm-dma.c +2 -1
index f4011bebc7ec..3689383fd5c3 100644

Lines of this file are not shown. View the raw message.

sound/soc/amd/raven/acp3x-pcm-dma.c +2 -1
index 3d58338fa3cf..8c15933a3145 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/rt5640.c +2 -2
index fc530481a6e4..6433d713ae8b 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/rt5651.c +2 -2
index b7ba64350a07..6965f970a32a 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/rt5663.c +2 -2
index da6647015708..aa24893a98b6 100644

Lines of this file are not shown. View the raw message.

sound/soc/dwc/dwc-i2s.c +3 -2
index 65112b9d8588..4ab23c0474c8 100644

Lines of this file are not shown. View the raw message.

sound/soc/fsl/fsl_asrc.c +2 -1
index 528e8b108422..119c1f908115 100644

Lines of this file are not shown. View the raw message.

sound/soc/fsl/fsl_esai.c +2 -1
index 57b484768a58..e72b88a34cd5 100644

Lines of this file are not shown. View the raw message.

sound/soc/fsl/fsl_sai.c +2 -1
index 4163f2cfc06f..859c7b8b5074 100644

Lines of this file are not shown. View the raw message.

sound/soc/fsl/fsl_spdif.c +2 -1
index 740b90df44bb..9987849d5258 100644

Lines of this file are not shown. View the raw message.

sound/soc/fsl/fsl_ssi.c +2 -1
index 0a648229e643..6481ea718aa3 100644

Lines of this file are not shown. View the raw message.

sound/x86/intel_hdmi_audio.c +3 -2
index 00c92eb854ce..d497def8ecdf 100644

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(-)
arch/x86/events/intel/uncore.c +2 -1
index 27a461414b30..2fe6f453b440 100644

Lines of this file are not shown. View the raw message.

drivers/auxdisplay/img-ascii-lcd.c +1 -1
index 834509506ef6..cfa0d8dcfbda 100644

Lines of this file are not shown. View the raw message.

drivers/block/xsysace.c +1 -1
index 87ccef4bd69e..a6b3aa5bbb82 100644

Lines of this file are not shown. View the raw message.

drivers/firewire/core-transaction.c +3 -2
index 50bf1fe1775f..44b19256a6aa 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/i915/i915_pmu.c +2 -1
index 017fc602a10e..be1aae302add 100644

Lines of this file are not shown. View the raw message.

drivers/ide/ide-probe.c +1 -1
index 958bf916d096..a137dfb1220c 100644

Lines of this file are not shown. View the raw message.

drivers/iio/trigger/iio-trig-hrtimer.c +2 -1
index 7accd0187ba1..d254026f82c4 100644

Lines of this file are not shown. View the raw message.

drivers/input/ff-memless.c +1 -1
index 2743ed4656e4..0fa743d51d46 100644

Lines of this file are not shown. View the raw message.

drivers/input/input.c +1 -1
index c22e8e167025..ce77a24512fe 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/capi/capidrv.c +1 -1
index e8949f3dcae1..44c6722b596f 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/i4l/isdn_common.c +1 -1
index 6a5b3f00f9ad..0ec6f1115447 100644

Lines of this file are not shown. View the raw message.

drivers/media/cec/cec-pin.c +2 -1
index 8f987bc0dd88..62efd672b249 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/bt8xx/bttv-driver.c +1 -1
index d09785fd37a8..703d0bdd9607 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/bt8xx/bttv-input.c +3 -2
index d34fbaa027c2..6acb2e1fa418 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/netup_unidvb/netup_unidvb_core.c +2 -1
index ead59fabd15f..8b945aa3d1c1 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/saa7134/saa7134-input.c +2 -1
index 35884d5b8337..43422aa92a1a 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/saa7134/saa7134-ts.c +2 -1
index 2be703617e29..bb94e1a92669 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/saa7134/saa7134-vbi.c +2 -1
index 57bea543c39b..f860bcc1797e 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/saa7134/saa7134-video.c +2 -1
index 5bc4b8fc8ebf..26076173343b 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/ttpci/av7110_ir.c +2 -1
index ee414803e6b5..11fb9c8f9892 100644

Lines of this file are not shown. View the raw message.

drivers/media/radio/radio-cadet.c +1 -1
index d12e07e32546..3ad09e86971c 100644

Lines of this file are not shown. View the raw message.

drivers/media/radio/wl128x/fmdrv_common.c +2 -1
index 800d69c3f80b..f2b0598d62e5 100644

Lines of this file are not shown. View the raw message.

drivers/media/rc/img-ir/img-ir-raw.c +1 -1
index 6e545680d3b6..26c72c418942 100644

Lines of this file are not shown. View the raw message.

drivers/media/rc/ir-rx51.c +2 -1
index 8a93f7468622..b32ba38951bd 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/au0828/au0828-video.c +4 -2
index 7876c897cc1d..6b802ab82488 100644

Lines of this file are not shown. View the raw message.

drivers/net/appletalk/cops.c +1 -1
index f90bb723985f..31c4c2e504b3 100644

Lines of this file are not shown. View the raw message.

drivers/net/caif/caif_hsi.c +6 -3
index 433a14b9f731..8d3422e2444e 100644

Lines of this file are not shown. View the raw message.

drivers/net/hamradio/6pack.c +2 -2
index a19868cba48c..13d1566bf9bc 100644

Lines of this file are not shown. View the raw message.

drivers/net/hamradio/scc.c +2 -2
index 1e7ee07887e1..16f851941e51 100644

Lines of this file are not shown. View the raw message.

drivers/net/hamradio/yam.c +2 -2
index 433695ae5e5c..ee316c06eb3c 100644

Lines of this file are not shown. View the raw message.

drivers/net/hippi/rrunner.c +1 -1
index 029206e4da3b..d38830828bad 100644

Lines of this file are not shown. View the raw message.

drivers/net/ieee802154/at86rf230.c +2 -1
index 50af3e288503..bb82970486b3 100644

Lines of this file are not shown. View the raw message.

drivers/net/slip/slip.c +2 -2
index 9757f1fc104f..9a7bb0f5ffff 100644

Lines of this file are not shown. View the raw message.

drivers/net/wan/sdla.c +1 -1
index 0a0cff9228e8..6bb1c9b5b87d 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/ath/ath9k/init.c +3 -2
index c070a9e51ebf..ef93894a1cf1 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/hostap/hostap_ap.c +1 -1
index 0094b1d2b577..8494fb259e8d 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c +2 -1
index 5380fba652cc..dcb5e62e0102 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/usb.c +1 -1
index d445acc4786b..ce963105142b 100644

Lines of this file are not shown. View the raw message.

drivers/pcmcia/yenta_socket.c +2 -1
index c978a6961578..4f8d72d7a691 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/sony-laptop.c +1 -1
index c83a8da216ce..52770388c84f 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/comedi_test.c +4 -2
index ef4c7c8a2b71..02b9ea93c1e7 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/jr3_pci.c +1 -1
index c3c88e6d298f..87e8b685b586 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8188eu/core/rtw_recv.c +1 -1
index 1d83affc08ce..d0bda444397a 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8188eu/os_dep/mlme_linux.c +11 -6
index d5ceb3beabbc..bed626e73545 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8188eu/os_dep/recv_linux.c +1 -1
index 9c9339863a4a..e24c94c24441 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +1 -1
index d7975aa335b2..da4143c26ab4 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +4 -2
index 8635faf84316..59c8aee82736 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/os_dep/mlme_linux.c +14 -8
index da4bd5292b0a..05899bf7916b 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/os_dep/recv_linux.c +1 -1
index 67ec336264e5..49aaf90622b0 100644

Lines of this file are not shown. View the raw message.

drivers/staging/speakup/main.c +1 -1
index 869f40ebf1a7..954bc394d17c 100644

Lines of this file are not shown. View the raw message.

drivers/tty/isicom.c +1 -1
index 803226775c8e..7cd335c00faa 100644

Lines of this file are not shown. View the raw message.

drivers/tty/moxa.c +1 -1
index 3a1a5e0ee93f..27263e0e5e1e 100644

Lines of this file are not shown. View the raw message.

drivers/tty/n_gsm.c +3 -2
index 6f7da9a9d76f..96c369226698 100644

Lines of this file are not shown. View the raw message.

drivers/tty/n_r3964.c +1 -1
index f75696f0ee2d..b4245410649b 100644

Lines of this file are not shown. View the raw message.

drivers/tty/rocket.c +1 -1
index b121d8f8f3d7..b016580693bb 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/8250/8250_core.c +2 -1
index 2b161a64a0c8..6e7f07bde100 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/8250/8250_port.c +2 -2
index d2f3310abe54..b3cab67ec021 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/max3100.c +1 -1
index 437c22dbc7e9..cf4d70234f87 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/mux.c +1 -1
index 00ce31e8d19a..433b98fbe911 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/pnx8xxx_uart.c +2 -1
index 223a9499104e..e1d971e763ee 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/sccnxp.c +1 -1
index 68a24a14f6b7..eeb8f0dc8da7 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/sh-sci.c +6 -3
index 64bbeb7d7e0c..23eedfebff08 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vcc.c +2 -2
index 58b454c34560..c325d92aa95c 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/keyboard.c +1 -1
index 88312c6c92cc..551fcf59be9f 100644

Lines of this file are not shown. View the raw message.

drivers/usb/chipidea/otg_fsm.c +2 -1
index 6ed4b00dba96..974141fc8d74 100644

Lines of this file are not shown. View the raw message.

drivers/usb/dwc2/hcd_queue.c +4 -2
index ea3aa640c15c..6d1e635efff0 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_ncm.c +2 -1
index 5780fba620ab..3ad2463e15b4 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/dummy_hcd.c +2 -2
index baf72f95f0f1..ebc4495a826a 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/m66592-udc.c +1 -1
index 7f8f97ec63f3..d191995e4001 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/r8a66597-udc.c +1 -1
index 1370c43c1f79..8d6d4f27c9f5 100644

Lines of this file are not shown. View the raw message.

drivers/usb/usbip/vudc_transfer.c +1 -1
index c9db846ee4f6..617fb13abae1 100644

Lines of this file are not shown. View the raw message.

drivers/uwb/neh.c +1 -1
index fbdca728bd9f..3ba6255795c7 100644

Lines of this file are not shown. View the raw message.

drivers/uwb/rsv.c +3 -2
index fe25a8cc6fa1..1a6648a4dfc8 100644

Lines of this file are not shown. View the raw message.

drivers/visorbus/visorbus_main.c +1 -1
index 0b2434cc4ecd..eb7ed196b429 100644

Lines of this file are not shown. View the raw message.

kernel/time/alarmtimer.c +1 -1
index 2c97e8c2d29f..c7576710ee85 100644

Lines of this file are not shown. View the raw message.

lib/random32.c +1 -1
index 4aaa76404d56..9cea9e8df380 100644

Lines of this file are not shown. View the raw message.

net/wireless/lib80211.c +1 -1
index 801d4781a73b..0e9867cb473e 100644

Lines of this file are not shown. View the raw message.

security/keys/gc.c +1 -1
index 634e96b380e8..66f35942b031 100644

Lines of this file are not shown. View the raw message.

sound/core/hrtimer.c +2 -1
index 18cb6f476bf4..a973931bf0f2 100644

Lines of this file are not shown. View the raw message.

sound/drivers/mpu401/mpu401_uart.c +2 -1
index 528bcc670149..5c024fa2c650 100644

Lines of this file are not shown. View the raw message.

sound/drivers/mtpav.c +2 -1
index 32b04d8b10e3..8e8d9d203d7b 100644

Lines of this file are not shown. View the raw message.

sound/drivers/pcsp/pcsp.c +2 -1
index 0dd3f46eb03e..80d971cbc4d7 100644

Lines of this file are not shown. View the raw message.

sound/drivers/serial-u16550.c +2 -1
index 6f7315903ce9..283c937c44f7 100644

Lines of this file are not shown. View the raw message.

sound/isa/sb/emu8000_pcm.c +1 -1
index f46f6ec3ea0c..9882e7b38156 100644

Lines of this file are not shown. View the raw message.

sound/isa/sb/sb8_midi.c +2 -1
index 4affdcb78f72..b1aaecdde82d 100644

Lines of this file are not shown. View the raw message.

sound/isa/wavefront/wavefront_midi.c +2 -2
index 556b14738970..6c6a53bce685 100644

Lines of this file are not shown. View the raw message.

sound/pci/echoaudio/midi.c +1 -1
index 6045a115cffe..a4d0b1ee6f15 100644

Lines of this file are not shown. View the raw message.

sound/pci/rme9652/hdsp.c +1 -1
index 479db0dcb86f..9917f8a3c582 100644

Lines of this file are not shown. View the raw message.

sound/pci/rme9652/hdspm.c +2 -1
index 5cb6248677f7..ab86733e2d12 100644

Lines of this file are not shown. View the raw message.

sound/usb/midi.c +2 -1
index b737f0ec77d0..a929f1cf1265 100644

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/atm/eni.c +2 -1
index f8c703426c90..bc6e792ac677 100644

Lines of this file are not shown. View the raw message.

drivers/atm/he.c +2 -1
index 211607986134..36f5d53ac41c 100644

Lines of this file are not shown. View the raw message.

drivers/block/xsysace.c +2 -1
index a6b3aa5bbb82..b5dd8d49920f 100644

Lines of this file are not shown. View the raw message.

drivers/crypto/ixp4xx_crypto.c +2 -1
index 1b0d156bb9be..142562b2dee2 100644

Lines of this file are not shown. View the raw message.

drivers/crypto/qat/qat_common/adf_isr.c +4 -3
index cd1cdf5305bc..23c053fb0d67 100644

Lines of this file are not shown. View the raw message.

drivers/crypto/qat/qat_common/adf_sriov.c +3 -3
index b36d8653b1ba..e9d188baffee 100644

Lines of this file are not shown. View the raw message.

drivers/crypto/qat/qat_common/adf_vf_isr.c +6 -4
index 4a73fc70f7a9..ee92578c51a9 100644

Lines of this file are not shown. View the raw message.

drivers/dma/dw/core.c +2 -1
index dc053e62f894..c5ff06c87592 100644

Lines of this file are not shown. View the raw message.

drivers/dma/ioat/init.c +2 -1
index 2d810dfcdc48..72fa81a88f39 100644

Lines of this file are not shown. View the raw message.

drivers/dma/virt-dma.c +2 -1
index 88ad8ed2a8d6..c3bf2fd20ca2 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/i915/intel_lrc.c +3 -2
index eab9341a5152..61466f7877e1 100644

Lines of this file are not shown. View the raw message.

drivers/hv/channel_mgmt.c +2 -2
index d01689079e9b..d904f0bfc367 100644

Lines of this file are not shown. View the raw message.

drivers/hv/hv.c +2 -2
index 632d25674e7f..28df050834d1 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/bnxt_re/qplib_fp.c +2 -2
index b98b054148cd..d437c3926455 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +2 -2
index 19551aa43850..2e584b626b89 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/i40iw/i40iw_main.c +6 -3
index 68095f00d08f..07fcef01a383 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/qib/qib_sdma.c +2 -2
index 3d64081c4819..52a9513f683a 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/sw/rxe/rxe_cq.c +2 -1
index a57276f2cb84..b8e0ad6cea0f 100644

Lines of this file are not shown. View the raw message.

drivers/input/serio/hil_mlc.c +1 -1
index e1423f7648d6..7760e143568a 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/gigaset/bas-gigaset.c +4 -4
index ecdeb89645d0..23ad5c21db4c 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/gigaset/common.c +2 -2
index 76b5407b5277..8e66e2dac9e7 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/gigaset/ser-gigaset.c +2 -2
index ab0b63a4d045..39e2427c5f52 100644

Lines of this file are not shown. View the raw message.

drivers/isdn/gigaset/usb-gigaset.c +2 -2
index eade36dafa34..2b243239bcb8 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/bt8xx/dvb-bt8xx.c +2 -1
index b46fbe557dd9..71844d7cb4ba 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/mantis/mantis_dvb.c +2 -1
index 54dbaa700fa3..30b739da90e5 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/smipcie/smipcie-main.c +2 -1
index 4d5ddbcb3514..234758f89eee 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/ttpci/av7110.c +8 -4
index 409defc75c05..62ddcb7c36e4 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/ttpci/budget-ci.c +6 -3
index ec8f92540f7c..78e3cbfa312f 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/ttpci/budget-core.c +2 -1
index 35b696bdb2df..9962b1413a9e 100644

Lines of this file are not shown. View the raw message.

drivers/media/pci/tw5864/tw5864-video.c +2 -2
index 5a1f3aa4101a..811a22ae797f 100644

Lines of this file are not shown. View the raw message.

drivers/media/platform/marvell-ccic/mcam-core.c +2 -2
index f1b301810260..c066db5d329c 100644

Lines of this file are not shown. View the raw message.

drivers/media/radio/wl128x/fmdrv_common.c +4 -2
index f2b0598d62e5..01d7728613fe 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/ttusb-dec/ttusb_dec.c +3 -2
index 44ca66cb9b8f..571b6a69b28d 100644

Lines of this file are not shown. View the raw message.

drivers/memstick/host/jmb38x_ms.c +2 -1
index 13b969c106ff..374e269a03fa 100644

Lines of this file are not shown. View the raw message.

drivers/misc/vmw_vmci/vmci_guest.c +4 -4
index dad5abee656e..c4b6d8698776 100644

Lines of this file are not shown. View the raw message.

drivers/mmc/host/wbsd.c +10 -10
index 1e54bbf13d75..b8b607a71eb1 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/broadcom/cnic.c +4 -4
index 510dfc1c236b..26fce29ab463 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/cadence/macb_main.c +2 -2
index 2b2882615e8b..c6a916f52558 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/micrel/ks8842.c +4 -3
index e3d7c74d47bb..17d7f1fffac5 100644

Lines of this file are not shown. View the raw message.

drivers/net/ppp/ppp_async.c +2 -1
index b287bb811875..22e4f5a62daf 100644

Lines of this file are not shown. View the raw message.

drivers/net/ppp/ppp_synctty.c +2 -1
index d02ba2494d93..5d5a61944ad8 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/cdc_ncm.c +2 -1
index 50c05d0f44cb..12cabae87dbd 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/hso.c +3 -3
index d6916f787fce..ae71221f4de4 100644

Lines of this file are not shown. View the raw message.

drivers/net/wan/farsync.c +2 -2
index 070dee4a1ac6..a0b4e44cdb64 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/ath/carl9170/usb.c +2 -2
index e7c3f3b8457d..5643ee0f8795 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/broadcom/b43legacy/main.c +3 -3
index e61752e584dd..6c08c2b73d7a 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/broadcom/b43legacy/pio.c +2 -2
index 282eedec675e..669ab1ec2d23 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/ipw2x00/ipw2100.c +3 -2
index 0b8c2275ec55..f396eda80074 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/ipw2x00/ipw2200.c +3 -2
index 33931a4435e3..79d2008fe4d7 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlegacy/3945-mac.c +3 -3
index 48cdce4a6ca0..96db8a4462b7 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlegacy/4965-mac.c +3 -3
index 8132d6964923..0b464f09c9b5 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/orinoco/main.c +2 -2
index 28dac36d7c4c..234cddb53d5d 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/mac80211_hwsim.c +3 -3
index 320edcac4699..d0cdd00ee6c4 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwl8k.c +4 -2
index 9a55fe1a2f0d..c4d4785fb80d 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/realtek/rtlwifi/pci.c +6 -6
index 58b64849172a..7269e8d7a99d 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aic94xx/aic94xx_hwi.c +2 -2
index 2bc7615193bd..a51ca4081ce4 100644

Lines of this file are not shown. View the raw message.

drivers/staging/ks7010/ks_hostif.c +2 -1
index 065bce193fac..0c16debab98f 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +3 -3
index c0d51ba70a75..192d3327372d 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +3 -3
index a72e069269b8..2de465fadead 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8192e/rtl8192e/rtl_core.c +9 -9
index 6070e3da1be6..a24ab322ee2a 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8192e/rtllib_softmac.c +3 -3
index 287d0c11fa38..02e5abfa5664 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_recv.c +3 -3
index 5bf9070b7a28..6d8240ccacce 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl871x_xmit.c +3 -3
index 5c7dc9c6f76b..12efecddc7ca 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +3 -5
index 26742960ed65..49278c11e797 100644

Lines of this file are not shown. View the raw message.

drivers/tty/ipwireless/hardware.c +2 -1
index b0baa4ce10f9..2274280ade21 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/ifx6x60.c +2 -2
index 4d796a82f311..f12da1602c79 100644

Lines of this file are not shown. View the raw message.

drivers/usb/atm/usbatm.c +4 -2
index dbea28495e1d..8bcd259a3c6d 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_midi.c +2 -1
index 46af0aa07e2e..db59d687d9b4 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/mos7720.c +2 -2
index fc52ac75fbf6..90a06d4e3dc0 100644

Lines of this file are not shown. View the raw message.

net/atm/pppoatm.c +1 -1
index d84227d75717..cf28ba053868 100644

Lines of this file are not shown. View the raw message.

net/mac80211/main.c +7 -7
index 87a729926734..ccf3a220e957 100644

Lines of this file are not shown. View the raw message.

net/rds/ib_cm.c +4 -4
index bfbb31f0c7fd..9da2cffaaf6f 100644

Lines of this file are not shown. View the raw message.

net/xfrm/xfrm_state.c +2 -1
index 23c92891758a..4471d94d2372 100644

Lines of this file are not shown. View the raw message.

sound/core/timer.c +2 -2
index c8a39813f609..578e97f0bb99 100644

Lines of this file are not shown. View the raw message.

sound/pci/asihpi/asihpi.c +2 -2
index aad74e809797..4c9c7c63c9f8 100644

Lines of this file are not shown. View the raw message.

sound/pci/rme9652/hdsp.c +2 -1
index 9917f8a3c582..8620f3a5b3f6 100644

Lines of this file are not shown. View the raw message.

sound/pci/rme9652/hdspm.c +2 -2
index ab86733e2d12..74c3bde6c6d0 100644

Lines of this file are not shown. View the raw message.

sound/usb/midi.c +2 -1
index a929f1cf1265..19928bc86748 100644

Lines of this file are not shown. View the raw message.

sound/usb/misc/ua101.c +2 -2
index a0b6d039017f..0c7a396c415d 100644

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.