Merge ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:for-focal/bug-1848922/fix-build into ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/focal

Proposed by You-Sheng Yang
Status: Merged
Approved by: You-Sheng Yang
Approved revision: 6879a3cafe8713324c025139c70caa8a0b9d779b
Merged at revision: 5fa6541e8dfbb7b1bacb95f57820e7dbce89253f
Proposed branch: ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:for-focal/bug-1848922/fix-build
Merge into: ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/focal
Diff against target: 128 lines (+68/-8)
5 files modified
debian/changelog (+10/-0)
debian/copyright (+1/-1)
debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch (+10/-7)
debian/patches/0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch (+46/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
You-Sheng Yang Approve
Review via email: mp+374436@code.launchpad.net
To post a comment you must log in.
Revision history for this message
You-Sheng Yang (vicamo) :
review: Approve

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 888ec1a..9535342 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,13 @@
6+backport-iwlwifi-dkms (7906-0ubuntu2) focal; urgency=low
7+
8+ * debian/patches/0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch
9+ - fix build against v5.3. (LP: #1848922)
10+ * debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch
11+ - add -fcf-protection=none when using retpoline flags. (LP: #1830961)
12+ - drop -fno-stack-clash-protection for it's no longer necessary.
13+
14+ -- You-Sheng Yang <vicamo.yang@canonical.com> Mon, 21 Oct 2019 20:22:27 +0800
15+
16 backport-iwlwifi-dkms (7906-0ubuntu1) eoan; urgency=low
17
18 * Initial release (LP: #1835858)
19diff --git a/debian/copyright b/debian/copyright
20index 25303a0..f71d321 100644
21--- a/debian/copyright
22+++ b/debian/copyright
23@@ -26,7 +26,7 @@ License: GPL-2.0
24 `/usr/share/common-licenses/GPL-2'.
25
26 Files: debian/*
27-Copyright: 2019 You-Sheng Yang <vicamo@gmail.com>
28+Copyright: 2019 Canonical Ltd
29 License: Apache-2.0
30 Licensed under the Apache License, Version 2.0 (the "License");
31 you may not use this file except in compliance with the License.
32diff --git a/debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch b/debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch
33index 194c653..83786b4 100644
34--- a/debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch
35+++ b/debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch
36@@ -1,21 +1,24 @@
37 From: You-Sheng Yang <vicamo@gmail.com>
38 Date: Mon, 15 Jul 2019 20:05:54 +0800
39-Subject: Makefile.kernel: pass -fno-stack-clash-protection and
40- -fcf-protection=none for gcc-9
41+Subject: kbuild: add -fcf-protection=none when using retpoline flags
42
43+See
44+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=29be86d7f9cb18df4123f309ac7857570513e8bc
45 ---
46- Makefile.kernel | 2 ++
47- 1 file changed, 2 insertions(+)
48+ Makefile.kernel | 4 ++++
49+ 1 file changed, 4 insertions(+)
50
51 diff --git a/Makefile.kernel b/Makefile.kernel
52-index 3274949..403345d 100644
53+index 3274949..4ee9f2f 100644
54 --- a/Makefile.kernel
55 +++ b/Makefile.kernel
56-@@ -10,6 +10,8 @@ KBUILD_CFLAGS := $(KBUILD_CFLAGS) -Wformat-security \
57+@@ -10,6 +10,10 @@ KBUILD_CFLAGS := $(KBUILD_CFLAGS) -Wformat-security \
58 $(call backport-cc-disable-error, date-time) \
59 $(call backport-cc-disable-warning, date-time)
60
61-+KBUILD_CFLAGS += -fno-stack-clash-protection -fcf-protection=none
62++ifdef CONFIG_RETPOLINE
63++KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
64++endif
65 +
66 NOSTDINC_FLAGS := \
67 -I$(M)/backport-include/ \
68diff --git a/debian/patches/0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch b/debian/patches/0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch
69new file mode 100644
70index 0000000..219899c
71--- /dev/null
72+++ b/debian/patches/0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch
73@@ -0,0 +1,46 @@
74+From: Luca Coelho <luciano.coelho@intel.com>
75+Date: Thu, 15 Aug 2019 14:49:00 +0300
76+Subject: [NOUPSTREAM] backport: rename ktime_get_boot_ns for v5.3+
77+
78+In v5.3, this function was renamed, so rename it here for v5.3+. When
79+we merge v5.3 back from upstream, the opposite should be done (i.e. we
80+will have _boottime_ and need to rename to _boot_ in < v5.3 instead).
81+
82+This may be applied to older cores if we want them to compile on
83+v5.3+.
84+
85+type=maint
86+ticket=none
87+
88+Change-Id: Ia3f2b514a173edb320b3445a9d6e7e31e9182059
89+Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
90+Reviewed-on: https://git-amr-3.devtools.intel.com/gerrit/233392
91+Tested-by: ec ger unix iil jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
92+x-iwlwifi-stack-dev: eb274c49a30f3bf2cf3ca6f537a018707edc0bae
93+(cherry picked from commit f47729b94e118ad592870073b251f6927b95d1e0)
94+Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
95+---
96+ backport-include/linux/timekeeping.h | 10 ++++++++++
97+ 1 file changed, 10 insertions(+)
98+
99+diff --git a/backport-include/linux/timekeeping.h b/backport-include/linux/timekeeping.h
100+index 198b09b..b97b09f 100644
101+--- a/backport-include/linux/timekeeping.h
102++++ b/backport-include/linux/timekeeping.h
103+@@ -26,6 +26,16 @@ static inline u64 ktime_get_boot_ns(void)
104+ }
105+ #endif /* < 3.17 */
106+
107++#if LINUX_VERSION_IS_GEQ(5,3,0)
108++/*
109++ * In v5.3, this function was renamed, so rename it here for v5.3+.
110++ * When we merge v5.3 back from upstream, the opposite should be done
111++ * (i.e. we will have _boottime_ and need to rename to _boot_ in <
112++ * v5.3 instead).
113++*/
114++#define ktime_get_boot_ns ktime_get_boottime_ns
115++#endif /* > 5.3.0 */
116++
117+ #if LINUX_VERSION_IS_LESS(4,18,0)
118+ extern time64_t ktime_get_boottime_seconds(void);
119+ #endif /* < 4.18 */
120diff --git a/debian/patches/series b/debian/patches/series
121index e037267..c03ca2f 100644
122--- a/debian/patches/series
123+++ b/debian/patches/series
124@@ -3,3 +3,4 @@
125 0003-backport-apply-__copy-to-init_module-cleanup_module.patch
126 0004-backport-fix-build-for-v5.2-kernel.patch
127 0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch
128+0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch

Subscribers

People subscribed via source and target branches

to all changes: