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

Proposed by You-Sheng Yang
Status: Merged
Merged at revision: a47613bcead3ca210283de075d2b54cafe2ab3c6
Proposed branch: ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:for-eoan/bug-1848922/fix-build
Merge into: ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/eoan
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+374437@code.launchpad.net
To post a comment you must log in.
Revision history for this message
You-Sheng Yang (vicamo) wrote :

commit a47613bce: update debian version as "7906-0ubuntu2~19.10.1" so that we don't conflict with Focal's.

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
diff --git a/debian/changelog b/debian/changelog
index 888ec1a..565258d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
1backport-iwlwifi-dkms (7906-0ubuntu2~19.10.1) eoan; urgency=low
2
3 * debian/patches/0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch
4 - fix build against v5.3. (LP: #1848922)
5 * debian/patches/0005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch
6 - add -fcf-protection=none when using retpoline flags. (LP: #1830961)
7 - drop -fno-stack-clash-protection for it's no longer necessary.
8
9 -- You-Sheng Yang <vicamo.yang@canonical.com> Mon, 21 Oct 2019 20:22:27 +0800
10
1backport-iwlwifi-dkms (7906-0ubuntu1) eoan; urgency=low11backport-iwlwifi-dkms (7906-0ubuntu1) eoan; urgency=low
212
3 * Initial release (LP: #1835858)13 * Initial release (LP: #1835858)
diff --git a/debian/copyright b/debian/copyright
index 25303a0..f71d321 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -26,7 +26,7 @@ License: GPL-2.0
26 `/usr/share/common-licenses/GPL-2'.26 `/usr/share/common-licenses/GPL-2'.
2727
28Files: debian/*28Files: debian/*
29Copyright: 2019 You-Sheng Yang <vicamo@gmail.com>29Copyright: 2019 Canonical Ltd
30License: Apache-2.030License: Apache-2.0
31 Licensed under the Apache License, Version 2.0 (the "License");31 Licensed under the Apache License, Version 2.0 (the "License");
32 you may not use this file except in compliance with the License.32 you may not use this file except in compliance with the License.
diff --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
index 194c653..83786b4 100644
--- 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
@@ -1,21 +1,24 @@
1From: You-Sheng Yang <vicamo@gmail.com>1From: You-Sheng Yang <vicamo@gmail.com>
2Date: Mon, 15 Jul 2019 20:05:54 +08002Date: Mon, 15 Jul 2019 20:05:54 +0800
3Subject: Makefile.kernel: pass -fno-stack-clash-protection and3Subject: kbuild: add -fcf-protection=none when using retpoline flags
4 -fcf-protection=none for gcc-9
54
5See
6https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=29be86d7f9cb18df4123f309ac7857570513e8bc
6---7---
7 Makefile.kernel | 2 ++8 Makefile.kernel | 4 ++++
8 1 file changed, 2 insertions(+)9 1 file changed, 4 insertions(+)
910
10diff --git a/Makefile.kernel b/Makefile.kernel11diff --git a/Makefile.kernel b/Makefile.kernel
11index 3274949..403345d 10064412index 3274949..4ee9f2f 100644
12--- a/Makefile.kernel13--- a/Makefile.kernel
13+++ b/Makefile.kernel14+++ b/Makefile.kernel
14@@ -10,6 +10,8 @@ KBUILD_CFLAGS := $(KBUILD_CFLAGS) -Wformat-security \15@@ -10,6 +10,10 @@ KBUILD_CFLAGS := $(KBUILD_CFLAGS) -Wformat-security \
15 $(call backport-cc-disable-error, date-time) \16 $(call backport-cc-disable-error, date-time) \
16 $(call backport-cc-disable-warning, date-time)17 $(call backport-cc-disable-warning, date-time)
17 18
18+KBUILD_CFLAGS += -fno-stack-clash-protection -fcf-protection=none19+ifdef CONFIG_RETPOLINE
20+KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
21+endif
19+22+
20 NOSTDINC_FLAGS := \23 NOSTDINC_FLAGS := \
21 -I$(M)/backport-include/ \24 -I$(M)/backport-include/ \
diff --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
22new file mode 10064425new file mode 100644
index 0000000..219899c
--- /dev/null
+++ b/debian/patches/0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch
@@ -0,0 +1,46 @@
1From: Luca Coelho <luciano.coelho@intel.com>
2Date: Thu, 15 Aug 2019 14:49:00 +0300
3Subject: [NOUPSTREAM] backport: rename ktime_get_boot_ns for v5.3+
4
5In v5.3, this function was renamed, so rename it here for v5.3+. When
6we merge v5.3 back from upstream, the opposite should be done (i.e. we
7will have _boottime_ and need to rename to _boot_ in < v5.3 instead).
8
9This may be applied to older cores if we want them to compile on
10v5.3+.
11
12type=maint
13ticket=none
14
15Change-Id: Ia3f2b514a173edb320b3445a9d6e7e31e9182059
16Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
17Reviewed-on: https://git-amr-3.devtools.intel.com/gerrit/233392
18Tested-by: ec ger unix iil jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
19x-iwlwifi-stack-dev: eb274c49a30f3bf2cf3ca6f537a018707edc0bae
20(cherry picked from commit f47729b94e118ad592870073b251f6927b95d1e0)
21Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
22---
23 backport-include/linux/timekeeping.h | 10 ++++++++++
24 1 file changed, 10 insertions(+)
25
26diff --git a/backport-include/linux/timekeeping.h b/backport-include/linux/timekeeping.h
27index 198b09b..b97b09f 100644
28--- a/backport-include/linux/timekeeping.h
29+++ b/backport-include/linux/timekeeping.h
30@@ -26,6 +26,16 @@ static inline u64 ktime_get_boot_ns(void)
31 }
32 #endif /* < 3.17 */
33
34+#if LINUX_VERSION_IS_GEQ(5,3,0)
35+/*
36+ * In v5.3, this function was renamed, so rename it here for v5.3+.
37+ * When we merge v5.3 back from upstream, the opposite should be done
38+ * (i.e. we will have _boottime_ and need to rename to _boot_ in <
39+ * v5.3 instead).
40+*/
41+#define ktime_get_boot_ns ktime_get_boottime_ns
42+#endif /* > 5.3.0 */
43+
44 #if LINUX_VERSION_IS_LESS(4,18,0)
45 extern time64_t ktime_get_boottime_seconds(void);
46 #endif /* < 4.18 */
diff --git a/debian/patches/series b/debian/patches/series
index e037267..c03ca2f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
30003-backport-apply-__copy-to-init_module-cleanup_module.patch30003-backport-apply-__copy-to-init_module-cleanup_module.patch
40004-backport-fix-build-for-v5.2-kernel.patch40004-backport-fix-build-for-v5.2-kernel.patch
50005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch50005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch
60006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch

Subscribers

People subscribed via source and target branches

to all changes: