Merge ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:bug-1856024/bionic-sru/bionic into ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/bionic

Proposed by You-Sheng Yang
Status: Superseded
Proposed branch: ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:bug-1856024/bionic-sru/bionic
Merge into: ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/bionic
Diff against target: 140 lines (+118/-0)
3 files modified
debian/changelog (+14/-0)
debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch (+103/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
You-Sheng Yang Disapprove
Review via email: mp+376638@code.launchpad.net

This proposal has been superseded by a proposal from 2019-12-20.

To post a comment you must log in.
bbcd1bb... by You-Sheng Yang

Merge remote-tracking branch 'launchpad/bug-1855825/address-interface-change-in-linux-skbuff.h/eoan' into ubuntu/eoan

Revision history for this message
You-Sheng Yang (vicamo) wrote :
review: Disapprove

Unmerged commits

019d33f... by You-Sheng Yang

Bug 1856024: Bionic: initial release

bbcd1bb... by You-Sheng Yang

Merge remote-tracking branch 'launchpad/bug-1855825/address-interface-change-in-linux-skbuff.h/eoan' into ubuntu/eoan

5e085ae... by You-Sheng Yang

Bug 1855825: backport: address interface change in linux/skbuff.h

31c26b7... by You-Sheng Yang

backport: address interface change in linux/skbuff.h since 5.3.10

Commit 9d0b402125a6 ("net/flow_dissector: switch to siphash") introduces
interface changes for skb_get_hash_perturb() and struct
fq_codel_sched_data. Since this DKMS package carries its own version of
backported definitions of aforementioned data types, it results in
abnormal behavior and in some cases it simply hang the whole system
while connecting to WiFi base stations.

This change synchronizes changed data types while maintaining the
compatibility to previous releases.

Closes: vicamo/backport-iwlwifi-dkms#7
Signed-off-by: You-Sheng Yang <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 565258d..655a602 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,17 @@
6+backport-iwlwifi-dkms (7906-0ubuntu3~18.04.1) bionic; urgency=critical
7+
8+ * Initial release (LP: #1856024).
9+ - Sync from Eoan 7906-0ubuntu3.
10+
11+ -- You-Sheng Yang <vicamo.yang@canonical.com> Wed, 11 Dec 2019 16:20:39 +0800
12+
13+backport-iwlwifi-dkms (7906-0ubuntu3) eoan; urgency=critical
14+
15+ * debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch
16+ - Fix system hang on connecting to WiFi base station. (LP: #1855825)
17+
18+ -- You-Sheng Yang <vicamo.yang@canonical.com> Wed, 11 Dec 2019 16:20:39 +0800
19+
20 backport-iwlwifi-dkms (7906-0ubuntu2~19.10.1) eoan; urgency=low
21
22 * debian/patches/0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch
23diff --git a/debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch b/debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch
24new file mode 100644
25index 0000000..a3427d4
26--- /dev/null
27+++ b/debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch
28@@ -0,0 +1,103 @@
29+From b13b11f8c71e4ca320a38185dbfba59bfc08e15e Mon Sep 17 00:00:00 2001
30+From: You-Sheng Yang <vicamo.yang@canonical.com>
31+Date: Tue, 10 Dec 2019 17:35:29 +0800
32+Subject: [PATCH] backport: address interface change in linux/skbuff.h since
33+ 5.3.10
34+
35+Commit 9d0b402125a6 ("net/flow_dissector: switch to siphash") introduces
36+interface changes for skb_get_hash_perturb() and struct
37+fq_codel_sched_data. Since this DKMS package carries its own version of
38+backported definitions of aforementioned data types, it results in
39+abnormal behavior and in some cases it simply hang the whole system
40+while connecting to WiFi base stations.
41+
42+This change synchronizes changed data types while maintaining the
43+compatibility to previous releases.
44+
45+Closes: vicamo/backport-iwlwifi-dkms#7
46+Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
47+---
48+ include/net/fq.h | 15 +++++++++++++++
49+ include/net/fq_impl.h | 30 ++++++++++++++++++++++++++++++
50+ 2 files changed, 45 insertions(+)
51+
52+diff --git a/include/net/fq.h b/include/net/fq.h
53+index ac944a686..76e4446be 100644
54+--- a/include/net/fq.h
55++++ b/include/net/fq.h
56+@@ -70,7 +70,22 @@ struct fq {
57+ struct list_head backlogs;
58+ spinlock_t lock;
59+ u32 flows_cnt;
60++#if LINUX_VERSION_IS_GEQ(5,3,10) || \
61++ LINUX_VERSION_IN_RANGE(4,19,83,5,0,0) || \
62++ LINUX_VERSION_IN_RANGE(4,14,153,4,15,0) || \
63++ LINUX_VERSION_IN_RANGE(4,9,200,4,10,0) || \
64++ LINUX_VERSION_IN_RANGE(4,4,200,4,5,0) || \
65++ (UTS_UBUNTU_RELEASE_ABI && \
66++ (((LINUX_VERSION_CODE == KERNEL_VERSION(5,0,21)) && \
67++ (((UTS_UBUNTU_RELEASE_ABI >= 38) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
68++ (UTS_UBUNTU_RELEASE_ABI >= 1032))) || \
69++ ((LINUX_VERSION_CODE == KERNEL_VERSION(4,15,18)) && \
70++ (((UTS_UBUNTU_RELEASE_ABI >= 73) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
71++ (UTS_UBUNTU_RELEASE_ABI >= 1066)))))
72++ siphash_key_t perturbation;
73++#else
74+ u32 perturbation;
75++#endif
76+ u32 limit;
77+ u32 memory_limit;
78+ u32 memory_usage;
79+diff --git a/include/net/fq_impl.h b/include/net/fq_impl.h
80+index be7c0fab3..3d4e8f45b 100644
81+--- a/include/net/fq_impl.h
82++++ b/include/net/fq_impl.h
83+@@ -118,7 +118,22 @@ static struct fq_flow *fq_flow_classify(struct fq *fq,
84+
85+ lockdep_assert_held(&fq->lock);
86+
87++#if LINUX_VERSION_IS_GEQ(5,3,10) || \
88++ LINUX_VERSION_IN_RANGE(4,19,83,5,0,0) || \
89++ LINUX_VERSION_IN_RANGE(4,14,153,4,15,0) || \
90++ LINUX_VERSION_IN_RANGE(4,9,200,4,10,0) || \
91++ LINUX_VERSION_IN_RANGE(4,4,200,4,5,0) || \
92++ (UTS_UBUNTU_RELEASE_ABI && \
93++ (((LINUX_VERSION_CODE == KERNEL_VERSION(5,0,21)) && \
94++ (((UTS_UBUNTU_RELEASE_ABI >= 38) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
95++ (UTS_UBUNTU_RELEASE_ABI >= 1032))) || \
96++ ((LINUX_VERSION_CODE == KERNEL_VERSION(4,15,18)) && \
97++ (((UTS_UBUNTU_RELEASE_ABI >= 73) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
98++ (UTS_UBUNTU_RELEASE_ABI >= 1066)))))
99++ hash = skb_get_hash_perturb(skb, &fq->perturbation);
100++#else
101+ hash = skb_get_hash_perturb(skb, fq->perturbation);
102++#endif
103+ idx = reciprocal_scale(hash, fq->flows_cnt);
104+ flow = &fq->flows[idx];
105+
106+@@ -307,7 +322,22 @@ static int fq_init(struct fq *fq, int flows_cnt)
107+ INIT_LIST_HEAD(&fq->backlogs);
108+ spin_lock_init(&fq->lock);
109+ fq->flows_cnt = max_t(u32, flows_cnt, 1);
110++#if LINUX_VERSION_IS_GEQ(5,3,10) || \
111++ LINUX_VERSION_IN_RANGE(4,19,83,5,0,0) || \
112++ LINUX_VERSION_IN_RANGE(4,14,153,4,15,0) || \
113++ LINUX_VERSION_IN_RANGE(4,9,200,4,10,0) || \
114++ LINUX_VERSION_IN_RANGE(4,4,200,4,5,0) || \
115++ (UTS_UBUNTU_RELEASE_ABI && \
116++ (((LINUX_VERSION_CODE == KERNEL_VERSION(5,0,21)) && \
117++ (((UTS_UBUNTU_RELEASE_ABI >= 38) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
118++ (UTS_UBUNTU_RELEASE_ABI >= 1032))) || \
119++ ((LINUX_VERSION_CODE == KERNEL_VERSION(4,15,18)) && \
120++ (((UTS_UBUNTU_RELEASE_ABI >= 73) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
121++ (UTS_UBUNTU_RELEASE_ABI >= 1066)))))
122++ get_random_bytes(&fq->perturbation, sizeof(fq->perturbation));
123++#else
124+ fq->perturbation = prandom_u32();
125++#endif
126+ fq->quantum = 300;
127+ fq->limit = 8192;
128+ fq->memory_limit = 16 << 20; /* 16 MBytes */
129+--
130+2.24.0
131+
132diff --git a/debian/patches/series b/debian/patches/series
133index c03ca2f..7d5bfad 100644
134--- a/debian/patches/series
135+++ b/debian/patches/series
136@@ -4,3 +4,4 @@
137 0004-backport-fix-build-for-v5.2-kernel.patch
138 0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch
139 0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch
140+0006-backport-address-interface-change-in-linux-skbuff.h-.patch

Subscribers

People subscribed via source and target branches

to all changes: