[linux] 02/07: Remove all patches handling or reverting ABI changes.

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Mon Feb 19 12:35:17 UTC 2018


This is an automated email from the git hooks/post-receive script.

corsac pushed a commit to branch stretch
in repository linux.

commit b8da5785de538a95cdd0fccbb074772caf4f904a
Author: Yves-Alexis Perez <corsac at corsac.net>
Date:   Sun Feb 18 10:48:10 2018 +0100

    Remove all patches handling or reverting ABI changes.
---
 debian/changelog                                   |  11 +-
 .../debian/bpf-avoid-abi-change-in-4.9.77.patch    | 122 -------
 .../inet_frag-limit-abi-change-in-4.9.51.patch     |  58 ---
 .../ip6_fib-avoid-abi-change-in-4.9.51.patch       |  23 --
 .../debian/keys-limit-abi-change-in-4.9.59.patch   |  95 -----
 .../mac80211-avoid-abi-change-in-4.9.53.patch      |  34 --
 .../mm-page_alloc-avoid-abi-change-in-4.9.65.patch |  26 --
 .../mmc-sdio-avoid-abi-change-in-4.9.54.patch      | 125 -------
 .../netfilter-nat-avoid-abi-change-in-4.9.63.patch |  58 ---
 ...avoid-false-sharing-of-map-refcount-with-.patch |  56 ---
 ...f-event-close-won-t-free-bpf-program-atta.patch |  40 ---
 ...vert-crypto-poly1305-remove-setkey-method.patch |  86 -----
 ...fence-Introduce-drm_fence_set_error-helpe.patch | 104 ------
 ...genalloc.c-make-the-avail-variable-an-ato.patch |  88 -----
 ...ix-100-CPU-kswapd-busyloop-on-unreclaimab.patch | 244 -------------
 ...ugetlbfs-introduce-split-to-vm_operations.patch |  76 ----
 ...crease-size-of-mii_bus_id_size-and-bus_id.patch |  34 --
 ...d-rt-Simplify-the-IPI-based-RT-balancing-.patch | 398 ---------------------
 ...d-rt-Up-the-root-domain-ref-count-when-pa.patch |  85 -----
 ...d-rt-Use-container_of-to-get-root-domain-.patch |  75 ----
 ...invalidate-rate-samples-during-SACK-reneg.patch | 136 -------
 ...asm-Move-status-from-thread_struct-to-thr.patch | 159 --------
 .../s390-mm-avoid-abi-change-in-4.9.52.patch       |  76 ----
 debian/patches/series                              |  22 --
 24 files changed, 1 insertion(+), 2230 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0687691..d7d6403 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -50,16 +50,9 @@ linux (4.9.82-1) UNRELEASED; urgency=medium
     - [x86] x86/microcode: Do the family check first
   * [x86] Rewrite "Make x32 syscall support conditional on a kernel parameter"
     to use a static key
-  * [x86] x86/asm: revert ABI break introduced in 4.9.81.
-  * [x86] Ignore ABI changes in KVM introduced in 4.9.81.
-  * [x86] Ignore ABI changes in boot_cpu_data and cpu_info introduced in
-    4.9.81.
-  * [x86] xen: Ignore ABI changes in xen_xlate_map_ballooned_pages (marked as
-    notrepoline because it's __init)
   * [x86] linux-compiler-gcc-6-x86: Add versioned dependency on gcc-6 for
     retpoline support
   * [powerpc] powerpc/64s: Simple RFI macro conversions (fix FTBFS)
-  * [powerpc] Ignore ABI change in paca, introduced in 4.9.81
   * Add myself to Uploaders since I did the last few uploads to Stretch.
     https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.82
     - CIFS: zero sensitive data when freeing
@@ -83,10 +76,8 @@ linux (4.9.82-1) UNRELEASED; urgency=medium
     - ACPI: sbshc: remove raw pointer from printk() message (CVE-2018-5750)
     - acpi, nfit: fix register dimm error handling
   * Remove patches included in 4.9.82
-  * sched/rt: remove two patches from 4.9.82 which need to be applied on top
-    of a patch reverted for ABI change in 4.9.66.
-  * crypto: revert ABI break in poly1305
   * Bump ABI to 6, remove all ignored ABI changes since ABI 5.
+  * Remove all patches handling or reverting ABI changes.
 
  -- Yves-Alexis Perez <corsac at debian.org>  Tue, 13 Feb 2018 17:44:41 +0100
 
diff --git a/debian/patches/debian/bpf-avoid-abi-change-in-4.9.77.patch b/debian/patches/debian/bpf-avoid-abi-change-in-4.9.77.patch
deleted file mode 100644
index 8b85bb4..0000000
--- a/debian/patches/debian/bpf-avoid-abi-change-in-4.9.77.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From: Yves-Alexis Perez <corsac at debian.org>
-Date: Sat, 20 Jan 2018 14:52:32 +0100
-Subject: bpf: Avoid ABI change in 4.9.77
-Forwarded: not-needed
-
-Commit a9bfac14cde2 "bpf: prevent out-of-bounds speculation" added one
-member each to struct bpf_map and struct bpf_array (which is
-effectively a sub-type of bpf_map).  Changing the size of struct
-bpf_array is an ABI change, since the array contents immediately
-follows the structure.  However, bpf_map::work is not used (or even
-initialised) until after the map's refcount drops to zero.  We can
-therefore move the new members into a union with it.
-
-Based on the patch against 4.14.14 by Ben Hutchings <ben at decadent.org.uk>
-
----
---- a/include/linux/bpf.h
-+++ b/include/linux/bpf.h
-@@ -43,10 +43,20 @@ struct bpf_map {
- 	u32 max_entries;
- 	u32 map_flags;
- 	u32 pages;
--	bool unpriv_array;
-+
- 	struct user_struct *user;
- 	const struct bpf_map_ops *ops;
-+#ifdef __GENKSYMS__
- 	struct work_struct work;
-+#else
-+	union {
-+		struct work_struct work;
-+		struct {
-+			bool unpriv_array;
-+			u32 index_mask;
-+		};
-+	};
-+#endif
- 	atomic_t usercnt;
- };
- 
-@@ -190,7 +200,6 @@ struct bpf_prog_aux {
- struct bpf_array {
- 	struct bpf_map map;
- 	u32 elem_size;
--	u32 index_mask;
- 	/* 'ownership' of prog_array is claimed by the first program that
- 	 * is going to use this map or by the first program which FD is stored
- 	 * in the map to make sure that all callers and callees have the same
---- a/kernel/bpf/arraymap.c
-+++ b/kernel/bpf/arraymap.c
-@@ -99,7 +99,7 @@ static struct bpf_map *array_map_alloc(u
- 	array = bpf_map_area_alloc(array_size);
- 	if (!array)
- 		return ERR_PTR(-ENOMEM);
--	array->index_mask = index_mask;
-+	array->map.index_mask = index_mask;
- 	array->map.unpriv_array = unpriv;
- 
- 	/* copy mandatory map attributes */
-@@ -134,7 +134,7 @@ static void *array_map_lookup_elem(struc
- 	if (unlikely(index >= array->map.max_entries))
- 		return NULL;
- 
--	return array->value + array->elem_size * (index & array->index_mask);
-+	return array->value + array->elem_size * (index & array->map.index_mask);
- }
- 
- /* Called from eBPF program */
-@@ -146,7 +146,7 @@ static void *percpu_array_map_lookup_ele
- 	if (unlikely(index >= array->map.max_entries))
- 		return NULL;
- 
--	return this_cpu_ptr(array->pptrs[index & array->index_mask]);
-+	return this_cpu_ptr(array->pptrs[index & array->map.index_mask]);
- }
- 
- int bpf_percpu_array_copy(struct bpf_map *map, void *key, void *value)
-@@ -166,7 +166,7 @@ int bpf_percpu_array_copy(struct bpf_map
- 	 */
- 	size = round_up(map->value_size, 8);
- 	rcu_read_lock();
--	pptr = array->pptrs[index & array->index_mask];
-+	pptr = array->pptrs[index & array->map.index_mask];
- 	for_each_possible_cpu(cpu) {
- 		bpf_long_memcpy(value + off, per_cpu_ptr(pptr, cpu), size);
- 		off += size;
-@@ -214,11 +214,11 @@ static int array_map_update_elem(struct
- 		return -EEXIST;
- 
- 	if (array->map.map_type == BPF_MAP_TYPE_PERCPU_ARRAY)
--		memcpy(this_cpu_ptr(array->pptrs[index & array->index_mask]),
-+		memcpy(this_cpu_ptr(array->pptrs[index & array->map.index_mask]),
- 		       value, map->value_size);
- 	else
- 		memcpy(array->value +
--		       array->elem_size * (index & array->index_mask),
-+		       array->elem_size * (index & array->map.index_mask),
- 		       value, map->value_size);
- 	return 0;
- }
-@@ -252,7 +252,7 @@ int bpf_percpu_array_update(struct bpf_m
- 	 */
- 	size = round_up(map->value_size, 8);
- 	rcu_read_lock();
--	pptr = array->pptrs[index & array->index_mask];
-+	pptr = array->pptrs[index & array->map.index_mask];
- 	for_each_possible_cpu(cpu) {
- 		bpf_long_memcpy(per_cpu_ptr(pptr, cpu), value + off, size);
- 		off += size;
---- a/kernel/bpf/verifier.c
-+++ b/kernel/bpf/verifier.c
-@@ -3414,9 +3414,7 @@ static int fixup_bpf_calls(struct bpf_ve
- 			insn_buf[0] = BPF_JMP_IMM(BPF_JGE, BPF_REG_3,
- 						  map_ptr->max_entries, 2);
- 			insn_buf[1] = BPF_ALU32_IMM(BPF_AND, BPF_REG_3,
--						    container_of(map_ptr,
--								 struct bpf_array,
--								 map)->index_mask);
-+						    map_ptr->index_mask);
- 			insn_buf[2] = *insn;
- 			cnt = 3;
- 			new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt);
diff --git a/debian/patches/debian/inet_frag-limit-abi-change-in-4.9.51.patch b/debian/patches/debian/inet_frag-limit-abi-change-in-4.9.51.patch
deleted file mode 100644
index 600e16c..0000000
--- a/debian/patches/debian/inet_frag-limit-abi-change-in-4.9.51.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Tue, 26 Sep 2017 00:03:33 +0100
-Subject: inet_frag: Limit ABI change in 4.9.51
-Forwarded: not-needed
-
-Commit fb452a1aa3fd 'Revert "net: use lib/percpu_counter API for
-fragmentation mem accounting"' changed the type of inet_frag::mem
-from struct percpu_counter to atomic_t.  There are few modules
-that actually depend on this, but struct inet_frag is embedded in
-various other structures that end up affecting symbol versions
-for a huge number of networking APIs.
-
-So add padding to keep the structure size unchanged, hide the type
-change from genksyms, and rename a key inet_frag function so that
-those modules that actually depend on the type of inet_frag::mem do
-see an ABI change.
-
----
---- a/include/net/inet_frag.h
-+++ b/include/net/inet_frag.h
-@@ -1,9 +1,22 @@
- #ifndef __NET_FRAG_H__
- #define __NET_FRAG_H__
- 
-+#include <linux/percpu_counter.h>
-+
- struct netns_frags {
-+	/*
-+	 * bwh: This change is hidden from genksyms, but we still make
-+	 * sure to avoid an ABI mismatch for the modules that access
-+	 * it (see comment below).
-+	 */
-+#ifndef __GENKSYMS__
- 	/* Keep atomic mem on separate cachelines in structs that include it */
- 	atomic_t		mem ____cacheline_aligned_in_smp;
-+	char			pad[sizeof(struct percpu_counter) -
-+				    sizeof(atomic_t)];
-+#else
-+	struct percpu_counter   mem ____cacheline_aligned_in_smp;
-+#endif
- 	/* sysctls */
- 	int			timeout;
- 	int			high_thresh;
-@@ -107,6 +120,14 @@ static inline void inet_frags_init_net(s
- {
- 	atomic_set(&nf->mem, 0);
- }
-+/*
-+ * bwh: All modules accessing inet_frag::mem through the inline
-+ * functions below also call inet_frags_exit_net().  Change the
-+ * function name together with that field's type, so that all loaded
-+ * code agrees on whether the type is atomic_t or struct
-+ * percpu_counter.
-+ */
-+#define inet_frags_exit_net inet_frags_exit_net_atomic
- void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f);
- 
- void inet_frag_kill(struct inet_frag_queue *q, struct inet_frags *f);
diff --git a/debian/patches/debian/ip6_fib-avoid-abi-change-in-4.9.51.patch b/debian/patches/debian/ip6_fib-avoid-abi-change-in-4.9.51.patch
deleted file mode 100644
index f79a7e8..0000000
--- a/debian/patches/debian/ip6_fib-avoid-abi-change-in-4.9.51.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Mon, 25 Sep 2017 22:49:55 +0100
-Subject: ip6_fib: Avoid ABI change in 4.9.51
-Forwarded: not-needed
-
-Commit c5cff8561d2d "ipv6: add rcu grace period before freeing
-fib6_node" added an rcu_head field to the end of struct fib6_node.
-As this structure is always allocated and freed inside of the ipv6
-module (or built-in code), we can safely hide it from genksyms.
-
----
---- a/include/net/ip6_fib.h
-+++ b/include/net/ip6_fib.h
-@@ -68,7 +68,9 @@ struct fib6_node {
- 	__u16			fn_flags;
- 	int			fn_sernum;
- 	struct rt6_info		*rr_ptr;
-+#ifndef __GENKSYMS__
- 	struct rcu_head		rcu;
-+#endif
- };
- 
- #ifndef CONFIG_IPV6_SUBTREES
diff --git a/debian/patches/debian/keys-limit-abi-change-in-4.9.59.patch b/debian/patches/debian/keys-limit-abi-change-in-4.9.59.patch
deleted file mode 100644
index a069e0e..0000000
--- a/debian/patches/debian/keys-limit-abi-change-in-4.9.59.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Sun, 29 Oct 2017 10:30:46 +0000
-Subject: KEYS: Limit ABI change in 4.9.59
-Forwarded: not-needed
-
-Commit 363b02dab09b ("KEYS: Fix race between updating and finding a
-negative key") rearranged various state members in struct key, resulting
-in an ABI change for all keys APIs.
-
-Only the keys subsystem and key type implementation use this state
-information, so we can limit the ABI break to them:
-
-- Renumber the other flags back to their old values
-- Hide the deletion of the reject_error field from genksyms (it was only
-  used inside the keys subsystem)
-- Move the new state field to the end of the structure and hide it from
-  genksyms
-- Rename the register_key_type() function, so newly built key type
-  modules will only load on top of the new keys subsystem while old
-  key type modules will only load on top of the old keys subsystem
-
----
---- a/include/linux/key.h
-+++ b/include/linux/key.h
-@@ -162,7 +162,6 @@ struct key {
- 						 * - may not match RCU dereferenced payload
- 						 * - payload should contain own length
- 						 */
--	short			state;		/* Key state (+) or rejection error (-) */
- 
- #ifdef KEY_DEBUGGING
- 	unsigned		magic;
-@@ -171,16 +170,16 @@ struct key {
- #endif
- 
- 	unsigned long		flags;		/* status flags (change with bitops) */
--#define KEY_FLAG_DEAD		0	/* set if key type has been deleted */
--#define KEY_FLAG_REVOKED	1	/* set if key had been revoked */
--#define KEY_FLAG_IN_QUOTA	2	/* set if key consumes quota */
--#define KEY_FLAG_USER_CONSTRUCT	3	/* set if key is being constructed in userspace */
--#define KEY_FLAG_ROOT_CAN_CLEAR	4	/* set if key can be cleared by root without permission */
--#define KEY_FLAG_INVALIDATED	5	/* set if key has been invalidated */
--#define KEY_FLAG_BUILTIN	6	/* set if key is built in to the kernel */
--#define KEY_FLAG_ROOT_CAN_INVAL	7	/* set if key can be invalidated by root without permission */
--#define KEY_FLAG_KEEP		8	/* set if key should not be removed */
--#define KEY_FLAG_UID_KEYRING	9	/* set if key is a user or user session keyring */
-+#define KEY_FLAG_DEAD		1	/* set if key type has been deleted */
-+#define KEY_FLAG_REVOKED	2	/* set if key had been revoked */
-+#define KEY_FLAG_IN_QUOTA	3	/* set if key consumes quota */
-+#define KEY_FLAG_USER_CONSTRUCT	4	/* set if key is being constructed in userspace */
-+#define KEY_FLAG_ROOT_CAN_CLEAR	6	/* set if key can be cleared by root without permission */
-+#define KEY_FLAG_INVALIDATED	7	/* set if key has been invalidated */
-+#define KEY_FLAG_BUILTIN	8	/* set if key is built in to the kernel */
-+#define KEY_FLAG_ROOT_CAN_INVAL	9	/* set if key can be invalidated by root without permission */
-+#define KEY_FLAG_KEEP		10	/* set if key should not be removed */
-+#define KEY_FLAG_UID_KEYRING	11	/* set if key is a user or user session keyring */
- 
- 	/* the key type and key description string
- 	 * - the desc is used to match a key against search criteria
-@@ -206,6 +205,9 @@ struct key {
- 			struct list_head name_link;
- 			struct assoc_array keys;
- 		};
-+#ifdef __GENKSYMS__
-+		int reject_error;
-+#endif
- 	};
- 
- 	/* This is set on a keyring to restrict the addition of a link to a key
-@@ -221,6 +223,10 @@ struct key {
- 	int (*restrict_link)(struct key *keyring,
- 			     const struct key_type *type,
- 			     const union key_payload *payload);
-+
-+#ifndef __GENKSYMS__
-+	short			state;		/* Key state (+) or rejection error (-) */
-+#endif
- };
- 
- extern struct key *key_alloc(struct key_type *type,
---- a/include/linux/key-type.h
-+++ b/include/linux/key-type.h
-@@ -154,6 +154,12 @@ struct key_type {
- 
- extern struct key_type key_type_keyring;
- 
-+/*
-+ * ABI compat: Rename register function so newly built key type modules
-+ * will require a new kernel and can then safely assume the existence of the
-+ * key::state field.  Other keys users don't access it and are unaffected.
-+ */
-+#define register_key_type register_key_type_2
- extern int register_key_type(struct key_type *ktype);
- extern void unregister_key_type(struct key_type *ktype);
- 
diff --git a/debian/patches/debian/mac80211-avoid-abi-change-in-4.9.53.patch b/debian/patches/debian/mac80211-avoid-abi-change-in-4.9.53.patch
deleted file mode 100644
index 2f3f9bb..0000000
--- a/debian/patches/debian/mac80211-avoid-abi-change-in-4.9.53.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Sat, 28 Oct 2017 20:46:43 +0100
-Subject: mac80211: Avoid ABI change in 4.9.53
-Forwarded: not-needed
-
-Commit 531682159092 ("mac80211: fix VLAN handling with TXQs") replaced
-a union with two separate members in ieee80211_tx_info::control.  The
-one which changed offset (enqueue_time) doesn't appear to be accessed
-outside of the mac80211 module, so this shouldn't be an ABI change for
-drivers.  Therefore hide the ABI change from genksyms.
-
----
---- a/include/net/mac80211.h
-+++ b/include/net/mac80211.h
-@@ -902,10 +902,19 @@ struct ieee80211_tx_info {
- 				unsigned long jiffies;
- 			};
- 			/* NB: vif can be NULL for injected frames */
-+#ifndef __GENKSYMS__
- 			struct ieee80211_vif *vif;
-+#else
-+			union {
-+				struct ieee80211_vif *vif;
-+				codel_time_t enqueue_time;
-+			};
-+#endif
- 			struct ieee80211_key_conf *hw_key;
- 			u32 flags;
-+#ifndef __GENKSYMS__
- 			codel_time_t enqueue_time;
-+#endif
- 		} control;
- 		struct {
- 			u64 cookie;
diff --git a/debian/patches/debian/mm-page_alloc-avoid-abi-change-in-4.9.65.patch b/debian/patches/debian/mm-page_alloc-avoid-abi-change-in-4.9.65.patch
deleted file mode 100644
index 6470e3b..0000000
--- a/debian/patches/debian/mm-page_alloc-avoid-abi-change-in-4.9.65.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Wed, 29 Nov 2017 20:05:45 +0000
-Subject: mm/page_alloc: Avoid ABI change in 4.9.65
-Forwarded: not-needed
-
-Commit d135e5750205 "mm/page_alloc.c: broken deferred calculation"
-renamed pglist_data::static_init_size to static_init_pgcnt.  However
-the field has the same semantics as were intended originally (and in
-any case, the field is only used by built-in code).  Hide the renaming
-from genksyms.
-
----
---- a/include/linux/mmzone.h
-+++ b/include/linux/mmzone.h
-@@ -673,7 +673,11 @@ typedef struct pglist_data {
- 	 */
- 	unsigned long first_deferred_pfn;
- 	/* Number of non-deferred pages */
-+#ifndef __GENKSYMS__
- 	unsigned long static_init_pgcnt;
-+#else
-+	unsigned long static_init_size;
-+#endif
- #endif /* CONFIG_DEFERRED_STRUCT_PAGE_INIT */
- 
- #ifdef CONFIG_TRANSPARENT_HUGEPAGE
diff --git a/debian/patches/debian/mmc-sdio-avoid-abi-change-in-4.9.54.patch b/debian/patches/debian/mmc-sdio-avoid-abi-change-in-4.9.54.patch
deleted file mode 100644
index 0cc9ac0..0000000
--- a/debian/patches/debian/mmc-sdio-avoid-abi-change-in-4.9.54.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Wed, 29 Nov 2017 19:54:22 +0000
-Subject: mmc: sdio: Avoid ABI change in 4.9.54
-Forwarded: not-needed
-
-Commit 5ef1ecf060f2 "mmc: sdio: fix alignment issue in struct
-sdio_func" changed the type of sdio_func::tmpbuf from array to
-pointer.  On 64-bit architectures this also changes the size of the
-field.  It appears that tmpbuf is only used by the MMC core, and the
-structure is always allocated there.  So put padding in the old
-position, move the pointer to the end of the structure, and hide this
-from genksyms.
-
-Just in case I missed a user elsewhere, which might end up accessing
-memory off the end of an old structure, rename the field to
-core_tmpbuf (and update its users in the core).
-
----
---- a/drivers/mmc/core/sdio_bus.c
-+++ b/drivers/mmc/core/sdio_bus.c
-@@ -266,7 +266,7 @@ static void sdio_release_func(struct dev
- 	sdio_free_func_cis(func);
- 
- 	kfree(func->info);
--	kfree(func->tmpbuf);
-+	kfree(func->core_tmpbuf);
- 	kfree(func);
- }
- 
-@@ -285,8 +285,8 @@ struct sdio_func *sdio_alloc_func(struct
- 	 * allocate buffer separately to make sure it's properly aligned for
- 	 * DMA usage (incl. 64 bit DMA)
- 	 */
--	func->tmpbuf = kmalloc(4, GFP_KERNEL);
--	if (!func->tmpbuf) {
-+	func->core_tmpbuf = kmalloc(4, GFP_KERNEL);
-+	if (!func->core_tmpbuf) {
- 		kfree(func);
- 		return ERR_PTR(-ENOMEM);
- 	}
---- a/drivers/mmc/core/sdio_io.c
-+++ b/drivers/mmc/core/sdio_io.c
-@@ -530,14 +530,14 @@ u16 sdio_readw(struct sdio_func *func, u
- 	if (err_ret)
- 		*err_ret = 0;
- 
--	ret = sdio_memcpy_fromio(func, func->tmpbuf, addr, 2);
-+	ret = sdio_memcpy_fromio(func, func->core_tmpbuf, addr, 2);
- 	if (ret) {
- 		if (err_ret)
- 			*err_ret = ret;
- 		return 0xFFFF;
- 	}
- 
--	return le16_to_cpup((__le16 *)func->tmpbuf);
-+	return le16_to_cpup((__le16 *)func->core_tmpbuf);
- }
- EXPORT_SYMBOL_GPL(sdio_readw);
- 
-@@ -556,9 +556,9 @@ void sdio_writew(struct sdio_func *func,
- {
- 	int ret;
- 
--	*(__le16 *)func->tmpbuf = cpu_to_le16(b);
-+	*(__le16 *)func->core_tmpbuf = cpu_to_le16(b);
- 
--	ret = sdio_memcpy_toio(func, addr, func->tmpbuf, 2);
-+	ret = sdio_memcpy_toio(func, addr, func->core_tmpbuf, 2);
- 	if (err_ret)
- 		*err_ret = ret;
- }
-@@ -582,14 +582,14 @@ u32 sdio_readl(struct sdio_func *func, u
- 	if (err_ret)
- 		*err_ret = 0;
- 
--	ret = sdio_memcpy_fromio(func, func->tmpbuf, addr, 4);
-+	ret = sdio_memcpy_fromio(func, func->core_tmpbuf, addr, 4);
- 	if (ret) {
- 		if (err_ret)
- 			*err_ret = ret;
- 		return 0xFFFFFFFF;
- 	}
- 
--	return le32_to_cpup((__le32 *)func->tmpbuf);
-+	return le32_to_cpup((__le32 *)func->core_tmpbuf);
- }
- EXPORT_SYMBOL_GPL(sdio_readl);
- 
-@@ -608,9 +608,9 @@ void sdio_writel(struct sdio_func *func,
- {
- 	int ret;
- 
--	*(__le32 *)func->tmpbuf = cpu_to_le32(b);
-+	*(__le32 *)func->core_tmpbuf = cpu_to_le32(b);
- 
--	ret = sdio_memcpy_toio(func, addr, func->tmpbuf, 4);
-+	ret = sdio_memcpy_toio(func, addr, func->core_tmpbuf, 4);
- 	if (err_ret)
- 		*err_ret = ret;
- }
---- a/include/linux/mmc/sdio_func.h
-+++ b/include/linux/mmc/sdio_func.h
-@@ -53,12 +53,21 @@ struct sdio_func {
- 	unsigned int		state;		/* function state */
- #define SDIO_STATE_PRESENT	(1<<0)		/* present in sysfs */
- 
--	u8			*tmpbuf;	/* DMA:able scratch buffer */
-+#ifndef __GENKSYMS__
-+	u8			pad_tmpbuf[4];
-+#else
-+	u8			tmpbuf[4];
-+#endif
- 
- 	unsigned		num_info;	/* number of info strings */
- 	const char		**info;		/* info strings */
- 
- 	struct sdio_func_tuple *tuples;
-+
-+#ifndef __GENKSYMS__
-+	u8			*core_tmpbuf;	/* DMA:able scratch buffer
-+						 * for SDIO core use */
-+#endif
- };
- 
- #define sdio_func_present(f)	((f)->state & SDIO_STATE_PRESENT)
diff --git a/debian/patches/debian/netfilter-nat-avoid-abi-change-in-4.9.63.patch b/debian/patches/debian/netfilter-nat-avoid-abi-change-in-4.9.63.patch
deleted file mode 100644
index 0cee413..0000000
--- a/debian/patches/debian/netfilter-nat-avoid-abi-change-in-4.9.63.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Thu, 16 Nov 2017 21:00:59 +0000
-Subject: netfilter: nat: Avoid ABI change in 4.9.63
-Forwarded: not-needed
-
-Commit e1bf1687740c ("netfilter: nat: Revert "netfilter: nat: convert
-nat bysrc hash to rhashtable") changed the type of
-nf_conn::nat_bysource.  Thankfully the two types are the same size,
-and nothing outside of nf_nat_core touches this field directly.  Hide
-the change from genksyms but add compile-time assertions to make sure
-that this isn't an ABI change.
-
----
---- a/include/net/netfilter/nf_conntrack.h
-+++ b/include/net/netfilter/nf_conntrack.h
-@@ -17,6 +17,7 @@
- #include <linux/bitops.h>
- #include <linux/compiler.h>
- #include <linux/atomic.h>
-+#include <linux/rhashtable.h>
- 
- #include <linux/netfilter/nf_conntrack_tcp.h>
- #include <linux/netfilter/nf_conntrack_dccp.h>
-@@ -100,7 +101,11 @@ struct nf_conn {
- 	possible_net_t ct_net;
- 
- #if IS_ENABLED(CONFIG_NF_NAT)
-+#ifndef __GENKSYMS__
- 	struct hlist_node	nat_bysource;
-+#else
-+	struct rhlist_head	nat_bysource;
-+#endif
- #endif
- 	/* all members below initialized via memset */
- 	u8 __nfct_init_offset[0];
---- a/include/net/netfilter/nf_nat.h
-+++ b/include/net/netfilter/nf_nat.h
-@@ -1,5 +1,6 @@
- #ifndef _NF_NAT_H
- #define _NF_NAT_H
-+#include <linux/rhashtable.h>
- #include <linux/netfilter_ipv4.h>
- #include <linux/netfilter/nf_nat.h>
- #include <net/netfilter/nf_conntrack_tuple.h>
---- a/net/netfilter/nf_nat_core.c
-+++ b/net/netfilter/nf_nat_core.c
-@@ -811,6 +811,11 @@ static int __init nf_nat_init(void)
- {
- 	int ret;
- 
-+	/* bwh: Assert that nat_bysource hasn't changed size or alignment */
-+	BUILD_BUG_ON(sizeof(struct hlist_node) != sizeof(struct rhlist_head));
-+	BUILD_BUG_ON(__alignof__(struct hlist_node) !=
-+		     __alignof__(struct rhlist_head));
-+
- 	/* Leave them the same for the moment. */
- 	nf_nat_htable_size = nf_conntrack_htable_size;
- 
diff --git a/debian/patches/debian/revert-bpf-avoid-false-sharing-of-map-refcount-with-.patch b/debian/patches/debian/revert-bpf-avoid-false-sharing-of-map-refcount-with-.patch
deleted file mode 100644
index 8ee9c4a..0000000
--- a/debian/patches/debian/revert-bpf-avoid-false-sharing-of-map-refcount-with-.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 50a81ed77e0b88330d0f85515022bf4d2c0aebeb Mon Sep 17 00:00:00 2001
-From: Yves-Alexis Perez <corsac at debian.org>
-Date: Fri, 2 Feb 2018 10:40:47 +0100
-Subject: [PATCH] Revert "bpf: avoid false sharing of map refcount with max_entries"
-Forwarded: not-needed
-
-This reverts commit 5cb917aa1f1e03df9a4c29b363e3900d73508fa8 which is commit
-be95a845cc4402272994ce290e3ad928aff06cb9 upstream. This commit heavily
-modifies the bpf_map structure to split it on two cachelines and prevent
-sharing reference counter with other, read-only fields in order to mitigate
-Spectre attacks. This modification changes the ABI, so revert the mitigation
-for now since the infrastructure is not yet complete for Spectre mitigation
-anyway.
-
----
- include/linux/bpf.h | 16 ++++------------
- 1 file changed, 4 insertions(+), 12 deletions(-)
-
-diff --git a/include/linux/bpf.h b/include/linux/bpf.h
-index 7995940d4187..75ffd3b2149e 100644
---- a/include/linux/bpf.h
-+++ b/include/linux/bpf.h
-@@ -36,10 +36,7 @@ struct bpf_map_ops {
- };
- 
- struct bpf_map {
--	/* 1st cacheline with read-mostly members of which some
--	 * are also accessed in fast-path (e.g. ops, max_entries).
--	 */
--	const struct bpf_map_ops *ops ____cacheline_aligned;
-+	atomic_t refcnt;
- 	enum bpf_map_type map_type;
- 	u32 key_size;
- 	u32 value_size;
-@@ -47,15 +44,10 @@ struct bpf_map {
- 	u32 map_flags;
- 	u32 pages;
- 	bool unpriv_array;
--	/* 7 bytes hole */
--
--	/* 2nd cacheline with misc members to avoid false sharing
--	 * particularly with refcounting.
--	 */
--	struct user_struct *user ____cacheline_aligned;
--	atomic_t refcnt;
--	atomic_t usercnt;
-+	struct user_struct *user;
-+	const struct bpf_map_ops *ops;
- 	struct work_struct work;
-+	atomic_t usercnt;
- };
- 
- struct bpf_map_type_list {
--- 
-2.15.1
-
diff --git a/debian/patches/debian/revert-bpf-one-perf-event-close-won-t-free-bpf-program-atta.patch b/debian/patches/debian/revert-bpf-one-perf-event-close-won-t-free-bpf-program-atta.patch
deleted file mode 100644
index 1602815..0000000
--- a/debian/patches/debian/revert-bpf-one-perf-event-close-won-t-free-bpf-program-atta.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Thu, 26 Oct 2017 22:38:57 +0200
-Subject: Revert "bpf: one perf event close won't free bpf program attached ..."
-Forwarded: not-needed
-
-This reverts commit dcc738d393156dd29ed961ecefe13d96ed5f782f, which was
-commit ec9dd352d591f0c90402ec67a317c1ed4fb2e638 upstream.  It introduces
-an ABI break that's not easily avoidable.  The bug it fixes doesn't seem
-to have any security impact.
-
----
---- a/include/linux/trace_events.h
-+++ b/include/linux/trace_events.h
-@@ -273,7 +273,6 @@ struct trace_event_call {
- 	int				perf_refcount;
- 	struct hlist_head __percpu	*perf_events;
- 	struct bpf_prog			*prog;
--	struct perf_event		*bpf_prog_owner;
- 
- 	int	(*perf_perm)(struct trace_event_call *,
- 			     struct perf_event *);
---- a/kernel/events/core.c
-+++ b/kernel/events/core.c
-@@ -7876,7 +7876,6 @@ static int perf_event_set_bpf_prog(struc
- 		}
- 	}
- 	event->tp_event->prog = prog;
--	event->tp_event->bpf_prog_owner = event;
- 
- 	return 0;
- }
-@@ -7891,7 +7890,7 @@ static void perf_event_free_bpf_prog(str
- 		return;
- 
- 	prog = event->tp_event->prog;
--	if (prog && event->tp_event->bpf_prog_owner == event) {
-+	if (prog) {
- 		event->tp_event->prog = NULL;
- 		bpf_prog_put(prog);
- 	}
diff --git a/debian/patches/debian/revert-crypto-poly1305-remove-setkey-method.patch b/debian/patches/debian/revert-crypto-poly1305-remove-setkey-method.patch
deleted file mode 100644
index 244a9f0..0000000
--- a/debian/patches/debian/revert-crypto-poly1305-remove-setkey-method.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From cf8534500a617ea07cae79458d4f99e509e11475 Mon Sep 17 00:00:00 2001
-From: Yves-Alexis Perez <corsac at debian.org>
-Date: Sat, 17 Feb 2018 18:01:41 +0100
-Subject: [PATCH] Revert "crypto: poly1305 - remove ->setkey() method"
-Forwarded: Not needed
-
-This reverts commit b93728341fb72fe0cf7ab24ada232ce0273e92db which is
-commit a16e772e664b9a261424107784804cffc8894977 upstream. Removing an
-exported function is an ABI break, so just revert the patch for now in
-case there are external users out there.
----
- arch/x86/crypto/poly1305_glue.c |  1 +
- crypto/poly1305_generic.c       | 17 ++++++++++++-----
- include/crypto/poly1305.h       |  2 ++
- 3 files changed, 15 insertions(+), 5 deletions(-)
-
-diff --git a/arch/x86/crypto/poly1305_glue.c b/arch/x86/crypto/poly1305_glue.c
-index 28c372003e44..e32142bc071d 100644
---- a/arch/x86/crypto/poly1305_glue.c
-+++ b/arch/x86/crypto/poly1305_glue.c
-@@ -164,6 +164,7 @@ static struct shash_alg alg = {
- 	.init		= poly1305_simd_init,
- 	.update		= poly1305_simd_update,
- 	.final		= crypto_poly1305_final,
-+	.setkey		= crypto_poly1305_setkey,
- 	.descsize	= sizeof(struct poly1305_simd_desc_ctx),
- 	.base		= {
- 		.cra_name		= "poly1305",
-diff --git a/crypto/poly1305_generic.c b/crypto/poly1305_generic.c
-index bca99238948f..2df9835dfbc0 100644
---- a/crypto/poly1305_generic.c
-+++ b/crypto/poly1305_generic.c
-@@ -51,6 +51,17 @@ int crypto_poly1305_init(struct shash_desc *desc)
- }
- EXPORT_SYMBOL_GPL(crypto_poly1305_init);
- 
-+int crypto_poly1305_setkey(struct crypto_shash *tfm,
-+			   const u8 *key, unsigned int keylen)
-+{
-+	/* Poly1305 requires a unique key for each tag, which implies that
-+	 * we can't set it on the tfm that gets accessed by multiple users
-+	 * simultaneously. Instead we expect the key as the first 32 bytes in
-+	 * the update() call. */
-+	return -ENOTSUPP;
-+}
-+EXPORT_SYMBOL_GPL(crypto_poly1305_setkey);
-+
- static void poly1305_setrkey(struct poly1305_desc_ctx *dctx, const u8 *key)
- {
- 	/* r &= 0xffffffc0ffffffc0ffffffc0fffffff */
-@@ -69,11 +80,6 @@ static void poly1305_setskey(struct poly1305_desc_ctx *dctx, const u8 *key)
- 	dctx->s[3] = le32_to_cpuvp(key + 12);
- }
- 
--/*
-- * Poly1305 requires a unique key for each tag, which implies that we can't set
-- * it on the tfm that gets accessed by multiple users simultaneously. Instead we
-- * expect the key as the first 32 bytes in the update() call.
-- */
- unsigned int crypto_poly1305_setdesckey(struct poly1305_desc_ctx *dctx,
- 					const u8 *src, unsigned int srclen)
- {
-@@ -279,6 +285,7 @@ static struct shash_alg poly1305_alg = {
- 	.init		= crypto_poly1305_init,
- 	.update		= crypto_poly1305_update,
- 	.final		= crypto_poly1305_final,
-+	.setkey		= crypto_poly1305_setkey,
- 	.descsize	= sizeof(struct poly1305_desc_ctx),
- 	.base		= {
- 		.cra_name		= "poly1305",
-diff --git a/include/crypto/poly1305.h b/include/crypto/poly1305.h
-index d586f741cab5..894df59b74e4 100644
---- a/include/crypto/poly1305.h
-+++ b/include/crypto/poly1305.h
-@@ -30,6 +30,8 @@ struct poly1305_desc_ctx {
- };
- 
- int crypto_poly1305_init(struct shash_desc *desc);
-+int crypto_poly1305_setkey(struct crypto_shash *tfm,
-+			   const u8 *key, unsigned int keylen);
- unsigned int crypto_poly1305_setdesckey(struct poly1305_desc_ctx *dctx,
- 					const u8 *src, unsigned int srclen);
- int crypto_poly1305_update(struct shash_desc *desc,
--- 
-2.16.1
-
diff --git a/debian/patches/debian/revert-dma-fence-Introduce-drm_fence_set_error-helpe.patch b/debian/patches/debian/revert-dma-fence-Introduce-drm_fence_set_error-helpe.patch
deleted file mode 100644
index 3d928aa..0000000
--- a/debian/patches/debian/revert-dma-fence-Introduce-drm_fence_set_error-helpe.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 2eac1dd4de9fdeb3591cc0b38b700f49ddd34275 Mon Sep 17 00:00:00 2001
-From: Yves-Alexis Perez <corsac at debian.org>
-Date: Sun, 7 Jan 2018 13:36:38 +0100
-Subject: [PATCH] Revert "dma-fence: Introduce drm_fence_set_error() helper"
-
-This reverts commit f5e0724e76c2c8efb4d3dc43c24228b409bbbfe9 (commit
-a009e975da5c7d42a7f5eaadc54946eb5f76c9af) which changes a field inside
-the struct fence.
----
- drivers/dma-buf/fence.c |  2 +-
- include/linux/fence.h   | 30 +++++-------------------------
- 2 files changed, 6 insertions(+), 26 deletions(-)
-
-diff --git a/drivers/dma-buf/fence.c b/drivers/dma-buf/fence.c
-index 04bf29808200..c7a0eefb93ab 100644
---- a/drivers/dma-buf/fence.c
-+++ b/drivers/dma-buf/fence.c
-@@ -551,7 +551,7 @@ fence_init(struct fence *fence, const struct fence_ops *ops,
- 	fence->context = context;
- 	fence->seqno = seqno;
- 	fence->flags = 0UL;
--	fence->error = 0;
-+	fence->status = 0;
- 
- 	trace_fence_init(fence);
- }
-diff --git a/include/linux/fence.h b/include/linux/fence.h
-index 9bb2c0c97a21..2dfed6957b61 100644
---- a/include/linux/fence.h
-+++ b/include/linux/fence.h
-@@ -47,7 +47,7 @@ struct fence_cb;
-  * can be compared to decide which fence would be signaled later.
-  * @flags: A mask of FENCE_FLAG_* defined below
-  * @timestamp: Timestamp when the fence was signaled.
-- * @error: Optional, only valid if < 0, must be set before calling
-+ * @status: Optional, only valid if < 0, must be set before calling
-  * fence_signal, indicates that the fence has completed with an error.
-  *
-  * the flags member must be manipulated and read using the appropriate
-@@ -79,7 +79,7 @@ struct fence {
- 	unsigned seqno;
- 	unsigned long flags;
- 	ktime_t timestamp;
--	int error;
-+	int status;
- };
- 
- enum fence_flag_bits {
-@@ -132,7 +132,7 @@ struct fence_cb {
-  * or some failure occurred that made it impossible to enable
-  * signaling. True indicates successful enabling.
-  *
-- * fence->error may be set in enable_signaling, but only when false is
-+ * fence->status may be set in enable_signaling, but only when false is
-  * returned.
-  *
-  * Calling fence_signal before enable_signaling is called allows
-@@ -144,7 +144,7 @@ struct fence_cb {
-  * the second time will be a noop since it was already signaled.
-  *
-  * Notes on signaled:
-- * May set fence->error if returning true.
-+ * May set fence->status if returning true.
-  *
-  * Notes on wait:
-  * Must not be NULL, set to fence_default_wait for default implementation.
-@@ -351,33 +351,13 @@ static inline struct fence *fence_later(struct fence *f1, struct fence *f2)
- static inline int fence_get_status_locked(struct fence *fence)
- {
- 	if (fence_is_signaled_locked(fence))
--		return fence->error ?: 1;
-+		return fence->status < 0 ? fence->status : 1;
- 	else
- 		return 0;
- }
- 
- int fence_get_status(struct fence *fence);
- 
--/**
-- * fence_set_error - flag an error condition on the fence
-- * @fence: [in]	the fence
-- * @error: [in]	the error to store
-- *
-- * Drivers can supply an optional error status condition before they signal
-- * the fence, to indicate that the fence was completed due to an error
-- * rather than success. This must be set before signaling (so that the value
-- * is visible before any waiters on the signal callback are woken). This
-- * helper exists to help catching erroneous setting of #fence.error.
-- */
--static inline void fence_set_error(struct fence *fence,
--				       int error)
--{
--	BUG_ON(test_bit(FENCE_FLAG_SIGNALED_BIT, &fence->flags));
--	BUG_ON(error >= 0 || error < -MAX_ERRNO);
--
--	fence->error = error;
--}
--
- signed long fence_wait_timeout(struct fence *, bool intr, signed long timeout);
- signed long fence_wait_any_timeout(struct fence **fences, uint32_t count,
- 				   bool intr, signed long timeout);
--- 
-2.15.1
-
diff --git a/debian/patches/debian/revert-lib-genalloc.c-make-the-avail-variable-an-ato.patch b/debian/patches/debian/revert-lib-genalloc.c-make-the-avail-variable-an-ato.patch
deleted file mode 100644
index d694bfa..0000000
--- a/debian/patches/debian/revert-lib-genalloc.c-make-the-avail-variable-an-ato.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 59c408f070056ac46a30b3ef91e92acf6e25fba7 Mon Sep 17 00:00:00 2001
-From: Yves-Alexis Perez <corsac at debian.org>
-Date: Sat, 6 Jan 2018 21:47:10 +0100
-Subject: [PATCH] Revert "lib/genalloc.c: make the avail variable an atomic_long_t"
-Forwarded: not-needed
-
-This reverts commit a77c116075936faa6e8b8622e22acc9cbf47fe9e which is
-commit 36a3d1dd4e16bcd0d2ddfb4a2ec7092f0ae0d931 upsream. It converts the
-`avail' field in struct gen_pool_chunk' to an atomic_long, causing an
-ABI breaks.
----
- include/linux/genalloc.h |  3 +--
- lib/genalloc.c           | 10 +++++-----
- 2 files changed, 6 insertions(+), 7 deletions(-)
-
-diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h
-index 206fe3bccccc..29d4385903d4 100644
---- a/include/linux/genalloc.h
-+++ b/include/linux/genalloc.h
-@@ -32,7 +32,6 @@
- 
- #include <linux/types.h>
- #include <linux/spinlock_types.h>
--#include <linux/atomic.h>
- 
- struct device;
- struct device_node;
-@@ -71,7 +70,7 @@ struct gen_pool {
-  */
- struct gen_pool_chunk {
- 	struct list_head next_chunk;	/* next chunk in pool */
--	atomic_long_t avail;
-+	atomic_t avail;
- 	phys_addr_t phys_addr;		/* physical starting address of memory chunk */
- 	unsigned long start_addr;	/* start address of memory chunk */
- 	unsigned long end_addr;		/* end address of memory chunk (inclusive) */
-diff --git a/lib/genalloc.c b/lib/genalloc.c
-index ca06adc4f445..144fe6b1a03e 100644
---- a/lib/genalloc.c
-+++ b/lib/genalloc.c
-@@ -194,7 +194,7 @@ int gen_pool_add_virt(struct gen_pool *pool, unsigned long virt, phys_addr_t phy
- 	chunk->phys_addr = phys;
- 	chunk->start_addr = virt;
- 	chunk->end_addr = virt + size - 1;
--	atomic_long_set(&chunk->avail, size);
-+	atomic_set(&chunk->avail, size);
- 
- 	spin_lock(&pool->lock);
- 	list_add_rcu(&chunk->next_chunk, &pool->chunks);
-@@ -304,7 +304,7 @@ unsigned long gen_pool_alloc_algo(struct gen_pool *pool, size_t size,
- 	nbits = (size + (1UL << order) - 1) >> order;
- 	rcu_read_lock();
- 	list_for_each_entry_rcu(chunk, &pool->chunks, next_chunk) {
--		if (size > atomic_long_read(&chunk->avail))
-+		if (size > atomic_read(&chunk->avail))
- 			continue;
- 
- 		start_bit = 0;
-@@ -324,7 +324,7 @@ unsigned long gen_pool_alloc_algo(struct gen_pool *pool, size_t size,
- 
- 		addr = chunk->start_addr + ((unsigned long)start_bit << order);
- 		size = nbits << order;
--		atomic_long_sub(size, &chunk->avail);
-+		atomic_sub(size, &chunk->avail);
- 		break;
- 	}
- 	rcu_read_unlock();
-@@ -390,7 +390,7 @@ void gen_pool_free(struct gen_pool *pool, unsigned long addr, size_t size)
- 			remain = bitmap_clear_ll(chunk->bits, start_bit, nbits);
- 			BUG_ON(remain);
- 			size = nbits << order;
--			atomic_long_add(size, &chunk->avail);
-+			atomic_add(size, &chunk->avail);
- 			rcu_read_unlock();
- 			return;
- 		}
-@@ -464,7 +464,7 @@ size_t gen_pool_avail(struct gen_pool *pool)
- 
- 	rcu_read_lock();
- 	list_for_each_entry_rcu(chunk, &pool->chunks, next_chunk)
--		avail += atomic_long_read(&chunk->avail);
-+		avail += atomic_read(&chunk->avail);
- 	rcu_read_unlock();
- 	return avail;
- }
--- 
-2.15.1
-
diff --git a/debian/patches/debian/revert-mm-fix-100-CPU-kswapd-busyloop-on-unreclaimab.patch b/debian/patches/debian/revert-mm-fix-100-CPU-kswapd-busyloop-on-unreclaimab.patch
deleted file mode 100644
index 5b72794..0000000
--- a/debian/patches/debian/revert-mm-fix-100-CPU-kswapd-busyloop-on-unreclaimab.patch
+++ /dev/null
@@ -1,244 +0,0 @@
-From 41080b302b0434b448531d75ec61b7df900511bc Mon Sep 17 00:00:00 2001
-From: Yves-Alexis Perez <corsac at debian.org>
-Date: Fri, 2 Feb 2018 09:46:54 +0100
-Subject: [PATCH] Revert "mm: fix 100% CPU kswapd busyloop on unreclaimable nodes"
-Forwarded: not-needed
-
-This reverts commit 19a7db1e2ef38865a704ea4dfd178b02a8026ada which is
-c73322d098e4b6f5f0f0fa1330bf57e218775539 upstream. By adding a new field into
-struct pglist_data it changes the ABI. Since the problem doesn't seem to
-occur often, revert the change for now.
----
- include/linux/mmzone.h |  2 --
- mm/internal.h          |  6 ------
- mm/page_alloc.c        |  9 +++++++--
- mm/vmscan.c            | 47 +++++++++++++++--------------------------------
- mm/vmstat.c            |  2 +-
- 5 files changed, 23 insertions(+), 43 deletions(-)
-
-diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
-index e3d7754f25f0..490f5a83f947 100644
---- a/include/linux/mmzone.h
-+++ b/include/linux/mmzone.h
-@@ -633,8 +633,6 @@ typedef struct pglist_data {
- 	int kswapd_order;
- 	enum zone_type kswapd_classzone_idx;
- 
--	int kswapd_failures;		/* Number of 'reclaimed == 0' runs */
--
- #ifdef CONFIG_COMPACTION
- 	int kcompactd_max_order;
- 	enum zone_type kcompactd_classzone_idx;
-diff --git a/mm/internal.h b/mm/internal.h
-index 3e2d01694747..34a5459e5989 100644
---- a/mm/internal.h
-+++ b/mm/internal.h
-@@ -73,12 +73,6 @@ static inline void set_page_refcounted(struct page *page)
- 
- extern unsigned long highest_memmap_pfn;
- 
--/*
-- * Maximum number of reclaim retries without progress before the OOM
-- * killer is consider the only way forward.
-- */
--#define MAX_RECLAIM_RETRIES 16
--
- /*
-  * in mm/vmscan.c:
-  */
-diff --git a/mm/page_alloc.c b/mm/page_alloc.c
-index 94018ea5f935..546713b3f762 100644
---- a/mm/page_alloc.c
-+++ b/mm/page_alloc.c
-@@ -3421,6 +3421,12 @@ bool gfp_pfmemalloc_allowed(gfp_t gfp_mask)
- 	return false;
- }
- 
-+/*
-+ * Maximum number of reclaim retries without any progress before OOM killer
-+ * is consider as the only way to move forward.
-+ */
-+#define MAX_RECLAIM_RETRIES 16
-+
- /*
-  * Checks whether it makes sense to retry the reclaim to make a forward progress
-  * for the given allocation request.
-@@ -4379,8 +4385,7 @@ void show_free_areas(unsigned int filter)
- 			K(node_page_state(pgdat, NR_WRITEBACK_TEMP)),
- 			K(node_page_state(pgdat, NR_UNSTABLE_NFS)),
- 			node_page_state(pgdat, NR_PAGES_SCANNED),
--			pgdat->kswapd_failures >= MAX_RECLAIM_RETRIES ?
--				"yes" : "no");
-+			!pgdat_reclaimable(pgdat) ? "yes" : "no");
- 	}
- 
- 	for_each_populated_zone(zone) {
-diff --git a/mm/vmscan.c b/mm/vmscan.c
-index f118dc23f662..30a88b945a44 100644
---- a/mm/vmscan.c
-+++ b/mm/vmscan.c
-@@ -2606,15 +2606,6 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc)
- 	} while (should_continue_reclaim(pgdat, sc->nr_reclaimed - nr_reclaimed,
- 					 sc->nr_scanned - nr_scanned, sc));
- 
--	/*
--	 * Kswapd gives up on balancing particular nodes after too
--	 * many failures to reclaim anything from them and goes to
--	 * sleep. On reclaim progress, reset the failure counter. A
--	 * successful direct reclaim run will revive a dormant kswapd.
--	 */
--	if (reclaimable)
--		pgdat->kswapd_failures = 0;
--
- 	return reclaimable;
- }
- 
-@@ -2689,6 +2680,10 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc)
- 						 GFP_KERNEL | __GFP_HARDWALL))
- 				continue;
- 
-+			if (sc->priority != DEF_PRIORITY &&
-+			    !pgdat_reclaimable(zone->zone_pgdat))
-+				continue;	/* Let kswapd poll it */
-+
- 			/*
- 			 * If we already have plenty of memory free for
- 			 * compaction in this zone, don't free any more.
-@@ -2825,7 +2820,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
- 	return 0;
- }
- 
--static bool allow_direct_reclaim(pg_data_t *pgdat)
-+static bool pfmemalloc_watermark_ok(pg_data_t *pgdat)
- {
- 	struct zone *zone;
- 	unsigned long pfmemalloc_reserve = 0;
-@@ -2833,9 +2828,6 @@ static bool allow_direct_reclaim(pg_data_t *pgdat)
- 	int i;
- 	bool wmark_ok;
- 
--	if (pgdat->kswapd_failures >= MAX_RECLAIM_RETRIES)
--		return true;
--
- 	for (i = 0; i <= ZONE_NORMAL; i++) {
- 		zone = &pgdat->node_zones[i];
- 		if (!managed_zone(zone) ||
-@@ -2916,7 +2908,7 @@ static bool throttle_direct_reclaim(gfp_t gfp_mask, struct zonelist *zonelist,
- 
- 		/* Throttle based on the first usable node */
- 		pgdat = zone->zone_pgdat;
--		if (allow_direct_reclaim(pgdat))
-+		if (pfmemalloc_watermark_ok(pgdat))
- 			goto out;
- 		break;
- 	}
-@@ -2938,14 +2930,14 @@ static bool throttle_direct_reclaim(gfp_t gfp_mask, struct zonelist *zonelist,
- 	 */
- 	if (!(gfp_mask & __GFP_FS)) {
- 		wait_event_interruptible_timeout(pgdat->pfmemalloc_wait,
--			allow_direct_reclaim(pgdat), HZ);
-+			pfmemalloc_watermark_ok(pgdat), HZ);
- 
- 		goto check_pending;
- 	}
- 
- 	/* Throttle until kswapd wakes the process */
- 	wait_event_killable(zone->zone_pgdat->pfmemalloc_wait,
--		allow_direct_reclaim(pgdat));
-+		pfmemalloc_watermark_ok(pgdat));
- 
- check_pending:
- 	if (fatal_signal_pending(current))
-@@ -3124,7 +3116,7 @@ static bool prepare_kswapd_sleep(pg_data_t *pgdat, int order, int classzone_idx)
- 
- 	/*
- 	 * The throttled processes are normally woken up in balance_pgdat() as
--	 * soon as allow_direct_reclaim() is true. But there is a potential
-+	 * soon as pfmemalloc_watermark_ok() is true. But there is a potential
- 	 * race between when kswapd checks the watermarks and a process gets
- 	 * throttled. There is also a potential race if processes get
- 	 * throttled, kswapd wakes, a large process exits thereby balancing the
-@@ -3138,10 +3130,6 @@ static bool prepare_kswapd_sleep(pg_data_t *pgdat, int order, int classzone_idx)
- 	if (waitqueue_active(&pgdat->pfmemalloc_wait))
- 		wake_up_all(&pgdat->pfmemalloc_wait);
- 
--	/* Hopeless node, leave it to direct reclaim */
--	if (pgdat->kswapd_failures >= MAX_RECLAIM_RETRIES)
--		return true;
--
- 	for (i = 0; i <= classzone_idx; i++) {
- 		struct zone *zone = pgdat->node_zones + i;
- 
-@@ -3228,9 +3216,9 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx)
- 	count_vm_event(PAGEOUTRUN);
- 
- 	do {
--		unsigned long nr_reclaimed = sc.nr_reclaimed;
- 		bool raise_priority = true;
- 
-+		sc.nr_reclaimed = 0;
- 		sc.reclaim_idx = classzone_idx;
- 
- 		/*
-@@ -3309,7 +3297,7 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx)
- 		 * able to safely make forward progress. Wake them
- 		 */
- 		if (waitqueue_active(&pgdat->pfmemalloc_wait) &&
--				allow_direct_reclaim(pgdat))
-+				pfmemalloc_watermark_ok(pgdat))
- 			wake_up_all(&pgdat->pfmemalloc_wait);
- 
- 		/* Check if kswapd should be suspending */
-@@ -3320,14 +3308,10 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx)
- 		 * Raise priority if scanning rate is too low or there was no
- 		 * progress in reclaiming pages
- 		 */
--		nr_reclaimed = sc.nr_reclaimed - nr_reclaimed;
--		if (raise_priority || !nr_reclaimed)
-+		if (raise_priority || !sc.nr_reclaimed)
- 			sc.priority--;
- 	} while (sc.priority >= 1);
- 
--	if (!sc.nr_reclaimed)
--		pgdat->kswapd_failures++;
--
- out:
- 	/*
- 	 * Return the order kswapd stopped reclaiming at as
-@@ -3527,10 +3511,6 @@ void wakeup_kswapd(struct zone *zone, int order, enum zone_type classzone_idx)
- 	if (!waitqueue_active(&pgdat->kswapd_wait))
- 		return;
- 
--	/* Hopeless node, leave it to direct reclaim */
--	if (pgdat->kswapd_failures >= MAX_RECLAIM_RETRIES)
--		return;
--
- 	/* Only wake kswapd if all zones are unbalanced */
- 	for (z = 0; z <= classzone_idx; z++) {
- 		zone = pgdat->node_zones + z;
-@@ -3801,6 +3781,9 @@ int node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned int order)
- 	    sum_zone_node_page_state(pgdat->node_id, NR_SLAB_RECLAIMABLE) <= pgdat->min_slab_pages)
- 		return NODE_RECLAIM_FULL;
- 
-+	if (!pgdat_reclaimable(pgdat))
-+		return NODE_RECLAIM_FULL;
-+
- 	/*
- 	 * Do not scan if the allocation should not be delayed.
- 	 */
-diff --git a/mm/vmstat.c b/mm/vmstat.c
-index 3863b5d6d598..6a088df04b29 100644
---- a/mm/vmstat.c
-+++ b/mm/vmstat.c
-@@ -1421,7 +1421,7 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
- 		   "\n  node_unreclaimable:  %u"
- 		   "\n  start_pfn:           %lu"
- 		   "\n  node_inactive_ratio: %u",
--		   pgdat->kswapd_failures >= MAX_RECLAIM_RETRIES,
-+		   !pgdat_reclaimable(zone->zone_pgdat),
- 		   zone->zone_start_pfn,
- 		   zone->zone_pgdat->inactive_ratio);
- 	seq_putc(m, '\n');
--- 
-2.15.1
-
diff --git a/debian/patches/debian/revert-mm-hugetlbfs-introduce-split-to-vm_operations.patch b/debian/patches/debian/revert-mm-hugetlbfs-introduce-split-to-vm_operations.patch
deleted file mode 100644
index d8b4d9a..0000000
--- a/debian/patches/debian/revert-mm-hugetlbfs-introduce-split-to-vm_operations.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From ab8170a378dae140de23b93116c35658de16edbc Mon Sep 17 00:00:00 2001
-From: Yves-Alexis Perez <corsac at debian.org>
-Date: Sun, 7 Jan 2018 14:50:46 +0100
-Subject: [PATCH] Revert "mm, hugetlbfs: introduce ->split() to vm_operations_struct"
-Forwarded: not-needed
-
-This reverts commit cebe139e5712d6925a9b70f3769df6818b6c14dd, which was
-commit 31383c6865a578834dd953d9dbc88e6b19fe3997 upstream. It introduces
-an ABI break and the depending commits are not in 4.9.
-
----
- include/linux/mm.h | 1 -
- mm/hugetlb.c       | 8 --------
- mm/mmap.c          | 8 +++-----
- 3 files changed, 3 insertions(+), 14 deletions(-)
-
-diff --git a/include/linux/mm.h b/include/linux/mm.h
-index 2217e2f18247..6c9e1ad12831 100644
---- a/include/linux/mm.h
-+++ b/include/linux/mm.h
-@@ -347,7 +347,6 @@ struct fault_env {
- struct vm_operations_struct {
- 	void (*open)(struct vm_area_struct * area);
- 	void (*close)(struct vm_area_struct * area);
--	int (*split)(struct vm_area_struct * area, unsigned long addr);
- 	int (*mremap)(struct vm_area_struct * area);
- 	int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
- 	int (*pmd_fault)(struct vm_area_struct *, unsigned long address,
-diff --git a/mm/hugetlb.c b/mm/hugetlb.c
-index 6ff65c405243..65c36acf8a6b 100644
---- a/mm/hugetlb.c
-+++ b/mm/hugetlb.c
-@@ -3135,13 +3135,6 @@ static void hugetlb_vm_op_close(struct vm_area_struct *vma)
- 	}
- }
- 
--static int hugetlb_vm_op_split(struct vm_area_struct *vma, unsigned long addr)
--{
--	if (addr & ~(huge_page_mask(hstate_vma(vma))))
--		return -EINVAL;
--	return 0;
--}
--
- /*
-  * We cannot handle pagefaults against hugetlb pages at all.  They cause
-  * handle_mm_fault() to try to instantiate regular-sized pages in the
-@@ -3158,7 +3151,6 @@ const struct vm_operations_struct hugetlb_vm_ops = {
- 	.fault = hugetlb_vm_op_fault,
- 	.open = hugetlb_vm_op_open,
- 	.close = hugetlb_vm_op_close,
--	.split = hugetlb_vm_op_split,
- };
- 
- static pte_t make_huge_pte(struct vm_area_struct *vma, struct page *page,
-diff --git a/mm/mmap.c b/mm/mmap.c
-index 5b48adb4aa56..75d263bd8739 100644
---- a/mm/mmap.c
-+++ b/mm/mmap.c
-@@ -2538,11 +2538,9 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
- 	struct vm_area_struct *new;
- 	int err;
- 
--	if (vma->vm_ops && vma->vm_ops->split) {
--		err = vma->vm_ops->split(vma, addr);
--		if (err)
--			return err;
--	}
-+	if (is_vm_hugetlb_page(vma) && (addr &
-+					~(huge_page_mask(hstate_vma(vma)))))
-+		return -EINVAL;
- 
- 	new = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
- 	if (!new)
--- 
-2.15.1
-
diff --git a/debian/patches/debian/revert-phy-increase-size-of-mii_bus_id_size-and-bus_id.patch b/debian/patches/debian/revert-phy-increase-size-of-mii_bus_id_size-and-bus_id.patch
deleted file mode 100644
index add8d16..0000000
--- a/debian/patches/debian/revert-phy-increase-size-of-mii_bus_id_size-and-bus_id.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Wed, 29 Nov 2017 02:31:04 +0000
-Subject: Revert "phy: increase size of MII_BUS_ID_SIZE and bus_id"
-Forwarded: not-needed
-
-This reverts commit a88a90128888dba8754db5a194dba84e9703b93f, which
-was commit 4567d686f5c6d955e57a3afa1741944c1e7f4033 upstream.  I don't
-want to change ABI for this.
-
----
---- a/include/linux/phy.h
-+++ b/include/linux/phy.h
-@@ -142,7 +142,11 @@ static inline const char *phy_modes(phy_
- /* Used when trying to connect to a specific phy (mii bus id:phy device id) */
- #define PHY_ID_FMT "%s:%02x"
- 
--#define MII_BUS_ID_SIZE	61
-+/*
-+ * Need to be a little smaller than phydev->dev.bus_id to leave room
-+ * for the ":%02x"
-+ */
-+#define MII_BUS_ID_SIZE	(20 - 3)
- 
- /* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit
-    IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */
-@@ -598,7 +602,7 @@ struct phy_driver {
- /* A Structure for boards to register fixups with the PHY Lib */
- struct phy_fixup {
- 	struct list_head list;
--	char bus_id[MII_BUS_ID_SIZE + 3];
-+	char bus_id[20];
- 	u32 phy_uid;
- 	u32 phy_uid_mask;
- 	int (*run)(struct phy_device *phydev);
diff --git a/debian/patches/debian/revert-sched-rt-Simplify-the-IPI-based-RT-balancing-.patch b/debian/patches/debian/revert-sched-rt-Simplify-the-IPI-based-RT-balancing-.patch
deleted file mode 100644
index 275a42d..0000000
--- a/debian/patches/debian/revert-sched-rt-Simplify-the-IPI-based-RT-balancing-.patch
+++ /dev/null
@@ -1,398 +0,0 @@
-From 3a7cd37c72cf0cd3f7ae82237ce71ee2c88df147 Mon Sep 17 00:00:00 2001
-From: Yves-Alexis Perez <corsac at debian.org>
-Date: Tue, 23 Jan 2018 08:23:44 +0100
-Subject: [PATCH] Revert "sched/rt: Simplify the IPI based RT balancing logic"
-
-This reverts commit 1c37ff78298a6b6063649123356a312e1cce12ca which is
-commit 4bdced5c9a2922521e325896a7bbbf0132c94e56 upstream. This commit
-removes two fields from struct rt_rq which is used in struct
-sched_rt_entity, used in turn in struct task_struct. This turns into a
-large ABI change for an enhancement fix, so revert that for now.
-
----
- kernel/sched/core.c  |   6 --
- kernel/sched/rt.c    | 235 ++++++++++++++++++++++++++-------------------------
- kernel/sched/sched.h |  24 ++----
- 3 files changed, 127 insertions(+), 138 deletions(-)
-
-diff --git a/kernel/sched/core.c b/kernel/sched/core.c
-index e5066955cc3a..d748d4e5455d 100644
---- a/kernel/sched/core.c
-+++ b/kernel/sched/core.c
-@@ -5877,12 +5877,6 @@ static int init_rootdomain(struct root_domain *rd)
- 	if (!zalloc_cpumask_var(&rd->rto_mask, GFP_KERNEL))
- 		goto free_dlo_mask;
- 
--#ifdef HAVE_RT_PUSH_IPI
--	rd->rto_cpu = -1;
--	raw_spin_lock_init(&rd->rto_lock);
--	init_irq_work(&rd->rto_push_work, rto_push_irq_work_func);
--#endif
--
- 	init_dl_bw(&rd->dl_bw);
- 	if (cpudl_init(&rd->cpudl) != 0)
- 		goto free_dlo_mask;
-diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
-index 7a360d6f6798..34b1133cbac3 100644
---- a/kernel/sched/rt.c
-+++ b/kernel/sched/rt.c
-@@ -72,6 +72,10 @@ static void start_rt_bandwidth(struct rt_bandwidth *rt_b)
- 	raw_spin_unlock(&rt_b->rt_runtime_lock);
- }
- 
-+#if defined(CONFIG_SMP) && defined(HAVE_RT_PUSH_IPI)
-+static void push_irq_work_func(struct irq_work *work);
-+#endif
-+
- void init_rt_rq(struct rt_rq *rt_rq)
- {
- 	struct rt_prio_array *array;
-@@ -91,6 +95,13 @@ void init_rt_rq(struct rt_rq *rt_rq)
- 	rt_rq->rt_nr_migratory = 0;
- 	rt_rq->overloaded = 0;
- 	plist_head_init(&rt_rq->pushable_tasks);
-+
-+#ifdef HAVE_RT_PUSH_IPI
-+	rt_rq->push_flags = 0;
-+	rt_rq->push_cpu = nr_cpu_ids;
-+	raw_spin_lock_init(&rt_rq->push_lock);
-+	init_irq_work(&rt_rq->push_work, push_irq_work_func);
-+#endif
- #endif /* CONFIG_SMP */
- 	/* We start is dequeued state, because no RT tasks are queued */
- 	rt_rq->rt_queued = 0;
-@@ -1853,166 +1864,160 @@ static void push_rt_tasks(struct rq *rq)
- }
- 
- #ifdef HAVE_RT_PUSH_IPI
--
- /*
-- * When a high priority task schedules out from a CPU and a lower priority
-- * task is scheduled in, a check is made to see if there's any RT tasks
-- * on other CPUs that are waiting to run because a higher priority RT task
-- * is currently running on its CPU. In this case, the CPU with multiple RT
-- * tasks queued on it (overloaded) needs to be notified that a CPU has opened
-- * up that may be able to run one of its non-running queued RT tasks.
-- *
-- * All CPUs with overloaded RT tasks need to be notified as there is currently
-- * no way to know which of these CPUs have the highest priority task waiting
-- * to run. Instead of trying to take a spinlock on each of these CPUs,
-- * which has shown to cause large latency when done on machines with many
-- * CPUs, sending an IPI to the CPUs to have them push off the overloaded
-- * RT tasks waiting to run.
-- *
-- * Just sending an IPI to each of the CPUs is also an issue, as on large
-- * count CPU machines, this can cause an IPI storm on a CPU, especially
-- * if its the only CPU with multiple RT tasks queued, and a large number
-- * of CPUs scheduling a lower priority task at the same time.
-- *
-- * Each root domain has its own irq work function that can iterate over
-- * all CPUs with RT overloaded tasks. Since all CPUs with overloaded RT
-- * tassk must be checked if there's one or many CPUs that are lowering
-- * their priority, there's a single irq work iterator that will try to
-- * push off RT tasks that are waiting to run.
-- *
-- * When a CPU schedules a lower priority task, it will kick off the
-- * irq work iterator that will jump to each CPU with overloaded RT tasks.
-- * As it only takes the first CPU that schedules a lower priority task
-- * to start the process, the rto_start variable is incremented and if
-- * the atomic result is one, then that CPU will try to take the rto_lock.
-- * This prevents high contention on the lock as the process handles all
-- * CPUs scheduling lower priority tasks.
-- *
-- * All CPUs that are scheduling a lower priority task will increment the
-- * rt_loop_next variable. This will make sure that the irq work iterator
-- * checks all RT overloaded CPUs whenever a CPU schedules a new lower
-- * priority task, even if the iterator is in the middle of a scan. Incrementing
-- * the rt_loop_next will cause the iterator to perform another scan.
-+ * The search for the next cpu always starts at rq->cpu and ends
-+ * when we reach rq->cpu again. It will never return rq->cpu.
-+ * This returns the next cpu to check, or nr_cpu_ids if the loop
-+ * is complete.
-  *
-+ * rq->rt.push_cpu holds the last cpu returned by this function,
-+ * or if this is the first instance, it must hold rq->cpu.
-  */
- static int rto_next_cpu(struct rq *rq)
- {
--	struct root_domain *rd = rq->rd;
--	int next;
-+	int prev_cpu = rq->rt.push_cpu;
- 	int cpu;
- 
-+	cpu = cpumask_next(prev_cpu, rq->rd->rto_mask);
-+
- 	/*
--	 * When starting the IPI RT pushing, the rto_cpu is set to -1,
--	 * rt_next_cpu() will simply return the first CPU found in
--	 * the rto_mask.
--	 *
--	 * If rto_next_cpu() is called with rto_cpu is a valid cpu, it
--	 * will return the next CPU found in the rto_mask.
--	 *
--	 * If there are no more CPUs left in the rto_mask, then a check is made
--	 * against rto_loop and rto_loop_next. rto_loop is only updated with
--	 * the rto_lock held, but any CPU may increment the rto_loop_next
--	 * without any locking.
-+	 * If the previous cpu is less than the rq's CPU, then it already
-+	 * passed the end of the mask, and has started from the beginning.
-+	 * We end if the next CPU is greater or equal to rq's CPU.
- 	 */
--	for (;;) {
--
--		/* When rto_cpu is -1 this acts like cpumask_first() */
--		cpu = cpumask_next(rd->rto_cpu, rd->rto_mask);
--
--		rd->rto_cpu = cpu;
--
--		if (cpu < nr_cpu_ids)
--			return cpu;
--
--		rd->rto_cpu = -1;
-+	if (prev_cpu < rq->cpu) {
-+		if (cpu >= rq->cpu)
-+			return nr_cpu_ids;
- 
-+	} else if (cpu >= nr_cpu_ids) {
- 		/*
--		 * ACQUIRE ensures we see the @rto_mask changes
--		 * made prior to the @next value observed.
--		 *
--		 * Matches WMB in rt_set_overload().
-+		 * We passed the end of the mask, start at the beginning.
-+		 * If the result is greater or equal to the rq's CPU, then
-+		 * the loop is finished.
- 		 */
--		next = atomic_read_acquire(&rd->rto_loop_next);
--
--		if (rd->rto_loop == next)
--			break;
--
--		rd->rto_loop = next;
-+		cpu = cpumask_first(rq->rd->rto_mask);
-+		if (cpu >= rq->cpu)
-+			return nr_cpu_ids;
- 	}
-+	rq->rt.push_cpu = cpu;
- 
--	return -1;
-+	/* Return cpu to let the caller know if the loop is finished or not */
-+	return cpu;
- }
- 
--static inline bool rto_start_trylock(atomic_t *v)
-+static int find_next_push_cpu(struct rq *rq)
- {
--	return !atomic_cmpxchg_acquire(v, 0, 1);
--}
-+	struct rq *next_rq;
-+	int cpu;
- 
--static inline void rto_start_unlock(atomic_t *v)
--{
--	atomic_set_release(v, 0);
-+	while (1) {
-+		cpu = rto_next_cpu(rq);
-+		if (cpu >= nr_cpu_ids)
-+			break;
-+		next_rq = cpu_rq(cpu);
-+
-+		/* Make sure the next rq can push to this rq */
-+		if (next_rq->rt.highest_prio.next < rq->rt.highest_prio.curr)
-+			break;
-+	}
-+
-+	return cpu;
- }
- 
-+#define RT_PUSH_IPI_EXECUTING		1
-+#define RT_PUSH_IPI_RESTART		2
-+
- static void tell_cpu_to_push(struct rq *rq)
- {
--	int cpu = -1;
--
--	/* Keep the loop going if the IPI is currently active */
--	atomic_inc(&rq->rd->rto_loop_next);
--
--	/* Only one CPU can initiate a loop at a time */
--	if (!rto_start_trylock(&rq->rd->rto_loop_start))
--		return;
-+	int cpu;
- 
--	raw_spin_lock(&rq->rd->rto_lock);
-+	if (rq->rt.push_flags & RT_PUSH_IPI_EXECUTING) {
-+		raw_spin_lock(&rq->rt.push_lock);
-+		/* Make sure it's still executing */
-+		if (rq->rt.push_flags & RT_PUSH_IPI_EXECUTING) {
-+			/*
-+			 * Tell the IPI to restart the loop as things have
-+			 * changed since it started.
-+			 */
-+			rq->rt.push_flags |= RT_PUSH_IPI_RESTART;
-+			raw_spin_unlock(&rq->rt.push_lock);
-+			return;
-+		}
-+		raw_spin_unlock(&rq->rt.push_lock);
-+	}
- 
--	/*
--	 * The rto_cpu is updated under the lock, if it has a valid cpu
--	 * then the IPI is still running and will continue due to the
--	 * update to loop_next, and nothing needs to be done here.
--	 * Otherwise it is finishing up and an ipi needs to be sent.
--	 */
--	if (rq->rd->rto_cpu < 0)
--		cpu = rto_next_cpu(rq);
-+	/* When here, there's no IPI going around */
- 
--	raw_spin_unlock(&rq->rd->rto_lock);
-+	rq->rt.push_cpu = rq->cpu;
-+	cpu = find_next_push_cpu(rq);
-+	if (cpu >= nr_cpu_ids)
-+		return;
- 
--	rto_start_unlock(&rq->rd->rto_loop_start);
-+	rq->rt.push_flags = RT_PUSH_IPI_EXECUTING;
- 
--	if (cpu >= 0)
--		irq_work_queue_on(&rq->rd->rto_push_work, cpu);
-+	irq_work_queue_on(&rq->rt.push_work, cpu);
- }
- 
- /* Called from hardirq context */
--void rto_push_irq_work_func(struct irq_work *work)
-+static void try_to_push_tasks(void *arg)
- {
--	struct rq *rq;
-+	struct rt_rq *rt_rq = arg;
-+	struct rq *rq, *src_rq;
-+	int this_cpu;
- 	int cpu;
- 
--	rq = this_rq();
-+	this_cpu = rt_rq->push_cpu;
- 
--	/*
--	 * We do not need to grab the lock to check for has_pushable_tasks.
--	 * When it gets updated, a check is made if a push is possible.
--	 */
-+	/* Paranoid check */
-+	BUG_ON(this_cpu != smp_processor_id());
-+
-+	rq = cpu_rq(this_cpu);
-+	src_rq = rq_of_rt_rq(rt_rq);
-+
-+again:
- 	if (has_pushable_tasks(rq)) {
- 		raw_spin_lock(&rq->lock);
--		push_rt_tasks(rq);
-+		push_rt_task(rq);
- 		raw_spin_unlock(&rq->lock);
- 	}
- 
--	raw_spin_lock(&rq->rd->rto_lock);
--
- 	/* Pass the IPI to the next rt overloaded queue */
--	cpu = rto_next_cpu(rq);
-+	raw_spin_lock(&rt_rq->push_lock);
-+	/*
-+	 * If the source queue changed since the IPI went out,
-+	 * we need to restart the search from that CPU again.
-+	 */
-+	if (rt_rq->push_flags & RT_PUSH_IPI_RESTART) {
-+		rt_rq->push_flags &= ~RT_PUSH_IPI_RESTART;
-+		rt_rq->push_cpu = src_rq->cpu;
-+	}
- 
--	raw_spin_unlock(&rq->rd->rto_lock);
-+	cpu = find_next_push_cpu(src_rq);
- 
--	if (cpu < 0)
-+	if (cpu >= nr_cpu_ids)
-+		rt_rq->push_flags &= ~RT_PUSH_IPI_EXECUTING;
-+	raw_spin_unlock(&rt_rq->push_lock);
-+
-+	if (cpu >= nr_cpu_ids)
- 		return;
- 
-+	/*
-+	 * It is possible that a restart caused this CPU to be
-+	 * chosen again. Don't bother with an IPI, just see if we
-+	 * have more to push.
-+	 */
-+	if (unlikely(cpu == rq->cpu))
-+		goto again;
-+
- 	/* Try the next RT overloaded CPU */
--	irq_work_queue_on(&rq->rd->rto_push_work, cpu);
-+	irq_work_queue_on(&rt_rq->push_work, cpu);
-+}
-+
-+static void push_irq_work_func(struct irq_work *work)
-+{
-+	struct rt_rq *rt_rq = container_of(work, struct rt_rq, push_work);
-+
-+	try_to_push_tasks(rt_rq);
- }
- #endif /* HAVE_RT_PUSH_IPI */
- 
-diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
-index cff985feb6e7..ad77d666583c 100644
---- a/kernel/sched/sched.h
-+++ b/kernel/sched/sched.h
-@@ -463,7 +463,7 @@ static inline int rt_bandwidth_enabled(void)
- }
- 
- /* RT IPI pull logic requires IRQ_WORK */
--#if defined(CONFIG_IRQ_WORK) && defined(CONFIG_SMP)
-+#ifdef CONFIG_IRQ_WORK
- # define HAVE_RT_PUSH_IPI
- #endif
- 
-@@ -485,6 +485,12 @@ struct rt_rq {
- 	unsigned long rt_nr_total;
- 	int overloaded;
- 	struct plist_head pushable_tasks;
-+#ifdef HAVE_RT_PUSH_IPI
-+	int push_flags;
-+	int push_cpu;
-+	struct irq_work push_work;
-+	raw_spinlock_t push_lock;
-+#endif
- #endif /* CONFIG_SMP */
- 	int rt_queued;
- 
-@@ -566,19 +572,6 @@ struct root_domain {
- 	struct dl_bw dl_bw;
- 	struct cpudl cpudl;
- 
--#ifdef HAVE_RT_PUSH_IPI
--	/*
--	 * For IPI pull requests, loop across the rto_mask.
--	 */
--	struct irq_work rto_push_work;
--	raw_spinlock_t rto_lock;
--	/* These are only updated and read within rto_lock */
--	int rto_loop;
--	int rto_cpu;
--	/* These atomics are updated outside of a lock */
--	atomic_t rto_loop_next;
--	atomic_t rto_loop_start;
--#endif
- 	/*
- 	 * The "RT overload" flag: it gets set if a CPU has more than
- 	 * one runnable RT task.
-@@ -591,9 +584,6 @@ struct root_domain {
- 
- extern struct root_domain def_root_domain;
- 
--#ifdef HAVE_RT_PUSH_IPI
--extern void rto_push_irq_work_func(struct irq_work *work);
--#endif
- #endif /* CONFIG_SMP */
- 
- /*
--- 
-2.15.1
-
diff --git a/debian/patches/debian/revert-sched-rt-Up-the-root-domain-ref-count-when-pa.patch b/debian/patches/debian/revert-sched-rt-Up-the-root-domain-ref-count-when-pa.patch
deleted file mode 100644
index 7f49b90..0000000
--- a/debian/patches/debian/revert-sched-rt-Up-the-root-domain-ref-count-when-pa.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 50deb025f5ccc9b5b2e36031c88deff9bc3aebca Mon Sep 17 00:00:00 2001
-From: Yves-Alexis Perez <corsac at debian.org>
-Date: Sat, 17 Feb 2018 15:57:01 +0100
-Subject: [PATCH] Revert "sched/rt: Up the root domain ref count when passing it around via IPIs"
-Forwarded: Not needed
-
-This reverts commit a384e5437f705972d2884cea17b931c1a2cd3277 which is
-commit 364f56653708ba8bcdefd4f0da2a42904baa8eeb upstream. It has to be
-applied on top of 1c37ff78298a6b6063649123356a312e1cce12ca which has
-been reverted in Debian to prevent an ABI change.
----
- kernel/sched/core.c  | 13 -------------
- kernel/sched/rt.c    |  9 ++-------
- kernel/sched/sched.h |  2 --
- 3 files changed, 2 insertions(+), 22 deletions(-)
-
-diff --git a/kernel/sched/core.c b/kernel/sched/core.c
-index bce3a7ad4253..e5066955cc3a 100644
---- a/kernel/sched/core.c
-+++ b/kernel/sched/core.c
-@@ -5864,19 +5864,6 @@ static void rq_attach_root(struct rq *rq, struct root_domain *rd)
- 		call_rcu_sched(&old_rd->rcu, free_rootdomain);
- }
- 
--void sched_get_rd(struct root_domain *rd)
--{
--	atomic_inc(&rd->refcount);
--}
--
--void sched_put_rd(struct root_domain *rd)
--{
--	if (!atomic_dec_and_test(&rd->refcount))
--		return;
--
--	call_rcu_sched(&rd->rcu, free_rootdomain);
--}
--
- static int init_rootdomain(struct root_domain *rd)
- {
- 	memset(rd, 0, sizeof(*rd));
-diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
-index 30aeff8f741c..7a360d6f6798 100644
---- a/kernel/sched/rt.c
-+++ b/kernel/sched/rt.c
-@@ -1979,11 +1979,8 @@ static void tell_cpu_to_push(struct rq *rq)
- 
- 	rto_start_unlock(&rq->rd->rto_loop_start);
- 
--	if (cpu >= 0) {
--		/* Make sure the rd does not get freed while pushing */
--		sched_get_rd(rq->rd);
-+	if (cpu >= 0)
- 		irq_work_queue_on(&rq->rd->rto_push_work, cpu);
--	}
- }
- 
- /* Called from hardirq context */
-@@ -2011,10 +2008,8 @@ void rto_push_irq_work_func(struct irq_work *work)
- 
- 	raw_spin_unlock(&rq->rd->rto_lock);
- 
--	if (cpu < 0) {
--		sched_put_rd(rd);
-+	if (cpu < 0)
- 		return;
--	}
- 
- 	/* Try the next RT overloaded CPU */
- 	irq_work_queue_on(&rq->rd->rto_push_work, cpu);
-diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
-index f564a1d2c9d5..cff985feb6e7 100644
---- a/kernel/sched/sched.h
-+++ b/kernel/sched/sched.h
-@@ -590,8 +590,6 @@ struct root_domain {
- };
- 
- extern struct root_domain def_root_domain;
--extern void sched_get_rd(struct root_domain *rd);
--extern void sched_put_rd(struct root_domain *rd);
- 
- #ifdef HAVE_RT_PUSH_IPI
- extern void rto_push_irq_work_func(struct irq_work *work);
--- 
-2.16.1
-
diff --git a/debian/patches/debian/revert-sched-rt-Use-container_of-to-get-root-domain-.patch b/debian/patches/debian/revert-sched-rt-Use-container_of-to-get-root-domain-.patch
deleted file mode 100644
index b70f003..0000000
--- a/debian/patches/debian/revert-sched-rt-Use-container_of-to-get-root-domain-.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 894708eaeb785463cc13bd7cc0f39cd9a0a3db05 Mon Sep 17 00:00:00 2001
-From: Yves-Alexis Perez <corsac at debian.org>
-Date: Sat, 17 Feb 2018 15:43:35 +0100
-Subject: [PATCH] Revert "sched/rt: Use container_of() to get root domain in rto_push_irq_work_func()"
-Forwarded: Not needed
-
-This reverts commit 1c679981309b4d36b024fc954cfcf2111a007de0 which is
-commit ad0f1d9d65938aec72a698116cd73a980916895e upstream. It has to be
-applied on top of 1c37ff78298a6b6063649123356a312e1cce12ca which has
-been reverted in Debian to prevent an ABI change.
----
- kernel/sched/rt.c | 15 +++++++--------
- 1 file changed, 7 insertions(+), 8 deletions(-)
-
-diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
-index f6d68ddfa2f3..30aeff8f741c 100644
---- a/kernel/sched/rt.c
-+++ b/kernel/sched/rt.c
-@@ -1895,8 +1895,9 @@ static void push_rt_tasks(struct rq *rq)
-  * the rt_loop_next will cause the iterator to perform another scan.
-  *
-  */
--static int rto_next_cpu(struct root_domain *rd)
-+static int rto_next_cpu(struct rq *rq)
- {
-+	struct root_domain *rd = rq->rd;
- 	int next;
- 	int cpu;
- 
-@@ -1972,7 +1973,7 @@ static void tell_cpu_to_push(struct rq *rq)
- 	 * Otherwise it is finishing up and an ipi needs to be sent.
- 	 */
- 	if (rq->rd->rto_cpu < 0)
--		cpu = rto_next_cpu(rq->rd);
-+		cpu = rto_next_cpu(rq);
- 
- 	raw_spin_unlock(&rq->rd->rto_lock);
- 
-@@ -1988,8 +1989,6 @@ static void tell_cpu_to_push(struct rq *rq)
- /* Called from hardirq context */
- void rto_push_irq_work_func(struct irq_work *work)
- {
--	struct root_domain *rd =
--		container_of(work, struct root_domain, rto_push_work);
- 	struct rq *rq;
- 	int cpu;
- 
-@@ -2005,12 +2004,12 @@ void rto_push_irq_work_func(struct irq_work *work)
- 		raw_spin_unlock(&rq->lock);
- 	}
- 
--	raw_spin_lock(&rd->rto_lock);
-+	raw_spin_lock(&rq->rd->rto_lock);
- 
- 	/* Pass the IPI to the next rt overloaded queue */
--	cpu = rto_next_cpu(rd);
-+	cpu = rto_next_cpu(rq);
- 
--	raw_spin_unlock(&rd->rto_lock);
-+	raw_spin_unlock(&rq->rd->rto_lock);
- 
- 	if (cpu < 0) {
- 		sched_put_rd(rd);
-@@ -2018,7 +2017,7 @@ void rto_push_irq_work_func(struct irq_work *work)
- 	}
- 
- 	/* Try the next RT overloaded CPU */
--	irq_work_queue_on(&rd->rto_push_work, cpu);
-+	irq_work_queue_on(&rq->rd->rto_push_work, cpu);
- }
- #endif /* HAVE_RT_PUSH_IPI */
- 
--- 
-2.16.1
-
diff --git a/debian/patches/debian/revert-tcp-invalidate-rate-samples-during-SACK-reneg.patch b/debian/patches/debian/revert-tcp-invalidate-rate-samples-during-SACK-reneg.patch
deleted file mode 100644
index 1a2b599..0000000
--- a/debian/patches/debian/revert-tcp-invalidate-rate-samples-during-SACK-reneg.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-From 6bab53619e8dc848c9fd16eef2c0aab037440daa Mon Sep 17 00:00:00 2001
-From: Yves-Alexis Perez <corsac at debian.org>
-Date: Mon, 8 Jan 2018 10:58:43 +0100
-Subject: [PATCH] Revert "tcp: invalidate rate samples during SACK reneging"
-
-This reverts commit e74fe7268e7eadb2880d3842fe167131220d5616 which is
-d4761754b4fb2ef8d9a1e9d121c4bec84e1fe292 upstream. Prevent changing the
-tcp_sock structure, causing an ABI change.
----
- include/linux/tcp.h  |  3 +--
- include/net/tcp.h    |  2 +-
- net/ipv4/tcp.c       |  1 -
- net/ipv4/tcp_input.c | 10 ++--------
- net/ipv4/tcp_rate.c  | 10 +++-------
- 5 files changed, 7 insertions(+), 19 deletions(-)
-
-diff --git a/include/linux/tcp.h b/include/linux/tcp.h
-index f50b717ce644..647532b0eb03 100644
---- a/include/linux/tcp.h
-+++ b/include/linux/tcp.h
-@@ -219,8 +219,7 @@ struct tcp_sock {
- 	} rack;
- 	u16	advmss;		/* Advertised MSS			*/
- 	u8	rate_app_limited:1,  /* rate_{delivered,interval_us} limited? */
--		is_sack_reneg:1,    /* in recovery from loss with SACK reneg? */
--		unused:6;
-+		unused:7;
- 	u8	nonagle     : 4,/* Disable Nagle algorithm?             */
- 		thin_lto    : 1,/* Use linear timeouts for thin streams */
- 		thin_dupack : 1,/* Fast retransmit on first dupack      */
-diff --git a/include/net/tcp.h b/include/net/tcp.h
-index caf35e062639..fba4fc46871d 100644
---- a/include/net/tcp.h
-+++ b/include/net/tcp.h
-@@ -1001,7 +1001,7 @@ void tcp_rate_skb_sent(struct sock *sk, struct sk_buff *skb);
- void tcp_rate_skb_delivered(struct sock *sk, struct sk_buff *skb,
- 			    struct rate_sample *rs);
- void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
--		  bool is_sack_reneg, struct skb_mstamp *now, struct rate_sample *rs);
-+		  struct skb_mstamp *now, struct rate_sample *rs);
- void tcp_rate_check_app_limited(struct sock *sk);
- 
- /* These functions determine how the current flow behaves in respect of SACK
-diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
-index 05d2bde00864..dd33c785ce16 100644
---- a/net/ipv4/tcp.c
-+++ b/net/ipv4/tcp.c
-@@ -2297,7 +2297,6 @@ int tcp_disconnect(struct sock *sk, int flags)
- 	tp->snd_cwnd_cnt = 0;
- 	tp->window_clamp = 0;
- 	tcp_set_ca_state(sk, TCP_CA_Open);
--	tp->is_sack_reneg = 0;
- 	tcp_clear_retrans(tp);
- 	inet_csk_delack_init(sk);
- 	/* Initialize rcv_mss to TCP_MIN_MSS to avoid division by 0
-diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
-index 2f107e46355c..05255a286888 100644
---- a/net/ipv4/tcp_input.c
-+++ b/net/ipv4/tcp_input.c
-@@ -1966,8 +1966,6 @@ void tcp_enter_loss(struct sock *sk)
- 		NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPSACKRENEGING);
- 		tp->sacked_out = 0;
- 		tp->fackets_out = 0;
--		/* Mark SACK reneging until we recover from this loss event. */
--		tp->is_sack_reneg = 1;
- 	}
- 	tcp_clear_all_retrans_hints(tp);
- 
-@@ -2465,7 +2463,6 @@ static bool tcp_try_undo_recovery(struct sock *sk)
- 		return true;
- 	}
- 	tcp_set_ca_state(sk, TCP_CA_Open);
--	tp->is_sack_reneg = 0;
- 	return false;
- }
- 
-@@ -2497,10 +2494,8 @@ static bool tcp_try_undo_loss(struct sock *sk, bool frto_undo)
- 			NET_INC_STATS(sock_net(sk),
- 					LINUX_MIB_TCPSPURIOUSRTOS);
- 		inet_csk(sk)->icsk_retransmits = 0;
--		if (frto_undo || tcp_is_sack(tp)) {
-+		if (frto_undo || tcp_is_sack(tp))
- 			tcp_set_ca_state(sk, TCP_CA_Open);
--			tp->is_sack_reneg = 0;
--		}
- 		return true;
- 	}
- 	return false;
-@@ -3594,7 +3589,6 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
- 	struct tcp_sacktag_state sack_state;
- 	struct rate_sample rs = { .prior_delivered = 0 };
- 	u32 prior_snd_una = tp->snd_una;
--	bool is_sack_reneg = tp->is_sack_reneg;
- 	u32 ack_seq = TCP_SKB_CB(skb)->seq;
- 	u32 ack = TCP_SKB_CB(skb)->ack_seq;
- 	bool is_dupack = false;
-@@ -3717,7 +3711,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
- 		tcp_schedule_loss_probe(sk);
- 	delivered = tp->delivered - delivered;	/* freshly ACKed or SACKed */
- 	lost = tp->lost - lost;			/* freshly marked lost */
--	tcp_rate_gen(sk, delivered, lost, is_sack_reneg, &now, &rs);
-+	tcp_rate_gen(sk, delivered, lost, &now, &rs);
- 	tcp_cong_control(sk, ack, delivered, flag, &rs);
- 	tcp_xmit_recovery(sk, rexmit);
- 	return 1;
-diff --git a/net/ipv4/tcp_rate.c b/net/ipv4/tcp_rate.c
-index 18309f58ab8d..9be1581a5a08 100644
---- a/net/ipv4/tcp_rate.c
-+++ b/net/ipv4/tcp_rate.c
-@@ -106,7 +106,7 @@ void tcp_rate_skb_delivered(struct sock *sk, struct sk_buff *skb,
- 
- /* Update the connection delivery information and generate a rate sample. */
- void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
--		  bool is_sack_reneg, struct skb_mstamp *now, struct rate_sample *rs)
-+		  struct skb_mstamp *now, struct rate_sample *rs)
- {
- 	struct tcp_sock *tp = tcp_sk(sk);
- 	u32 snd_us, ack_us;
-@@ -124,12 +124,8 @@ void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
- 
- 	rs->acked_sacked = delivered;	/* freshly ACKed or SACKed */
- 	rs->losses = lost;		/* freshly marked lost */
--	/* Return an invalid sample if no timing information is available or
--	 * in recovery from loss with SACK reneging. Rate samples taken during
--	 * a SACK reneging event may overestimate bw by including packets that
--	 * were SACKed before the reneg.
--	 */
--	if (!rs->prior_mstamp.v64 || is_sack_reneg) {
-+	/* Return an invalid sample if no timing information is available. */
-+	if (!rs->prior_mstamp.v64) {
- 		rs->delivered = -1;
- 		rs->interval_us = -1;
- 		return;
--- 
-2.15.1
-
diff --git a/debian/patches/debian/revert-x86-asm-Move-status-from-thread_struct-to-thr.patch b/debian/patches/debian/revert-x86-asm-Move-status-from-thread_struct-to-thr.patch
deleted file mode 100644
index bfb438c..0000000
--- a/debian/patches/debian/revert-x86-asm-Move-status-from-thread_struct-to-thr.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-From b0d78cb41fb649a4611e7c8418bbf634d63ae42f Mon Sep 17 00:00:00 2001
-From: Yves-Alexis Perez <corsac at corsac.net>
-Date: Fri, 16 Feb 2018 10:04:40 +0100
-Subject: [PATCH] Revert "x86/asm: Move 'status' from thread_struct to thread_info"
-Forwarded: not-needed
-
-This reverts commit f03d00ba0b478963fc96c975d3b27fc1b9bc3a43 which is
-commit 37a8f7c38339b22b69876d6f5a0ab851565284e3 upstream.
-
-Moving status from struct thread_struct to struct thread_info is an ABI
-change, so hold on it for now.
----
- arch/x86/entry/common.c            | 4 ++--
- arch/x86/include/asm/processor.h   | 2 ++
- arch/x86/include/asm/syscall.h     | 6 +++---
- arch/x86/include/asm/thread_info.h | 3 +--
- arch/x86/kernel/process_64.c       | 4 ++--
- arch/x86/kernel/ptrace.c           | 2 +-
- arch/x86/kernel/signal.c           | 2 +-
- 7 files changed, 12 insertions(+), 11 deletions(-)
-
-diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
-index b0cd306dc527..57da9ec3593b 100644
---- a/arch/x86/entry/common.c
-+++ b/arch/x86/entry/common.c
-@@ -202,7 +202,7 @@ __visible inline void prepare_exit_to_usermode(struct pt_regs *regs)
- 	 * special case only applies after poking regs and before the
- 	 * very next return to user mode.
- 	 */
--	ti->status &= ~(TS_COMPAT|TS_I386_REGS_POKED);
-+	current->thread.status &= ~(TS_COMPAT|TS_I386_REGS_POKED);
- #endif
- 
- 	user_enter_irqoff();
-@@ -301,7 +301,7 @@ static __always_inline void do_syscall_32_irqs_on(struct pt_regs *regs)
- 	unsigned int nr = (unsigned int)regs->orig_ax;
- 
- #ifdef CONFIG_IA32_EMULATION
--	ti->status |= TS_COMPAT;
-+	current->thread.status |= TS_COMPAT;
- #endif
- 
- 	if (READ_ONCE(ti->flags) & _TIF_WORK_SYSCALL_ENTRY) {
-diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
-index cb866ae1bc5d..353f038ec645 100644
---- a/arch/x86/include/asm/processor.h
-+++ b/arch/x86/include/asm/processor.h
-@@ -391,6 +391,8 @@ struct thread_struct {
- 	unsigned short		gsindex;
- #endif
- 
-+	u32			status;		/* thread synchronous flags */
-+
- #ifdef CONFIG_X86_64
- 	unsigned long		fsbase;
- 	unsigned long		gsbase;
-diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h
-index 03eedc21246d..e3c95e8e61c5 100644
---- a/arch/x86/include/asm/syscall.h
-+++ b/arch/x86/include/asm/syscall.h
-@@ -60,7 +60,7 @@ static inline long syscall_get_error(struct task_struct *task,
- 	 * TS_COMPAT is set for 32-bit syscall entries and then
- 	 * remains set until we return to user mode.
- 	 */
--	if (task->thread_info.status & (TS_COMPAT|TS_I386_REGS_POKED))
-+	if (task->thread.status & (TS_COMPAT|TS_I386_REGS_POKED))
- 		/*
- 		 * Sign-extend the value so (int)-EFOO becomes (long)-EFOO
- 		 * and will match correctly in comparisons.
-@@ -116,7 +116,7 @@ static inline void syscall_get_arguments(struct task_struct *task,
- 					 unsigned long *args)
- {
- # ifdef CONFIG_IA32_EMULATION
--	if (task->thread_info.status & TS_COMPAT)
-+	if (task->thread.status & TS_COMPAT)
- 		switch (i) {
- 		case 0:
- 			if (!n--) break;
-@@ -177,7 +177,7 @@ static inline void syscall_set_arguments(struct task_struct *task,
- 					 const unsigned long *args)
- {
- # ifdef CONFIG_IA32_EMULATION
--	if (task->thread_info.status & TS_COMPAT)
-+	if (task->thread.status & TS_COMPAT)
- 		switch (i) {
- 		case 0:
- 			if (!n--) break;
-diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
-index 89978b9c667a..bdf9c4c91572 100644
---- a/arch/x86/include/asm/thread_info.h
-+++ b/arch/x86/include/asm/thread_info.h
-@@ -54,7 +54,6 @@ struct task_struct;
- 
- struct thread_info {
- 	unsigned long		flags;		/* low level flags */
--	u32			status;		/* thread synchronous flags */
- };
- 
- #define INIT_THREAD_INFO(tsk)			\
-@@ -214,7 +213,7 @@ static inline int arch_within_stack_frames(const void * const stack,
- #define in_ia32_syscall() true
- #else
- #define in_ia32_syscall() (IS_ENABLED(CONFIG_IA32_EMULATION) && \
--			   current_thread_info()->status & TS_COMPAT)
-+			   current->thread.status & TS_COMPAT)
- #endif
- 
- /*
-diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
-index dffe81d3c261..0887d2ae3797 100644
---- a/arch/x86/kernel/process_64.c
-+++ b/arch/x86/kernel/process_64.c
-@@ -538,7 +538,7 @@ void set_personality_ia32(bool x32)
- 		current->personality &= ~READ_IMPLIES_EXEC;
- 		/* in_compat_syscall() uses the presence of the x32
- 		   syscall bit flag to determine compat status */
--		current_thread_info()->status &= ~TS_COMPAT;
-+		current->thread.status &= ~TS_COMPAT;
- 	} else {
- 		set_thread_flag(TIF_IA32);
- 		clear_thread_flag(TIF_X32);
-@@ -546,7 +546,7 @@ void set_personality_ia32(bool x32)
- 			current->mm->context.ia32_compat = TIF_IA32;
- 		current->personality |= force_personality32;
- 		/* Prepare the first "return" to user space */
--		current_thread_info()->status |= TS_COMPAT;
-+		current->thread.status |= TS_COMPAT;
- 	}
- }
- EXPORT_SYMBOL_GPL(set_personality_ia32);
-diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
-index e497d374412a..0e63c0267f99 100644
---- a/arch/x86/kernel/ptrace.c
-+++ b/arch/x86/kernel/ptrace.c
-@@ -934,7 +934,7 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 value)
- 		 */
- 		regs->orig_ax = value;
- 		if (syscall_get_nr(child, regs) >= 0)
--			child->thread_info.status |= TS_I386_REGS_POKED;
-+			child->thread.status |= TS_I386_REGS_POKED;
- 		break;
- 
- 	case offsetof(struct user32, regs.eflags):
-diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
-index b1a5d252d482..763af1d0de64 100644
---- a/arch/x86/kernel/signal.c
-+++ b/arch/x86/kernel/signal.c
-@@ -785,7 +785,7 @@ static inline unsigned long get_nr_restart_syscall(const struct pt_regs *regs)
- 	 * than the tracee.
- 	 */
- #ifdef CONFIG_IA32_EMULATION
--	if (current_thread_info()->status & (TS_COMPAT|TS_I386_REGS_POKED))
-+	if (current->thread.status & (TS_COMPAT|TS_I386_REGS_POKED))
- 		return __NR_ia32_restart_syscall;
- #endif
- #ifdef CONFIG_X86_X32_ABI
--- 
-2.16.1
-
diff --git a/debian/patches/debian/s390-mm-avoid-abi-change-in-4.9.52.patch b/debian/patches/debian/s390-mm-avoid-abi-change-in-4.9.52.patch
deleted file mode 100644
index accdc20..0000000
--- a/debian/patches/debian/s390-mm-avoid-abi-change-in-4.9.52.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Mon, 27 Nov 2017 20:49:07 +0000
-Subject: s390/mm: Avoid ABI change in 4.9.52
-Forwarded: not-needed
-
-Commit 60f07c8ec5fa "s390/mm: fix race on mm->context.flush_mm" added
-a field to the s390 definition of mm_context_t.  This is embedded in
-the arch-indepdendent struct mm_struct, so adding a new field results
-in an incompatible change to the layout of the larger struct.
-
-Move the new field out of mm_context_t to the end of mm_struct, and
-hide the change from genksyms.
-
----
---- a/arch/s390/include/asm/mmu.h
-+++ b/arch/s390/include/asm/mmu.h
-@@ -5,7 +5,6 @@
- #include <linux/errno.h>
- 
- typedef struct {
--	spinlock_t lock;
- 	cpumask_t cpu_attach_mask;
- 	atomic_t flush_count;
- 	unsigned int flush_mm;
-@@ -26,7 +25,7 @@ typedef struct {
- } mm_context_t;
- 
- #define INIT_MM_CONTEXT(name)						   \
--	.context.lock =	__SPIN_LOCK_UNLOCKED(name.context.lock),	   \
-+	.s390_flush_lock = __SPIN_LOCK_UNLOCKED(name.s390_flush_lock),	   \
- 	.context.pgtable_lock =						   \
- 			__SPIN_LOCK_UNLOCKED(name.context.pgtable_lock),   \
- 	.context.pgtable_list = LIST_HEAD_INIT(name.context.pgtable_list), \
---- a/arch/s390/include/asm/mmu_context.h
-+++ b/arch/s390/include/asm/mmu_context.h
-@@ -15,7 +15,7 @@
- static inline int init_new_context(struct task_struct *tsk,
- 				   struct mm_struct *mm)
- {
--	spin_lock_init(&mm->context.lock);
-+	spin_lock_init(&mm->s390_flush_lock);
- 	spin_lock_init(&mm->context.pgtable_lock);
- 	INIT_LIST_HEAD(&mm->context.pgtable_list);
- 	spin_lock_init(&mm->context.gmap_lock);
---- a/arch/s390/include/asm/tlbflush.h
-+++ b/arch/s390/include/asm/tlbflush.h
-@@ -96,12 +96,12 @@ static inline void __tlb_flush_kernel(vo
- 
- static inline void __tlb_flush_mm_lazy(struct mm_struct * mm)
- {
--	spin_lock(&mm->context.lock);
-+	spin_lock(&mm->s390_flush_lock);
- 	if (mm->context.flush_mm) {
- 		mm->context.flush_mm = 0;
- 		__tlb_flush_mm(mm);
- 	}
--	spin_unlock(&mm->context.lock);
-+	spin_unlock(&mm->s390_flush_lock);
- }
- 
- /*
---- a/include/linux/mm_types.h
-+++ b/include/linux/mm_types.h
-@@ -523,6 +523,12 @@ struct mm_struct {
- 	atomic_long_t hugetlb_usage;
- #endif
- 	struct work_struct async_put_work;
-+#ifndef __GENKSYMS__
-+#ifdef CONFIG_S390
-+	/* bwh: This should be in s390's mm_context_t but that breaks ABI */
-+	spinlock_t s390_flush_lock;
-+#endif
-+#endif
- };
- 
- static inline void mm_init_cpumask(struct mm_struct *mm)
diff --git a/debian/patches/series b/debian/patches/series
index f63283c..a5d97a9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -167,25 +167,3 @@ bugfix/all/liblockdep-fix-set-but-not-used-warnings.patch
 bugfix/all/liblockdep-fix-defined-but-not-used-warning-for-init.patch
 
 # ABI maintenance
-debian/ip6_fib-avoid-abi-change-in-4.9.51.patch
-debian/inet_frag-limit-abi-change-in-4.9.51.patch
-debian/s390-mm-avoid-abi-change-in-4.9.52.patch
-debian/mac80211-avoid-abi-change-in-4.9.53.patch
-debian/mmc-sdio-avoid-abi-change-in-4.9.54.patch
-debian/keys-limit-abi-change-in-4.9.59.patch
-debian/netfilter-nat-avoid-abi-change-in-4.9.63.patch
-debian/mm-page_alloc-avoid-abi-change-in-4.9.65.patch
-debian/revert-phy-increase-size-of-mii_bus_id_size-and-bus_id.patch
-debian/revert-bpf-one-perf-event-close-won-t-free-bpf-program-atta.patch
-debian/revert-mm-hugetlbfs-introduce-split-to-vm_operations.patch
-debian/revert-dma-fence-Introduce-drm_fence_set_error-helpe.patch
-debian/revert-lib-genalloc.c-make-the-avail-variable-an-ato.patch
-debian/revert-tcp-invalidate-rate-samples-during-SACK-reneg.patch
-debian/revert-bpf-avoid-false-sharing-of-map-refcount-with-.patch
-debian/bpf-avoid-abi-change-in-4.9.77.patch
-debian/revert-sched-rt-Use-container_of-to-get-root-domain-.patch
-debian/revert-sched-rt-Up-the-root-domain-ref-count-when-pa.patch
-debian/revert-sched-rt-Simplify-the-IPI-based-RT-balancing-.patch
-debian/revert-mm-fix-100-CPU-kswapd-busyloop-on-unreclaimab.patch
-debian/revert-x86-asm-Move-status-from-thread_struct-to-thr.patch
-debian/revert-crypto-poly1305-remove-setkey-method.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list