From dbe31c66431986713f46122ac3a600282ddcd264 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 13 Dec 2014 11:46:32 +0000 Subject: [PATCH 01/43] [sh4] Build with gcc-4.8 (Closes: #772602) svn path=/dists/sid/linux/; revision=22193 --- debian/changelog | 6 ++++++ debian/config/sh4/defines | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3cb47d244..ef681c423 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium + + * [sh4] Build with gcc-4.8 (Closes: #772602) + + -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 + linux (3.16.7-ckt2-1) unstable; urgency=high * New upstream stable update: diff --git a/debian/config/sh4/defines b/debian/config/sh4/defines index bc9ba7b5c..84dd7f8db 100644 --- a/debian/config/sh4/defines +++ b/debian/config/sh4/defines @@ -3,7 +3,6 @@ flavours: sh7751r sh7785lcr kernel-arch: sh -compiler: gcc-4.7 [build] image-file: arch/sh/boot/zImage From 0ab43721faa90657737f61c0663cf400c59686e5 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Sat, 13 Dec 2014 12:20:44 +0000 Subject: [PATCH 02/43] [armhf] Enable support for support OMAP5432 uEVM Based on a patch from Chen Baozi (Closes: #772953) svn path=/dists/sid/linux/; revision=22194 --- debian/changelog | 8 ++++++ debian/config/armhf/config.armmp | 26 +++++++++++++++++++ debian/config/config | 2 +- .../armhf/modules/armhf-armmp/usb-modules | 1 + 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ef681c423..85a7e078d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,15 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium + [ Ben Hutchings ] * [sh4] Build with gcc-4.8 (Closes: #772602) + [ Ian Campbell ] + * [armhf] Enable support for support OMAP5432 uEVM by enabling: + TI_SOC_THERMAL, MFD_PALMAS, REGULATOR_PALMAS, REGULATOR_PBIAS, + REGULATOR_TI_ABB, OMAP5_DSS_HDMI, DISPLAY_ENCODER_TPD12S015, + DISPLAY_CONNECTOR_HDMI, USB_DWC3_OMAP, EXTCON_PALMAS, TI_EMIF and DDR. + Based on a patch from Chen Baozi (Closes: #772953) + -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 linux (3.16.7-ckt2-1) unstable; urgency=high diff --git a/debian/config/armhf/config.armmp b/debian/config/armhf/config.armmp index 62496a3c6..ce0895072 100644 --- a/debian/config/armhf/config.armmp +++ b/debian/config/armhf/config.armmp @@ -346,6 +346,11 @@ CONFIG_RADIO_WL128X=m ## CONFIG_IR_GPIO_CIR=m +## +## drivers/memory/Kconfig +## +CONFIG_TI_EMIF=m + ## ## file: drivers/mfd/Kconfig ## @@ -356,6 +361,7 @@ CONFIG_MFD_MC13XXX_I2C=m CONFIG_MFD_SEC_CORE=y CONFIG_MFD_TI_AM335X_TSCADC=m CONFIG_TWL6040_CORE=y +CONFIG_MFD_PALMAS=y ## ## file: drivers/misc/Kconfig @@ -628,6 +634,9 @@ CONFIG_REGULATOR_S2MPS11=m CONFIG_REGULATOR_S5M8767=m CONFIG_REGULATOR_TWL4030=y CONFIG_REGULATOR_VEXPRESS=m +CONFIG_REGULATOR_PBIAS=m +CONFIG_REGULATOR_TI_ABB=m +CONFIG_REGULATOR_PALMAS=m ## ## file: drivers/rtc/Kconfig @@ -707,6 +716,14 @@ CONFIG_TIDSPBRIDGE_RECOVERY=y ## CONFIG_ARMADA_THERMAL=y +## +## file: drivers/thermal/ti-soc-thermal/Kconfig +## +CONFIG_TI_SOC_THERMAL=m +CONFIG_TI_THERMAL=y +CONFIG_OMAP4_THERMAL=y +CONFIG_OMAP5_THERMAL=y + ## ## file: drivers/tty/serial/Kconfig ## @@ -758,6 +775,7 @@ CONFIG_USB_CHIPIDEA_DEBUG=y ## CONFIG_USB_DWC3=m CONFIG_USB_DWC3_HOST=y +CONFIG_USB_DWC3_OMAP=m CONFIG_USB_DWC3_EXYNOS=m # CONFIG_USB_DWC3_PCI is not set @@ -830,12 +848,15 @@ CONFIG_FB_SIMPLE=y CONFIG_OMAP2_DSS=m CONFIG_OMAP2_DSS_VENC=y CONFIG_OMAP4_DSS_HDMI=y +CONFIG_OMAP5_DSS_HDMI=y CONFIG_OMAP2_DSS_SDI=y ## ## file: drivers/video/fbdev/omap2/displays-new/Kconfig ## CONFIG_DISPLAY_PANEL_SONY_ACX565AKM=m +CONFIG_DISPLAY_ENCODER_TPD12S015=m +CONFIG_DISPLAY_CONNECTOR_HDMI=m ## ## file: drivers/video/fbdev/omap2/omapfb/Kconfig @@ -895,3 +916,8 @@ CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m CONFIG_SND_OMAP_SOC_OMAP_HDMI=m CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m +## +## file: drivers/extcon/Kconfig +## +CONFIG_EXTCON=m +CONFIG_EXTCON_PALMAS=m diff --git a/debian/config/config b/debian/config/config index 4caa1b36e..6c5d79349 100644 --- a/debian/config/config +++ b/debian/config/config @@ -2012,7 +2012,7 @@ CONFIG_USB_ZR364XX=m ## ## file: drivers/memory/Kconfig ## -# CONFIG_MEMORY is not set +CONFIG_MEMORY=y ## ## file: drivers/memstick/Kconfig diff --git a/debian/installer/armhf/modules/armhf-armmp/usb-modules b/debian/installer/armhf/modules/armhf-armmp/usb-modules index 38f91fe3a..0828c55ae 100644 --- a/debian/installer/armhf/modules/armhf-armmp/usb-modules +++ b/debian/installer/armhf/modules/armhf-armmp/usb-modules @@ -1,6 +1,7 @@ #include phy-sun4i-usb dwc3-exynos +dwc3-omap ohci-exynos ehci-exynos phy-exynos-usb2 From feb126f08447df1291f62edc76b1a8e2814ab37f Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Sat, 13 Dec 2014 12:20:47 +0000 Subject: [PATCH 03/43] [armhf] Enable some further OMAP uEVM related options PINCTRL, GPIO and RTC. svn path=/dists/sid/linux/; revision=22195 --- debian/changelog | 5 +++-- debian/config/armhf/config.armmp | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 85a7e078d..6924d507c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,8 +6,9 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: TI_SOC_THERMAL, MFD_PALMAS, REGULATOR_PALMAS, REGULATOR_PBIAS, - REGULATOR_TI_ABB, OMAP5_DSS_HDMI, DISPLAY_ENCODER_TPD12S015, - DISPLAY_CONNECTOR_HDMI, USB_DWC3_OMAP, EXTCON_PALMAS, TI_EMIF and DDR. + REGULATOR_TI_ABB, PINCTRL_PALMAS, GPIO_PALMAS, RTC_DRV_PALMAS, + OMAP5_DSS_HDMI, DISPLAY_ENCODER_TPD12S015, DISPLAY_CONNECTOR_HDMI, + USB_DWC3_OMAP, EXTCON_PALMAS, TI_EMIF and DDR. Based on a patch from Chen Baozi (Closes: #772953) -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armhf/config.armmp b/debian/config/armhf/config.armmp index ce0895072..8781e59a2 100644 --- a/debian/config/armhf/config.armmp +++ b/debian/config/armhf/config.armmp @@ -184,6 +184,7 @@ CONFIG_GPIO_GENERIC_PLATFORM=m CONFIG_GPIO_PCA953X=m CONFIG_GPIO_TWL4030=y CONFIG_GPIO_TWL6040=y +CONFIG_GPIO_PALMAS=y ## ## file: drivers/gpu/drm/Kconfig @@ -590,6 +591,7 @@ CONFIG_PHY_EXYNOS5_USBDRD=m ## file: drivers/pinctrl/Kconfig ## CONFIG_PINCTRL_SINGLE=y +CONFIG_PINCTRL_PALMAS=y ## ## file: drivers/pinctrl/vt8500/Kconfig @@ -655,6 +657,7 @@ CONFIG_RTC_DRV_MV=y CONFIG_RTC_DRV_MC13XXX=y CONFIG_RTC_DRV_MXC=y CONFIG_RTC_DRV_SNVS=y +CONFIG_RTC_DRV_PALMAS=y ## ## file: drivers/scsi/Kconfig From eb1f86e012a2cce3b7b381ed59c52fbd494208f9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 15 Dec 2014 22:01:58 +0000 Subject: [PATCH 04/43] Fix inconsistent ABI name generation in debian/bin/{abiupdate,buildcheck,gencontrol}.py (Closes: #773233) svn path=/dists/sid/linux/; revision=22199 --- debian/bin/abiupdate.py | 23 ++++++++++++++--------- debian/bin/buildcheck.py | 6 ++---- debian/bin/gencontrol.py | 1 + debian/changelog | 2 ++ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/debian/bin/abiupdate.py b/debian/bin/abiupdate.py index f557a98e1..2808b3f51 100755 --- a/debian/bin/abiupdate.py +++ b/debian/bin/abiupdate.py @@ -68,9 +68,9 @@ class Main(object): self.version = changelog.version.linux_version self.version_source = changelog.version.complete - local_config = ConfigCoreDump(fp=open("debian/config.defines.dump", "rb")) + self.config = ConfigCoreDump(fp=open("debian/config.defines.dump", "rb")) - self.version_abi = local_config['version', ]['abiname'] + self.version_abi = self.config['version', ]['abiname'] def __call__(self): self.dir = tempfile.mkdtemp(prefix='abiupdate') @@ -99,13 +99,18 @@ class Main(object): return base_out def get_abi(self, arch, prefix): - filename = "linux-headers-%s-%s_%s_%s.deb" % (self.version_abi, prefix, self.version_source, arch) + try: + version_abi = (self.config['version',]['abiname_base'] + '-' + + self.config['abi', arch]['abiname']) + except KeyError: + version_abi = self.version_abi + filename = "linux-headers-%s-%s_%s_%s.deb" % (version_abi, prefix, self.version_source, arch) f = self.retrieve_package(self.url, filename, arch) d = self.extract_package(f, "linux-headers-%s_%s" % (prefix, arch)) - f1 = d + "/usr/src/linux-headers-%s-%s/Module.symvers" % (self.version_abi, prefix) + f1 = d + "/usr/src/linux-headers-%s-%s/Module.symvers" % (version_abi, prefix) s = Symbols(open(f1)) shutil.rmtree(d) - return s + return version_abi, s def get_config(self): filename = "linux-support-%s_%s_all.deb" % (self.version_abi, self.version_source) @@ -129,8 +134,8 @@ class Main(object): f_out.write(r) return filename_out - def save_abi(self, symbols, arch, featureset, flavour): - dir = "debian/abi/%s" % self.version_abi + def save_abi(self, version_abi, symbols, arch, featureset, flavour): + dir = "debian/abi/%s" % version_abi if not os.path.exists(dir): os.makedirs(dir) out = "%s/%s_%s_%s" % (dir, arch, featureset, flavour) @@ -170,8 +175,8 @@ class Main(object): else: localversion = featureset + '-' + flavour - abi = self.get_abi(arch, localversion) - self.save_abi(abi, arch, featureset, flavour) + version_abi, abi = self.get_abi(arch, localversion) + self.save_abi(version_abi, abi, arch, featureset, flavour) self.log("Ok.\n") except HTTPError as e: self.log("Failed to retrieve %s: %s\n" % (e.filename, e)) diff --git a/debian/bin/buildcheck.py b/debian/bin/buildcheck.py index a6f6f062f..38241df87 100755 --- a/debian/bin/buildcheck.py +++ b/debian/bin/buildcheck.py @@ -44,13 +44,11 @@ class CheckAbi(object): self.filename_new = "%s/Module.symvers" % dir - upstream_version = self.config['version',]['upstream'] try: - version_abi = (upstream_version + '-' + + version_abi = (self.config['version',]['abiname_base'] + '-' + self.config['abi', arch]['abiname']) except KeyError: - version_abi = (upstream_version + '-' + - self.config['abi', ]['abiname']) + version_abi = self.config['version',]['abiname'] self.filename_ref = "debian/abi/%s/%s_%s_%s" % (version_abi, arch, featureset, flavour) def __call__(self, out): diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 6c0701dce..e72921ffc 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -477,6 +477,7 @@ class Gencontrol(Base): } self.config['version', ] = {'source': self.version.complete, 'upstream': self.version.linux_upstream, + 'abiname_base': self.abiname_version, 'abiname': (self.abiname_version + self.abiname_part)} diff --git a/debian/changelog b/debian/changelog index 6924d507c..97f84691b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium [ Ben Hutchings ] * [sh4] Build with gcc-4.8 (Closes: #772602) + * Fix inconsistent ABI name generation in + debian/bin/{abiupdate,buildcheck,gencontrol}.py (Closes: #773233) [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: From dc83676921ca35cdd541d47d638af4423134fe25 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 15 Dec 2014 22:38:49 +0000 Subject: [PATCH 05/43] iov: Revert unwanted ABI 'fix' in 3.16.7-ckt2-1 svn path=/dists/sid/linux/; revision=22200 --- debian/changelog | 1 + .../iovec-fix-abi-change-in-3.16.7-ckt1.patch | 65 +++++-------------- 2 files changed, 18 insertions(+), 48 deletions(-) diff --git a/debian/changelog b/debian/changelog index 97f84691b..505270433 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium * [sh4] Build with gcc-4.8 (Closes: #772602) * Fix inconsistent ABI name generation in debian/bin/{abiupdate,buildcheck,gencontrol}.py (Closes: #773233) + * iov: Revert unwanted ABI 'fix' in 3.16.7-ckt2-1 [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/patches/debian/iovec-fix-abi-change-in-3.16.7-ckt1.patch b/debian/patches/debian/iovec-fix-abi-change-in-3.16.7-ckt1.patch index bf9d8059e..1df94d511 100644 --- a/debian/patches/debian/iovec-fix-abi-change-in-3.16.7-ckt1.patch +++ b/debian/patches/debian/iovec-fix-abi-change-in-3.16.7-ckt1.patch @@ -1,58 +1,27 @@ From: Ben Hutchings -Date: Mon, 08 Dec 2014 01:22:04 +0000 -Subject: iovec: Fix ABI change in 3.16.7-ckt1 +Date: Mon, 15 Dec 2014 22:34:53 +0000 +Subject: iovec: Fix ABI change in 3.16.7-ckt2-1 Forwarded: not-needed -The combination of 'switch iov_iter_get_pages() to passing maximal -number of pages' and 'fuse: honour max_read and max_write in direct_io -mode' adds a new parameter to iov_iter_get_pages(). +I got confused and tried to fix an ABI change from upstream changes +that we already had. Thanks to #773233 this wasn't spotted before +upload. Keep the extra function around. -I don't think it's very likely to be used OOT, but just in case it is: -- Rename the new version to iov_iter_get_pages_fixed() -- Define and export iov_iter_get_pages() with the old parameters - for ABI compatibility -- Define iov_iter_get_pages as a macro alias for iov_iter_get_pages_fixed - ---- a/include/linux/uio.h -+++ b/include/linux/uio.h -@@ -84,7 +84,10 @@ unsigned long iov_iter_alignment(const s - void iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov, - unsigned long nr_segs, size_t count); - ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages, -+ size_t maxsize, size_t *start); -+ssize_t iov_iter_get_pages_fixed(struct iov_iter *i, struct page **pages, - size_t maxsize, unsigned maxpages, size_t *start); -+#define iov_iter_get_pages iov_iter_get_pages_fixed - ssize_t iov_iter_get_pages_alloc(struct iov_iter *i, struct page ***pages, - size_t maxsize, size_t *start); - int iov_iter_npages(const struct iov_iter *i, int maxpages); --- a/mm/iov_iter.c +++ b/mm/iov_iter.c -@@ -714,7 +714,8 @@ unsigned long iov_iter_alignment(const s +@@ -725,6 +725,15 @@ ssize_t iov_iter_get_pages(struct iov_it } - EXPORT_SYMBOL(iov_iter_alignment); - --ssize_t iov_iter_get_pages(struct iov_iter *i, -+/* Called as iov_iter_get_pages() */ -+ssize_t iov_iter_get_pages_fixed(struct iov_iter *i, - struct page **pages, size_t maxsize, unsigned maxpages, - size_t *start) - { -@@ -723,6 +724,17 @@ ssize_t iov_iter_get_pages(struct iov_it - else - return get_pages_iovec(i, pages, maxsize, maxpages, start); - } -+EXPORT_SYMBOL(iov_iter_get_pages_fixed); -+ -+/* ABI compatibility wrapper */ -+#undef iov_iter_get_pages -+ssize_t iov_iter_get_pages(struct iov_iter *i, -+ struct page **pages, size_t maxsize, -+ size_t *start) -+{ -+ return iov_iter_get_pages_fixed(i, pages, maxsize, maxsize / PAGE_SIZE, -+ start); -+} EXPORT_SYMBOL(iov_iter_get_pages); ++/* bwh: Alias for iov_iter_get_pages() because I'm an idiot */ ++ssize_t iov_iter_get_pages_fixed(struct iov_iter *i, ++ struct page **pages, size_t maxsize, unsigned maxpages, ++ size_t *start) ++{ ++ return iov_iter_get_pages(i, pages, maxsize, maxpages, start); ++} ++EXPORT_SYMBOL(iov_iter_get_pages_fixed); ++ ssize_t iov_iter_get_pages_alloc(struct iov_iter *i, + struct page ***pages, size_t maxsize, + size_t *start) From 0e5e0ba34c4ee57a4ca8bf40b0a1f7cffcb85a95 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 15 Dec 2014 22:48:13 +0000 Subject: [PATCH 06/43] Ignore ABI changes in mm, of functions not really used by modules svn path=/dists/sid/linux/; revision=22201 --- debian/changelog | 1 + debian/config/defines | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 505270433..6492cda1a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium * Fix inconsistent ABI name generation in debian/bin/{abiupdate,buildcheck,gencontrol}.py (Closes: #773233) * iov: Revert unwanted ABI 'fix' in 3.16.7-ckt2-1 + * Ignore ABI changes in mm, of functions not really used by modules [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/config/defines b/debian/config/defines index 61890753a..2a872b2c5 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -1,9 +1,14 @@ [abi] abiname: 4 ignore-changes: +# Should not be used from OOT module:arch/x86/kvm/kvm module:drivers/mtd/spi-nor/spi-nor module:drivers/net/wireless/iwlwifi/iwlwifi +# Apparently not used OOT + __add_pages + __remove_pages + of_device_is_stdout_path [base] arches: From bbecbd8cc48db224565a2d40d6ead968e0cedce3 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:49:43 +0000 Subject: [PATCH 07/43] [armel] Warn if image size leaves less than 1% spare capacity in the flash. This allows some slack for growth over the lifetime of a stable release. svn path=/dists/sid/linux/; revision=22203 --- debian/bin/buildcheck.py | 17 ++++++++++++++++- debian/changelog | 3 +++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/debian/bin/buildcheck.py b/debian/bin/buildcheck.py index 38241df87..8cad29989 100755 --- a/debian/bin/buildcheck.py +++ b/debian/bin/buildcheck.py @@ -172,6 +172,8 @@ class CheckImage(object): self.dir = dir self.arch, self.featureset, self.flavour = arch, featureset, flavour + self.changelog = Changelog(version=VersionLinux)[0] + self.config_entry_build = config.merge('build', arch, featureset, flavour) self.config_entry_image = config.merge('image', arch, featureset, flavour) @@ -204,7 +206,20 @@ class CheckImage(object): out.write('Image too large (%d > %d)! Refusing to continue.\n' % (size, value)) return 1 - out.write('Image fits (%d <= %d). Continuing.\n' % (size, value)) + # 1% overhead is desirable in order to cope with growth + # through the lifetime of a stable release. Warn if this is + # not the case. + usage = (float(size)/value) * 100.0 + out.write('Image size %d/%d, using %.2f%%. ' % (size, value, usage)) + if size > value: + sys.write('Too large. Refusing to continue.\n') + return 1 + elif usage >= 99.0: + out.write('Under 1%% space in %s. ' % self.changelog.distribution) + else: + out.write('Image fits. ') + out.write('Continuing.\n') + return 0 diff --git a/debian/changelog b/debian/changelog index 6492cda1a..ae585760f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,9 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium OMAP5_DSS_HDMI, DISPLAY_ENCODER_TPD12S015, DISPLAY_CONNECTOR_HDMI, USB_DWC3_OMAP, EXTCON_PALMAS, TI_EMIF and DDR. Based on a patch from Chen Baozi (Closes: #772953) + * [armel] Change configuration to reduce kernel image size + - Warn if image size leaves less than 1% spare capacity in the flash. This + allows some slack for growth over the lifetime of a stable release. -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 From eb0e5184dae3cc00ee6f433b4e860d305be3146b Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:51:33 +0000 Subject: [PATCH 08/43] [armel/kirkwood] Disable RD_LZO and RD_LZ4 svn path=/dists/sid/linux/; revision=22204 --- debian/changelog | 1 + debian/config/armel/config.kirkwood | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index ae585760f..a6bce3b28 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium * [armel] Change configuration to reduce kernel image size - Warn if image size leaves less than 1% spare capacity in the flash. This allows some slack for growth over the lifetime of a stable release. + - [/kirkwood] Disable RD_LZO and RD_LZ4 -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config.kirkwood b/debian/config/armel/config.kirkwood index dc02c4579..1b6a92d56 100644 --- a/debian/config/armel/config.kirkwood +++ b/debian/config/armel/config.kirkwood @@ -678,3 +678,8 @@ CONFIG_SND_KIRKWOOD_SOC=m CONFIG_SND_KIRKWOOD_SOC_OPENRD=m CONFIG_SND_KIRKWOOD_SOC_T5325=m +## +## file: usr/Kconfig +## +# CONFIG_RD_LZO is not set +# CONFIG_RD_LZ4 is not set From 882a70be5e24e13fac253bda5f6a6d9c17b7d9ef Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:04 +0000 Subject: [PATCH 09/43] [armel/kirkwood] mm: Disable KSM svn path=/dists/sid/linux/; revision=22205 --- debian/changelog | 1 + debian/config/armel/config.kirkwood | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index a6bce3b28..4314c9419 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - Warn if image size leaves less than 1% spare capacity in the flash. This allows some slack for growth over the lifetime of a stable release. - [/kirkwood] Disable RD_LZO and RD_LZ4 + - [/kirkwood] mm: Disable KSM -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config.kirkwood b/debian/config/armel/config.kirkwood index 1b6a92d56..32ae29d3e 100644 --- a/debian/config/armel/config.kirkwood +++ b/debian/config/armel/config.kirkwood @@ -641,6 +641,7 @@ CONFIG_FLATMEM_MANUAL=y # CONFIG_DISCONTIGMEM_MANUAL is not set # CONFIG_SPARSEMEM_MANUAL is not set ## end choice +# CONFIG_KSM is not set ## ## file: net/atm/Kconfig From ad649354cdd904db60c3cddb2fb8f74d78b57d89 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:18 +0000 Subject: [PATCH 10/43] [armel/kirkwood] Disable CHECKPOINT_RESTORE svn path=/dists/sid/linux/; revision=22206 --- debian/changelog | 1 + debian/config/armel/config.kirkwood | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4314c9419..da5295415 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium allows some slack for growth over the lifetime of a stable release. - [/kirkwood] Disable RD_LZO and RD_LZ4 - [/kirkwood] mm: Disable KSM + - [/kirkwood] Disable CHECKPOINT_RESTORE -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config.kirkwood b/debian/config/armel/config.kirkwood index 32ae29d3e..6aa776600 100644 --- a/debian/config/armel/config.kirkwood +++ b/debian/config/armel/config.kirkwood @@ -619,6 +619,7 @@ CONFIG_UBIFS_FS=y ## ## file: init/Kconfig ## +# CONFIG_CHECKPOINT_RESTORE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y ## From fc50a9a0658a797c602ba0f1faec2a508a6b24a2 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:22 +0000 Subject: [PATCH 11/43] [armel/kirkwood] Disable ZSMALLOC svn path=/dists/sid/linux/; revision=22207 --- debian/changelog | 1 + debian/config/armel/config.kirkwood | 1 + debian/config/armel/defines | 11 +++++++++++ 3 files changed, 13 insertions(+) diff --git a/debian/changelog b/debian/changelog index da5295415..f6cf32022 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/kirkwood] Disable RD_LZO and RD_LZ4 - [/kirkwood] mm: Disable KSM - [/kirkwood] Disable CHECKPOINT_RESTORE + - [/kirkwood] Disable ZSMALLOC -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config.kirkwood b/debian/config/armel/config.kirkwood index 6aa776600..8b7c5bd53 100644 --- a/debian/config/armel/config.kirkwood +++ b/debian/config/armel/config.kirkwood @@ -643,6 +643,7 @@ CONFIG_FLATMEM_MANUAL=y # CONFIG_SPARSEMEM_MANUAL is not set ## end choice # CONFIG_KSM is not set +# CONFIG_ZSMALLOC is not set ## ## file: net/atm/Kconfig diff --git a/debian/config/armel/defines b/debian/config/armel/defines index 1624ae5b0..16de81755 100644 --- a/debian/config/armel/defines +++ b/debian/config/armel/defines @@ -40,6 +40,17 @@ recommends: uboot-mkimage # QNAP TS-119/TS-219: 2097152 - 8 - 64 = 2097080 check-size: 2097080 +[kirkwood_abi] +ignore-changes: + # Disabled in 3.16.7-ckt2-2 to reduce image size (#772983) + zs_create_pool + zs_destroy_pool + zs_free + zs_get_total_size_bytes + zs_malloc + zs_map_object + zs_unmap_object + [orion5x_description] hardware: Marvell Orion hardware-long: Marvell Orion 5181, 5182 and 5281 based systems (QNAP TS-109/TS-209, etc) From 167139e297935ac4259dfb4e2e48cedb9884cca2 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:25 +0000 Subject: [PATCH 12/43] [armel/kirkwood] Disable CRYPTO_FIPS svn path=/dists/sid/linux/; revision=22208 --- debian/changelog | 1 + debian/config/armel/config.kirkwood | 5 +++++ debian/config/armel/defines | 1 + 3 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index f6cf32022..81485ad56 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/kirkwood] mm: Disable KSM - [/kirkwood] Disable CHECKPOINT_RESTORE - [/kirkwood] Disable ZSMALLOC + - [/kirkwood] Disable CRYPTO_FIPS -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config.kirkwood b/debian/config/armel/config.kirkwood index 8b7c5bd53..308e80aae 100644 --- a/debian/config/armel/config.kirkwood +++ b/debian/config/armel/config.kirkwood @@ -78,6 +78,11 @@ CONFIG_SGI_PARTITION=y CONFIG_ULTRIX_PARTITION=y CONFIG_SUN_PARTITION=y +## +## file: crypto/Kconfig +## +# CONFIG_CRYPTO_FIPS is not set + ## ## file: drivers/ata/Kconfig ## diff --git a/debian/config/armel/defines b/debian/config/armel/defines index 16de81755..668d00bfd 100644 --- a/debian/config/armel/defines +++ b/debian/config/armel/defines @@ -50,6 +50,7 @@ ignore-changes: zs_malloc zs_map_object zs_unmap_object + fips_enabled [orion5x_description] hardware: Marvell Orion From d055946e2394ff5072bbc85da72933edeab3eb96 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:29 +0000 Subject: [PATCH 13/43] [armel/kirkwood] Disable NET_MPLS_GSO svn path=/dists/sid/linux/; revision=22209 --- debian/changelog | 1 + debian/config/armel/config.kirkwood | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 81485ad56..969092ce2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/kirkwood] Disable CHECKPOINT_RESTORE - [/kirkwood] Disable ZSMALLOC - [/kirkwood] Disable CRYPTO_FIPS + - [/kirkwood] Disable NET_MPLS_GSO -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config.kirkwood b/debian/config/armel/config.kirkwood index 308e80aae..a1d21e856 100644 --- a/debian/config/armel/config.kirkwood +++ b/debian/config/armel/config.kirkwood @@ -669,6 +669,11 @@ CONFIG_ROSE=m ## CONFIG_IPV6=m +## +## file: net/mpls/Kconfig +## +# CONFIG_NET_MPLS_GSO is not set + ## ## file: sound/soc/Kconfig ## From 5ef74419e080a43e504e235af8ff5cc67cb5150f Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:35 +0000 Subject: [PATCH 14/43] [armel/kirkwood] Disable NETLINK_MMAP svn path=/dists/sid/linux/; revision=22210 --- debian/changelog | 1 + debian/config/armel/config.kirkwood | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 969092ce2..d60fac081 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/kirkwood] Disable ZSMALLOC - [/kirkwood] Disable CRYPTO_FIPS - [/kirkwood] Disable NET_MPLS_GSO + - [/kirkwood] Disable NETLINK_MMAP -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config.kirkwood b/debian/config/armel/config.kirkwood index a1d21e856..3c913aa1c 100644 --- a/debian/config/armel/config.kirkwood +++ b/debian/config/armel/config.kirkwood @@ -674,6 +674,11 @@ CONFIG_IPV6=m ## # CONFIG_NET_MPLS_GSO is not set +## +## file: net/netlink/Kconfig +## +# CONFIG_NETLINK_MMAP is not set + ## ## file: sound/soc/Kconfig ## From a61834eb59340a0b688da30f9a4e7c78caa11e2b Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:39 +0000 Subject: [PATCH 15/43] [armel/kirkwood] Disable PROFILING svn path=/dists/sid/linux/; revision=22211 --- debian/changelog | 1 + debian/config/armel/config.kirkwood | 1 + debian/config/armel/defines | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/debian/changelog b/debian/changelog index d60fac081..b5d19c746 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/kirkwood] Disable CRYPTO_FIPS - [/kirkwood] Disable NET_MPLS_GSO - [/kirkwood] Disable NETLINK_MMAP + - [/kirkwood] Disable PROFILING -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config.kirkwood b/debian/config/armel/config.kirkwood index 3c913aa1c..1f2110e84 100644 --- a/debian/config/armel/config.kirkwood +++ b/debian/config/armel/config.kirkwood @@ -626,6 +626,7 @@ CONFIG_UBIFS_FS=y ## # CONFIG_CHECKPOINT_RESTORE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_PROFILING is not set ## ## file: kernel/power/Kconfig diff --git a/debian/config/armel/defines b/debian/config/armel/defines index 668d00bfd..6002e1a99 100644 --- a/debian/config/armel/defines +++ b/debian/config/armel/defines @@ -51,6 +51,16 @@ ignore-changes: zs_map_object zs_unmap_object fips_enabled + dcookie_register + dcookie_unregister + get_dcookie + prof_on + profile_event_register + profile_event_unregister + profile_hits + ring_buffer_swap_cpu + task_handoff_register + task_handoff_unregister [orion5x_description] hardware: Marvell Orion From fd5b922f9474af7a0c1f674fa74c3804837b36a1 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:43 +0000 Subject: [PATCH 16/43] [armel/kirkwood] Disable BPF_JIT svn path=/dists/sid/linux/; revision=22212 --- debian/changelog | 1 + debian/config/armel/config.kirkwood | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index b5d19c746..cb50761d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,6 +25,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/kirkwood] Disable NET_MPLS_GSO - [/kirkwood] Disable NETLINK_MMAP - [/kirkwood] Disable PROFILING + - [/kirkwood] Disable BPF_JIT -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config.kirkwood b/debian/config/armel/config.kirkwood index 1f2110e84..81ea6d65b 100644 --- a/debian/config/armel/config.kirkwood +++ b/debian/config/armel/config.kirkwood @@ -651,6 +651,12 @@ CONFIG_FLATMEM_MANUAL=y # CONFIG_KSM is not set # CONFIG_ZSMALLOC is not set +## +## file: net/Kconfig +## +#. Saves about 3K +# CONFIG_BPF_JIT is not set + ## ## file: net/atm/Kconfig ## From 44a88551bb7c8b8167eb65dee843b7b241e7c692 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:47 +0000 Subject: [PATCH 17/43] [armel/kirkwood] Disable KPROBES svn path=/dists/sid/linux/; revision=22213 --- debian/changelog | 1 + debian/config/armel/config.kirkwood | 5 +++++ debian/config/armel/defines | 16 ++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/debian/changelog b/debian/changelog index cb50761d1..599575529 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/kirkwood] Disable NETLINK_MMAP - [/kirkwood] Disable PROFILING - [/kirkwood] Disable BPF_JIT + - [/kirkwood] Disable KPROBES -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config.kirkwood b/debian/config/armel/config.kirkwood index 81ea6d65b..236864548 100644 --- a/debian/config/armel/config.kirkwood +++ b/debian/config/armel/config.kirkwood @@ -1,3 +1,8 @@ +## +## file: arch/Kconfig +## +# CONFIG_KPROBES is not set + ## ## file: arch/arm/Kconfig ## diff --git a/debian/config/armel/defines b/debian/config/armel/defines index 6002e1a99..c2b28069b 100644 --- a/debian/config/armel/defines +++ b/debian/config/armel/defines @@ -61,6 +61,22 @@ ignore-changes: ring_buffer_swap_cpu task_handoff_register task_handoff_unregister + disable_kprobe + enable_kprobe + jprobe_return + profile_hits + register_jprobe + register_jprobes + register_kprobe + register_kprobes + register_kretprobe + register_kretprobes + unregister_jprobe + unregister_jprobes + unregister_kprobe + unregister_kprobes + unregister_kretprobe + unregister_kretprobes [orion5x_description] hardware: Marvell Orion From 2d258fcb734134a99461cc088bb604201a60b1e2 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:50 +0000 Subject: [PATCH 18/43] [armel/ixp4xx,orion5x]: Disable RD_LZO svn path=/dists/sid/linux/; revision=22214 --- debian/changelog | 1 + debian/config/armel/config-reduced | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 599575529..c97cc14f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/kirkwood] Disable PROFILING - [/kirkwood] Disable BPF_JIT - [/kirkwood] Disable KPROBES + - [/ixp4xx,orion5x]: Disable RD_LZO -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config-reduced b/debian/config/armel/config-reduced index 2b64af876..409d39fb8 100644 --- a/debian/config/armel/config-reduced +++ b/debian/config/armel/config-reduced @@ -84,5 +84,5 @@ CONFIG_IPV6=m ## ## file: usr/Kconfig ## +# CONFIG_RD_LZO is not set # CONFIG_RD_LZ4 is not set - From 7c5b251899b373872dfabe4ad5aa4253ab505c68 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:53 +0000 Subject: [PATCH 19/43] [armel/ixp4xx,orion5x]: Disable PROFILING svn path=/dists/sid/linux/; revision=22215 --- debian/changelog | 1 + debian/config/armel/config-reduced | 1 + debian/config/armel/defines | 120 +++++++++++++++++++++++++++++ 3 files changed, 122 insertions(+) diff --git a/debian/changelog b/debian/changelog index c97cc14f6..4c24938ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/kirkwood] Disable BPF_JIT - [/kirkwood] Disable KPROBES - [/ixp4xx,orion5x]: Disable RD_LZO + - [/ixp4xx,orion5x]: Disable PROFILING -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config-reduced b/debian/config/armel/config-reduced index 409d39fb8..7ad9aa58c 100644 --- a/debian/config/armel/config-reduced +++ b/debian/config/armel/config-reduced @@ -30,6 +30,7 @@ CONFIG_IOSCHED_DEADLINE=m CONFIG_CC_OPTIMIZE_FOR_SIZE=y #. Saves about 17K, and none of the quirks are likely to be needed # CONFIG_PCI_QUIRKS is not set +# CONFIG_PROFILING is not set ## ## file: kernel/power/Kconfig diff --git a/debian/config/armel/defines b/debian/config/armel/defines index c2b28069b..99efdee75 100644 --- a/debian/config/armel/defines +++ b/debian/config/armel/defines @@ -30,6 +30,66 @@ configs: armel/config-reduced armel/config.ixp4xx +[ixp4xx_abi] +ignore-changes: + # Disabled in 3.16.7-ckt2-2 to reduce image size (#772983) + __ring_buffer_alloc + dcookie_register + dcookie_unregister + get_dcookie + prof_on + profile_event_register + profile_event_unregister + profile_hits + ring_buffer_alloc_read_page + ring_buffer_bytes_cpu + ring_buffer_change_overwrite + ring_buffer_commit_overrun_cpu + ring_buffer_consume + ring_buffer_discard_commit + ring_buffer_dropped_events_cpu + ring_buffer_empty + ring_buffer_empty_cpu + ring_buffer_entries + ring_buffer_entries_cpu + ring_buffer_event_data + ring_buffer_event_length + ring_buffer_free + ring_buffer_free_read_page + ring_buffer_iter_empty + ring_buffer_iter_peek + ring_buffer_iter_reset + ring_buffer_lock_reserve + ring_buffer_normalize_time_stamp + ring_buffer_oldest_event_ts + ring_buffer_overrun_cpu + ring_buffer_overruns + ring_buffer_peek + ring_buffer_read + ring_buffer_read_events_cpu + ring_buffer_read_finish + ring_buffer_read_page + ring_buffer_read_prepare + ring_buffer_read_prepare_sync + ring_buffer_read_start + ring_buffer_record_disable + ring_buffer_record_disable_cpu + ring_buffer_record_enable + ring_buffer_record_enable_cpu + ring_buffer_record_off + ring_buffer_record_on + ring_buffer_reset + ring_buffer_reset_cpu + ring_buffer_resize + ring_buffer_size + ring_buffer_swap_cpu + ring_buffer_time_stamp + ring_buffer_unlock_commit + ring_buffer_write + task_handoff_register + task_handoff_unregister + trace_clock_local + [kirkwood_description] hardware: Marvell Kirkwood hardware-long: Marvell Kirkwood based systems (SheevaPlug, QNAP TS-119/TS-219, etc) @@ -92,6 +152,66 @@ configs: armel/config-reduced armel/config.orion5x +[orion5x_abi] +ignore-changes: + # Disabled in 3.16.7-ckt2-2 to reduce image size (#772983) + __ring_buffer_alloc + dcookie_register + dcookie_unregister + get_dcookie + prof_on + profile_event_register + profile_event_unregister + profile_hits + ring_buffer_alloc_read_page + ring_buffer_bytes_cpu + ring_buffer_change_overwrite + ring_buffer_commit_overrun_cpu + ring_buffer_consume + ring_buffer_discard_commit + ring_buffer_dropped_events_cpu + ring_buffer_empty + ring_buffer_empty_cpu + ring_buffer_entries + ring_buffer_entries_cpu + ring_buffer_event_data + ring_buffer_event_length + ring_buffer_free + ring_buffer_free_read_page + ring_buffer_iter_empty + ring_buffer_iter_peek + ring_buffer_iter_reset + ring_buffer_lock_reserve + ring_buffer_normalize_time_stamp + ring_buffer_oldest_event_ts + ring_buffer_overrun_cpu + ring_buffer_overruns + ring_buffer_peek + ring_buffer_read + ring_buffer_read_events_cpu + ring_buffer_read_finish + ring_buffer_read_page + ring_buffer_read_prepare + ring_buffer_read_prepare_sync + ring_buffer_read_start + ring_buffer_record_disable + ring_buffer_record_disable_cpu + ring_buffer_record_enable + ring_buffer_record_enable_cpu + ring_buffer_record_off + ring_buffer_record_on + ring_buffer_reset + ring_buffer_reset_cpu + ring_buffer_resize + ring_buffer_size + ring_buffer_swap_cpu + ring_buffer_time_stamp + ring_buffer_unlock_commit + ring_buffer_write + task_handoff_register + task_handoff_unregister + trace_clock_local + [versatile_description] hardware: Versatile hardware-long: Versatile systems (PB, AB, Qemu) From 5cb95daf7eebb6bd2c4bbcd6cc0fc312cde41d38 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 19 Dec 2014 08:54:57 +0000 Subject: [PATCH 20/43] [armel/orion5x]: Make SERIO and dependants modular svn path=/dists/sid/linux/; revision=22216 --- debian/changelog | 1 + debian/config/armel/config-reduced | 9 +++++++++ debian/config/armel/config.ixp4xx | 9 --------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4c24938ca..204f7267d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,7 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/kirkwood] Disable KPROBES - [/ixp4xx,orion5x]: Disable RD_LZO - [/ixp4xx,orion5x]: Disable PROFILING + - [/orion5x]: Make SERIO and dependants modular -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/config/armel/config-reduced b/debian/config/armel/config-reduced index 7ad9aa58c..fa2f0a434 100644 --- a/debian/config/armel/config-reduced +++ b/debian/config/armel/config-reduced @@ -18,6 +18,15 @@ CONFIG_IOSCHED_DEADLINE=m ## # CONFIG_VGA_ARB is not set +## +## file: drivers/input/serio/Kconfig +## +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=m +# CONFIG_SERIO_RAW is not set + ## ## file: init/Kconfig ## diff --git a/debian/config/armel/config.ixp4xx b/debian/config/armel/config.ixp4xx index 93fc873cc..0fd5f12c2 100644 --- a/debian/config/armel/config.ixp4xx +++ b/debian/config/armel/config.ixp4xx @@ -263,15 +263,6 @@ CONFIG_KEYBOARD_ATKBD=m ## CONFIG_INPUT_IXP4XX_BEEPER=m -## -## file: drivers/input/serio/Kconfig -## -CONFIG_SERIO=m -CONFIG_SERIO_SERPORT=m -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=m -# CONFIG_SERIO_RAW is not set - ## ## file: drivers/input/touchscreen/Kconfig ## From 9de78beeeb85f736ea62c520b7288cca90f0a170 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 24 Dec 2014 16:00:02 +0000 Subject: [PATCH 21/43] Fix comment syntax - comments must not be indented svn path=/dists/sid/linux/; revision=22225 --- debian/config/armel/defines | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/config/armel/defines b/debian/config/armel/defines index 99efdee75..70ddf571e 100644 --- a/debian/config/armel/defines +++ b/debian/config/armel/defines @@ -32,7 +32,7 @@ configs: [ixp4xx_abi] ignore-changes: - # Disabled in 3.16.7-ckt2-2 to reduce image size (#772983) +# Disabled in 3.16.7-ckt2-2 to reduce image size (#772983) __ring_buffer_alloc dcookie_register dcookie_unregister From cb5a9360cfa9b2e536fd26a2e3ea3411f43da1a0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 24 Dec 2014 16:03:10 +0000 Subject: [PATCH 22/43] Fix comment syntax - comments must not be indented svn path=/dists/sid/linux/; revision=22226 --- debian/config/armel/defines | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/config/armel/defines b/debian/config/armel/defines index 70ddf571e..aeb83a42f 100644 --- a/debian/config/armel/defines +++ b/debian/config/armel/defines @@ -102,7 +102,7 @@ check-size: 2097080 [kirkwood_abi] ignore-changes: - # Disabled in 3.16.7-ckt2-2 to reduce image size (#772983) +# Disabled in 3.16.7-ckt2-2 to reduce image size (#772983) zs_create_pool zs_destroy_pool zs_free @@ -154,7 +154,7 @@ configs: [orion5x_abi] ignore-changes: - # Disabled in 3.16.7-ckt2-2 to reduce image size (#772983) +# Disabled in 3.16.7-ckt2-2 to reduce image size (#772983) __ring_buffer_alloc dcookie_register dcookie_unregister From a6291ddc6751fd36e37d3fcec2db4a8ae0477147 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 24 Dec 2014 16:54:34 +0000 Subject: [PATCH 23/43] [arm64] Enable pstore, efi-pstore, etc. (Closes: #773309) Enable PSTORE as built-in and EFI_VARS_PSTORE as module. Auto-load efivars and efi-pstore: - Replace features/all/efi-autoload-efivars.patch with the version that was committed upstream, which is not x86-specific. - Add a separate patch to make efi-pstore auto-load, as this was not included in the upstream commit. svn path=/dists/sid/linux/; revision=22227 --- debian/changelog | 2 + debian/config/arm64/config | 5 ++ .../all/efi-autoload-efi-pstore.patch | 16 +++++ .../features/all/efi-autoload-efivars.patch | 59 ++++++++++--------- debian/patches/series | 1 + 5 files changed, 56 insertions(+), 27 deletions(-) create mode 100644 debian/patches/features/all/efi-autoload-efi-pstore.patch diff --git a/debian/changelog b/debian/changelog index 204f7267d..c5d2be6ec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium debian/bin/{abiupdate,buildcheck,gencontrol}.py (Closes: #773233) * iov: Revert unwanted ABI 'fix' in 3.16.7-ckt2-1 * Ignore ABI changes in mm, of functions not really used by modules + * [arm64] Enable PSTORE as built-in and EFI_VARS_PSTORE as module; + ensure efivars and efi-pstore are loaded on EFI systems (Closes: #773309) [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/config/arm64/config b/debian/config/arm64/config index 9eb461960..b49853933 100644 --- a/debian/config/arm64/config +++ b/debian/config/arm64/config @@ -126,3 +126,8 @@ CONFIG_USB_OHCI_HCD_PLATFORM=m ## CONFIG_VIRTIO_MMIO=m +## +## file: fs/pstore/Kconfig +## +CONFIG_PSTORE=y + diff --git a/debian/patches/features/all/efi-autoload-efi-pstore.patch b/debian/patches/features/all/efi-autoload-efi-pstore.patch new file mode 100644 index 000000000..27672c9e0 --- /dev/null +++ b/debian/patches/features/all/efi-autoload-efi-pstore.patch @@ -0,0 +1,16 @@ +From: Ben Hutchings +Subject: x86/efi: Autoload efi-pstore +Date: Wed, 24 Dec 2014 17:44:06 +0100 +Bug-Debian: https://bugs.debian.org/703363 +Bug-Debian: https://bugs.debian.org/773309 +Forwarded: no + +efi-pstore should be auto-loaded on EFI systems, same as efivars. + +--- a/drivers/firmware/efi/efi-pstore.c ++++ b/drivers/firmware/efi/efi-pstore.c +@@ -400,3 +400,4 @@ module_exit(efivars_pstore_exit); + + MODULE_DESCRIPTION("EFI variable backend for pstore"); + MODULE_LICENSE("GPL"); ++MODULE_ALIAS("platform:efivars"); diff --git a/debian/patches/features/all/efi-autoload-efivars.patch b/debian/patches/features/all/efi-autoload-efivars.patch index 758605e78..8892af1c2 100644 --- a/debian/patches/features/all/efi-autoload-efivars.patch +++ b/debian/patches/features/all/efi-autoload-efivars.patch @@ -1,32 +1,44 @@ -From: Ben Hutchings -Subject: x86/efi: Autoload efivars -Date: Mon, 18 Mar 2013 22:59:14 +0000 +From: "Lee, Chun-Yi" +Date: Wed, 9 Jul 2014 18:39:29 +0800 +Subject: efi: Autoload efivars Bug-Debian: https://bugs.debian.org/703363 -Forwarded: no +Origin: https://git.kernel.org/linus/28d54022e6ff9c16bf4dacb5f64a97443a38caa9 + +The original patch is from Ben Hutchings's contribution to debian +kernel. Got Ben's permission to remove the code of efi-pstore.c and +send to linux-efi: +https://github.com/BlankOn/linux-debian/blob/master/debian/patches/features/all/efi-autoload-efivars.patch efivars is generally useful to have on EFI systems, and in some cases it may be impossible to load it after a kernel upgrade in order to -complete a boot loader update. efi-pstore is similarly useful though -less critical. At the same time we don't want to waste memory on -non-EFI systems by making them built-in. +complete a boot loader update. At the same time we don't want to waste +memory on non-EFI systems by making them built-in. Instead, give them module aliases as if they are platform drivers, and register a corresponding platform device whenever EFI runtime services are available. This should trigger udev to load them. +Signed-off-by: Lee, Chun-Yi +Cc: Ben Hutchings +Tested-by: Ard Biesheuvel +Signed-off-by: Matt Fleming --- ---- a/arch/x86/platform/efi/efi.c -+++ b/arch/x86/platform/efi/efi.c -@@ -42,6 +42,7 @@ + drivers/firmware/efi/efi.c | 15 +++++++++++++++ + drivers/firmware/efi/efivars.c | 1 + + 2 files changed, 16 insertions(+) + +--- a/drivers/firmware/efi/efi.c ++++ b/drivers/firmware/efi/efi.c +@@ -23,6 +23,7 @@ + #include + #include #include - #include - #include +#include - #include - #include -@@ -783,6 +784,20 @@ void __init efi_late_init(void) - efi_bgrt_init(); + struct efi __read_mostly efi = { + .mps = EFI_INVALID_TABLE_ADDR, +@@ -321,6 +322,20 @@ int __init efi_config_init(efi_config_ta + return 0; } +#ifdef CONFIG_EFI_VARS_MODULE @@ -43,12 +55,12 @@ are available. This should trigger udev to load them. +device_initcall(efi_load_efivars); +#endif + - void __init efi_set_executable(efi_memory_desc_t *md, bool executable) - { - u64 addr, npages; + #ifdef CONFIG_EFI_PARAMS_FROM_FDT + + #define UEFI_PARAM(name, prop, field) \ --- a/drivers/firmware/efi/efivars.c +++ b/drivers/firmware/efi/efivars.c -@@ -77,6 +77,7 @@ MODULE_AUTHOR("Matt Domsch Date: Mon, 29 Dec 2014 23:16:33 +0000 Subject: [PATCH 24/43] [arhmf] Add device-tree for LinkSprite pcDuino V3. Patch from Karsten Merker (Closes: #774067) svn path=/dists/sid/linux/; revision=22233 --- debian/changelog | 2 + ...rd-support-for-LinkSprite-pcDuino-V3.patch | 206 ++++++++++++++++++ ...ense-the-device-tree-under-GPLv2-X11.patch | 74 +++++++ debian/patches/series | 2 + 4 files changed, 284 insertions(+) create mode 100644 debian/patches/features/arm/dts-sun7i-Add-board-support-for-LinkSprite-pcDuino-V3.patch create mode 100644 debian/patches/features/arm/dts-sun7i-pcduino3-Relicense-the-device-tree-under-GPLv2-X11.patch diff --git a/debian/changelog b/debian/changelog index c5d2be6ec..757ba2b67 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,8 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/ixp4xx,orion5x]: Disable RD_LZO - [/ixp4xx,orion5x]: Disable PROFILING - [/orion5x]: Make SERIO and dependants modular + * [arhmf] Add device-tree for LinkSprite pcDuino V3. Patch from Karsten + Merker (Closes: #774067) -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/patches/features/arm/dts-sun7i-Add-board-support-for-LinkSprite-pcDuino-V3.patch b/debian/patches/features/arm/dts-sun7i-Add-board-support-for-LinkSprite-pcDuino-V3.patch new file mode 100644 index 000000000..cc66f0020 --- /dev/null +++ b/debian/patches/features/arm/dts-sun7i-Add-board-support-for-LinkSprite-pcDuino-V3.patch @@ -0,0 +1,206 @@ +From 04089927981f295b42cd695485383b2d11283d59 Mon Sep 17 00:00:00 2001 +From: Zoltan HERPAI +Date: Mon, 30 Jun 2014 23:57:56 +0200 +Subject: ARM: dts: sun7i: Add board support for LinkSprite pcDuino V3 +Origin: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=04089927981f295b42cd695485383b2d11283d59 + +The LinkSprite pcDuino V3 is an A20 based development board featuring +arduino compatible io headers, 1G RAM, 4G nand, sata, rtl8188cus usb wifi +and 100 Mbit ethernet using an ip101a phy: + +http://www.pcduino.com/pcduino-v3/ + +Signed-off-by: Zoltan HERPAI +[hdegoede@redhat.com: Various cleanups, correct led pins] +[hdegoede@redhat.com: Add axp209, ir and gpio-keys nodes] +Signed-off-by: Hans de Goede +Signed-off-by: Maxime Ripard + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -381,7 +381,8 @@ + sun7i-a20-cubietruck.dtb \ + sun7i-a20-i12-tvbox.dtb \ + sun7i-a20-olinuxino-lime.dtb \ +- sun7i-a20-olinuxino-micro.dtb ++ sun7i-a20-olinuxino-micro.dtb \ ++ sun7i-a20-pcduino3.dtb + dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ + tegra20-iris-512.dtb \ + tegra20-medcom-wide.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/sun7i-a20-pcduino3.dts +@@ -0,0 +1,173 @@ ++/* ++ * Copyright 2014 Zoltan HERPAI ++ * Zoltan HERPAI ++ * ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/dts-v1/; ++/include/ "sun7i-a20.dtsi" ++/include/ "sunxi-common-regulators.dtsi" ++#include ++#include ++ ++/ { ++ model = "LinkSprite pcDuino3"; ++ compatible = "linksprite,pcduino3", "allwinner,sun7i-a20"; ++ ++ soc@01c00000 { ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; ++ vmmc-supply = <®_vcc3v3>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ ++ usbphy: phy@01c13400 { ++ usb1_vbus-supply = <®_usb1_vbus>; ++ usb2_vbus-supply = <®_usb2_vbus>; ++ status = "okay"; ++ }; ++ ++ ehci0: usb@01c14000 { ++ status = "okay"; ++ }; ++ ++ ohci0: usb@01c14400 { ++ status = "okay"; ++ }; ++ ++ ahci: sata@01c18000 { ++ target-supply = <®_ahci_5v>; ++ status = "okay"; ++ }; ++ ++ ehci1: usb@01c1c000 { ++ status = "okay"; ++ }; ++ ++ ohci1: usb@01c1c400 { ++ status = "okay"; ++ }; ++ ++ pinctrl@01c20800 { ++ ahci_pwr_pin_a: ahci_pwr_pin@0 { ++ allwinner,pins = "PH2"; ++ }; ++ ++ led_pins_pcduino3: led_pins@0 { ++ allwinner,pins = "PH15", "PH16"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = <0>; ++ allwinner,pull = <0>; ++ }; ++ ++ key_pins_pcduino3: key_pins@0 { ++ allwinner,pins = "PH17", "PH18", "PH19"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = <0>; ++ allwinner,pull = <0>; ++ }; ++ }; ++ ++ ir0: ir@01c21800 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ir0_pins_a>; ++ status = "okay"; ++ }; ++ ++ uart0: serial@01c28000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_a>; ++ status = "okay"; ++ }; ++ ++ i2c0: i2c@01c2ac00 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins_a>; ++ status = "okay"; ++ ++ axp209: pmic@34 { ++ compatible = "x-powers,axp209"; ++ reg = <0x34>; ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 8>; ++ ++ interrupt-controller; ++ #interrupt-cells = <1>; ++ }; ++ }; ++ ++ gmac: ethernet@01c50000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gmac_pins_mii_a>; ++ phy = <&phy1>; ++ phy-mode = "mii"; ++ status = "okay"; ++ ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&led_pins_pcduino3>; ++ ++ tx { ++ label = "pcduino3:green:tx"; ++ gpios = <&pio 7 15 GPIO_ACTIVE_LOW>; ++ }; ++ ++ rx { ++ label = "pcduino3:green:rx"; ++ gpios = <&pio 7 16 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&key_pins_pcduino3>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ button@0 { ++ label = "Key Back"; ++ linux,code = ; ++ gpios = <&pio 7 17 GPIO_ACTIVE_LOW>; ++ }; ++ button@1 { ++ label = "Key Home"; ++ linux,code = ; ++ gpios = <&pio 7 18 GPIO_ACTIVE_LOW>; ++ }; ++ button@2 { ++ label = "Key Menu"; ++ linux,code = ; ++ gpios = <&pio 7 19 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ reg_usb1_vbus: usb1-vbus { ++ status = "okay"; ++ }; ++ ++ reg_usb2_vbus: usb2-vbus { ++ status = "okay"; ++ }; ++ ++ reg_ahci_5v: ahci-5v { ++ gpio = <&pio 7 2 0>; ++ status = "okay"; ++ }; ++}; diff --git a/debian/patches/features/arm/dts-sun7i-pcduino3-Relicense-the-device-tree-under-GPLv2-X11.patch b/debian/patches/features/arm/dts-sun7i-pcduino3-Relicense-the-device-tree-under-GPLv2-X11.patch new file mode 100644 index 000000000..007ca4fc6 --- /dev/null +++ b/debian/patches/features/arm/dts-sun7i-pcduino3-Relicense-the-device-tree-under-GPLv2-X11.patch @@ -0,0 +1,74 @@ +From ca4ee84ccac71eb05fe3bedff9283cf52d4b4aa7 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Tue, 2 Sep 2014 19:25:26 +0200 +Subject: ARM: sun7i: pcduino3: Relicense the device tree under GPLv2/X11 +Origin: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=ca4ee84ccac71eb05fe3bedff9283cf52d4b4aa7 + +The current GPL only licensing on the DTSI makes it very impractical for other +software components licensed under another license. + +In order to make it easier for them to reuse our device trees, relicense our +device trees under a GPL/X11 dual-license. + +Signed-off-by: Maxime Ripard +Acked-by: Zoltan HERPAI + +diff --git a/arch/arm/boot/dts/sun7i-a20-pcduino3.dts b/arch/arm/boot/dts/sun7i-a20-pcduino3.dts +index 046dfc0..8dca49b 100644 +--- a/arch/arm/boot/dts/sun7i-a20-pcduino3.dts ++++ b/arch/arm/boot/dts/sun7i-a20-pcduino3.dts +@@ -2,12 +2,48 @@ + * Copyright 2014 Zoltan HERPAI + * Zoltan HERPAI + * +- * The code contained herein is licensed under the GNU General Public +- * License. You may obtain a copy of the GNU General Public License +- * Version 2 or later at the following locations: ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. + * +- * http://www.opensource.org/licenses/gpl-license.html +- * http://www.gnu.org/copyleft/gpl.html ++ * a) This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public ++ * License along with this file; if not, write to the Free ++ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, ++ * MA 02110-1301 USA ++ * ++ * Or, alternatively, ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use, ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. + */ + + /dts-v1/; + diff --git a/debian/patches/series b/debian/patches/series index 0b1f0f712..1c16f9dff 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -110,6 +110,8 @@ features/arm/dts-sun7i-Add-uart3_pins_b-pinctrl-setting.patch features/arm/dts-sun7i-Add-Banana-Pi-board.patch features/arm/dts-sunxi-Banana-Pi-increase-startup-delay-for-the-GMAC-PHY-regulator.patch features/arm/dts-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME.patch +features/arm/dts-sun7i-Add-board-support-for-LinkSprite-pcDuino-V3.patch +features/arm/dts-sun7i-pcduino3-Relicense-the-device-tree-under-GPLv2-X11.patch features/arm64/drivers-net-Add-APM-X-Gene-SoC-ethernet-driver-suppo.patch features/arm64/drivers-net-NET_XGENE-should-depend-on-HAS_DMA.patch features/arm64/net-xgene-Check-negative-return-value-of-xgene_enet_.patch From d0e9352ff82cd079cc42198ff489e22fa66d04b4 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 29 Dec 2014 23:16:37 +0000 Subject: [PATCH 25/43] [armhf] Updates to udebs for OMAP5432 uEVM support. Based on a patch from Chen Baozi. Added pbias-regulator to mmc-modules and ohci-omap3, ehci-omap and phy-omap-usb2 to usb-modules (dwc3-omap was already present). Enabled CONFIG_REGULATOR_PALMAS and CONFIG_TI_PIPE3 as builtin since they are used by multiple subsystems. svn path=/dists/sid/linux/; revision=22234 --- debian/config/armhf/config.armmp | 4 ++-- debian/installer/armhf/modules/armhf-armmp/mmc-modules | 1 + debian/installer/armhf/modules/armhf-armmp/usb-modules | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/config/armhf/config.armmp b/debian/config/armhf/config.armmp index 8781e59a2..62e512f0c 100644 --- a/debian/config/armhf/config.armmp +++ b/debian/config/armhf/config.armmp @@ -579,7 +579,7 @@ CONFIG_PCI_MVEBU=y ## CONFIG_OMAP_CONTROL_PHY=m CONFIG_OMAP_USB2=m -CONFIG_TI_PIPE3=m +CONFIG_TI_PIPE3=y CONFIG_TWL4030_USB=m CONFIG_PHY_EXYNOS5250_SATA=m CONFIG_PHY_SUN4I_USB=m @@ -638,7 +638,7 @@ CONFIG_REGULATOR_TWL4030=y CONFIG_REGULATOR_VEXPRESS=m CONFIG_REGULATOR_PBIAS=m CONFIG_REGULATOR_TI_ABB=m -CONFIG_REGULATOR_PALMAS=m +CONFIG_REGULATOR_PALMAS=y ## ## file: drivers/rtc/Kconfig diff --git a/debian/installer/armhf/modules/armhf-armmp/mmc-modules b/debian/installer/armhf/modules/armhf-armmp/mmc-modules index 5718bd2e0..6ebd458ea 100644 --- a/debian/installer/armhf/modules/armhf-armmp/mmc-modules +++ b/debian/installer/armhf/modules/armhf-armmp/mmc-modules @@ -4,3 +4,4 @@ mmci omap_hsmmc sunxi-mmc dw_mmc-exynos +pbias-regulator diff --git a/debian/installer/armhf/modules/armhf-armmp/usb-modules b/debian/installer/armhf/modules/armhf-armmp/usb-modules index 0828c55ae..f00b24fc8 100644 --- a/debian/installer/armhf/modules/armhf-armmp/usb-modules +++ b/debian/installer/armhf/modules/armhf-armmp/usb-modules @@ -3,7 +3,10 @@ phy-sun4i-usb dwc3-exynos dwc3-omap ohci-exynos +ohci-omap3 ehci-exynos +ehci-omap phy-exynos-usb2 +phy-omap-usb2 ci_hdrc_imx phy-mxs-usb From b84001ac07f0a0ba8c4c3ce4af694a2db9a13768 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 29 Dec 2014 23:16:40 +0000 Subject: [PATCH 26/43] [xen] More netback fixes (including reintroducing support for feature-rx-notify, which was regressed by the fix to #767261). svn path=/dists/sid/linux/; revision=22235 --- debian/changelog | 2 + ...back-don-t-store-invalid-vif-pointer.patch | 50 +++++ ...able-NAPI-after-disabling-interrupts.patch | 38 ++++ ...ot-report-success-if-backend_create_.patch | 84 ++++++++ ...ort-frontends-without-feature-rx-not.patch | 188 ++++++++++++++++++ debian/patches/series | 4 + 6 files changed, 366 insertions(+) create mode 100644 debian/patches/bugfix/all/netback-don-t-store-invalid-vif-pointer.patch create mode 100644 debian/patches/bugfix/all/xen-netback-Disable-NAPI-after-disabling-interrupts.patch create mode 100644 debian/patches/bugfix/all/xen-netback-do-not-report-success-if-backend_create_.patch create mode 100644 debian/patches/bugfix/all/xen-netback-support-frontends-without-feature-rx-not.patch diff --git a/debian/changelog b/debian/changelog index 757ba2b67..109c22a45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,6 +34,8 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium - [/orion5x]: Make SERIO and dependants modular * [arhmf] Add device-tree for LinkSprite pcDuino V3. Patch from Karsten Merker (Closes: #774067) + * [xen] More netback fixes (including reintroducing support for + feature-rx-notify, which was regressed by the fix to #767261). -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/patches/bugfix/all/netback-don-t-store-invalid-vif-pointer.patch b/debian/patches/bugfix/all/netback-don-t-store-invalid-vif-pointer.patch new file mode 100644 index 000000000..57644a3b1 --- /dev/null +++ b/debian/patches/bugfix/all/netback-don-t-store-invalid-vif-pointer.patch @@ -0,0 +1,50 @@ +From e67d8dd0e2c1b8b4573a6a3f05f609be230dfaff Mon Sep 17 00:00:00 2001 +From: Jan Beulich +Date: Tue, 9 Dec 2014 11:47:04 +0000 +Subject: [PATCH 3/4] netback: don't store invalid vif pointer +Origin: https://git.kernel.org/linus/f15650b7f94879667f253bc32de7431c1baf2d6e + +When xenvif_alloc() fails, it returns a non-NULL error indicator. To +avoid eventual races, we shouldn't store that into struct backend_info +as readers of it only check for NULL. + +Signed-off-by: Jan Beulich +Acked-by: Ian Campbell +Signed-off-by: David S. Miller +--- + drivers/net/xen-netback/xenbus.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c +index 0b4f1c7..cc8f8ba 100644 +--- a/drivers/net/xen-netback/xenbus.c ++++ b/drivers/net/xen-netback/xenbus.c +@@ -404,6 +404,7 @@ static int backend_create_xenvif(struct backend_info *be) + int err; + long handle; + struct xenbus_device *dev = be->dev; ++ struct xenvif *vif; + + if (be->vif != NULL) + return 0; +@@ -414,13 +415,13 @@ static int backend_create_xenvif(struct backend_info *be) + return (err < 0) ? err : -EINVAL; + } + +- be->vif = xenvif_alloc(&dev->dev, dev->otherend_id, handle); +- if (IS_ERR(be->vif)) { +- err = PTR_ERR(be->vif); +- be->vif = NULL; ++ vif = xenvif_alloc(&dev->dev, dev->otherend_id, handle); ++ if (IS_ERR(vif)) { ++ err = PTR_ERR(vif); + xenbus_dev_fatal(dev, err, "creating interface"); + return err; + } ++ be->vif = vif; + + kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE); + return 0; +-- +1.7.10.4 + diff --git a/debian/patches/bugfix/all/xen-netback-Disable-NAPI-after-disabling-interrupts.patch b/debian/patches/bugfix/all/xen-netback-Disable-NAPI-after-disabling-interrupts.patch new file mode 100644 index 000000000..0f861dfa3 --- /dev/null +++ b/debian/patches/bugfix/all/xen-netback-Disable-NAPI-after-disabling-interrupts.patch @@ -0,0 +1,38 @@ +From bafb73e2d50d3addd0f79e09ea3f2e2950505733 Mon Sep 17 00:00:00 2001 +From: Zoltan Kiss +Date: Tue, 28 Oct 2014 15:29:30 +0000 +Subject: [PATCH 1/4] xen-netback: Disable NAPI after disabling interrupts +Origin: https://git.kernel.org/linus/8fe78989c3445a221cfcc54964e7e62718883615 + +Otherwise the interrupt handler still calls napi_complete. Although it +won't schedule NAPI again as either NAPI_STATE_DISABLE or +NAPI_STATE_SCHED is set, it is just unnecessary, and it makes more +sense to do this way. + +Signed-off-by: Zoltan Kiss +Signed-off-by: David Vrabel +Acked-by: Wei Liu +Signed-off-by: David S. Miller +--- + drivers/net/xen-netback/interface.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c +index 21d8db8..ddcb757 100644 +--- a/drivers/net/xen-netback/interface.c ++++ b/drivers/net/xen-netback/interface.c +@@ -235,10 +235,10 @@ static void xenvif_down(struct xenvif *vif) + + for (queue_index = 0; queue_index < num_queues; ++queue_index) { + queue = &vif->queues[queue_index]; +- napi_disable(&queue->napi); + disable_irq(queue->tx_irq); + if (queue->tx_irq != queue->rx_irq) + disable_irq(queue->rx_irq); ++ napi_disable(&queue->napi); + del_timer_sync(&queue->credit_timeout); + } + } +-- +1.7.10.4 + diff --git a/debian/patches/bugfix/all/xen-netback-do-not-report-success-if-backend_create_.patch b/debian/patches/bugfix/all/xen-netback-do-not-report-success-if-backend_create_.patch new file mode 100644 index 000000000..f94a170b4 --- /dev/null +++ b/debian/patches/bugfix/all/xen-netback-do-not-report-success-if-backend_create_.patch @@ -0,0 +1,84 @@ +From 0a640486cd7694015eaa7221714f9a2ce654f7a7 Mon Sep 17 00:00:00 2001 +From: Alexey Khoroshilov +Date: Mon, 24 Nov 2014 13:58:00 +0300 +Subject: [PATCH 2/4] xen-netback: do not report success if + backend_create_xenvif() fails +Origin: https://git.kernel.org/linus/2dd34339ac6305c4f2f4e589b858212e339d31e9 + +If xenvif_alloc() or xenbus_scanf() fail in backend_create_xenvif(), +xenbus is left in offline mode but netback_probe() reports success. + +The patch implements propagation of error code for backend_create_xenvif(). + +Found by Linux Driver Verification project (linuxtesting.org). + +Signed-off-by: Alexey Khoroshilov +Acked-by: Wei Liu +Signed-off-by: David S. Miller +--- + drivers/net/xen-netback/xenbus.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c +index 396b3d9..0b4f1c7 100644 +--- a/drivers/net/xen-netback/xenbus.c ++++ b/drivers/net/xen-netback/xenbus.c +@@ -39,7 +39,7 @@ struct backend_info { + static int connect_rings(struct backend_info *be, struct xenvif_queue *queue); + static void connect(struct backend_info *be); + static int read_xenbus_vif_flags(struct backend_info *be); +-static void backend_create_xenvif(struct backend_info *be); ++static int backend_create_xenvif(struct backend_info *be); + static void unregister_hotplug_status_watch(struct backend_info *be); + static void set_backend_state(struct backend_info *be, + enum xenbus_state state); +@@ -352,7 +352,9 @@ static int netback_probe(struct xenbus_device *dev, + be->state = XenbusStateInitWait; + + /* This kicks hotplug scripts, so do it immediately. */ +- backend_create_xenvif(be); ++ err = backend_create_xenvif(be); ++ if (err) ++ goto fail; + + return 0; + +@@ -397,19 +399,19 @@ static int netback_uevent(struct xenbus_device *xdev, + } + + +-static void backend_create_xenvif(struct backend_info *be) ++static int backend_create_xenvif(struct backend_info *be) + { + int err; + long handle; + struct xenbus_device *dev = be->dev; + + if (be->vif != NULL) +- return; ++ return 0; + + err = xenbus_scanf(XBT_NIL, dev->nodename, "handle", "%li", &handle); + if (err != 1) { + xenbus_dev_fatal(dev, err, "reading handle"); +- return; ++ return (err < 0) ? err : -EINVAL; + } + + be->vif = xenvif_alloc(&dev->dev, dev->otherend_id, handle); +@@ -417,10 +419,11 @@ static void backend_create_xenvif(struct backend_info *be) + err = PTR_ERR(be->vif); + be->vif = NULL; + xenbus_dev_fatal(dev, err, "creating interface"); +- return; ++ return err; + } + + kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE); ++ return 0; + } + + static void backend_disconnect(struct backend_info *be) +-- +1.7.10.4 + diff --git a/debian/patches/bugfix/all/xen-netback-support-frontends-without-feature-rx-not.patch b/debian/patches/bugfix/all/xen-netback-support-frontends-without-feature-rx-not.patch new file mode 100644 index 000000000..a211842a6 --- /dev/null +++ b/debian/patches/bugfix/all/xen-netback-support-frontends-without-feature-rx-not.patch @@ -0,0 +1,188 @@ +From 0baa6f7d5b0ed21b28768d151b1d74cb9b88dacf Mon Sep 17 00:00:00 2001 +From: David Vrabel +Date: Thu, 18 Dec 2014 11:13:06 +0000 +Subject: [PATCH 4/4] xen-netback: support frontends without feature-rx-notify + again +Origin: https://git.kernel.org/linus/26c0e102585d5a4d311f5d6eb7f524d288e7f6b7 + +Commit bc96f648df1bbc2729abbb84513cf4f64273a1f1 (xen-netback: make +feature-rx-notify mandatory) incorrectly assumed that there were no +frontends in use that did not support this feature. But the frontend +driver in MiniOS does not and since this is used by (qemu) stubdoms, +these stopped working. + +Netback sort of works as-is in this mode except: + +- If there are no Rx requests and the internal Rx queue fills, only + the drain timeout will wake the thread. The default drain timeout + of 10 s would give unacceptable pauses. + +- If an Rx stall was detected and the internal Rx queue is drained, + then the Rx thread would never wake. + +Handle these two cases (when feature-rx-notify is disabled) by: + +- Reducing the drain timeout to 30 ms. + +- Disabling Rx stall detection. + +Reported-by: John +Tested-by: John +Signed-off-by: David Vrabel +Reviewed-by: Wei Liu +Signed-off-by: David S. Miller +--- + drivers/net/xen-netback/common.h | 4 +++- + drivers/net/xen-netback/interface.c | 4 +++- + drivers/net/xen-netback/netback.c | 27 ++++++++++++++------------- + drivers/net/xen-netback/xenbus.c | 12 +++++++++--- + 4 files changed, 29 insertions(+), 18 deletions(-) + +diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h +index 083ecc9..5f1fda4 100644 +--- a/drivers/net/xen-netback/common.h ++++ b/drivers/net/xen-netback/common.h +@@ -230,6 +230,8 @@ struct xenvif { + */ + bool disabled; + unsigned long status; ++ unsigned long drain_timeout; ++ unsigned long stall_timeout; + + /* Queues */ + struct xenvif_queue *queues; +@@ -328,7 +330,7 @@ irqreturn_t xenvif_interrupt(int irq, void *dev_id); + extern bool separate_tx_rx_irq; + + extern unsigned int rx_drain_timeout_msecs; +-extern unsigned int rx_drain_timeout_jiffies; ++extern unsigned int rx_stall_timeout_msecs; + extern unsigned int xenvif_max_queues; + + #ifdef CONFIG_DEBUG_FS +diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c +index ddcb757..af047c2 100644 +--- a/drivers/net/xen-netback/interface.c ++++ b/drivers/net/xen-netback/interface.c +@@ -166,7 +166,7 @@ static int xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) + goto drop; + + cb = XENVIF_RX_CB(skb); +- cb->expires = jiffies + rx_drain_timeout_jiffies; ++ cb->expires = jiffies + vif->drain_timeout; + + xenvif_rx_queue_tail(queue, skb); + xenvif_kick_thread(queue); +@@ -414,6 +414,8 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid, + vif->ip_csum = 1; + vif->dev = dev; + vif->disabled = false; ++ vif->drain_timeout = msecs_to_jiffies(rx_drain_timeout_msecs); ++ vif->stall_timeout = msecs_to_jiffies(rx_stall_timeout_msecs); + + /* Start out with no queues. */ + vif->queues = NULL; +diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c +index 6563f07..c39aace 100644 +--- a/drivers/net/xen-netback/netback.c ++++ b/drivers/net/xen-netback/netback.c +@@ -60,14 +60,12 @@ module_param(separate_tx_rx_irq, bool, 0644); + */ + unsigned int rx_drain_timeout_msecs = 10000; + module_param(rx_drain_timeout_msecs, uint, 0444); +-unsigned int rx_drain_timeout_jiffies; + + /* The length of time before the frontend is considered unresponsive + * because it isn't providing Rx slots. + */ +-static unsigned int rx_stall_timeout_msecs = 60000; ++unsigned int rx_stall_timeout_msecs = 60000; + module_param(rx_stall_timeout_msecs, uint, 0444); +-static unsigned int rx_stall_timeout_jiffies; + + unsigned int xenvif_max_queues; + module_param_named(max_queues, xenvif_max_queues, uint, 0644); +@@ -2022,7 +2020,7 @@ static bool xenvif_rx_queue_stalled(struct xenvif_queue *queue) + return !queue->stalled + && prod - cons < XEN_NETBK_RX_SLOTS_MAX + && time_after(jiffies, +- queue->last_rx_time + rx_stall_timeout_jiffies); ++ queue->last_rx_time + queue->vif->stall_timeout); + } + + static bool xenvif_rx_queue_ready(struct xenvif_queue *queue) +@@ -2040,8 +2038,9 @@ static bool xenvif_have_rx_work(struct xenvif_queue *queue) + { + return (!skb_queue_empty(&queue->rx_queue) + && xenvif_rx_ring_slots_available(queue, XEN_NETBK_RX_SLOTS_MAX)) +- || xenvif_rx_queue_stalled(queue) +- || xenvif_rx_queue_ready(queue) ++ || (queue->vif->stall_timeout && ++ (xenvif_rx_queue_stalled(queue) ++ || xenvif_rx_queue_ready(queue))) + || kthread_should_stop() + || queue->vif->disabled; + } +@@ -2094,6 +2093,9 @@ int xenvif_kthread_guest_rx(void *data) + struct xenvif_queue *queue = data; + struct xenvif *vif = queue->vif; + ++ if (!vif->stall_timeout) ++ xenvif_queue_carrier_on(queue); ++ + for (;;) { + xenvif_wait_for_rx_work(queue); + +@@ -2120,10 +2122,12 @@ int xenvif_kthread_guest_rx(void *data) + * while it's probably not responsive, drop the + * carrier so packets are dropped earlier. + */ +- if (xenvif_rx_queue_stalled(queue)) +- xenvif_queue_carrier_off(queue); +- else if (xenvif_rx_queue_ready(queue)) +- xenvif_queue_carrier_on(queue); ++ if (vif->stall_timeout) { ++ if (xenvif_rx_queue_stalled(queue)) ++ xenvif_queue_carrier_off(queue); ++ else if (xenvif_rx_queue_ready(queue)) ++ xenvif_queue_carrier_on(queue); ++ } + + /* Queued packets may have foreign pages from other + * domains. These cannot be queued indefinitely as +@@ -2194,9 +2198,6 @@ static int __init netback_init(void) + if (rc) + goto failed_init; + +- rx_drain_timeout_jiffies = msecs_to_jiffies(rx_drain_timeout_msecs); +- rx_stall_timeout_jiffies = msecs_to_jiffies(rx_stall_timeout_msecs); +- + #ifdef CONFIG_DEBUG_FS + xen_netback_dbg_root = debugfs_create_dir("xen-netback", NULL); + if (IS_ERR_OR_NULL(xen_netback_dbg_root)) +diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c +index cc8f8ba..60f7c7d 100644 +--- a/drivers/net/xen-netback/xenbus.c ++++ b/drivers/net/xen-netback/xenbus.c +@@ -887,9 +887,15 @@ static int read_xenbus_vif_flags(struct backend_info *be) + return -EOPNOTSUPP; + + if (xenbus_scanf(XBT_NIL, dev->otherend, +- "feature-rx-notify", "%d", &val) < 0 || val == 0) { +- xenbus_dev_fatal(dev, -EINVAL, "feature-rx-notify is mandatory"); +- return -EINVAL; ++ "feature-rx-notify", "%d", &val) < 0) ++ val = 0; ++ if (!val) { ++ /* - Reduce drain timeout to poll more frequently for ++ * Rx requests. ++ * - Disable Rx stall detection. ++ */ ++ be->vif->drain_timeout = msecs_to_jiffies(30); ++ be->vif->stall_timeout = 0; + } + + if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-sg", +-- +1.7.10.4 + diff --git a/debian/patches/series b/debian/patches/series index 1c16f9dff..c42df5ba3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -157,6 +157,10 @@ bugfix/all/xen-netback-move-netif_napi_add-before-binding-inter.patch bugfix/all/xen-netback-make-feature-rx-notify-mandatory.patch bugfix/all/xen-netback-fix-unlimited-guest-Rx-internal-queue-an.patch bugfix/all/xen-netback-reintroduce-guest-Rx-stall-detection.patch +bugfix/all/xen-netback-Disable-NAPI-after-disabling-interrupts.patch +bugfix/all/xen-netback-do-not-report-success-if-backend_create_.patch +bugfix/all/netback-don-t-store-invalid-vif-pointer.patch +bugfix/all/xen-netback-support-frontends-without-feature-rx-not.patch bugfix/all/of-fdt-memblock_reserve-memreserve-regions-in-the-ca.patch # memfd_create() & kdbus backport From f75504c2b3b31d3e9ba2ed7c0609b94cbcf5c77f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 2 Jan 2015 03:44:16 +0000 Subject: [PATCH 27/43] Update to 3.16.7-ckt3 - Drop various patches that were applied upstream - Refresh the big firmware logging patch - Fix/ignore ABI changes as appropriate svn path=/dists/sid/linux/; revision=22238 --- debian/changelog | 92 +++++++- debian/config/defines | 1 + ...ivers-net-Disable-UFO-through-virtio.patch | 212 ------------------ ...-Select-IPv6-fragment-idents-for-vir.patch | 135 ----------- ...-redundant-log-messages-from-drivers.patch | 58 ++--- ...apping-d_name.hash-into-switch_names.patch | 41 ---- ...reserve-memreserve-regions-in-the-ca.patch | 53 ----- ...fo-through-virtio-in-macvtap-and-tun.patch | 129 ----------- ...ange-short-filenames-unconditionally.patch | 115 ---------- ...to-fix-makefile-rule-for-aes-glue-.o.patch | 37 --- ...sable-tracing-and-kprobes-in-fixup_b.patch | 50 ----- ...-the-espfix64-DF-fixup-and-rewrite-i.patch | 111 --------- .../x86/x86_64-traps-Rework-bad_iret.patch | 154 ------------- .../x86_64-traps-Stop-using-IST-for-SS.patch | 131 ----------- ...d_info-fix-abi-change-in-3.16.7-ckt3.patch | 35 +++ .../pci-fix-abi-change-in-3.16.7-ckt3.patch | 29 +++ debian/patches/series | 13 +- 17 files changed, 186 insertions(+), 1210 deletions(-) delete mode 100644 debian/patches/bugfix/all/drivers-net-Disable-UFO-through-virtio.patch delete mode 100644 debian/patches/bugfix/all/drivers-net-ipv6-Select-IPv6-fragment-idents-for-vir.patch delete mode 100644 debian/patches/bugfix/all/fold-swapping-d_name.hash-into-switch_names.patch delete mode 100644 debian/patches/bugfix/all/of-fdt-memblock_reserve-memreserve-regions-in-the-ca.patch delete mode 100644 debian/patches/bugfix/all/revert-drivers-net-disable-ufo-through-virtio-in-macvtap-and-tun.patch delete mode 100644 debian/patches/bugfix/all/vfs-Don-t-exchange-short-filenames-unconditionally.patch delete mode 100644 debian/patches/bugfix/arm64/arm64-crypto-fix-makefile-rule-for-aes-glue-.o.patch delete mode 100644 debian/patches/bugfix/x86/x86-asm-traps-Disable-tracing-and-kprobes-in-fixup_b.patch delete mode 100644 debian/patches/bugfix/x86/x86_64-traps-Fix-the-espfix64-DF-fixup-and-rewrite-i.patch delete mode 100644 debian/patches/bugfix/x86/x86_64-traps-Rework-bad_iret.patch delete mode 100644 debian/patches/bugfix/x86/x86_64-traps-Stop-using-IST-for-SS.patch create mode 100644 debian/patches/debian/arm-thread_info-fix-abi-change-in-3.16.7-ckt3.patch create mode 100644 debian/patches/debian/pci-fix-abi-change-in-3.16.7-ckt3.patch diff --git a/debian/changelog b/debian/changelog index 109c22a45..e31ad417c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,99 @@ -linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium +linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium + + * New upstream stable update: + http://kernel.ubuntu.com/stable/ChangeLog-3.16.7-ckt3 + - [x86] kvm: use alternatives for VMCALL vs. VMMCALL if kernel text is + read-only + - [sparc*] Fix constraints on swab helpers. + - inetdevice: fixed signed integer overflow + - ieee802154: fix error handling in ieee802154fake_probe() + - bonding: fix curr_active_slave/carrier with loadbalance arp monitoring + (regression in 3.14) + - pptp: fix stack info leak in pptp_getname() + - ipx: fix locking regression in ipx_sendmsg and ipx_recvmsg + - net/mlx4_en: Add VXLAN ndo calls to the PF net device ops too + (regression in 3.15) + - net/mlx4_en: Advertize encapsulation offloads features only when VXLAN + tunnel is set (regression in 3.15) + - target: Don't call TFO->write_pending if data_length == 0 + - vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT + - iser-target: Handle DEVICE_REMOVAL event on network portal listener + correctly + - ASoC: dpcm: Fix race between FE/BE updates and trigger + - mac80211: Fix regression that triggers a kernel BUG with CCMP + (regression in 3.13) + - rt2x00: do not align payload on modern H/W + - bitops: Fix shift overflow in GENMASK macros + - [x86] Require exact match for 'noxsave' command line option + - [x86] drm/i915: Kick fbdev before vgacon (regression in 3.16) + - can: dev: avoid calling kfree_skb() from interrupt context + - [x86] mm: Set NX across entire PMD at boot + - of: Fix crash if an earlycon driver is not found + - btrfs: fix lockups from btrfs_clear_path_blocking + - [i386/686-pae,armhf/armmp-lpae] PCI: Support 64-bit bridge windows if we + have 64-bit dma_addr_t (regression in 3.14) + - ACPI / PM: Ignore wakeup setting if the ACPI companion can't wake up + (regression in 3.13) + - drm/radeon: fix endian swapping in vbios fetch for tdp table + - Bluetooth: Fix endian and alignment issue with ath3k version handling + - nfs: Don't busy-wait on SIGKILL in __nfs_iocounter_wait + - [armhf] 8109/1: mm: Modify pte_write and pmd_write logic for LPAE + - aio: fix incorrect dirty pages accouting when truncating AIO ring buffer + (regression in 3.12) + - [armel,armhf] mvebu: add missing of_node_put() call in coherency.c + (regression in 3.16) + - iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask + - spi: Fix mapping from vmalloc-ed buffer to scatter list + - SUNRPC: Fix locking around callback channel reply receive + - nfsd: Fix slot wake up race in the nfsv4.1 callback code + - bnx2fc: do not add shared skbs to the fcoe_rx_list + - Revert "xhci: clear root port wake on bits if controller isn't wake-up + capable" (regression in 3.16) + - usb: xhci: rework root port wake bits if controller isn't allowed to + wakeup + - ixgbe: Correctly disable VLAN filter in promiscuous mode + (regression in 3.16) + - ixgbe: fix use after free adapter->state test in ixgbe_remove/ixgbe_probe + (regression in 3.15) + - ALSA: hda - Limit 40bit DMA for AMD HDMI controllers + - PCI/MSI: Add device flag indicating that 64-bit MSIs don't work + - gpu/radeon: Set flag to indicate broken 64-bit MSI + - sound/radeon: Move 64-bit MSI quirk from arch to driver + - [powerpc*] pseries: Honor the generic "no_64bit_msi" flag + - [mips*] fix EVA & non-SMP non-FPU FP context signal handling + (regression in 3.15) + - [x86] drm/i915: Ignore SURFLIVE and flip counter when the GPU gets reset + (regression in 3.16) + - [powerpc*] 32 bit getcpu VDSO function uses 64 bit instructions + - [armhf] 8222/1: mvebu: enable strex backoff delay + - [armel,armhf] 8226/1: cacheflush: get rid of restarting block + - btrfs: zero out left over bytes after processing compression streams + - [armhf] net: sun4i-emac: fix memory leak on bad packet + - [armhf] i2c: omap: fix NACK and Arbitration Lost irq handling + - [media] s2255drv: fix payload size for JPG, MJPEG (regression in 3.15) + - nouveau: move the hotplug ignore to correct place. (regression in 3.16.4) + - mm: frontswap: invalidate expired data on a dup-store failure + - mm/vmpressure.c: fix race in vmpressure_work_fn() + - xen-netfront: Remove BUGs on paged skb data which crosses a page boundary + - drivers/input/evdev.c: don't kfree() a vmalloc address + (regression in 3.13) + - mm: fix anon_vma_clone() error treatment (regression in 3.12) + - ip_tunnel: the lack of vti_link_ops' dellink() cause kernel panic + - vxlan: Fix race condition between vxlan_sock_add and vxlan_sock_release + - bond: Check length of IFLA_BOND_ARP_IP_TARGET attributes + - gre: Set inner mac header in gro complete (regression in 3.16.7-ckt1) + - [mips*] bpf: Fix broken BPF_MOD [ Ben Hutchings ] * [sh4] Build with gcc-4.8 (Closes: #772602) * Fix inconsistent ABI name generation in debian/bin/{abiupdate,buildcheck,gencontrol}.py (Closes: #773233) * iov: Revert unwanted ABI 'fix' in 3.16.7-ckt2-1 - * Ignore ABI changes in mm, of functions not really used by modules + * [armel,armhf] thread_info: Fix ABI change in 3.16.7-ckt3 + * PCI: Fix ABI change in 3.16.7-ckt3 + * Ignore some ABI changes that don't appear to affect OOT modules: + - Removal of __add_pages(), __remove_pages(), of_device_is_stdout_path() + - Changes to ASoC functions * [arm64] Enable PSTORE as built-in and EFI_VARS_PSTORE as module; ensure efivars and efi-pstore are loaded on EFI systems (Closes: #773309) diff --git a/debian/config/defines b/debian/config/defines index 2a872b2c5..8f059752d 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -9,6 +9,7 @@ ignore-changes: __add_pages __remove_pages of_device_is_stdout_path + module:sound/soc/* [base] arches: diff --git a/debian/patches/bugfix/all/drivers-net-Disable-UFO-through-virtio.patch b/debian/patches/bugfix/all/drivers-net-Disable-UFO-through-virtio.patch deleted file mode 100644 index 347d85d90..000000000 --- a/debian/patches/bugfix/all/drivers-net-Disable-UFO-through-virtio.patch +++ /dev/null @@ -1,212 +0,0 @@ -From: Ben Hutchings -Date: Thu, 30 Oct 2014 18:27:12 +0000 -Subject: [1/2] drivers/net: Disable UFO through virtio -Origin: https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit?id=3d0ad09412ffe00c9afa201d01effdb6023d09b4 - -IPv6 does not allow fragmentation by routers, so there is no -fragmentation ID in the fixed header. UFO for IPv6 requires the ID to -be passed separately, but there is no provision for this in the virtio -net protocol. - -Until recently our software implementation of UFO/IPv6 generated a new -ID, but this was a bug. Now we will use ID=0 for any UFO/IPv6 packet -passed through a tap, which is even worse. - -Unfortunately there is no distinction between UFO/IPv4 and v6 -features, so disable UFO on taps and virtio_net completely until we -have a proper solution. - -We cannot depend on VM managers respecting the tap feature flags, so -keep accepting UFO packets but log a warning the first time we do -this. - -Signed-off-by: Ben Hutchings -Fixes: 916e4cf46d02 ("ipv6: reuse ip6_frag_id from ip6_ufo_append_data") -Signed-off-by: David S. Miller ---- - drivers/net/macvtap.c | 13 +++++-------- - drivers/net/tun.c | 19 +++++++++++-------- - drivers/net/virtio_net.c | 24 ++++++++++++++---------- - 3 files changed, 30 insertions(+), 26 deletions(-) - ---- a/drivers/net/macvtap.c -+++ b/drivers/net/macvtap.c -@@ -65,7 +65,7 @@ static struct cdev macvtap_cdev; - static const struct proto_ops macvtap_socket_ops; - - #define TUN_OFFLOADS (NETIF_F_HW_CSUM | NETIF_F_TSO_ECN | NETIF_F_TSO | \ -- NETIF_F_TSO6 | NETIF_F_UFO) -+ NETIF_F_TSO6) - #define RX_OFFLOADS (NETIF_F_GRO | NETIF_F_LRO) - #define TAP_FEATURES (NETIF_F_GSO | NETIF_F_SG) - -@@ -569,6 +569,8 @@ static int macvtap_skb_from_vnet_hdr(str - gso_type = SKB_GSO_TCPV6; - break; - case VIRTIO_NET_HDR_GSO_UDP: -+ pr_warn_once("macvtap: %s: using disabled UFO feature; please fix this program\n", -+ current->comm); - gso_type = SKB_GSO_UDP; - break; - default: -@@ -614,8 +616,6 @@ static void macvtap_skb_to_vnet_hdr(cons - vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV4; - else if (sinfo->gso_type & SKB_GSO_TCPV6) - vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV6; -- else if (sinfo->gso_type & SKB_GSO_UDP) -- vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_UDP; - else - BUG(); - if (sinfo->gso_type & SKB_GSO_TCP_ECN) -@@ -950,9 +950,6 @@ static int set_offload(struct macvtap_qu - if (arg & TUN_F_TSO6) - feature_mask |= NETIF_F_TSO6; - } -- -- if (arg & TUN_F_UFO) -- feature_mask |= NETIF_F_UFO; - } - - /* tun/tap driver inverts the usage for TSO offloads, where -@@ -963,7 +960,7 @@ static int set_offload(struct macvtap_qu - * When user space turns off TSO, we turn off GSO/LRO so that - * user-space will not receive TSO frames. - */ -- if (feature_mask & (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_UFO)) -+ if (feature_mask & (NETIF_F_TSO | NETIF_F_TSO6)) - features |= RX_OFFLOADS; - else - features &= ~RX_OFFLOADS; -@@ -1064,7 +1061,7 @@ static long macvtap_ioctl(struct file *f - case TUNSETOFFLOAD: - /* let the user check for future flags */ - if (arg & ~(TUN_F_CSUM | TUN_F_TSO4 | TUN_F_TSO6 | -- TUN_F_TSO_ECN | TUN_F_UFO)) -+ TUN_F_TSO_ECN)) - return -EINVAL; - - rtnl_lock(); ---- a/drivers/net/tun.c -+++ b/drivers/net/tun.c -@@ -174,7 +174,7 @@ struct tun_struct { - struct net_device *dev; - netdev_features_t set_features; - #define TUN_USER_FEATURES (NETIF_F_HW_CSUM|NETIF_F_TSO_ECN|NETIF_F_TSO| \ -- NETIF_F_TSO6|NETIF_F_UFO) -+ NETIF_F_TSO6) - - int vnet_hdr_sz; - int sndbuf; -@@ -1149,8 +1149,18 @@ static ssize_t tun_get_user(struct tun_s - skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6; - break; - case VIRTIO_NET_HDR_GSO_UDP: -+ { -+ static bool warned; -+ -+ if (!warned) { -+ warned = true; -+ netdev_warn(tun->dev, -+ "%s: using disabled UFO feature; please fix this program\n", -+ current->comm); -+ } - skb_shinfo(skb)->gso_type = SKB_GSO_UDP; - break; -+ } - default: - tun->dev->stats.rx_frame_errors++; - kfree_skb(skb); -@@ -1251,8 +1261,6 @@ static ssize_t tun_put_user(struct tun_s - gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV4; - else if (sinfo->gso_type & SKB_GSO_TCPV6) - gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV6; -- else if (sinfo->gso_type & SKB_GSO_UDP) -- gso.gso_type = VIRTIO_NET_HDR_GSO_UDP; - else { - pr_err("unexpected GSO type: " - "0x%x, gso_size %d, hdr_len %d\n", -@@ -1761,11 +1769,6 @@ static int set_offload(struct tun_struct - features |= NETIF_F_TSO6; - arg &= ~(TUN_F_TSO4|TUN_F_TSO6); - } -- -- if (arg & TUN_F_UFO) { -- features |= NETIF_F_UFO; -- arg &= ~TUN_F_UFO; -- } - } - - /* This gives the user a way to test for new features in future by ---- a/drivers/net/virtio_net.c -+++ b/drivers/net/virtio_net.c -@@ -496,8 +496,17 @@ static void receive_buf(struct receive_q - skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4; - break; - case VIRTIO_NET_HDR_GSO_UDP: -+ { -+ static bool warned; -+ -+ if (!warned) { -+ warned = true; -+ netdev_warn(dev, -+ "host using disabled UFO feature; please fix it\n"); -+ } - skb_shinfo(skb)->gso_type = SKB_GSO_UDP; - break; -+ } - case VIRTIO_NET_HDR_GSO_TCPV6: - skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6; - break; -@@ -836,8 +845,6 @@ static int xmit_skb(struct send_queue *s - hdr->hdr.gso_type = VIRTIO_NET_HDR_GSO_TCPV4; - else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6) - hdr->hdr.gso_type = VIRTIO_NET_HDR_GSO_TCPV6; -- else if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP) -- hdr->hdr.gso_type = VIRTIO_NET_HDR_GSO_UDP; - else - BUG(); - if (skb_shinfo(skb)->gso_type & SKB_GSO_TCP_ECN) -@@ -1657,7 +1664,7 @@ static int virtnet_probe(struct virtio_d - dev->features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST; - - if (virtio_has_feature(vdev, VIRTIO_NET_F_GSO)) { -- dev->hw_features |= NETIF_F_TSO | NETIF_F_UFO -+ dev->hw_features |= NETIF_F_TSO - | NETIF_F_TSO_ECN | NETIF_F_TSO6; - } - /* Individual feature bits: what can host handle? */ -@@ -1667,11 +1674,9 @@ static int virtnet_probe(struct virtio_d - dev->hw_features |= NETIF_F_TSO6; - if (virtio_has_feature(vdev, VIRTIO_NET_F_HOST_ECN)) - dev->hw_features |= NETIF_F_TSO_ECN; -- if (virtio_has_feature(vdev, VIRTIO_NET_F_HOST_UFO)) -- dev->hw_features |= NETIF_F_UFO; - - if (gso) -- dev->features |= dev->hw_features & (NETIF_F_ALL_TSO|NETIF_F_UFO); -+ dev->features |= dev->hw_features & NETIF_F_ALL_TSO; - /* (!csum && gso) case will be fixed by register_netdev() */ - } - if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_CSUM)) -@@ -1711,8 +1716,7 @@ static int virtnet_probe(struct virtio_d - /* If we can receive ANY GSO packets, we must allocate large ones. */ - if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) || - virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6) || -- virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_ECN) || -- virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_UFO)) -+ virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_ECN)) - vi->big_packets = true; - - if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF)) -@@ -1910,9 +1914,9 @@ static struct virtio_device_id id_table[ - static unsigned int features[] = { - VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, - VIRTIO_NET_F_GSO, VIRTIO_NET_F_MAC, -- VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, -+ VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_TSO6, - VIRTIO_NET_F_HOST_ECN, VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, -- VIRTIO_NET_F_GUEST_ECN, VIRTIO_NET_F_GUEST_UFO, -+ VIRTIO_NET_F_GUEST_ECN, - VIRTIO_NET_F_MRG_RXBUF, VIRTIO_NET_F_STATUS, VIRTIO_NET_F_CTRL_VQ, - VIRTIO_NET_F_CTRL_RX, VIRTIO_NET_F_CTRL_VLAN, - VIRTIO_NET_F_GUEST_ANNOUNCE, VIRTIO_NET_F_MQ, diff --git a/debian/patches/bugfix/all/drivers-net-ipv6-Select-IPv6-fragment-idents-for-vir.patch b/debian/patches/bugfix/all/drivers-net-ipv6-Select-IPv6-fragment-idents-for-vir.patch deleted file mode 100644 index a79539fe2..000000000 --- a/debian/patches/bugfix/all/drivers-net-ipv6-Select-IPv6-fragment-idents-for-vir.patch +++ /dev/null @@ -1,135 +0,0 @@ -From: Ben Hutchings -Date: Thu, 30 Oct 2014 18:27:17 +0000 -Subject: [2/2] drivers/net, ipv6: Select IPv6 fragment idents for virtio UFO - packets -Origin: https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit?id=5188cd44c55db3e92cd9e77a40b5baa7ed4340f7 - -UFO is now disabled on all drivers that work with virtio net headers, -but userland may try to send UFO/IPv6 packets anyway. Instead of -sending with ID=0, we should select identifiers on their behalf (as we -used to). - -Signed-off-by: Ben Hutchings -Fixes: 916e4cf46d02 ("ipv6: reuse ip6_frag_id from ip6_ufo_append_data") -Signed-off-by: David S. Miller ---- - drivers/net/macvtap.c | 3 +++ - drivers/net/tun.c | 6 +++++- - include/net/ipv6.h | 2 ++ - net/ipv6/output_core.c | 34 ++++++++++++++++++++++++++++++++++ - 4 files changed, 44 insertions(+), 1 deletion(-) - ---- a/drivers/net/macvtap.c -+++ b/drivers/net/macvtap.c -@@ -16,6 +16,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -572,6 +573,8 @@ static int macvtap_skb_from_vnet_hdr(str - pr_warn_once("macvtap: %s: using disabled UFO feature; please fix this program\n", - current->comm); - gso_type = SKB_GSO_UDP; -+ if (skb->protocol == htons(ETH_P_IPV6)) -+ ipv6_proxy_select_ident(skb); - break; - default: - return -EINVAL; ---- a/drivers/net/tun.c -+++ b/drivers/net/tun.c -@@ -65,6 +65,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -1139,6 +1140,8 @@ static ssize_t tun_get_user(struct tun_s - break; - } - -+ skb_reset_network_header(skb); -+ - if (gso.gso_type != VIRTIO_NET_HDR_GSO_NONE) { - pr_debug("GSO!\n"); - switch (gso.gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { -@@ -1159,6 +1162,8 @@ static ssize_t tun_get_user(struct tun_s - current->comm); - } - skb_shinfo(skb)->gso_type = SKB_GSO_UDP; -+ if (skb->protocol == htons(ETH_P_IPV6)) -+ ipv6_proxy_select_ident(skb); - break; - } - default: -@@ -1189,7 +1194,6 @@ static ssize_t tun_get_user(struct tun_s - skb_shinfo(skb)->tx_flags |= SKBTX_SHARED_FRAG; - } - -- skb_reset_network_header(skb); - skb_probe_transport_header(skb, 0); - - rxhash = skb_get_hash(skb); ---- a/include/net/ipv6.h -+++ b/include/net/ipv6.h -@@ -668,6 +668,8 @@ static inline int ipv6_addr_diff(const s - return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); - } - -+void ipv6_proxy_select_ident(struct sk_buff *skb); -+ - int ip6_dst_hoplimit(struct dst_entry *dst); - - static inline int ip6_sk_dst_hoplimit(struct ipv6_pinfo *np, struct flowi6 *fl6, ---- a/net/ipv6/output_core.c -+++ b/net/ipv6/output_core.c -@@ -3,11 +3,45 @@ - * not configured or static. These functions are needed by GSO/GRO implementation. - */ - #include -+#include - #include - #include - #include - #include - -+/* This function exists only for tap drivers that must support broken -+ * clients requesting UFO without specifying an IPv6 fragment ID. -+ * -+ * This is similar to ipv6_select_ident() but we use an independent hash -+ * seed to limit information leakage. -+ * -+ * The network header must be set before calling this. -+ */ -+void ipv6_proxy_select_ident(struct sk_buff *skb) -+{ -+ static u32 ip6_proxy_idents_hashrnd __read_mostly; -+ struct in6_addr buf[2]; -+ struct in6_addr *addrs; -+ u32 hash, id; -+ -+ addrs = skb_header_pointer(skb, -+ skb_network_offset(skb) + -+ offsetof(struct ipv6hdr, saddr), -+ sizeof(buf), buf); -+ if (!addrs) -+ return; -+ -+ net_get_random_once(&ip6_proxy_idents_hashrnd, -+ sizeof(ip6_proxy_idents_hashrnd)); -+ -+ hash = __ipv6_addr_jhash(&addrs[1], ip6_proxy_idents_hashrnd); -+ hash = __ipv6_addr_jhash(&addrs[0], hash); -+ -+ id = ip_idents_reserve(hash, 1); -+ skb_shinfo(skb)->ip6_frag_id = htonl(id); -+} -+EXPORT_SYMBOL_GPL(ipv6_proxy_select_ident); -+ - int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) - { - u16 offset = sizeof(struct ipv6hdr); diff --git a/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch b/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch index 95ebd9190..3847571ce 100644 --- a/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch +++ b/debian/patches/bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch @@ -96,8 +96,8 @@ upstream submission. fw_size = firmware->size / sizeof(u32); --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c -@@ -370,10 +370,8 @@ static int ath3k_load_patch(struct usb_d - le32_to_cpu(fw_version.rom_version)); +@@ -377,10 +377,8 @@ static int ath3k_load_patch(struct usb_d + le32_to_cpu(fw_version.rom_version)); ret = request_firmware(&firmware, filename, &udev->dev); - if (ret < 0) { @@ -106,9 +106,9 @@ upstream submission. return ret; - } - pt_version.rom_version = *(int *)(firmware->data + firmware->size - 8); - pt_version.build_version = *(int *) -@@ -432,10 +430,8 @@ static int ath3k_load_syscfg(struct usb_ + pt_rom_version = get_unaligned_le32(firmware->data + + firmware->size - 8); +@@ -440,10 +438,8 @@ static int ath3k_load_syscfg(struct usb_ le32_to_cpu(fw_version.rom_version), clk_value, ".dfu"); ret = request_firmware(&firmware, filename, &udev->dev); @@ -168,7 +168,7 @@ upstream submission. --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c -@@ -288,8 +288,6 @@ static int btmrvl_sdio_download_helper(s +@@ -293,8 +293,6 @@ static int btmrvl_sdio_download_helper(s ret = request_firmware(&fw_helper, card->helper, &card->func->dev); if ((ret < 0) || !fw_helper) { @@ -177,7 +177,7 @@ upstream submission. ret = -ENOENT; goto done; } -@@ -388,8 +386,6 @@ static int btmrvl_sdio_download_fw_w_hel +@@ -393,8 +391,6 @@ static int btmrvl_sdio_download_fw_w_hel ret = request_firmware(&fw_firmware, card->firmware, &card->func->dev); if ((ret < 0) || !fw_firmware) { @@ -203,7 +203,7 @@ upstream submission. fw->size, fw_name); --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c -@@ -1269,10 +1269,8 @@ static void sdma_load_firmware(const str +@@ -1281,10 +1281,8 @@ static void sdma_load_firmware(const str const struct sdma_script_start_addrs *addr; unsigned short *ram_code; @@ -232,7 +232,7 @@ upstream submission. where = 0; --- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c -@@ -1221,10 +1221,8 @@ nvc0_graph_ctor_fw(struct nvc0_graph_pri +@@ -1248,10 +1248,8 @@ nvc0_graph_ctor_fw(struct nvc0_graph_pri if (ret) { snprintf(f, sizeof(f), "nouveau/%s", fwname); ret = request_firmware(&fw, f, nv_device_base(device)); @@ -274,7 +274,7 @@ upstream submission. release_firmware(rdev->me_fw); --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c -@@ -1036,10 +1036,7 @@ static int r100_cp_init_microcode(struct +@@ -1017,10 +1017,7 @@ static int r100_cp_init_microcode(struct } err = request_firmware(&rdev->me_fw, fw_name, rdev->dev); @@ -288,7 +288,7 @@ upstream submission. rdev->me_fw->size, fw_name); --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c -@@ -2434,10 +2434,6 @@ int r600_init_microcode(struct radeon_de +@@ -2427,10 +2427,6 @@ int r600_init_microcode(struct radeon_de out: if (err) { @@ -685,7 +685,7 @@ upstream submission. printk(KERN_INFO "tda1004x: please rename the firmware file to %s\n", --- a/drivers/media/dvb-frontends/tda10071.c +++ b/drivers/media/dvb-frontends/tda10071.c -@@ -952,12 +952,8 @@ static int tda10071_init(struct dvb_fron +@@ -956,12 +956,8 @@ static int tda10071_init(struct dvb_fron /* request the firmware, this will block and timeout */ ret = request_firmware(&fw, fw_file, priv->i2c->dev.parent); @@ -835,7 +835,7 @@ upstream submission. fw_data = (void *)fw_entry->data; --- a/drivers/media/pci/bt8xx/bttv-cards.c +++ b/drivers/media/pci/bt8xx/bttv-cards.c -@@ -3814,10 +3814,8 @@ static int pvr_boot(struct bttv *btv) +@@ -3834,10 +3834,8 @@ static int pvr_boot(struct bttv *btv) int rc; rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev); @@ -1061,7 +1061,7 @@ upstream submission. --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c -@@ -2306,10 +2306,8 @@ static int s2255_probe(struct usb_interf +@@ -2305,10 +2305,8 @@ static int s2255_probe(struct usb_interf } /* load the first chunk */ if (request_firmware(&dev->fw_data->fw, @@ -1240,7 +1240,7 @@ upstream submission. if (bp->mips_firmware->size < sizeof(*mips_fw) || --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c -@@ -12775,11 +12775,8 @@ static int bnx2x_init_firmware(struct bn +@@ -12738,11 +12738,8 @@ static int bnx2x_init_firmware(struct bn BNX2X_DEV_INFO("Loading %s\n", fw_file_name); rc = request_firmware(&bp->firmware, fw_file_name, &bp->pdev->dev); @@ -1255,7 +1255,7 @@ upstream submission. if (rc) { --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c -@@ -11286,11 +11286,8 @@ static int tg3_request_firmware(struct t +@@ -11323,11 +11323,8 @@ static int tg3_request_firmware(struct t { const struct tg3_firmware_hdr *fw_hdr; @@ -1431,7 +1431,7 @@ upstream submission. } else --- a/drivers/net/wireless/at76c50x-usb.c +++ b/drivers/net/wireless/at76c50x-usb.c -@@ -1553,13 +1553,8 @@ static struct fwentry *at76_load_firmwar +@@ -1622,13 +1622,8 @@ static struct fwentry *at76_load_firmwar at76_dbg(DBG_FW, "downloading firmware %s", fwe->fwname); ret = request_firmware(&fwe->fw, fwe->fwname, &udev->dev); @@ -1464,7 +1464,7 @@ upstream submission. &hif_dev->udev->dev); --- a/drivers/net/wireless/ath/carl9170/usb.c +++ b/drivers/net/wireless/ath/carl9170/usb.c -@@ -1025,7 +1025,6 @@ static void carl9170_usb_firmware_step2( +@@ -1032,7 +1032,6 @@ static void carl9170_usb_firmware_step2( return; } @@ -1490,7 +1490,7 @@ upstream submission. int success = 0; --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c -@@ -2160,19 +2160,8 @@ int b43_do_request_fw(struct b43_request +@@ -2154,19 +2154,8 @@ int b43_do_request_fw(struct b43_request } err = request_firmware(&ctx->blob, ctx->fwname, ctx->dev->dev->dev); @@ -1714,7 +1714,7 @@ upstream submission. --- a/drivers/net/wireless/orinoco/orinoco_usb.c +++ b/drivers/net/wireless/orinoco/orinoco_usb.c -@@ -1690,7 +1690,6 @@ static int ezusb_probe(struct usb_interf +@@ -1676,7 +1676,6 @@ static int ezusb_probe(struct usb_interf if (ezusb_firmware_download(upriv, &firmware) < 0) goto error; } else { @@ -1968,7 +1968,7 @@ upstream submission. --- a/drivers/scsi/pm8001/pm8001_ctl.c +++ b/drivers/scsi/pm8001/pm8001_ctl.c -@@ -676,9 +676,6 @@ static ssize_t pm8001_store_update_fw(st +@@ -679,9 +679,6 @@ static ssize_t pm8001_store_update_fw(st pm8001_ha->dev); if (err) { @@ -1991,7 +1991,7 @@ upstream submission. } --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c -@@ -5358,8 +5358,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha, +@@ -5352,8 +5352,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha, /* Load firmware blob. */ blob = qla2x00_request_firmware(vha); if (!blob) { @@ -2000,7 +2000,7 @@ upstream submission. ql_log(ql_log_info, vha, 0x0084, "Firmware images can be retrieved from: "QLA_FW_URL ".\n"); return QLA_FUNCTION_FAILED; -@@ -5461,8 +5459,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t * +@@ -5455,8 +5453,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t * /* Load firmware blob. */ blob = qla2x00_request_firmware(vha); if (!blob) { @@ -2011,7 +2011,7 @@ upstream submission. QLA_FW_URL ".\n"); --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c -@@ -2449,11 +2449,8 @@ try_blob_fw: +@@ -2459,11 +2459,8 @@ try_blob_fw: /* Load firmware blob. */ blob = ha->hablob = qla2x00_request_firmware(vha); @@ -2026,7 +2026,7 @@ upstream submission. if (qla82xx_validate_firmware_blob(vha, --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c -@@ -5393,8 +5393,6 @@ qla2x00_request_firmware(scsi_qla_host_t +@@ -5403,8 +5403,6 @@ qla2x00_request_firmware(scsi_qla_host_t goto out; if (request_firmware(&blob->fw, blob->name, &ha->pdev->dev)) { @@ -2208,7 +2208,7 @@ upstream submission. usb_set_intfdata(pusb_intf, NULL); --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c -@@ -402,11 +402,8 @@ static int slic_card_download_gbrcv(stru +@@ -393,11 +393,8 @@ static int slic_card_download_gbrcv(stru } ret = request_firmware(&fw, file, &adapter->pcidev->dev); @@ -2221,7 +2221,7 @@ upstream submission. rcvucodelen = *(u32 *)(fw->data + index); index += 4; -@@ -480,11 +477,8 @@ static int slic_card_download(struct ada +@@ -471,11 +468,8 @@ static int slic_card_download(struct ada return -ENOENT; } ret = request_firmware(&fw, file, &adapter->pcidev->dev); @@ -2236,7 +2236,7 @@ upstream submission. for (i = 0; i < numsects; i++) { --- a/drivers/staging/vt6656/firmware.c +++ b/drivers/staging/vt6656/firmware.c -@@ -57,11 +57,8 @@ int FIRMWAREbDownload(struct vnt_private +@@ -56,11 +56,8 @@ int FIRMWAREbDownload(struct vnt_private DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Download firmware\n"); rc = request_firmware(&fw, FIRMWARE_NAME, dev); @@ -2657,7 +2657,7 @@ upstream submission. filename, emu->firmware->size); --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c -@@ -1407,10 +1407,8 @@ static void azx_firmware_cb(const struct +@@ -1449,10 +1449,8 @@ static void azx_firmware_cb(const struct struct azx *chip = card->private_data; struct pci_dev *pci = chip->pci; diff --git a/debian/patches/bugfix/all/fold-swapping-d_name.hash-into-switch_names.patch b/debian/patches/bugfix/all/fold-swapping-d_name.hash-into-switch_names.patch deleted file mode 100644 index b1d7a79ce..000000000 --- a/debian/patches/bugfix/all/fold-swapping-d_name.hash-into-switch_names.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Linus Torvalds -Date: Wed, 24 Sep 2014 12:27:39 -0700 -Subject: fold swapping ->d_name.hash into switch_names() -Origin: https://git.kernel.org/linus/a28ddb87cdddb0db57466ba7f59f831002f4340c - -and do it along with ->d_name.len there - -Signed-off-by: Linus Torvalds -Signed-off-by: Al Viro -[bwh: Backported to 3.16: change __d_materialise_dentry() as well] ---- - fs/dcache.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - ---- a/fs/dcache.c -+++ b/fs/dcache.c -@@ -2441,7 +2441,7 @@ static void switch_names(struct dentry * - } - } - } -- swap(dentry->d_name.len, target->d_name.len); -+ swap(dentry->d_name.hash_len, target->d_name.hash_len); - } - - static void dentry_lock_for_move(struct dentry *dentry, struct dentry *target) -@@ -2540,7 +2540,6 @@ static void __d_move(struct dentry *dent - - /* Switch the names.. */ - switch_names(dentry, target); -- swap(dentry->d_name.hash, target->d_name.hash); - - /* ... and switch the parents */ - if (IS_ROOT(dentry)) { -@@ -2679,7 +2678,6 @@ static void __d_materialise_dentry(struc - dparent = dentry->d_parent; - - switch_names(dentry, anon); -- swap(dentry->d_name.hash, anon->d_name.hash); - - dentry->d_parent = dentry; - list_del_init(&dentry->d_u.d_child); diff --git a/debian/patches/bugfix/all/of-fdt-memblock_reserve-memreserve-regions-in-the-ca.patch b/debian/patches/bugfix/all/of-fdt-memblock_reserve-memreserve-regions-in-the-ca.patch deleted file mode 100644 index 067ab855f..000000000 --- a/debian/patches/bugfix/all/of-fdt-memblock_reserve-memreserve-regions-in-the-ca.patch +++ /dev/null @@ -1,53 +0,0 @@ -From a636289fb6037392c3551aeed1033576c3aef426 Mon Sep 17 00:00:00 2001 -From: Ian Campbell -Date: Tue, 25 Nov 2014 15:05:13 +0000 -Subject: [PATCH] of/fdt: memblock_reserve /memreserve/ regions in the case of - partial overlap -Origin: https://git.kernel.org/cgit/linux/kernel/git/glikely/linux.git/commit/?h=devicetree/merge&id=094cb98179f19b75acf9ff471daabf3948ce98e6 - -memblock_is_region_reserved() returns true in the case of a partial -overlap, meaning that the current code fails to reserve the -non-overlapping portion. - -This call was introduced as part of d1552ce449eb "of/fdt: move -memreserve and dtb memory reservations into core" which went into -v3.16. - -I observed this causing a Midway system with a buggy fdt (the header -declares itself to be larger than it really is) failing to boot -because the over-inflated size of the fdt was causing it to seem to -run into the swapper_pg_dir region, meaning the DT wasn't reserved. -The symptoms were failing to find an disks or network and failing to -boot. - -However given the ambiguity of whether things like the initrd are -covered by /memreserve/ and similar I think it is best to also -register the region rather than just ignoring it. - -Since memblock_reserve() handles overlaps just fine lets just warn and -carry on. - -Signed-off-by: Ian Campbell -Signed-off-by: Grant Likely -Cc: Rob Herring -Cc: stable@vger.kernel.org # v3.16+ ---- - drivers/of/fdt.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c -index 379ad4f..94a8511 100644 ---- a/drivers/of/fdt.c -+++ b/drivers/of/fdt.c -@@ -960,8 +960,6 @@ void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size) - int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, - phys_addr_t size, bool nomap) - { -- if (memblock_is_region_reserved(base, size)) -- return -EBUSY; - if (nomap) - return memblock_remove(base, size); - return memblock_reserve(base, size); --- -2.1.3 - diff --git a/debian/patches/bugfix/all/revert-drivers-net-disable-ufo-through-virtio-in-macvtap-and-tun.patch b/debian/patches/bugfix/all/revert-drivers-net-disable-ufo-through-virtio-in-macvtap-and-tun.patch deleted file mode 100644 index 3b1b05ffc..000000000 --- a/debian/patches/bugfix/all/revert-drivers-net-disable-ufo-through-virtio-in-macvtap-and-tun.patch +++ /dev/null @@ -1,129 +0,0 @@ -Subject: Revert "drivers/net: Disable UFO through virtio" in macvtap and tun -From: Ben Hutchings -Date: Tue, 11 Nov 2014 17:12:58 +0000 - -This reverts commit 88e0e0e5aa722b193c8758c8b45d041de5316924 for -the tap drivers, but leaves UFO disabled in virtio_net. - -libvirt at least assumes that tap features will never be dropped -in new kernel versions, and doing so prevents migration of VMs to -the never kernel version while they are running with virtio net -devices. - -Fixes: 88e0e0e5aa7a ("drivers/net: Disable UFO through virtio") -Signed-off-by: Ben Hutchings ---- - drivers/net/macvtap.c | 13 ++++++++----- - drivers/net/tun.c | 19 ++++++++----------- - 2 files changed, 16 insertions(+), 16 deletions(-) - ---- a/drivers/net/macvtap.c -+++ b/drivers/net/macvtap.c -@@ -66,7 +66,7 @@ static struct cdev macvtap_cdev; - static const struct proto_ops macvtap_socket_ops; - - #define TUN_OFFLOADS (NETIF_F_HW_CSUM | NETIF_F_TSO_ECN | NETIF_F_TSO | \ -- NETIF_F_TSO6) -+ NETIF_F_TSO6 | NETIF_F_UFO) - #define RX_OFFLOADS (NETIF_F_GRO | NETIF_F_LRO) - #define TAP_FEATURES (NETIF_F_GSO | NETIF_F_SG) - -@@ -570,8 +570,6 @@ static int macvtap_skb_from_vnet_hdr(str - gso_type = SKB_GSO_TCPV6; - break; - case VIRTIO_NET_HDR_GSO_UDP: -- pr_warn_once("macvtap: %s: using disabled UFO feature; please fix this program\n", -- current->comm); - gso_type = SKB_GSO_UDP; - if (skb->protocol == htons(ETH_P_IPV6)) - ipv6_proxy_select_ident(skb); -@@ -619,6 +617,8 @@ static void macvtap_skb_to_vnet_hdr(cons - vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV4; - else if (sinfo->gso_type & SKB_GSO_TCPV6) - vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV6; -+ else if (sinfo->gso_type & SKB_GSO_UDP) -+ vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_UDP; - else - BUG(); - if (sinfo->gso_type & SKB_GSO_TCP_ECN) -@@ -955,6 +955,9 @@ static int set_offload(struct macvtap_qu - if (arg & TUN_F_TSO6) - feature_mask |= NETIF_F_TSO6; - } -+ -+ if (arg & TUN_F_UFO) -+ feature_mask |= NETIF_F_UFO; - } - - /* tun/tap driver inverts the usage for TSO offloads, where -@@ -965,7 +968,7 @@ static int set_offload(struct macvtap_qu - * When user space turns off TSO, we turn off GSO/LRO so that - * user-space will not receive TSO frames. - */ -- if (feature_mask & (NETIF_F_TSO | NETIF_F_TSO6)) -+ if (feature_mask & (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_UFO)) - features |= RX_OFFLOADS; - else - features &= ~RX_OFFLOADS; -@@ -1066,7 +1069,7 @@ static long macvtap_ioctl(struct file *f - case TUNSETOFFLOAD: - /* let the user check for future flags */ - if (arg & ~(TUN_F_CSUM | TUN_F_TSO4 | TUN_F_TSO6 | -- TUN_F_TSO_ECN)) -+ TUN_F_TSO_ECN | TUN_F_UFO)) - return -EINVAL; - - rtnl_lock(); ---- a/drivers/net/tun.c -+++ b/drivers/net/tun.c -@@ -175,7 +175,7 @@ struct tun_struct { - struct net_device *dev; - netdev_features_t set_features; - #define TUN_USER_FEATURES (NETIF_F_HW_CSUM|NETIF_F_TSO_ECN|NETIF_F_TSO| \ -- NETIF_F_TSO6) -+ NETIF_F_TSO6|NETIF_F_UFO) - - int vnet_hdr_sz; - int sndbuf; -@@ -1152,20 +1152,10 @@ static ssize_t tun_get_user(struct tun_s - skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6; - break; - case VIRTIO_NET_HDR_GSO_UDP: -- { -- static bool warned; -- -- if (!warned) { -- warned = true; -- netdev_warn(tun->dev, -- "%s: using disabled UFO feature; please fix this program\n", -- current->comm); -- } - skb_shinfo(skb)->gso_type = SKB_GSO_UDP; - if (skb->protocol == htons(ETH_P_IPV6)) - ipv6_proxy_select_ident(skb); - break; -- } - default: - tun->dev->stats.rx_frame_errors++; - kfree_skb(skb); -@@ -1269,6 +1259,8 @@ static ssize_t tun_put_user(struct tun_s - gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV4; - else if (sinfo->gso_type & SKB_GSO_TCPV6) - gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV6; -+ else if (sinfo->gso_type & SKB_GSO_UDP) -+ gso.gso_type = VIRTIO_NET_HDR_GSO_UDP; - else { - pr_err("unexpected GSO type: " - "0x%x, gso_size %d, hdr_len %d\n", -@@ -1775,6 +1767,11 @@ static int set_offload(struct tun_struct - features |= NETIF_F_TSO6; - arg &= ~(TUN_F_TSO4|TUN_F_TSO6); - } -+ -+ if (arg & TUN_F_UFO) { -+ features |= NETIF_F_UFO; -+ arg &= ~TUN_F_UFO; -+ } - } - - /* This gives the user a way to test for new features in future by diff --git a/debian/patches/bugfix/all/vfs-Don-t-exchange-short-filenames-unconditionally.patch b/debian/patches/bugfix/all/vfs-Don-t-exchange-short-filenames-unconditionally.patch deleted file mode 100644 index 124d1a7ba..000000000 --- a/debian/patches/bugfix/all/vfs-Don-t-exchange-short-filenames-unconditionally.patch +++ /dev/null @@ -1,115 +0,0 @@ -From: Mikhail Efremov -Date: Wed, 24 Sep 2014 22:14:33 +0400 -Subject: vfs: Don't exchange "short" filenames unconditionally. -Origin: https://git.kernel.org/linus/d2fa4a8476b911782f7e5167db18770222ac40c3 - -Only exchange source and destination filenames -if flags contain RENAME_EXCHANGE. -In case if executable file was running and replaced by -other file /proc/PID/exe should still show correct file name, -not the old name of the file by which it was replaced. - -The scenario when this bug manifests itself was like this: -* ALT Linux uses rpm and start-stop-daemon; -* during a package upgrade rpm creates a temporary file - for an executable to rename it upon successful unpacking; -* start-stop-daemon is run subsequently and it obtains - the (nonexistant) temporary filename via /proc/PID/exe - thus failing to identify the running process. - -Note that "long" filenames (> DNAiME_INLINE_LEN) are still -exchanged without RENAME_EXCHANGE and this behaviour exists -long enough (should be fixed too apparently). -So this patch is just an interim workaround that restores -behavior for "short" names as it was before changes -introduced by commit da1ce0670c14 ("vfs: add cross-rename"). - -See https://lkml.org/lkml/2014/9/7/6 for details. - -AV: the comments about being more careful with ->d_name.hash -than with ->d_name.name are from back in 2.3.40s; they -became obsolete by 2.3.60s, when we started to unhash the -target instead of swapping hash chain positions followed -by d_delete() as we used to do when dcache was first -introduced. - -Acked-by: Miklos Szeredi -Cc: Linus Torvalds -Cc: Alexander Viro -Cc: linux-fsdevel@vger.kernel.org -Cc: stable@vger.kernel.org -Fixes: da1ce0670c14 "vfs: add cross-rename" -Signed-off-by: Mikhail Efremov -Signed-off-by: Al Viro -[bwh: Backported to 3.16: - - Adjust context - - Change __d_materialise_dentry() as well] ---- - fs/dcache.c | 27 ++++++++++++++++++--------- - 1 file changed, 18 insertions(+), 9 deletions(-) - ---- a/fs/dcache.c -+++ b/fs/dcache.c -@@ -2401,7 +2401,8 @@ void dentry_update_name_case(struct dent - } - EXPORT_SYMBOL(dentry_update_name_case); - --static void switch_names(struct dentry *dentry, struct dentry *target) -+static void switch_names(struct dentry *dentry, struct dentry *target, -+ bool exchange) - { - if (dname_external(target)) { - if (dname_external(dentry)) { -@@ -2435,6 +2436,12 @@ static void switch_names(struct dentry * - */ - unsigned int i; - BUILD_BUG_ON(!IS_ALIGNED(DNAME_INLINE_LEN, sizeof(long))); -+ if (!exchange) { -+ memcpy(dentry->d_iname, target->d_name.name, -+ target->d_name.len + 1); -+ dentry->d_name.hash_len = target->d_name.hash_len; -+ return; -+ } - for (i = 0; i < DNAME_INLINE_LEN / sizeof(long); i++) { - swap(((long *) &dentry->d_iname)[i], - ((long *) &target->d_iname)[i]); -@@ -2484,12 +2491,15 @@ static void dentry_unlock_parents_for_mo - * When switching names, the actual string doesn't strictly have to - * be preserved in the target - because we're dropping the target - * anyway. As such, we can just do a simple memcpy() to copy over -- * the new name before we switch. -- * -- * Note that we have to be a lot more careful about getting the hash -- * switched - we have to switch the hash value properly even if it -- * then no longer matches the actual (corrupted) string of the target. -- * The hash value has to match the hash queue that the dentry is on.. -+ * the new name before we switch, unless we are going to rehash -+ * it. Note that if we *do* unhash the target, we are not allowed -+ * to rehash it without giving it a new name/hash key - whether -+ * we swap or overwrite the names here, resulting name won't match -+ * the reality in filesystem; it's only there for d_path() purposes. -+ * Note that all of this is happening under rename_lock, so the -+ * any hash lookup seeing it in the middle of manipulations will -+ * be discarded anyway. So we do not care what happens to the hash -+ * key in that case. - */ - /* - * __d_move - move a dentry -@@ -2539,7 +2549,7 @@ static void __d_move(struct dentry *dent - list_del(&target->d_u.d_child); - - /* Switch the names.. */ -- switch_names(dentry, target); -+ switch_names(dentry, target, exchange); - - /* ... and switch the parents */ - if (IS_ROOT(dentry)) { -@@ -2677,7 +2687,7 @@ static void __d_materialise_dentry(struc - - dparent = dentry->d_parent; - -- switch_names(dentry, anon); -+ switch_names(dentry, anon, false); - - dentry->d_parent = dentry; - list_del_init(&dentry->d_u.d_child); diff --git a/debian/patches/bugfix/arm64/arm64-crypto-fix-makefile-rule-for-aes-glue-.o.patch b/debian/patches/bugfix/arm64/arm64-crypto-fix-makefile-rule-for-aes-glue-.o.patch deleted file mode 100644 index 3eb42edcd..000000000 --- a/debian/patches/bugfix/arm64/arm64-crypto-fix-makefile-rule-for-aes-glue-.o.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Andreas Schwab -Date: Thu, 24 Jul 2014 17:03:26 +0100 -Subject: [PATCH] arm64/crypto: fix makefile rule for aes-glue-%.o -Origin: https://git.kernel.org/linus/7c2105fbe9658d6cee18751568e29579bb58bfec - -This fixes the following build failure when building with CONFIG_MODVERSIONS -enabled: - - CC [M] arch/arm64/crypto/aes-glue-ce.o -ld: cannot find arch/arm64/crypto/aes-glue-ce.o: No such file or directory -make[1]: *** [arch/arm64/crypto/aes-ce-blk.o] Error 1 -make: *** [arch/arm64/crypto] Error 2 - -The $(obj)/aes-glue-%.o rule only creates $(obj)/.tmp_aes-glue-ce.o, it -should use if_changed_rule instead of if_changed_dep. - -Signed-off-by: Andreas Schwab -[ardb: mention CONFIG_MODVERSIONS in commit log] -Signed-off-by: Ard Biesheuvel -Signed-off-by: Catalin Marinas ---- - arch/arm64/crypto/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile -index 2070a56..a3f935f 100644 ---- a/arch/arm64/crypto/Makefile -+++ b/arch/arm64/crypto/Makefile -@@ -35,4 +35,4 @@ AFLAGS_aes-neon.o := -DINTERLEAVE=4 - CFLAGS_aes-glue-ce.o := -DUSE_V8_CRYPTO_EXTENSIONS - - $(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE -- $(call if_changed_dep,cc_o_c) -+ $(call if_changed_rule,cc_o_c) --- -2.1.0 - diff --git a/debian/patches/bugfix/x86/x86-asm-traps-Disable-tracing-and-kprobes-in-fixup_b.patch b/debian/patches/bugfix/x86/x86-asm-traps-Disable-tracing-and-kprobes-in-fixup_b.patch deleted file mode 100644 index cfd521066..000000000 --- a/debian/patches/bugfix/x86/x86-asm-traps-Disable-tracing-and-kprobes-in-fixup_b.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Andy Lutomirski -Date: Mon, 24 Nov 2014 17:39:06 -0800 -Subject: x86/asm/traps: Disable tracing and kprobes in fixup_bad_iret and - sync_regs -Origin: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit?id=7ddc6a2199f1da405a2fb68c40db8899b1a8cd87 - -These functions can be executed on the int3 stack, so kprobes -are dangerous. Tracing is probably a bad idea, too. - -Fixes: b645af2d5905 ("x86_64, traps: Rework bad_iret") -Signed-off-by: Andy Lutomirski -Cc: # Backport as far back as it would apply -Cc: Linus Torvalds -Cc: Steven Rostedt -Link: http://lkml.kernel.org/r/50e33d26adca60816f3ba968875801652507d0c4.1416870125.git.luto@amacapital.net -Signed-off-by: Ingo Molnar ---- - arch/x86/kernel/traps.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c -index de801f2..07ab8e9 100644 ---- a/arch/x86/kernel/traps.c -+++ b/arch/x86/kernel/traps.c -@@ -387,7 +387,7 @@ NOKPROBE_SYMBOL(do_int3); - * for scheduling or signal handling. The actual stack switch is done in - * entry.S - */ --asmlinkage __visible struct pt_regs *sync_regs(struct pt_regs *eregs) -+asmlinkage __visible notrace struct pt_regs *sync_regs(struct pt_regs *eregs) - { - struct pt_regs *regs = eregs; - /* Did already sync */ -@@ -413,7 +413,7 @@ struct bad_iret_stack { - struct pt_regs regs; - }; - --asmlinkage __visible -+asmlinkage __visible notrace - struct bad_iret_stack *fixup_bad_iret(struct bad_iret_stack *s) - { - /* -@@ -436,6 +436,7 @@ struct bad_iret_stack *fixup_bad_iret(struct bad_iret_stack *s) - BUG_ON(!user_mode_vm(&new_stack->regs)); - return new_stack; - } -+NOKPROBE_SYMBOL(fixup_bad_iret); - #endif - - /* diff --git a/debian/patches/bugfix/x86/x86_64-traps-Fix-the-espfix64-DF-fixup-and-rewrite-i.patch b/debian/patches/bugfix/x86/x86_64-traps-Fix-the-espfix64-DF-fixup-and-rewrite-i.patch deleted file mode 100644 index c1db95679..000000000 --- a/debian/patches/bugfix/x86/x86_64-traps-Fix-the-espfix64-DF-fixup-and-rewrite-i.patch +++ /dev/null @@ -1,111 +0,0 @@ -From: Andy Lutomirski -Date: Sat, 22 Nov 2014 18:00:31 -0800 -Subject: x86_64, traps: Fix the espfix64 #DF fixup and rewrite it in C -Origin: https://git.kernel.org/linus/af726f21ed8af2cdaa4e93098dc211521218ae65 - -There's nothing special enough about the espfix64 double fault fixup to -justify writing it in assembly. Move it to C. - -This also fixes a bug: if the double fault came from an IST stack, the -old asm code would return to a partially uninitialized stack frame. - -Fixes: 3891a04aafd668686239349ea58f3314ea2af86b -Signed-off-by: Andy Lutomirski -Reviewed-by: Thomas Gleixner -Cc: stable@vger.kernel.org -Signed-off-by: Linus Torvalds ---- - arch/x86/kernel/entry_64.S | 34 ++-------------------------------- - arch/x86/kernel/traps.c | 24 ++++++++++++++++++++++++ - 2 files changed, 26 insertions(+), 32 deletions(-) - ---- a/arch/x86/kernel/entry_64.S -+++ b/arch/x86/kernel/entry_64.S -@@ -860,6 +860,7 @@ ENTRY(native_iret) - jnz native_irq_return_ldt - #endif - -+.global native_irq_return_iret - native_irq_return_iret: - iretq - _ASM_EXTABLE(native_irq_return_iret, bad_iret) -@@ -954,37 +955,6 @@ ENTRY(retint_kernel) - CFI_ENDPROC - END(common_interrupt) - -- /* -- * If IRET takes a fault on the espfix stack, then we -- * end up promoting it to a doublefault. In that case, -- * modify the stack to make it look like we just entered -- * the #GP handler from user space, similar to bad_iret. -- */ --#ifdef CONFIG_X86_ESPFIX64 -- ALIGN --__do_double_fault: -- XCPT_FRAME 1 RDI+8 -- movq RSP(%rdi),%rax /* Trap on the espfix stack? */ -- sarq $PGDIR_SHIFT,%rax -- cmpl $ESPFIX_PGD_ENTRY,%eax -- jne do_double_fault /* No, just deliver the fault */ -- cmpl $__KERNEL_CS,CS(%rdi) -- jne do_double_fault -- movq RIP(%rdi),%rax -- cmpq $native_irq_return_iret,%rax -- jne do_double_fault /* This shouldn't happen... */ -- movq PER_CPU_VAR(kernel_stack),%rax -- subq $(6*8-KERNEL_STACK_OFFSET),%rax /* Reset to original stack */ -- movq %rax,RSP(%rdi) -- movq $0,(%rax) /* Missing (lost) #GP error code */ -- movq $general_protection,RIP(%rdi) -- retq -- CFI_ENDPROC --END(__do_double_fault) --#else --# define __do_double_fault do_double_fault --#endif -- - /* - * APIC interrupts. - */ -@@ -1156,7 +1126,7 @@ idtentry overflow do_overflow has_error_ - idtentry bounds do_bounds has_error_code=0 - idtentry invalid_op do_invalid_op has_error_code=0 - idtentry device_not_available do_device_not_available has_error_code=0 --idtentry double_fault __do_double_fault has_error_code=1 paranoid=1 -+idtentry double_fault do_double_fault has_error_code=1 paranoid=1 - idtentry coprocessor_segment_overrun do_coprocessor_segment_overrun has_error_code=0 - idtentry invalid_TSS do_invalid_TSS has_error_code=1 - idtentry segment_not_present do_segment_not_present has_error_code=1 ---- a/arch/x86/kernel/traps.c -+++ b/arch/x86/kernel/traps.c -@@ -243,6 +243,30 @@ dotraplinkage void do_double_fault(struc - static const char str[] = "double fault"; - struct task_struct *tsk = current; - -+#ifdef CONFIG_X86_ESPFIX64 -+ extern unsigned char native_irq_return_iret[]; -+ -+ /* -+ * If IRET takes a non-IST fault on the espfix64 stack, then we -+ * end up promoting it to a doublefault. In that case, modify -+ * the stack to make it look like we just entered the #GP -+ * handler from user space, similar to bad_iret. -+ */ -+ if (((long)regs->sp >> PGDIR_SHIFT) == ESPFIX_PGD_ENTRY && -+ regs->cs == __KERNEL_CS && -+ regs->ip == (unsigned long)native_irq_return_iret) -+ { -+ struct pt_regs *normal_regs = task_pt_regs(current); -+ -+ /* Fake a #GP(0) from userspace. */ -+ memmove(&normal_regs->ip, (void *)regs->sp, 5*8); -+ normal_regs->orig_ax = 0; /* Missing (lost) #GP error code */ -+ regs->ip = (unsigned long)general_protection; -+ regs->sp = (unsigned long)&normal_regs->orig_ax; -+ return; -+ } -+#endif -+ - exception_enter(); - /* Return not checked because double check cannot be ignored */ - notify_die(DIE_TRAP, str, regs, error_code, X86_TRAP_DF, SIGSEGV); diff --git a/debian/patches/bugfix/x86/x86_64-traps-Rework-bad_iret.patch b/debian/patches/bugfix/x86/x86_64-traps-Rework-bad_iret.patch deleted file mode 100644 index fef2c2dca..000000000 --- a/debian/patches/bugfix/x86/x86_64-traps-Rework-bad_iret.patch +++ /dev/null @@ -1,154 +0,0 @@ -From: Andy Lutomirski -Date: Sat, 22 Nov 2014 18:00:33 -0800 -Subject: x86_64, traps: Rework bad_iret -Origin: https://git.kernel.org/linus/b645af2d5905c4e32399005b867987919cbfc3ae - -It's possible for iretq to userspace to fail. This can happen because -of a bad CS, SS, or RIP. - -Historically, we've handled it by fixing up an exception from iretq to -land at bad_iret, which pretends that the failed iret frame was really -the hardware part of #GP(0) from userspace. To make this work, there's -an extra fixup to fudge the gs base into a usable state. - -This is suboptimal because it loses the original exception. It's also -buggy because there's no guarantee that we were on the kernel stack to -begin with. For example, if the failing iret happened on return from an -NMI, then we'll end up executing general_protection on the NMI stack. -This is bad for several reasons, the most immediate of which is that -general_protection, as a non-paranoid idtentry, will try to deliver -signals and/or schedule from the wrong stack. - -This patch throws out bad_iret entirely. As a replacement, it augments -the existing swapgs fudge into a full-blown iret fixup, mostly written -in C. It's should be clearer and more correct. - -Signed-off-by: Andy Lutomirski -Reviewed-by: Thomas Gleixner -Cc: stable@vger.kernel.org -Signed-off-by: Linus Torvalds -[bwh: Backported to 3.16: adjust context] ---- - arch/x86/kernel/entry_64.S | 45 +++++++++++++++++++-------------------------- - arch/x86/kernel/traps.c | 29 +++++++++++++++++++++++++++++ - 2 files changed, 48 insertions(+), 26 deletions(-) - ---- a/arch/x86/kernel/entry_64.S -+++ b/arch/x86/kernel/entry_64.S -@@ -862,8 +862,13 @@ ENTRY(native_iret) - - .global native_irq_return_iret - native_irq_return_iret: -+ /* -+ * This may fault. Non-paranoid faults on return to userspace are -+ * handled by fixup_bad_iret. These include #SS, #GP, and #NP. -+ * Double-faults due to espfix64 are handled in do_double_fault. -+ * Other faults here are fatal. -+ */ - iretq -- _ASM_EXTABLE(native_irq_return_iret, bad_iret) - - #ifdef CONFIG_X86_ESPFIX64 - native_irq_return_ldt: -@@ -891,25 +896,6 @@ native_irq_return_ldt: - jmp native_irq_return_iret - #endif - -- .section .fixup,"ax" --bad_iret: -- /* -- * The iret traps when the %cs or %ss being restored is bogus. -- * We've lost the original trap vector and error code. -- * #GPF is the most likely one to get for an invalid selector. -- * So pretend we completed the iret and took the #GPF in user mode. -- * -- * We are now running with the kernel GS after exception recovery. -- * But error_entry expects us to have user GS to match the user %cs, -- * so swap back. -- */ -- pushq $0 -- -- SWAPGS -- jmp general_protection -- -- .previous -- - /* edi: workmask, edx: work */ - retint_careful: - CFI_RESTORE_STATE -@@ -1401,16 +1387,15 @@ error_sti: - - /* - * There are two places in the kernel that can potentially fault with -- * usergs. Handle them here. The exception handlers after iret run with -- * kernel gs again, so don't set the user space flag. B stepping K8s -- * sometimes report an truncated RIP for IRET exceptions returning to -- * compat mode. Check for these here too. -+ * usergs. Handle them here. B stepping K8s sometimes report a -+ * truncated RIP for IRET exceptions returning to compat mode. Check -+ * for these here too. - */ - error_kernelspace: - incl %ebx - leaq native_irq_return_iret(%rip),%rcx - cmpq %rcx,RIP+8(%rsp) -- je error_swapgs -+ je error_bad_iret - movl %ecx,%eax /* zero extend */ - cmpq %rax,RIP+8(%rsp) - je bstep_iret -@@ -1421,7 +1406,15 @@ error_kernelspace: - bstep_iret: - /* Fix truncated RIP */ - movq %rcx,RIP+8(%rsp) -- jmp error_swapgs -+ /* fall through */ -+ -+error_bad_iret: -+ SWAPGS -+ mov %rsp,%rdi -+ call fixup_bad_iret -+ mov %rax,%rsp -+ decl %ebx /* Return to usergs */ -+ jmp error_sti - CFI_ENDPROC - END(error_entry) - ---- a/arch/x86/kernel/traps.c -+++ b/arch/x86/kernel/traps.c -@@ -407,6 +407,35 @@ asmlinkage __visible struct pt_regs *syn - return regs; - } - NOKPROBE_SYMBOL(sync_regs); -+ -+struct bad_iret_stack { -+ void *error_entry_ret; -+ struct pt_regs regs; -+}; -+ -+asmlinkage __visible -+struct bad_iret_stack *fixup_bad_iret(struct bad_iret_stack *s) -+{ -+ /* -+ * This is called from entry_64.S early in handling a fault -+ * caused by a bad iret to user mode. To handle the fault -+ * correctly, we want move our stack frame to task_pt_regs -+ * and we want to pretend that the exception came from the -+ * iret target. -+ */ -+ struct bad_iret_stack *new_stack = -+ container_of(task_pt_regs(current), -+ struct bad_iret_stack, regs); -+ -+ /* Copy the IRET target to the new stack. */ -+ memmove(&new_stack->regs.ip, (void *)s->regs.sp, 5*8); -+ -+ /* Copy the remainder of the stack from the current stack. */ -+ memmove(new_stack, s, offsetof(struct bad_iret_stack, regs.ip)); -+ -+ BUG_ON(!user_mode_vm(&new_stack->regs)); -+ return new_stack; -+} - #endif - - /* diff --git a/debian/patches/bugfix/x86/x86_64-traps-Stop-using-IST-for-SS.patch b/debian/patches/bugfix/x86/x86_64-traps-Stop-using-IST-for-SS.patch deleted file mode 100644 index e136cb507..000000000 --- a/debian/patches/bugfix/x86/x86_64-traps-Stop-using-IST-for-SS.patch +++ /dev/null @@ -1,131 +0,0 @@ -From: Andy Lutomirski -Date: Sat, 22 Nov 2014 18:00:32 -0800 -Subject: x86_64, traps: Stop using IST for #SS -Origin: https://git.kernel.org/linus/6f442be2fb22be02cafa606f1769fa1e6f894441 - -On a 32-bit kernel, this has no effect, since there are no IST stacks. - -On a 64-bit kernel, #SS can only happen in user code, on a failed iret -to user space, a canonical violation on access via RSP or RBP, or a -genuine stack segment violation in 32-bit kernel code. The first two -cases don't need IST, and the latter two cases are unlikely fatal bugs, -and promoting them to double faults would be fine. - -This fixes a bug in which the espfix64 code mishandles a stack segment -violation. - -This saves 4k of memory per CPU and a tiny bit of code. - -Signed-off-by: Andy Lutomirski -Reviewed-by: Thomas Gleixner -Cc: stable@vger.kernel.org -Signed-off-by: Linus Torvalds ---- - arch/x86/include/asm/page_32_types.h | 1 - - arch/x86/include/asm/page_64_types.h | 11 +++++------ - arch/x86/include/asm/traps.h | 1 + - arch/x86/kernel/dumpstack_64.c | 1 - - arch/x86/kernel/entry_64.S | 2 +- - arch/x86/kernel/traps.c | 18 +----------------- - 6 files changed, 8 insertions(+), 26 deletions(-) - ---- a/arch/x86/include/asm/page_32_types.h -+++ b/arch/x86/include/asm/page_32_types.h -@@ -20,7 +20,6 @@ - #define THREAD_SIZE_ORDER 1 - #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) - --#define STACKFAULT_STACK 0 - #define DOUBLEFAULT_STACK 1 - #define NMI_STACK 0 - #define DEBUG_STACK 0 ---- a/arch/x86/include/asm/page_64_types.h -+++ b/arch/x86/include/asm/page_64_types.h -@@ -14,12 +14,11 @@ - #define IRQ_STACK_ORDER 2 - #define IRQ_STACK_SIZE (PAGE_SIZE << IRQ_STACK_ORDER) - --#define STACKFAULT_STACK 1 --#define DOUBLEFAULT_STACK 2 --#define NMI_STACK 3 --#define DEBUG_STACK 4 --#define MCE_STACK 5 --#define N_EXCEPTION_STACKS 5 /* hw limit: 7 */ -+#define DOUBLEFAULT_STACK 1 -+#define NMI_STACK 2 -+#define DEBUG_STACK 3 -+#define MCE_STACK 4 -+#define N_EXCEPTION_STACKS 4 /* hw limit: 7 */ - - #define PUD_PAGE_SIZE (_AC(1, UL) << PUD_SHIFT) - #define PUD_PAGE_MASK (~(PUD_PAGE_SIZE-1)) ---- a/arch/x86/include/asm/traps.h -+++ b/arch/x86/include/asm/traps.h -@@ -39,6 +39,7 @@ asmlinkage void simd_coprocessor_error(v - - #ifdef CONFIG_TRACING - asmlinkage void trace_page_fault(void); -+#define trace_stack_segment stack_segment - #define trace_divide_error divide_error - #define trace_bounds bounds - #define trace_invalid_op invalid_op ---- a/arch/x86/kernel/dumpstack_64.c -+++ b/arch/x86/kernel/dumpstack_64.c -@@ -24,7 +24,6 @@ static char x86_stack_ids[][8] = { - [ DEBUG_STACK-1 ] = "#DB", - [ NMI_STACK-1 ] = "NMI", - [ DOUBLEFAULT_STACK-1 ] = "#DF", -- [ STACKFAULT_STACK-1 ] = "#SS", - [ MCE_STACK-1 ] = "#MC", - #if DEBUG_STKSZ > EXCEPTION_STKSZ - [ N_EXCEPTION_STACKS ... ---- a/arch/x86/kernel/entry_64.S -+++ b/arch/x86/kernel/entry_64.S -@@ -1321,7 +1321,7 @@ apicinterrupt3 HYPERVISOR_CALLBACK_VECTO - - idtentry debug do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK - idtentry int3 do_int3 has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK --idtentry stack_segment do_stack_segment has_error_code=1 paranoid=1 -+idtentry stack_segment do_stack_segment has_error_code=1 - #ifdef CONFIG_XEN - idtentry xen_debug do_debug has_error_code=0 - idtentry xen_int3 do_int3 has_error_code=0 ---- a/arch/x86/kernel/traps.c -+++ b/arch/x86/kernel/traps.c -@@ -233,27 +233,11 @@ DO_ERROR(X86_TRAP_UD, SIGILL, "inva - DO_ERROR(X86_TRAP_OLD_MF, SIGFPE, "coprocessor segment overrun",coprocessor_segment_overrun) - DO_ERROR(X86_TRAP_TS, SIGSEGV, "invalid TSS", invalid_TSS) - DO_ERROR(X86_TRAP_NP, SIGBUS, "segment not present", segment_not_present) --#ifdef CONFIG_X86_32 - DO_ERROR(X86_TRAP_SS, SIGBUS, "stack segment", stack_segment) --#endif - DO_ERROR(X86_TRAP_AC, SIGBUS, "alignment check", alignment_check) - - #ifdef CONFIG_X86_64 - /* Runs on IST stack */ --dotraplinkage void do_stack_segment(struct pt_regs *regs, long error_code) --{ -- enum ctx_state prev_state; -- -- prev_state = exception_enter(); -- if (notify_die(DIE_TRAP, "stack segment", regs, error_code, -- X86_TRAP_SS, SIGBUS) != NOTIFY_STOP) { -- preempt_conditional_sti(regs); -- do_trap(X86_TRAP_SS, SIGBUS, "stack segment", regs, error_code, NULL); -- preempt_conditional_cli(regs); -- } -- exception_exit(prev_state); --} -- - dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code) - { - static const char str[] = "double fault"; -@@ -778,7 +762,7 @@ void __init trap_init(void) - set_intr_gate(X86_TRAP_OLD_MF, coprocessor_segment_overrun); - set_intr_gate(X86_TRAP_TS, invalid_TSS); - set_intr_gate(X86_TRAP_NP, segment_not_present); -- set_intr_gate_ist(X86_TRAP_SS, &stack_segment, STACKFAULT_STACK); -+ set_intr_gate(X86_TRAP_SS, stack_segment); - set_intr_gate(X86_TRAP_GP, general_protection); - set_intr_gate(X86_TRAP_SPURIOUS, spurious_interrupt_bug); - set_intr_gate(X86_TRAP_MF, coprocessor_error); diff --git a/debian/patches/debian/arm-thread_info-fix-abi-change-in-3.16.7-ckt3.patch b/debian/patches/debian/arm-thread_info-fix-abi-change-in-3.16.7-ckt3.patch new file mode 100644 index 000000000..ab7a9a945 --- /dev/null +++ b/debian/patches/debian/arm-thread_info-fix-abi-change-in-3.16.7-ckt3.patch @@ -0,0 +1,35 @@ +From: Ben Hutchings +Date: Mon, 29 Dec 2014 00:55:03 +0100 +Subject: ARM: thread_info: Avoid ABI change in 3.16.7-ckt3 +Forwarded: not-needed + +Restore thread_info::arm_restart_block even though it's now unused. + +--- a/arch/arm/include/asm/thread_info.h ++++ b/arch/arm/include/asm/thread_info.h +@@ -43,6 +43,17 @@ struct cpu_context_save { + __u32 extra[2]; /* Xscale 'acc' register, etc */ + }; + ++/* bwh: Retained only for ABI compatibility */ ++struct arm_restart_block { ++ union { ++ /* For user cache flushing */ ++ struct { ++ unsigned long start; ++ unsigned long end; ++ } cache; ++ }; ++}; ++ + /* + * low level task data that entry.S needs immediate access to. + * __switch_to() assumes cpu_context follows immediately after cpu_domain. +@@ -68,6 +79,7 @@ struct thread_info { + unsigned long thumbee_state; /* ThumbEE Handler Base register */ + #endif + struct restart_block restart_block; ++ struct arm_restart_block arm_restart_block; + }; + + #define INIT_THREAD_INFO(tsk) \ diff --git a/debian/patches/debian/pci-fix-abi-change-in-3.16.7-ckt3.patch b/debian/patches/debian/pci-fix-abi-change-in-3.16.7-ckt3.patch new file mode 100644 index 000000000..7becac7a0 --- /dev/null +++ b/debian/patches/debian/pci-fix-abi-change-in-3.16.7-ckt3.patch @@ -0,0 +1,29 @@ +From: Ben Hutchings +Date: Mon, 29 Dec 2014 00:59:35 +0100 +Subject: PCI: Avoid ABI change in 3.16.7-ckt3 +Forwarded: not-needed + +Move the added bitfield pci_dev::no_64bit_msi to the end of its +bitfield group and hide it from genksyms. + +--- a/include/linux/pci.h ++++ b/include/linux/pci.h +@@ -331,7 +331,6 @@ struct pci_dev { + unsigned int is_added:1; + unsigned int is_busmaster:1; /* device is busmaster */ + unsigned int no_msi:1; /* device may not use msi */ +- unsigned int no_64bit_msi:1; /* device may only use 32-bit MSIs */ + unsigned int block_cfg_access:1; /* config space access is blocked */ + unsigned int broken_parity_status:1; /* Device generates false positive parity */ + unsigned int irq_reroute_variant:2; /* device needs IRQ rerouting variant */ +@@ -349,6 +348,10 @@ struct pci_dev { + unsigned int __aer_firmware_first:1; + unsigned int broken_intx_masking:1; + unsigned int io_window_1k:1; /* Intel P2P bridge 1K I/O windows */ ++#ifndef __GENKSYMS__ ++ unsigned int no_64bit_msi:1; /* device may only use 32-bit MSIs */ ++ /* 8 bits spare */ ++#endif + pci_dev_flags_t dev_flags; + atomic_t enable_cnt; /* pci_enable_device has been called */ + diff --git a/debian/patches/series b/debian/patches/series index c42df5ba3..da6831b54 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -52,17 +52,12 @@ bugfix/mips/disable-advansys.patch bugfix/arm/ixp4xx_iobe.patch bugfix/m68k/ethernat-kconfig.patch bugfix/s390/s390-3215-fix-hanging-console-issue.patch -bugfix/arm64/arm64-crypto-fix-makefile-rule-for-aes-glue-.o.patch bugfix/s390/s390-3215-fix-tty-output-containing-tabs.patch bugfix/x86/drm-i915-initialise-userptr-mmu_notifier-serial-to-1.patch bugfix/x86/drm-i915-Add-some-L3-registers-to-the-parser-whiteli.patch bugfix/parisc/parisc-reduce-sigrtmin-from-37-to-32-to-behave-like-.patch bugfix/arm64/arm64-add-missing-dts-entry-for-X-Gene-platform.patch bugfix/arm64/arm64-removed-using-of-the-mask-attribute-in-the-dts.patch -bugfix/x86/x86_64-traps-Stop-using-IST-for-SS.patch -bugfix/x86/x86_64-traps-Fix-the-espfix64-DF-fixup-and-rewrite-i.patch -bugfix/x86/x86_64-traps-Rework-bad_iret.patch -bugfix/x86/x86-asm-traps-Disable-tracing-and-kprobes-in-fixup_b.patch # Arch features features/mips/MIPS-Support-hard-limit-of-cpu-count-nr_cpu_ids.patch @@ -136,13 +131,8 @@ bugfix/all/kbuild-use-nostdinc-in-compile-tests.patch bugfix/all/disable-some-marvell-phys.patch debian/i2o-disable-i2o_ext_adaptec-on-64bit.patch bugfix/all/aic94xx-remove-broken-fallback-for-missing-ctrl-a.patch -bugfix/all/fold-swapping-d_name.hash-into-switch_names.patch -bugfix/all/vfs-Don-t-exchange-short-filenames-unconditionally.patch bugfix/all/rtsx_usb_ms-use-msleep_interruptible-in-polling-loop.patch bugfix/all/HID-i2c-hid-call-the-hid-driver-s-suspend-and-resume.patch -bugfix/all/drivers-net-Disable-UFO-through-virtio.patch -bugfix/all/drivers-net-ipv6-Select-IPv6-fragment-idents-for-vir.patch -bugfix/all/revert-drivers-net-disable-ufo-through-virtio-in-macvtap-and-tun.patch bugfix/all/xen-netback-Adding-debugfs-io_ring_qX-files.patch bugfix/all/xen-netback-Using-a-new-state-bit-instead-of-carrier.patch bugfix/all/xen-netback-Turn-off-the-carrier-if-the-guest-is-not.patch @@ -161,7 +151,6 @@ bugfix/all/xen-netback-Disable-NAPI-after-disabling-interrupts.patch bugfix/all/xen-netback-do-not-report-success-if-backend_create_.patch bugfix/all/netback-don-t-store-invalid-vif-pointer.patch bugfix/all/xen-netback-support-frontends-without-feature-rx-not.patch -bugfix/all/of-fdt-memblock_reserve-memreserve-regions-in-the-ca.patch # memfd_create() & kdbus backport features/all/kdbus/mm-allow-drivers-to-prevent-new-writable-mappings.patch @@ -491,3 +480,5 @@ debian/of-fix-abi-changes.patch debian/iovec-fix-abi-change-in-3.16.7-ckt1.patch debian/truncate-fix-abi-change-in-3.16.7-ckt1.patch debian/perf-fix-abi-change-in-3.16.7-ckt2.patch +debian/arm-thread_info-fix-abi-change-in-3.16.7-ckt3.patch +debian/pci-fix-abi-change-in-3.16.7-ckt3.patch From bc7cf66d8d5edc76c9035837ce0a358c73f202b3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 2 Jan 2015 03:48:04 +0000 Subject: [PATCH 28/43] hwmon: Enable SENSORS_NCT6683 as module (Closes: #774372) svn path=/dists/sid/linux/; revision=22239 --- debian/changelog | 1 + debian/config/config | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index e31ad417c..f41e9f7d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -96,6 +96,7 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium - Changes to ASoC functions * [arm64] Enable PSTORE as built-in and EFI_VARS_PSTORE as module; ensure efivars and efi-pstore are loaded on EFI systems (Closes: #773309) + * hwmon: Enable SENSORS_NCT6683 as module (Closes: #774372) [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/config/config b/debian/config/config index 6c5d79349..036c4a381 100644 --- a/debian/config/config +++ b/debian/config/config @@ -704,6 +704,7 @@ CONFIG_SENSORS_LM95241=m CONFIG_SENSORS_LM95245=m CONFIG_SENSORS_PC87427=m CONFIG_SENSORS_NTC_THERMISTOR=m +CONFIG_SENSORS_NCT6683=m CONFIG_SENSORS_NCT6775=m # CONFIG_SENSORS_SHT15 is not set CONFIG_SENSORS_SHT21=m From 4356c62c74b6bacca385b98d23d3aeeb5ad846eb Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 2 Jan 2015 04:04:31 +0000 Subject: [PATCH 29/43] [x86] platform/chrome: chromeos_laptop - Add support for Acer C720 (Closes: #774209) svn path=/dists/sid/linux/; revision=22240 --- debian/changelog | 2 + ...chromeos_laptop-add-support-for-acer.patch | 124 ++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 127 insertions(+) create mode 100644 debian/patches/features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch diff --git a/debian/changelog b/debian/changelog index f41e9f7d9..02ee88d65 100644 --- a/debian/changelog +++ b/debian/changelog @@ -97,6 +97,8 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium * [arm64] Enable PSTORE as built-in and EFI_VARS_PSTORE as module; ensure efivars and efi-pstore are loaded on EFI systems (Closes: #773309) * hwmon: Enable SENSORS_NCT6683 as module (Closes: #774372) + * [x86] platform/chrome: chromeos_laptop - Add support for Acer C720 + (Closes: #774209) [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/patches/features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch b/debian/patches/features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch new file mode 100644 index 000000000..9caf443ea --- /dev/null +++ b/debian/patches/features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch @@ -0,0 +1,124 @@ +From: Mika Westerberg +Date: Tue, 17 Jun 2014 14:02:00 -0700 +Subject: platform/chrome: chromeos_laptop - Add support for Acer C720 +Origin: https://git.kernel.org/linus/da3b0ab75aadab63d1ffd5563100c9386e444dad + +Acer C720 has touchpad and light sensor connected to a separate I2C buses. +Since the designware I2C host controller driver has two instances on this +particular machine we need a way to match the correct instance. Add support +for this and then register both C720 touchpad and light sensor. + +This code is based on following patch from Benson Leung: + +https://patchwork.kernel.org/patch/3074411/ + +Signed-off-by: Mika Westerberg +Tested-by: Kirill A. Shutemov +Signed-off-by: Benson Leung +Reviewed-by: Mika Westerberg +Signed-off-by: Olof Johansson +--- + drivers/platform/chrome/chromeos_laptop.c | 45 ++++++++++++++++++++++++++----- + 1 file changed, 39 insertions(+), 6 deletions(-) + +diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c +index 7f1a2e2..a241e5f 100644 +--- a/drivers/platform/chrome/chromeos_laptop.c ++++ b/drivers/platform/chrome/chromeos_laptop.c +@@ -45,6 +45,8 @@ static const char *i2c_adapter_names[] = { + "SMBus I801 adapter", + "i915 gmbus vga", + "i915 gmbus panel", ++ "i2c-designware-pci", ++ "i2c-designware-pci", + }; + + /* Keep this enum consistent with i2c_adapter_names */ +@@ -52,6 +54,8 @@ enum i2c_adapter_type { + I2C_ADAPTER_SMBUS = 0, + I2C_ADAPTER_VGADDC, + I2C_ADAPTER_PANEL, ++ I2C_ADAPTER_DESIGNWARE_0, ++ I2C_ADAPTER_DESIGNWARE_1, + }; + + struct i2c_peripheral { +@@ -172,29 +176,42 @@ static struct i2c_client *__add_probed_i2c_device( + return client; + } + ++struct i2c_lookup { ++ const char *name; ++ int instance; ++ int n; ++}; ++ + static int __find_i2c_adap(struct device *dev, void *data) + { +- const char *name = data; ++ struct i2c_lookup *lookup = data; + static const char *prefix = "i2c-"; + struct i2c_adapter *adapter; + if (strncmp(dev_name(dev), prefix, strlen(prefix)) != 0) + return 0; + adapter = to_i2c_adapter(dev); +- return (strncmp(adapter->name, name, strlen(name)) == 0); ++ if (strncmp(adapter->name, lookup->name, strlen(lookup->name)) == 0 && ++ lookup->n++ == lookup->instance) ++ return 1; ++ return 0; + } + + static int find_i2c_adapter_num(enum i2c_adapter_type type) + { + struct device *dev = NULL; + struct i2c_adapter *adapter; +- const char *name = i2c_adapter_names[type]; ++ struct i2c_lookup lookup; ++ ++ memset(&lookup, 0, sizeof(lookup)); ++ lookup.name = i2c_adapter_names[type]; ++ lookup.instance = (type == I2C_ADAPTER_DESIGNWARE_1) ? 1 : 0; ++ + /* find the adapter by name */ +- dev = bus_find_device(&i2c_bus_type, NULL, (void *)name, +- __find_i2c_adap); ++ dev = bus_find_device(&i2c_bus_type, NULL, &lookup, __find_i2c_adap); + if (!dev) { + /* Adapters may appear later. Deferred probing will retry */ + pr_notice("%s: i2c adapter %s not found on system.\n", __func__, +- name); ++ lookup.name); + return -ENODEV; + } + adapter = to_i2c_adapter(dev); +@@ -377,6 +394,15 @@ static struct chromeos_laptop acer_ac700 = { + }, + }; + ++static struct chromeos_laptop acer_c720 = { ++ .i2c_peripherals = { ++ /* Touchpad. */ ++ { .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 }, ++ /* Light Sensor. */ ++ { .add = setup_isl29018_als, I2C_ADAPTER_DESIGNWARE_1 }, ++ }, ++}; ++ + static struct chromeos_laptop hp_pavilion_14_chromebook = { + .i2c_peripherals = { + /* Touchpad. */ +@@ -434,6 +460,13 @@ static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = { + _CBDD(acer_ac700), + }, + { ++ .ident = "Acer C720", ++ .matches = { ++ DMI_MATCH(DMI_PRODUCT_NAME, "Peppy"), ++ }, ++ _CBDD(acer_c720), ++ }, ++ { + .ident = "HP Pavilion 14 Chromebook", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "Butterfly"), diff --git a/debian/patches/series b/debian/patches/series index da6831b54..266e317f9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -482,3 +482,4 @@ debian/truncate-fix-abi-change-in-3.16.7-ckt1.patch debian/perf-fix-abi-change-in-3.16.7-ckt2.patch debian/arm-thread_info-fix-abi-change-in-3.16.7-ckt3.patch debian/pci-fix-abi-change-in-3.16.7-ckt3.patch +features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch From 147729defc5a68698088b06b9d6682ea49d4a5e9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 2 Jan 2015 04:19:56 +0000 Subject: [PATCH 30/43] udeb: Add i2c-designware-{core,platform} to i2c-modules and i2c-hid to input-modules (Closes: #772578) svn path=/dists/sid/linux/; revision=22241 --- debian/changelog | 2 ++ debian/installer/modules/i2c-modules | 1 + debian/installer/modules/input-modules | 1 + debian/installer/package-list | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 02ee88d65..786dc8c03 100644 --- a/debian/changelog +++ b/debian/changelog @@ -99,6 +99,8 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium * hwmon: Enable SENSORS_NCT6683 as module (Closes: #774372) * [x86] platform/chrome: chromeos_laptop - Add support for Acer C720 (Closes: #774209) + * udeb: Add i2c-designware-{core,platform} to i2c-modules and i2c-hid to + input-modules (Closes: #772578) [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/installer/modules/i2c-modules b/debian/installer/modules/i2c-modules index 58a42a086..0c4999fa7 100644 --- a/debian/installer/modules/i2c-modules +++ b/debian/installer/modules/i2c-modules @@ -1,2 +1,3 @@ i2c-core i2c-algo-bit +i2c-designware-platform ? diff --git a/debian/installer/modules/input-modules b/debian/installer/modules/input-modules index 8a80c41bf..f228dee18 100644 --- a/debian/installer/modules/input-modules +++ b/debian/installer/modules/input-modules @@ -28,3 +28,4 @@ hid-sunplus ? hid-topseed ? synaptics_usb ? wistron_btns ? +i2c-hid ? diff --git a/debian/installer/package-list b/debian/installer/package-list index b54f621b7..462566901 100644 --- a/debian/installer/package-list +++ b/debian/installer/package-list @@ -216,7 +216,7 @@ Description: Frame buffer support This package contains Frame buffer drivers for the kernel. Package: input-modules -Depends: kernel-image, usb-modules +Depends: kernel-image, usb-modules, i2c-modules Priority: extra Description: Input devices support This package contains input device drivers for the kernel. From da330a0eef95ae378d8938a77fcfa83bec6eb1e3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 2 Jan 2015 04:26:05 +0000 Subject: [PATCH 31/43] [x86] ACPI / video: Run _BCL before deciding registering backlight (regression in 3.16) (Closes: #762285) svn path=/dists/sid/linux/; revision=22242 --- debian/changelog | 2 + ...bcl-before-deciding-registering-back.patch | 61 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 64 insertions(+) create mode 100644 debian/patches/bugfix/x86/acpi-video-run-_bcl-before-deciding-registering-back.patch diff --git a/debian/changelog b/debian/changelog index 786dc8c03..7b7d35989 100644 --- a/debian/changelog +++ b/debian/changelog @@ -101,6 +101,8 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium (Closes: #774209) * udeb: Add i2c-designware-{core,platform} to i2c-modules and i2c-hid to input-modules (Closes: #772578) + * [x86] ACPI / video: Run _BCL before deciding registering backlight + (regression in 3.16) (Closes: #762285) [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/patches/bugfix/x86/acpi-video-run-_bcl-before-deciding-registering-back.patch b/debian/patches/bugfix/x86/acpi-video-run-_bcl-before-deciding-registering-back.patch new file mode 100644 index 000000000..9df54f3cb --- /dev/null +++ b/debian/patches/bugfix/x86/acpi-video-run-_bcl-before-deciding-registering-back.patch @@ -0,0 +1,61 @@ +From: Aaron Lu +Date: Tue, 28 Oct 2014 14:35:59 +0800 +Subject: ACPI / video: Run _BCL before deciding registering backlight +Origin: https://git.kernel.org/linus/dce4ec2e452fddb7542b5fc15d0e6b8531f6d5eb + +The ASUS K53SM's ACPI table queries _OSI("Windows 2012") in the video +output device's _BCL and _BCM control method instead of the usual _INI +functions of the _SB or PCI host bridge PCI0 devices. This made our +video module thought this is a pre-Win8 system when deciding if we +should register a backlight interface for it and the end result is that +a non-working acpi_video interface is registered and user is unable to +control backlight from GUI. Solve this problem by evaluating _BCL control +method before doing the decision. + +Note that for some Thinkpad systems, the _BCL is also required to be +evaluated for the hotkey event to be generated no matter if we will +register an ACPI video backlight interface for it or not. Since the +thinkpad_acpi module will do this anyway we didn't add such a thing in +the video module previously. But now with this change here, the +thinkpad_acpi module is no more necessary for those systems regarding +backlight functionality. + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=85051 +Reported-and-tested-by: Ralf Jung +Signed-off-by: Aaron Lu +Signed-off-by: Rafael J. Wysocki +--- + drivers/acpi/video.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +--- a/drivers/acpi/video.c ++++ b/drivers/acpi/video.c +@@ -1836,6 +1836,19 @@ static void acpi_video_dev_register_back + printk(KERN_ERR PREFIX "Create sysfs link\n"); + } + ++static void acpi_video_run_bcl_for_osi(struct acpi_video_bus *video) ++{ ++ struct acpi_video_device *dev; ++ union acpi_object *levels; ++ ++ mutex_lock(&video->device_list_lock); ++ list_for_each_entry(dev, &video->video_device_list, entry) { ++ if (!acpi_video_device_lcd_query_levels(dev, &levels)) ++ kfree(levels); ++ } ++ mutex_unlock(&video->device_list_lock); ++} ++ + static int acpi_video_bus_register_backlight(struct acpi_video_bus *video) + { + struct acpi_video_device *dev; +@@ -1843,6 +1856,8 @@ static int acpi_video_bus_register_backl + if (video->backlight_registered) + return 0; + ++ acpi_video_run_bcl_for_osi(video); ++ + if (!acpi_video_verify_backlight_support()) + return 0; + diff --git a/debian/patches/series b/debian/patches/series index 266e317f9..9c0296d56 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -483,3 +483,4 @@ debian/perf-fix-abi-change-in-3.16.7-ckt2.patch debian/arm-thread_info-fix-abi-change-in-3.16.7-ckt3.patch debian/pci-fix-abi-change-in-3.16.7-ckt3.patch features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch +bugfix/x86/acpi-video-run-_bcl-before-deciding-registering-back.patch From 988cd5cb011199c4a37e673cce9da20ac621e413 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 5 Jan 2015 20:58:19 +0000 Subject: [PATCH 32/43] [amd64] Enable EFI_MIXED to support Bay Trail systems svn path=/dists/sid/linux/; revision=22243 --- debian/changelog | 1 + debian/config/kernelarch-x86/config-arch-64 | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7b7d35989..dbe8901d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -103,6 +103,7 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium input-modules (Closes: #772578) * [x86] ACPI / video: Run _BCL before deciding registering backlight (regression in 3.16) (Closes: #762285) + * [amd64] Enable EFI_MIXED to support Bay Trail systems [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/config/kernelarch-x86/config-arch-64 b/debian/config/kernelarch-x86/config-arch-64 index ce115aff5..53c97ca2a 100644 --- a/debian/config/kernelarch-x86/config-arch-64 +++ b/debian/config/kernelarch-x86/config-arch-64 @@ -14,6 +14,7 @@ CONFIG_NUMA=y CONFIG_AMD_NUMA=y CONFIG_X86_64_ACPI_NUMA=y CONFIG_NUMA_EMU=y +CONFIG_EFI_MIXED=y CONFIG_PCI_MMCONFIG=y CONFIG_ISA_DMA_API=y CONFIG_X86_X32=y From 45c478e07ed606749790b424f6da02d0dbeb7374 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 12 Jan 2015 03:09:51 +0000 Subject: [PATCH 33/43] Add various security fixes svn path=/dists/sid/linux/; revision=22249 --- debian/changelog | 10 + ...late-extra-tail-size-based-on-queued.patch | 58 ++++ ...fix-infinite-looping-over-ce-entries.patch | 52 +++ ...fix-unchecked-printing-of-er-records.patch | 30 ++ ...-race-between-key-lookup-and-freeing.patch | 42 +++ ...ravirt_enabled-on-kvm-guests-for-esp.patch | 63 ++++ ...lidate-tls-entries-to-protect-espfix.patch | 75 +++++ ...-load-tls-descriptors-before-switchi.patch | 304 ++++++++++++++++++ debian/patches/series | 7 + 9 files changed, 641 insertions(+) create mode 100644 debian/patches/bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch create mode 100644 debian/patches/bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch create mode 100644 debian/patches/bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch create mode 100644 debian/patches/bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch create mode 100644 debian/patches/bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch create mode 100644 debian/patches/bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch create mode 100644 debian/patches/bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch diff --git a/debian/changelog b/debian/changelog index dbe8901d4..fb7d2b953 100644 --- a/debian/changelog +++ b/debian/changelog @@ -104,6 +104,16 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium * [x86] ACPI / video: Run _BCL before deciding registering backlight (regression in 3.16) (Closes: #762285) * [amd64] Enable EFI_MIXED to support Bay Trail systems + * [x86] tls: Validate TLS entries to protect espfix (CVE-2014-8133) + * [x86] kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit + (CVE-2014-8134) + * [amd64] switch_to(): Load TLS descriptors before switching DS and ES + (CVE-2014-9419) + * isofs: Fix infinite looping over CE entries (CVE-2014-9420) + * batman-adv: Calculate extra tail size based on queued fragments + (Closes: #774155) (CVE-2014-9428) + * KEYS: close race between key lookup and freeing (CVE-2014-9529) + * isofs: Fix unchecked printing of ER records (CVE-2014-9584) [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/patches/bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch b/debian/patches/bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch new file mode 100644 index 000000000..31486c9fe --- /dev/null +++ b/debian/patches/bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch @@ -0,0 +1,58 @@ +From: Sven Eckelmann +Date: Sat, 20 Dec 2014 13:48:55 +0100 +Subject: batman-adv: Calculate extra tail size based on queued fragments +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Origin: https://git.kernel.org/linus/5b6698b0e4a37053de35cc24ee695b98a7eb712b + +The fragmentation code was replaced in 610bfc6bc99bc83680d190ebc69359a05fc7f605 +("batman-adv: Receive fragmented packets and merge"). The new code provided a +mostly unused parameter skb for the merging function. It is used inside the +function to calculate the additionally needed skb tailroom. But instead of +increasing its own tailroom, it is only increasing the tailroom of the first +queued skb. This is not correct in some situations because the first queued +entry can be a different one than the parameter. + +An observed problem was: + +1. packet with size 104, total_size 1464, fragno 1 was received + - packet is queued +2. packet with size 1400, total_size 1464, fragno 0 was received + - packet is queued at the end of the list +3. enough data was received and can be given to the merge function + (1464 == (1400 - 20) + (104 - 20)) + - merge functions gets 1400 byte large packet as skb argument +4. merge function gets first entry in queue (104 byte) + - stored as skb_out +5. merge function calculates the required extra tail as total_size - skb->len + - pskb_expand_head tail of skb_out with 64 bytes +6. merge function tries to squeeze the extra 1380 bytes from the second queued + skb (1400 byte aka skb parameter) in the 64 extra tail bytes of skb_out + +Instead calculate the extra required tail bytes for skb_out also using skb_out +instead of using the parameter skb. The skb parameter is only used to get the +total_size from the last received packet. This is also the total_size used to +decide that all fragments were received. + +Reported-by: Philipp Psurek +Signed-off-by: Sven Eckelmann +Acked-by: Martin Hundebøll +Signed-off-by: David S. Miller +--- + net/batman-adv/fragmentation.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c +index fc1835c..8af3461 100644 +--- a/net/batman-adv/fragmentation.c ++++ b/net/batman-adv/fragmentation.c +@@ -251,7 +251,7 @@ batadv_frag_merge_packets(struct hlist_head *chain, struct sk_buff *skb) + kfree(entry); + + /* Make room for the rest of the fragments. */ +- if (pskb_expand_head(skb_out, 0, size - skb->len, GFP_ATOMIC) < 0) { ++ if (pskb_expand_head(skb_out, 0, size - skb_out->len, GFP_ATOMIC) < 0) { + kfree_skb(skb_out); + skb_out = NULL; + goto free; diff --git a/debian/patches/bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch b/debian/patches/bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch new file mode 100644 index 000000000..c9fbb27bc --- /dev/null +++ b/debian/patches/bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch @@ -0,0 +1,52 @@ +From: Jan Kara +Date: Mon, 15 Dec 2014 14:22:46 +0100 +Subject: isofs: Fix infinite looping over CE entries +Origin: https://git.kernel.org/linus/f54e18f1b831c92f6512d2eedb224cd63d607d3d + +Rock Ridge extensions define so called Continuation Entries (CE) which +define where is further space with Rock Ridge data. Corrupted isofs +image can contain arbitrarily long chain of these, including a one +containing loop and thus causing kernel to end in an infinite loop when +traversing these entries. + +Limit the traversal to 32 entries which should be more than enough space +to store all the Rock Ridge data. + +Reported-by: P J P +CC: stable@vger.kernel.org +Signed-off-by: Jan Kara +--- + fs/isofs/rock.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c +index f488bba..bb63254 100644 +--- a/fs/isofs/rock.c ++++ b/fs/isofs/rock.c +@@ -30,6 +30,7 @@ struct rock_state { + int cont_size; + int cont_extent; + int cont_offset; ++ int cont_loops; + struct inode *inode; + }; + +@@ -73,6 +74,9 @@ static void init_rock_state(struct rock_state *rs, struct inode *inode) + rs->inode = inode; + } + ++/* Maximum number of Rock Ridge continuation entries */ ++#define RR_MAX_CE_ENTRIES 32 ++ + /* + * Returns 0 if the caller should continue scanning, 1 if the scan must end + * and -ve on error. +@@ -105,6 +109,8 @@ static int rock_continue(struct rock_state *rs) + goto out; + } + ret = -EIO; ++ if (++rs->cont_loops >= RR_MAX_CE_ENTRIES) ++ goto out; + bh = sb_bread(rs->inode->i_sb, rs->cont_extent); + if (bh) { + memcpy(rs->buffer, bh->b_data + rs->cont_offset, diff --git a/debian/patches/bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch b/debian/patches/bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch new file mode 100644 index 000000000..125951e1a --- /dev/null +++ b/debian/patches/bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch @@ -0,0 +1,30 @@ +From: Jan Kara +Date: Thu, 18 Dec 2014 17:26:10 +0100 +Subject: isofs: Fix unchecked printing of ER records +Origin: https://git.kernel.org/linus/4e2024624e678f0ebb916e6192bd23c1f9fdf696 + +We didn't check length of rock ridge ER records before printing them. +Thus corrupted isofs image can cause us to access and print some memory +behind the buffer with obvious consequences. + +Reported-and-tested-by: Carl Henrik Lunde +CC: stable@vger.kernel.org +Signed-off-by: Jan Kara +--- + fs/isofs/rock.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c +index bb63254..735d752 100644 +--- a/fs/isofs/rock.c ++++ b/fs/isofs/rock.c +@@ -362,6 +362,9 @@ repeat: + rs.cont_size = isonum_733(rr->u.CE.size); + break; + case SIG('E', 'R'): ++ /* Invalid length of ER tag id? */ ++ if (rr->u.ER.len_id + offsetof(struct rock_ridge, u.ER.data) > rr->len) ++ goto out; + ISOFS_SB(inode->i_sb)->s_rock = 1; + printk(KERN_DEBUG "ISO 9660 Extensions: "); + { diff --git a/debian/patches/bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch b/debian/patches/bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch new file mode 100644 index 000000000..ada785fef --- /dev/null +++ b/debian/patches/bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch @@ -0,0 +1,42 @@ +From: Sasha Levin +Date: Mon, 29 Dec 2014 09:39:01 -0500 +Subject: KEYS: close race between key lookup and freeing +Origin: https://git.kernel.org/linus/a3a8784454692dd72e5d5d34dcdab17b4420e74c + +When a key is being garbage collected, it's key->user would get put before +the ->destroy() callback is called, where the key is removed from it's +respective tracking structures. + +This leaves a key hanging in a semi-invalid state which leaves a window open +for a different task to try an access key->user. An example is +find_keyring_by_name() which would dereference key->user for a key that is +in the process of being garbage collected (where key->user was freed but +->destroy() wasn't called yet - so it's still present in the linked list). + +This would cause either a panic, or corrupt memory. + +Fixes CVE-2014-9529. + +Signed-off-by: Sasha Levin +Signed-off-by: David Howells +--- + security/keys/gc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/security/keys/gc.c ++++ b/security/keys/gc.c +@@ -157,12 +157,12 @@ static noinline void key_gc_unused_keys( + if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags)) + atomic_dec(&key->user->nikeys); + +- key_user_put(key->user); +- + /* now throw away the key memory */ + if (key->type->destroy) + key->type->destroy(key); + ++ key_user_put(key->user); ++ + kfree(key->description); + + #ifdef KEY_DEBUGGING diff --git a/debian/patches/bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch b/debian/patches/bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch new file mode 100644 index 000000000..372a7160a --- /dev/null +++ b/debian/patches/bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch @@ -0,0 +1,63 @@ +From: Andy Lutomirski +Date: Fri, 5 Dec 2014 19:03:28 -0800 +Subject: x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit +Origin: https://git.kernel.org/linus/29fa6825463c97e5157284db80107d1bfac5d77b + +paravirt_enabled has the following effects: + + - Disables the F00F bug workaround warning. There is no F00F bug + workaround any more because Linux's standard IDT handling already + works around the F00F bug, but the warning still exists. This + is only cosmetic, and, in any event, there is no such thing as + KVM on a CPU with the F00F bug. + + - Disables 32-bit APM BIOS detection. On a KVM paravirt system, + there should be no APM BIOS anyway. + + - Disables tboot. I think that the tboot code should check the + CPUID hypervisor bit directly if it matters. + + - paravirt_enabled disables espfix32. espfix32 should *not* be + disabled under KVM paravirt. + +The last point is the purpose of this patch. It fixes a leak of the +high 16 bits of the kernel stack address on 32-bit KVM paravirt +guests. Fixes CVE-2014-8134. + +Cc: stable@vger.kernel.org +Suggested-by: Konrad Rzeszutek Wilk +Signed-off-by: Andy Lutomirski +Signed-off-by: Paolo Bonzini +--- + arch/x86/kernel/kvm.c | 9 ++++++++- + arch/x86/kernel/kvmclock.c | 1 - + 2 files changed, 8 insertions(+), 2 deletions(-) + +--- a/arch/x86/kernel/kvm.c ++++ b/arch/x86/kernel/kvm.c +@@ -282,7 +282,14 @@ NOKPROBE_SYMBOL(do_async_page_fault); + static void __init paravirt_ops_setup(void) + { + pv_info.name = "KVM"; +- pv_info.paravirt_enabled = 1; ++ ++ /* ++ * KVM isn't paravirt in the sense of paravirt_enabled. A KVM ++ * guest kernel works like a bare metal kernel with additional ++ * features, and paravirt_enabled is about features that are ++ * missing. ++ */ ++ pv_info.paravirt_enabled = 0; + + if (kvm_para_has_feature(KVM_FEATURE_NOP_IO_DELAY)) + pv_cpu_ops.io_delay = kvm_io_delay; +--- a/arch/x86/kernel/kvmclock.c ++++ b/arch/x86/kernel/kvmclock.c +@@ -263,7 +263,6 @@ void __init kvmclock_init(void) + #endif + kvm_get_preset_lpj(); + clocksource_register_hz(&kvm_clock, NSEC_PER_SEC); +- pv_info.paravirt_enabled = 1; + pv_info.name = "KVM"; + + if (kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE_STABLE_BIT)) diff --git a/debian/patches/bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch b/debian/patches/bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch new file mode 100644 index 000000000..bf7690eec --- /dev/null +++ b/debian/patches/bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch @@ -0,0 +1,75 @@ +From: Andy Lutomirski +Date: Thu, 4 Dec 2014 16:48:16 -0800 +Subject: x86/tls: Validate TLS entries to protect espfix +Origin: https://git.kernel.org/linus/41bdc78544b8a93a9c6814b8bbbfef966272abbe + +Installing a 16-bit RW data segment into the GDT defeats espfix. +AFAICT this will not affect glibc, Wine, or dosemu at all. + +Signed-off-by: Andy Lutomirski +Acked-by: H. Peter Anvin +Cc: stable@vger.kernel.org +Cc: Konrad Rzeszutek Wilk +Cc: Linus Torvalds +Cc: security@kernel.org +Cc: Willy Tarreau +Signed-off-by: Ingo Molnar +--- + arch/x86/kernel/tls.c | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c +index f7fec09..e7650bd 100644 +--- a/arch/x86/kernel/tls.c ++++ b/arch/x86/kernel/tls.c +@@ -27,6 +27,21 @@ static int get_free_idx(void) + return -ESRCH; + } + ++static bool tls_desc_okay(const struct user_desc *info) ++{ ++ if (LDT_empty(info)) ++ return true; ++ ++ /* ++ * espfix is required for 16-bit data segments, but espfix ++ * only works for LDT segments. ++ */ ++ if (!info->seg_32bit) ++ return false; ++ ++ return true; ++} ++ + static void set_tls_desc(struct task_struct *p, int idx, + const struct user_desc *info, int n) + { +@@ -66,6 +81,9 @@ int do_set_thread_area(struct task_struct *p, int idx, + if (copy_from_user(&info, u_info, sizeof(info))) + return -EFAULT; + ++ if (!tls_desc_okay(&info)) ++ return -EINVAL; ++ + if (idx == -1) + idx = info.entry_number; + +@@ -192,6 +210,7 @@ int regset_tls_set(struct task_struct *target, const struct user_regset *regset, + { + struct user_desc infobuf[GDT_ENTRY_TLS_ENTRIES]; + const struct user_desc *info; ++ int i; + + if (pos >= GDT_ENTRY_TLS_ENTRIES * sizeof(struct user_desc) || + (pos % sizeof(struct user_desc)) != 0 || +@@ -205,6 +224,10 @@ int regset_tls_set(struct task_struct *target, const struct user_regset *regset, + else + info = infobuf; + ++ for (i = 0; i < count / sizeof(struct user_desc); i++) ++ if (!tls_desc_okay(info + i)) ++ return -EINVAL; ++ + set_tls_desc(target, + GDT_ENTRY_TLS_MIN + (pos / sizeof(struct user_desc)), + info, count / sizeof(struct user_desc)); diff --git a/debian/patches/bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch b/debian/patches/bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch new file mode 100644 index 000000000..e426b726d --- /dev/null +++ b/debian/patches/bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch @@ -0,0 +1,304 @@ +From: Andy Lutomirski +Date: Mon, 8 Dec 2014 13:55:20 -0800 +Subject: x86_64, switch_to(): Load TLS descriptors before switching DS and ES +Origin: https://git.kernel.org/linus/f647d7c155f069c1a068030255c300663516420e + +Otherwise, if buggy user code points DS or ES into the TLS +array, they would be corrupted after a context switch. + +This also significantly improves the comments and documents some +gotchas in the code. + +Before this patch, the both tests below failed. With this +patch, the es test passes, although the gsbase test still fails. + + ----- begin es test ----- + +/* + * Copyright (c) 2014 Andy Lutomirski + * GPL v2 + */ + +static unsigned short GDT3(int idx) +{ + return (idx << 3) | 3; +} + +static int create_tls(int idx, unsigned int base) +{ + struct user_desc desc = { + .entry_number = idx, + .base_addr = base, + .limit = 0xfffff, + .seg_32bit = 1, + .contents = 0, /* Data, grow-up */ + .read_exec_only = 0, + .limit_in_pages = 1, + .seg_not_present = 0, + .useable = 0, + }; + + if (syscall(SYS_set_thread_area, &desc) != 0) + err(1, "set_thread_area"); + + return desc.entry_number; +} + +int main() +{ + int idx = create_tls(-1, 0); + printf("Allocated GDT index %d\n", idx); + + unsigned short orig_es; + asm volatile ("mov %%es,%0" : "=rm" (orig_es)); + + int errors = 0; + int total = 1000; + for (int i = 0; i < total; i++) { + asm volatile ("mov %0,%%es" : : "rm" (GDT3(idx))); + usleep(100); + + unsigned short es; + asm volatile ("mov %%es,%0" : "=rm" (es)); + asm volatile ("mov %0,%%es" : : "rm" (orig_es)); + if (es != GDT3(idx)) { + if (errors == 0) + printf("[FAIL]\tES changed from 0x%hx to 0x%hx\n", + GDT3(idx), es); + errors++; + } + } + + if (errors) { + printf("[FAIL]\tES was corrupted %d/%d times\n", errors, total); + return 1; + } else { + printf("[OK]\tES was preserved\n"); + return 0; + } +} + + ----- end es test ----- + + ----- begin gsbase test ----- + +/* + * gsbase.c, a gsbase test + * Copyright (c) 2014 Andy Lutomirski + * GPL v2 + */ + +static unsigned char *testptr, *testptr2; + +static unsigned char read_gs_testvals(void) +{ + unsigned char ret; + asm volatile ("movb %%gs:%1, %0" : "=r" (ret) : "m" (*testptr)); + return ret; +} + +int main() +{ + int errors = 0; + + testptr = mmap((void *)0x200000000UL, 1, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS, -1, 0); + if (testptr == MAP_FAILED) + err(1, "mmap"); + + testptr2 = mmap((void *)0x300000000UL, 1, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS, -1, 0); + if (testptr2 == MAP_FAILED) + err(1, "mmap"); + + *testptr = 0; + *testptr2 = 1; + + if (syscall(SYS_arch_prctl, ARCH_SET_GS, + (unsigned long)testptr2 - (unsigned long)testptr) != 0) + err(1, "ARCH_SET_GS"); + + usleep(100); + + if (read_gs_testvals() == 1) { + printf("[OK]\tARCH_SET_GS worked\n"); + } else { + printf("[FAIL]\tARCH_SET_GS failed\n"); + errors++; + } + + asm volatile ("mov %0,%%gs" : : "r" (0)); + + if (read_gs_testvals() == 0) { + printf("[OK]\tWriting 0 to gs worked\n"); + } else { + printf("[FAIL]\tWriting 0 to gs failed\n"); + errors++; + } + + usleep(100); + + if (read_gs_testvals() == 0) { + printf("[OK]\tgsbase is still zero\n"); + } else { + printf("[FAIL]\tgsbase was corrupted\n"); + errors++; + } + + return errors == 0 ? 0 : 1; +} + + ----- end gsbase test ----- + +Signed-off-by: Andy Lutomirski +Cc: +Cc: Andi Kleen +Cc: Linus Torvalds +Link: http://lkml.kernel.org/r/509d27c9fec78217691c3dad91cec87e1006b34a.1418075657.git.luto@amacapital.net +Signed-off-by: Ingo Molnar +--- + arch/x86/kernel/process_64.c | 101 +++++++++++++++++++++++++++++++------------ + 1 file changed, 73 insertions(+), 28 deletions(-) + +--- a/arch/x86/kernel/process_64.c ++++ b/arch/x86/kernel/process_64.c +@@ -286,24 +286,9 @@ __switch_to(struct task_struct *prev_p, + + fpu = switch_fpu_prepare(prev_p, next_p, cpu); + +- /* +- * Reload esp0, LDT and the page table pointer: +- */ ++ /* Reload esp0 and ss1. */ + load_sp0(tss, next); + +- /* +- * Switch DS and ES. +- * This won't pick up thread selector changes, but I guess that is ok. +- */ +- savesegment(es, prev->es); +- if (unlikely(next->es | prev->es)) +- loadsegment(es, next->es); +- +- savesegment(ds, prev->ds); +- if (unlikely(next->ds | prev->ds)) +- loadsegment(ds, next->ds); +- +- + /* We must save %fs and %gs before load_TLS() because + * %fs and %gs may be cleared by load_TLS(). + * +@@ -312,41 +297,101 @@ __switch_to(struct task_struct *prev_p, + savesegment(fs, fsindex); + savesegment(gs, gsindex); + ++ /* ++ * Load TLS before restoring any segments so that segment loads ++ * reference the correct GDT entries. ++ */ + load_TLS(next, cpu); + + /* +- * Leave lazy mode, flushing any hypercalls made here. +- * This must be done before restoring TLS segments so +- * the GDT and LDT are properly updated, and must be +- * done before math_state_restore, so the TS bit is up +- * to date. ++ * Leave lazy mode, flushing any hypercalls made here. This ++ * must be done after loading TLS entries in the GDT but before ++ * loading segments that might reference them, and and it must ++ * be done before math_state_restore, so the TS bit is up to ++ * date. + */ + arch_end_context_switch(next_p); + ++ /* Switch DS and ES. ++ * ++ * Reading them only returns the selectors, but writing them (if ++ * nonzero) loads the full descriptor from the GDT or LDT. The ++ * LDT for next is loaded in switch_mm, and the GDT is loaded ++ * above. ++ * ++ * We therefore need to write new values to the segment ++ * registers on every context switch unless both the new and old ++ * values are zero. ++ * ++ * Note that we don't need to do anything for CS and SS, as ++ * those are saved and restored as part of pt_regs. ++ */ ++ savesegment(es, prev->es); ++ if (unlikely(next->es | prev->es)) ++ loadsegment(es, next->es); ++ ++ savesegment(ds, prev->ds); ++ if (unlikely(next->ds | prev->ds)) ++ loadsegment(ds, next->ds); ++ + /* + * Switch FS and GS. + * +- * Segment register != 0 always requires a reload. Also +- * reload when it has changed. When prev process used 64bit +- * base always reload to avoid an information leak. ++ * These are even more complicated than FS and GS: they have ++ * 64-bit bases are that controlled by arch_prctl. Those bases ++ * only differ from the values in the GDT or LDT if the selector ++ * is 0. ++ * ++ * Loading the segment register resets the hidden base part of ++ * the register to 0 or the value from the GDT / LDT. If the ++ * next base address zero, writing 0 to the segment register is ++ * much faster than using wrmsr to explicitly zero the base. ++ * ++ * The thread_struct.fs and thread_struct.gs values are 0 ++ * if the fs and gs bases respectively are not overridden ++ * from the values implied by fsindex and gsindex. They ++ * are nonzero, and store the nonzero base addresses, if ++ * the bases are overridden. ++ * ++ * (fs != 0 && fsindex != 0) || (gs != 0 && gsindex != 0) should ++ * be impossible. ++ * ++ * Therefore we need to reload the segment registers if either ++ * the old or new selector is nonzero, and we need to override ++ * the base address if next thread expects it to be overridden. ++ * ++ * This code is unnecessarily slow in the case where the old and ++ * new indexes are zero and the new base is nonzero -- it will ++ * unnecessarily write 0 to the selector before writing the new ++ * base address. ++ * ++ * Note: This all depends on arch_prctl being the only way that ++ * user code can override the segment base. Once wrfsbase and ++ * wrgsbase are enabled, most of this code will need to change. + */ + if (unlikely(fsindex | next->fsindex | prev->fs)) { + loadsegment(fs, next->fsindex); ++ + /* +- * Check if the user used a selector != 0; if yes +- * clear 64bit base, since overloaded base is always +- * mapped to the Null selector ++ * If user code wrote a nonzero value to FS, then it also ++ * cleared the overridden base address. ++ * ++ * XXX: if user code wrote 0 to FS and cleared the base ++ * address itself, we won't notice and we'll incorrectly ++ * restore the prior base address next time we reschdule ++ * the process. + */ + if (fsindex) + prev->fs = 0; + } +- /* when next process has a 64bit base use it */ + if (next->fs) + wrmsrl(MSR_FS_BASE, next->fs); + prev->fsindex = fsindex; + + if (unlikely(gsindex | next->gsindex | prev->gs)) { + load_gs_index(next->gsindex); ++ ++ /* This works (and fails) the same way as fsindex above. */ + if (gsindex) + prev->gs = 0; + } diff --git a/debian/patches/series b/debian/patches/series index 9c0296d56..4dd35a070 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -484,3 +484,10 @@ debian/arm-thread_info-fix-abi-change-in-3.16.7-ckt3.patch debian/pci-fix-abi-change-in-3.16.7-ckt3.patch features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch bugfix/x86/acpi-video-run-_bcl-before-deciding-registering-back.patch +bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch +bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch +bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch +bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch +bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch +bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch +bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch From 3aa362afbe448c66f1a9979eb8d9a631c11de488 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 12 Jan 2015 05:08:31 +0000 Subject: [PATCH 34/43] vfs: Fix potential deadlock in dcache (CVE-2014-8559) svn path=/dists/sid/linux/; revision=22250 --- debian/changelog | 5 + ...overlapping-d_child-to-overlapping-d.patch | 71 ++ .../all/deal-with-deadlock-in-d_walk.patch | 82 ++ ...overlapping-d_child-to-overlapping-d.patch | 714 ++++++++++++++++++ ...-abi-change-for-dentry-union-changes.patch | 76 ++ debian/patches/series | 4 + 6 files changed, 952 insertions(+) create mode 100644 debian/patches/bugfix/all/aufs-move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch create mode 100644 debian/patches/bugfix/all/deal-with-deadlock-in-d_walk.patch create mode 100644 debian/patches/bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch create mode 100644 debian/patches/debian/vfs-avoid-abi-change-for-dentry-union-changes.patch diff --git a/debian/changelog b/debian/changelog index fb7d2b953..e071c6a12 100644 --- a/debian/changelog +++ b/debian/changelog @@ -114,6 +114,11 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium (Closes: #774155) (CVE-2014-9428) * KEYS: close race between key lookup and freeing (CVE-2014-9529) * isofs: Fix unchecked printing of ER records (CVE-2014-9584) + * vfs: Fix potential deadlock in dcache (CVE-2014-8559) + - move d_rcu from overlapping d_child to overlapping d_alias + - aufs: move d_rcu from overlapping d_child to overlapping d_alias + - vfs: Avoid ABI change for dentry union changes + - deal with deadlock in d_walk() [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/patches/bugfix/all/aufs-move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch b/debian/patches/bugfix/all/aufs-move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch new file mode 100644 index 000000000..9c536893e --- /dev/null +++ b/debian/patches/bugfix/all/aufs-move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch @@ -0,0 +1,71 @@ +From: Ben Hutchings +Date: Mon, 12 Jan 2015 04:12:45 +0000 +Subject: aufs: move d_rcu from overlapping d_child to overlapping d_alias +Forwarded: not-needed + +Apply the renaming from commit 946e51f2bf37f1656916eb75bd0742ba33983c28 +upstream to aufs. + +--- +--- a/fs/aufs/dcsub.c ++++ b/fs/aufs/dcsub.c +@@ -134,7 +134,7 @@ resume: + while (next != &this_parent->d_subdirs) { + struct list_head *tmp = next; + struct dentry *dentry = list_entry(tmp, struct dentry, +- d_u.d_child); ++ d_child); + + next = tmp->next; + spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); +@@ -170,7 +170,7 @@ resume: + this_parent = tmp; + spin_lock(&this_parent->d_lock); + rcu_read_unlock(); +- next = child->d_u.d_child.next; ++ next = child->d_child.next; + goto resume; + } + +--- a/fs/aufs/debug.c ++++ b/fs/aufs/debug.c +@@ -169,7 +169,7 @@ void au_dpri_dalias(struct inode *inode) + struct dentry *d; + + spin_lock(&inode->i_lock); +- hlist_for_each_entry(d, &inode->i_dentry, d_alias) ++ hlist_for_each_entry(d, &inode->i_dentry, d_u.d_alias) + au_dpri_dentry(d); + spin_unlock(&inode->i_lock); + } +--- a/fs/aufs/export.c ++++ b/fs/aufs/export.c +@@ -243,7 +243,7 @@ static struct dentry *decode_by_ino(stru + dentry = d_find_alias(inode); + else { + spin_lock(&inode->i_lock); +- hlist_for_each_entry(d, &inode->i_dentry, d_alias) { ++ hlist_for_each_entry(d, &inode->i_dentry, d_u.d_alias) { + spin_lock(&d->d_lock); + if (!au_test_anon(d) + && d->d_parent->d_inode->i_ino == dir_ino) { +--- a/fs/aufs/hnotify.c ++++ b/fs/aufs/hnotify.c +@@ -211,7 +211,7 @@ static int hn_gen_by_inode(char *name, u + AuDebugOn(!name); + au_iigen_dec(inode); + spin_lock(&inode->i_lock); +- hlist_for_each_entry(d, &inode->i_dentry, d_alias) { ++ hlist_for_each_entry(d, &inode->i_dentry, d_u.d_alias) { + spin_lock(&d->d_lock); + dname = &d->d_name; + if (dname->len != nlen +@@ -378,7 +378,7 @@ static struct dentry *lookup_wlock_by_na + + dentry = NULL; + spin_lock(&parent->d_lock); +- list_for_each_entry(d, &parent->d_subdirs, d_u.d_child) { ++ list_for_each_entry(d, &parent->d_subdirs, d_child) { + /* AuDbg("%pd\n", d); */ + spin_lock_nested(&d->d_lock, DENTRY_D_LOCK_NESTED); + dname = &d->d_name; diff --git a/debian/patches/bugfix/all/deal-with-deadlock-in-d_walk.patch b/debian/patches/bugfix/all/deal-with-deadlock-in-d_walk.patch new file mode 100644 index 000000000..87c868341 --- /dev/null +++ b/debian/patches/bugfix/all/deal-with-deadlock-in-d_walk.patch @@ -0,0 +1,82 @@ +From: Al Viro +Date: Sun, 26 Oct 2014 19:31:10 -0400 +Subject: deal with deadlock in d_walk() +Origin: https://git.kernel.org/linus/ca5358ef75fc69fee5322a38a340f5739d997c10 + +... by not hitting rename_retry for reasons other than rename having +happened. In other words, do _not_ restart when finding that +between unlocking the child and locking the parent the former got +into __dentry_kill(). Skip the killed siblings instead... + +Signed-off-by: Al Viro +--- + fs/dcache.c | 31 ++++++++++++++++--------------- + 1 file changed, 16 insertions(+), 15 deletions(-) + +--- a/fs/dcache.c ++++ b/fs/dcache.c +@@ -484,7 +484,7 @@ static void __dentry_kill(struct dentry + } + /* if it was on the hash then remove it */ + __d_drop(dentry); +- list_del(&dentry->d_child); ++ __list_del_entry(&dentry->d_child); + /* + * Inform d_walk() that we are no longer attached to the + * dentry tree +@@ -1138,33 +1138,31 @@ resume: + /* + * All done at this level ... ascend and resume the search. + */ ++ rcu_read_lock(); ++ascend: + if (this_parent != parent) { + struct dentry *child = this_parent; + this_parent = child->d_parent; + +- rcu_read_lock(); + spin_unlock(&child->d_lock); + spin_lock(&this_parent->d_lock); + +- /* +- * might go back up the wrong parent if we have had a rename +- * or deletion +- */ +- if (this_parent != child->d_parent || +- (child->d_flags & DCACHE_DENTRY_KILLED) || +- need_seqretry(&rename_lock, seq)) { +- spin_unlock(&this_parent->d_lock); +- rcu_read_unlock(); ++ /* might go back up the wrong parent if we have had a rename. */ ++ if (need_seqretry(&rename_lock, seq)) + goto rename_retry; ++ next = child->d_child.next; ++ while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED)) { ++ if (next == &this_parent->d_subdirs) ++ goto ascend; ++ child = list_entry(next, struct dentry, d_child); ++ next = next->next; + } + rcu_read_unlock(); +- next = child->d_child.next; + goto resume; + } +- if (need_seqretry(&rename_lock, seq)) { +- spin_unlock(&this_parent->d_lock); ++ if (need_seqretry(&rename_lock, seq)) + goto rename_retry; +- } ++ rcu_read_unlock(); + if (finish) + finish(data); + +@@ -1174,6 +1172,9 @@ out_unlock: + return; + + rename_retry: ++ spin_unlock(&this_parent->d_lock); ++ rcu_read_unlock(); ++ BUG_ON(seq & 1); + if (!retry) + return; + seq = 1; diff --git a/debian/patches/bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch b/debian/patches/bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch new file mode 100644 index 000000000..f5957410e --- /dev/null +++ b/debian/patches/bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch @@ -0,0 +1,714 @@ +From: Al Viro +Date: Sun, 26 Oct 2014 19:19:16 -0400 +Subject: move d_rcu from overlapping d_child to overlapping d_alias +Origin: https://git.kernel.org/linus/946e51f2bf37f1656916eb75bd0742ba33983c28 + +Signed-off-by: Al Viro +[bwh: Backported to 3.16: + - Apply name changes in all the different places we use d_alias and d_child + - Adjust context] +--- + arch/powerpc/platforms/cell/spufs/inode.c | 2 +- + drivers/staging/lustre/lustre/llite/dcache.c | 2 +- + drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- + drivers/staging/lustre/lustre/llite/namei.c | 8 ++-- + fs/affs/amigaffs.c | 2 +- + fs/autofs4/expire.c | 12 +++--- + fs/autofs4/root.c | 2 +- + fs/ceph/dir.c | 8 ++-- + fs/ceph/inode.c | 2 +- + fs/cifs/inode.c | 2 +- + fs/coda/cache.c | 2 +- + fs/dcache.c | 53 ++++++++++++------------- + fs/debugfs/inode.c | 2 +- + fs/exportfs/expfs.c | 2 +- + fs/libfs.c | 12 +++--- + fs/ncpfs/dir.c | 2 +- + fs/ncpfs/ncplib_kernel.h | 4 +- + fs/nfs/getroot.c | 2 +- + fs/notify/fsnotify.c | 4 +- + fs/ocfs2/dcache.c | 2 +- + include/linux/dcache.h | 8 ++-- + kernel/trace/trace.c | 4 +- + kernel/trace/trace_events.c | 2 +- + security/selinux/selinuxfs.c | 6 +-- + 24 files changed, 73 insertions(+), 74 deletions(-) + +--- a/arch/powerpc/platforms/cell/spufs/inode.c ++++ b/arch/powerpc/platforms/cell/spufs/inode.c +@@ -164,7 +164,7 @@ static void spufs_prune_dir(struct dentr + struct dentry *dentry, *tmp; + + mutex_lock(&dir->d_inode->i_mutex); +- list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_u.d_child) { ++ list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_child) { + spin_lock(&dentry->d_lock); + if (!(d_unhashed(dentry)) && dentry->d_inode) { + dget_dlock(dentry); +--- a/drivers/staging/lustre/lustre/llite/dcache.c ++++ b/drivers/staging/lustre/lustre/llite/dcache.c +@@ -258,7 +258,7 @@ void ll_invalidate_aliases(struct inode + inode->i_ino, inode->i_generation, inode); + + ll_lock_dcache(inode); +- ll_d_hlist_for_each_entry(dentry, p, &inode->i_dentry, d_alias) { ++ ll_d_hlist_for_each_entry(dentry, p, &inode->i_dentry, d_u.d_alias) { + CDEBUG(D_DENTRY, "dentry in drop %.*s (%p) parent %p " + "inode %p flags %d\n", dentry->d_name.len, + dentry->d_name.name, dentry, dentry->d_parent, +--- a/drivers/staging/lustre/lustre/llite/llite_lib.c ++++ b/drivers/staging/lustre/lustre/llite/llite_lib.c +@@ -704,7 +704,7 @@ void lustre_dump_dentry(struct dentry *d + return; + + list_for_each(tmp, &dentry->d_subdirs) { +- struct dentry *d = list_entry(tmp, struct dentry, d_u.d_child); ++ struct dentry *d = list_entry(tmp, struct dentry, d_child); + lustre_dump_dentry(d, recur - 1); + } + } +--- a/drivers/staging/lustre/lustre/llite/namei.c ++++ b/drivers/staging/lustre/lustre/llite/namei.c +@@ -167,14 +167,14 @@ static void ll_invalidate_negative_child + struct ll_d_hlist_node *p; + + ll_lock_dcache(dir); +- ll_d_hlist_for_each_entry(dentry, p, &dir->i_dentry, d_alias) { ++ ll_d_hlist_for_each_entry(dentry, p, &dir->i_dentry, d_u.d_alias) { + spin_lock(&dentry->d_lock); + if (!list_empty(&dentry->d_subdirs)) { + struct dentry *child; + + list_for_each_entry_safe(child, tmp_subdir, + &dentry->d_subdirs, +- d_u.d_child) { ++ d_child) { + if (child->d_inode == NULL) + d_lustre_invalidate(child, 1); + } +@@ -362,7 +362,7 @@ static struct dentry *ll_find_alias(stru + discon_alias = invalid_alias = NULL; + + ll_lock_dcache(inode); +- ll_d_hlist_for_each_entry(alias, p, &inode->i_dentry, d_alias) { ++ ll_d_hlist_for_each_entry(alias, p, &inode->i_dentry, d_u.d_alias) { + LASSERT(alias != dentry); + + spin_lock(&alias->d_lock); +@@ -943,7 +943,7 @@ static void ll_get_child_fid(struct inod + { + struct dentry *parent, *child; + +- parent = ll_d_hlist_entry(dir->i_dentry, struct dentry, d_alias); ++ parent = ll_d_hlist_entry(dir->i_dentry, struct dentry, d_u.d_alias); + child = d_lookup(parent, name); + if (child) { + if (child->d_inode) +--- a/fs/affs/amigaffs.c ++++ b/fs/affs/amigaffs.c +@@ -127,7 +127,7 @@ affs_fix_dcache(struct inode *inode, u32 + { + struct dentry *dentry; + spin_lock(&inode->i_lock); +- hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { ++ hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { + if (entry_ino == (u32)(long)dentry->d_fsdata) { + dentry->d_fsdata = (void *)inode->i_ino; + break; +--- a/fs/autofs4/expire.c ++++ b/fs/autofs4/expire.c +@@ -91,7 +91,7 @@ static struct dentry *get_next_positive_ + spin_lock(&root->d_lock); + + if (prev) +- next = prev->d_u.d_child.next; ++ next = prev->d_child.next; + else { + prev = dget_dlock(root); + next = prev->d_subdirs.next; +@@ -105,13 +105,13 @@ cont: + return NULL; + } + +- q = list_entry(next, struct dentry, d_u.d_child); ++ q = list_entry(next, struct dentry, d_child); + + spin_lock_nested(&q->d_lock, DENTRY_D_LOCK_NESTED); + /* Already gone or negative dentry (under construction) - try next */ + if (!d_count(q) || !simple_positive(q)) { + spin_unlock(&q->d_lock); +- next = q->d_u.d_child.next; ++ next = q->d_child.next; + goto cont; + } + dget_dlock(q); +@@ -161,13 +161,13 @@ again: + goto relock; + } + spin_unlock(&p->d_lock); +- next = p->d_u.d_child.next; ++ next = p->d_child.next; + p = parent; + if (next != &parent->d_subdirs) + break; + } + } +- ret = list_entry(next, struct dentry, d_u.d_child); ++ ret = list_entry(next, struct dentry, d_child); + + spin_lock_nested(&ret->d_lock, DENTRY_D_LOCK_NESTED); + /* Negative dentry - try next */ +@@ -461,7 +461,7 @@ found: + spin_lock(&sbi->lookup_lock); + spin_lock(&expired->d_parent->d_lock); + spin_lock_nested(&expired->d_lock, DENTRY_D_LOCK_NESTED); +- list_move(&expired->d_parent->d_subdirs, &expired->d_u.d_child); ++ list_move(&expired->d_parent->d_subdirs, &expired->d_child); + spin_unlock(&expired->d_lock); + spin_unlock(&expired->d_parent->d_lock); + spin_unlock(&sbi->lookup_lock); +--- a/fs/autofs4/root.c ++++ b/fs/autofs4/root.c +@@ -655,7 +655,7 @@ static void autofs_clear_leaf_automount_ + /* only consider parents below dentrys in the root */ + if (IS_ROOT(parent->d_parent)) + return; +- d_child = &dentry->d_u.d_child; ++ d_child = &dentry->d_child; + /* Set parent managed if it's becoming empty */ + if (d_child->next == &parent->d_subdirs && + d_child->prev == &parent->d_subdirs) +--- a/fs/ceph/dir.c ++++ b/fs/ceph/dir.c +@@ -111,7 +111,7 @@ static int fpos_cmp(loff_t l, loff_t r) + /* + * When possible, we try to satisfy a readdir by peeking at the + * dcache. We make this work by carefully ordering dentries on +- * d_u.d_child when we initially get results back from the MDS, and ++ * d_child when we initially get results back from the MDS, and + * falling back to a "normal" sync readdir if any dentries in the dir + * are dropped. + * +@@ -147,11 +147,11 @@ static int __dcache_readdir(struct file + p = parent->d_subdirs.prev; + dout(" initial p %p/%p\n", p->prev, p->next); + } else { +- p = last->d_u.d_child.prev; ++ p = last->d_child.prev; + } + + more: +- dentry = list_entry(p, struct dentry, d_u.d_child); ++ dentry = list_entry(p, struct dentry, d_child); + di = ceph_dentry(dentry); + while (1) { + dout(" p %p/%p %s d_subdirs %p/%p\n", p->prev, p->next, +@@ -174,7 +174,7 @@ more: + !dentry->d_inode ? " null" : ""); + spin_unlock(&dentry->d_lock); + p = p->prev; +- dentry = list_entry(p, struct dentry, d_u.d_child); ++ dentry = list_entry(p, struct dentry, d_child); + di = ceph_dentry(dentry); + } + +--- a/fs/ceph/inode.c ++++ b/fs/ceph/inode.c +@@ -1399,7 +1399,7 @@ retry_lookup: + /* reorder parent's d_subdirs */ + spin_lock(&parent->d_lock); + spin_lock_nested(&dn->d_lock, DENTRY_D_LOCK_NESTED); +- list_move(&dn->d_u.d_child, &parent->d_subdirs); ++ list_move(&dn->d_child, &parent->d_subdirs); + spin_unlock(&dn->d_lock); + spin_unlock(&parent->d_lock); + } +--- a/fs/cifs/inode.c ++++ b/fs/cifs/inode.c +@@ -887,7 +887,7 @@ inode_has_hashed_dentries(struct inode * + struct dentry *dentry; + + spin_lock(&inode->i_lock); +- hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { ++ hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { + if (!d_unhashed(dentry) || IS_ROOT(dentry)) { + spin_unlock(&inode->i_lock); + return true; +--- a/fs/coda/cache.c ++++ b/fs/coda/cache.c +@@ -92,7 +92,7 @@ static void coda_flag_children(struct de + struct dentry *de; + + spin_lock(&parent->d_lock); +- list_for_each_entry(de, &parent->d_subdirs, d_u.d_child) { ++ list_for_each_entry(de, &parent->d_subdirs, d_child) { + /* don't know what to do with negative dentries */ + if (de->d_inode ) + coda_flag_inode(de->d_inode, flag); +--- a/fs/dcache.c ++++ b/fs/dcache.c +@@ -44,7 +44,7 @@ + /* + * Usage: + * dcache->d_inode->i_lock protects: +- * - i_dentry, d_alias, d_inode of aliases ++ * - i_dentry, d_u.d_alias, d_inode of aliases + * dcache_hash_bucket lock protects: + * - the dcache hash table + * s_anon bl list spinlock protects: +@@ -59,7 +59,7 @@ + * - d_unhashed() + * - d_parent and d_subdirs + * - childrens' d_child and d_parent +- * - d_alias, d_inode ++ * - d_u.d_alias, d_inode + * + * Ordering: + * dentry->d_inode->i_lock +@@ -239,7 +239,6 @@ static void __d_free(struct rcu_head *he + { + struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); + +- WARN_ON(!hlist_unhashed(&dentry->d_alias)); + if (dname_external(dentry)) + kfree(dentry->d_name.name); + kmem_cache_free(dentry_cache, dentry); +@@ -247,6 +246,8 @@ static void __d_free(struct rcu_head *he + + static void dentry_free(struct dentry *dentry) + { ++ WARN_ON(!hlist_unhashed(&dentry->d_u.d_alias)); ++ + /* if dentry was never visible to RCU, immediate free is OK */ + if (!(dentry->d_flags & DCACHE_RCUACCESS)) + __d_free(&dentry->d_u.d_rcu); +@@ -280,7 +281,7 @@ static void dentry_iput(struct dentry * + struct inode *inode = dentry->d_inode; + if (inode) { + dentry->d_inode = NULL; +- hlist_del_init(&dentry->d_alias); ++ hlist_del_init(&dentry->d_u.d_alias); + spin_unlock(&dentry->d_lock); + spin_unlock(&inode->i_lock); + if (!inode->i_nlink) +@@ -305,7 +306,7 @@ static void dentry_unlink_inode(struct d + struct inode *inode = dentry->d_inode; + __d_clear_type(dentry); + dentry->d_inode = NULL; +- hlist_del_init(&dentry->d_alias); ++ hlist_del_init(&dentry->d_u.d_alias); + dentry_rcuwalk_barrier(dentry); + spin_unlock(&dentry->d_lock); + spin_unlock(&inode->i_lock); +@@ -465,7 +466,7 @@ static void __dentry_kill(struct dentry + } + /* if it was on the hash then remove it */ + __d_drop(dentry); +- list_del(&dentry->d_u.d_child); ++ list_del(&dentry->d_child); + /* + * Inform d_walk() that we are no longer attached to the + * dentry tree +@@ -749,7 +750,7 @@ static struct dentry *__d_find_alias(str + + again: + discon_alias = NULL; +- hlist_for_each_entry(alias, &inode->i_dentry, d_alias) { ++ hlist_for_each_entry(alias, &inode->i_dentry, d_u.d_alias) { + spin_lock(&alias->d_lock); + if (S_ISDIR(inode->i_mode) || !d_unhashed(alias)) { + if (IS_ROOT(alias) && +@@ -802,7 +803,7 @@ void d_prune_aliases(struct inode *inode + struct dentry *dentry; + restart: + spin_lock(&inode->i_lock); +- hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { ++ hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { + spin_lock(&dentry->d_lock); + if (!dentry->d_lockref.count) { + /* +@@ -1087,7 +1088,7 @@ repeat: + resume: + while (next != &this_parent->d_subdirs) { + struct list_head *tmp = next; +- struct dentry *dentry = list_entry(tmp, struct dentry, d_u.d_child); ++ struct dentry *dentry = list_entry(tmp, struct dentry, d_child); + next = tmp->next; + + spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); +@@ -1139,7 +1140,7 @@ resume: + goto rename_retry; + } + rcu_read_unlock(); +- next = child->d_u.d_child.next; ++ next = child->d_child.next; + goto resume; + } + if (need_seqretry(&rename_lock, seq)) { +@@ -1474,8 +1475,8 @@ struct dentry *__d_alloc(struct super_bl + INIT_HLIST_BL_NODE(&dentry->d_hash); + INIT_LIST_HEAD(&dentry->d_lru); + INIT_LIST_HEAD(&dentry->d_subdirs); +- INIT_HLIST_NODE(&dentry->d_alias); +- INIT_LIST_HEAD(&dentry->d_u.d_child); ++ INIT_HLIST_NODE(&dentry->d_u.d_alias); ++ INIT_LIST_HEAD(&dentry->d_child); + d_set_d_op(dentry, dentry->d_sb->s_d_op); + + this_cpu_inc(nr_dentry); +@@ -1505,7 +1506,7 @@ struct dentry *d_alloc(struct dentry * p + */ + __dget_dlock(parent); + dentry->d_parent = parent; +- list_add(&dentry->d_u.d_child, &parent->d_subdirs); ++ list_add(&dentry->d_child, &parent->d_subdirs); + spin_unlock(&parent->d_lock); + + return dentry; +@@ -1598,7 +1599,7 @@ static void __d_instantiate(struct dentr + spin_lock(&dentry->d_lock); + __d_set_type(dentry, add_flags); + if (inode) +- hlist_add_head(&dentry->d_alias, &inode->i_dentry); ++ hlist_add_head(&dentry->d_u.d_alias, &inode->i_dentry); + dentry->d_inode = inode; + dentry_rcuwalk_barrier(dentry); + spin_unlock(&dentry->d_lock); +@@ -1622,7 +1623,7 @@ static void __d_instantiate(struct dentr + + void d_instantiate(struct dentry *entry, struct inode * inode) + { +- BUG_ON(!hlist_unhashed(&entry->d_alias)); ++ BUG_ON(!hlist_unhashed(&entry->d_u.d_alias)); + if (inode) + spin_lock(&inode->i_lock); + __d_instantiate(entry, inode); +@@ -1661,7 +1662,7 @@ static struct dentry *__d_instantiate_un + return NULL; + } + +- hlist_for_each_entry(alias, &inode->i_dentry, d_alias) { ++ hlist_for_each_entry(alias, &inode->i_dentry, d_u.d_alias) { + /* + * Don't need alias->d_lock here, because aliases with + * d_parent == entry->d_parent are not subject to name or +@@ -1687,7 +1688,7 @@ struct dentry *d_instantiate_unique(stru + { + struct dentry *result; + +- BUG_ON(!hlist_unhashed(&entry->d_alias)); ++ BUG_ON(!hlist_unhashed(&entry->d_u.d_alias)); + + if (inode) + spin_lock(&inode->i_lock); +@@ -1718,7 +1719,7 @@ EXPORT_SYMBOL(d_instantiate_unique); + */ + int d_instantiate_no_diralias(struct dentry *entry, struct inode *inode) + { +- BUG_ON(!hlist_unhashed(&entry->d_alias)); ++ BUG_ON(!hlist_unhashed(&entry->d_u.d_alias)); + + spin_lock(&inode->i_lock); + if (S_ISDIR(inode->i_mode) && !hlist_empty(&inode->i_dentry)) { +@@ -1757,7 +1758,7 @@ static struct dentry * __d_find_any_alia + + if (hlist_empty(&inode->i_dentry)) + return NULL; +- alias = hlist_entry(inode->i_dentry.first, struct dentry, d_alias); ++ alias = hlist_entry(inode->i_dentry.first, struct dentry, d_u.d_alias); + __dget(alias); + return alias; + } +@@ -1834,7 +1835,7 @@ struct dentry *d_obtain_alias(struct ino + spin_lock(&tmp->d_lock); + tmp->d_inode = inode; + tmp->d_flags |= add_flags; +- hlist_add_head(&tmp->d_alias, &inode->i_dentry); ++ hlist_add_head(&tmp->d_u.d_alias, &inode->i_dentry); + hlist_bl_lock(&tmp->d_sb->s_anon); + hlist_bl_add_head(&tmp->d_hash, &tmp->d_sb->s_anon); + hlist_bl_unlock(&tmp->d_sb->s_anon); +@@ -2277,7 +2278,7 @@ int d_validate(struct dentry *dentry, st + struct dentry *child; + + spin_lock(&dparent->d_lock); +- list_for_each_entry(child, &dparent->d_subdirs, d_u.d_child) { ++ list_for_each_entry(child, &dparent->d_subdirs, d_child) { + if (dentry == child) { + spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); + __dget_dlock(dentry); +@@ -2545,8 +2546,8 @@ static void __d_move(struct dentry *dent + d_hash(dentry->d_parent, dentry->d_name.hash)); + } + +- list_del(&dentry->d_u.d_child); +- list_del(&target->d_u.d_child); ++ list_del(&dentry->d_child); ++ list_del(&target->d_child); + + /* Switch the names.. */ + switch_names(dentry, target, exchange); +@@ -2555,15 +2556,15 @@ static void __d_move(struct dentry *dent + if (IS_ROOT(dentry)) { + dentry->d_parent = target->d_parent; + target->d_parent = target; +- INIT_LIST_HEAD(&target->d_u.d_child); ++ INIT_LIST_HEAD(&target->d_child); + } else { + swap(dentry->d_parent, target->d_parent); + + /* And add them back to the (new) parent lists */ +- list_add(&target->d_u.d_child, &target->d_parent->d_subdirs); ++ list_add(&target->d_child, &target->d_parent->d_subdirs); + } + +- list_add(&dentry->d_u.d_child, &dentry->d_parent->d_subdirs); ++ list_add(&dentry->d_child, &dentry->d_parent->d_subdirs); + + write_seqcount_end(&target->d_seq); + write_seqcount_end(&dentry->d_seq); +@@ -2690,9 +2691,9 @@ static void __d_materialise_dentry(struc + switch_names(dentry, anon, false); + + dentry->d_parent = dentry; +- list_del_init(&dentry->d_u.d_child); ++ list_del_init(&dentry->d_child); + anon->d_parent = dparent; +- list_move(&anon->d_u.d_child, &dparent->d_subdirs); ++ list_move(&anon->d_child, &dparent->d_subdirs); + + write_seqcount_end(&dentry->d_seq); + write_seqcount_end(&anon->d_seq); +@@ -3324,7 +3325,7 @@ void d_tmpfile(struct dentry *dentry, st + { + inode_dec_link_count(inode); + BUG_ON(dentry->d_name.name != dentry->d_iname || +- !hlist_unhashed(&dentry->d_alias) || ++ !hlist_unhashed(&dentry->d_u.d_alias) || + !d_unlinked(dentry)); + spin_lock(&dentry->d_parent->d_lock); + spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); +--- a/fs/debugfs/inode.c ++++ b/fs/debugfs/inode.c +@@ -553,7 +553,7 @@ void debugfs_remove_recursive(struct den + * use the d_u.d_child as the rcu head and corrupt this list. + */ + spin_lock(&parent->d_lock); +- list_for_each_entry(child, &parent->d_subdirs, d_u.d_child) { ++ list_for_each_entry(child, &parent->d_subdirs, d_child) { + if (!debugfs_positive(child)) + continue; + +--- a/fs/exportfs/expfs.c ++++ b/fs/exportfs/expfs.c +@@ -50,7 +50,7 @@ find_acceptable_alias(struct dentry *res + + inode = result->d_inode; + spin_lock(&inode->i_lock); +- hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { ++ hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { + dget(dentry); + spin_unlock(&inode->i_lock); + if (toput) +--- a/fs/libfs.c ++++ b/fs/libfs.c +@@ -114,18 +114,18 @@ loff_t dcache_dir_lseek(struct file *fil + + spin_lock(&dentry->d_lock); + /* d_lock not required for cursor */ +- list_del(&cursor->d_u.d_child); ++ list_del(&cursor->d_child); + p = dentry->d_subdirs.next; + while (n && p != &dentry->d_subdirs) { + struct dentry *next; +- next = list_entry(p, struct dentry, d_u.d_child); ++ next = list_entry(p, struct dentry, d_child); + spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED); + if (simple_positive(next)) + n--; + spin_unlock(&next->d_lock); + p = p->next; + } +- list_add_tail(&cursor->d_u.d_child, p); ++ list_add_tail(&cursor->d_child, p); + spin_unlock(&dentry->d_lock); + } + } +@@ -150,7 +150,7 @@ int dcache_readdir(struct file *file, st + { + struct dentry *dentry = file->f_path.dentry; + struct dentry *cursor = file->private_data; +- struct list_head *p, *q = &cursor->d_u.d_child; ++ struct list_head *p, *q = &cursor->d_child; + + if (!dir_emit_dots(file, ctx)) + return 0; +@@ -159,7 +159,7 @@ int dcache_readdir(struct file *file, st + list_move(q, &dentry->d_subdirs); + + for (p = q->next; p != &dentry->d_subdirs; p = p->next) { +- struct dentry *next = list_entry(p, struct dentry, d_u.d_child); ++ struct dentry *next = list_entry(p, struct dentry, d_child); + spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED); + if (!simple_positive(next)) { + spin_unlock(&next->d_lock); +@@ -287,7 +287,7 @@ int simple_empty(struct dentry *dentry) + int ret = 0; + + spin_lock(&dentry->d_lock); +- list_for_each_entry(child, &dentry->d_subdirs, d_u.d_child) { ++ list_for_each_entry(child, &dentry->d_subdirs, d_child) { + spin_lock_nested(&child->d_lock, DENTRY_D_LOCK_NESTED); + if (simple_positive(child)) { + spin_unlock(&child->d_lock); +--- a/fs/ncpfs/dir.c ++++ b/fs/ncpfs/dir.c +@@ -406,7 +406,7 @@ ncp_dget_fpos(struct dentry *dentry, str + spin_lock(&parent->d_lock); + next = parent->d_subdirs.next; + while (next != &parent->d_subdirs) { +- dent = list_entry(next, struct dentry, d_u.d_child); ++ dent = list_entry(next, struct dentry, d_child); + if ((unsigned long)dent->d_fsdata == fpos) { + if (dent->d_inode) + dget(dent); +--- a/fs/ncpfs/ncplib_kernel.h ++++ b/fs/ncpfs/ncplib_kernel.h +@@ -194,7 +194,7 @@ ncp_renew_dentries(struct dentry *parent + spin_lock(&parent->d_lock); + next = parent->d_subdirs.next; + while (next != &parent->d_subdirs) { +- dentry = list_entry(next, struct dentry, d_u.d_child); ++ dentry = list_entry(next, struct dentry, d_child); + + if (dentry->d_fsdata == NULL) + ncp_age_dentry(server, dentry); +@@ -216,7 +216,7 @@ ncp_invalidate_dircache_entries(struct d + spin_lock(&parent->d_lock); + next = parent->d_subdirs.next; + while (next != &parent->d_subdirs) { +- dentry = list_entry(next, struct dentry, d_u.d_child); ++ dentry = list_entry(next, struct dentry, d_child); + dentry->d_fsdata = NULL; + ncp_age_dentry(server, dentry); + next = next->next; +--- a/fs/nfs/getroot.c ++++ b/fs/nfs/getroot.c +@@ -58,7 +58,7 @@ static int nfs_superblock_set_dummy_root + */ + spin_lock(&sb->s_root->d_inode->i_lock); + spin_lock(&sb->s_root->d_lock); +- hlist_del_init(&sb->s_root->d_alias); ++ hlist_del_init(&sb->s_root->d_u.d_alias); + spin_unlock(&sb->s_root->d_lock); + spin_unlock(&sb->s_root->d_inode->i_lock); + } +--- a/fs/notify/fsnotify.c ++++ b/fs/notify/fsnotify.c +@@ -63,14 +63,14 @@ void __fsnotify_update_child_dentry_flag + spin_lock(&inode->i_lock); + /* run all of the dentries associated with this inode. Since this is a + * directory, there damn well better only be one item on this list */ +- hlist_for_each_entry(alias, &inode->i_dentry, d_alias) { ++ hlist_for_each_entry(alias, &inode->i_dentry, d_u.d_alias) { + struct dentry *child; + + /* run all of the children of the original inode and fix their + * d_flags to indicate parental interest (their parent is the + * original inode) */ + spin_lock(&alias->d_lock); +- list_for_each_entry(child, &alias->d_subdirs, d_u.d_child) { ++ list_for_each_entry(child, &alias->d_subdirs, d_child) { + if (!child->d_inode) + continue; + +--- a/fs/ocfs2/dcache.c ++++ b/fs/ocfs2/dcache.c +@@ -172,7 +172,7 @@ struct dentry *ocfs2_find_local_alias(st + struct dentry *dentry; + + spin_lock(&inode->i_lock); +- hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { ++ hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { + spin_lock(&dentry->d_lock); + if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) { + trace_ocfs2_find_local_alias(dentry->d_name.len, +--- a/include/linux/dcache.h ++++ b/include/linux/dcache.h +@@ -124,15 +124,15 @@ struct dentry { + void *d_fsdata; /* fs-specific data */ + + struct list_head d_lru; /* LRU list */ ++ struct list_head d_child; /* child of parent list */ ++ struct list_head d_subdirs; /* our children */ + /* +- * d_child and d_rcu can share memory ++ * d_alias and d_rcu can share memory + */ + union { +- struct list_head d_child; /* child of parent list */ ++ struct hlist_node d_alias; /* inode alias list */ + struct rcu_head d_rcu; + } d_u; +- struct list_head d_subdirs; /* our children */ +- struct hlist_node d_alias; /* inode alias list */ + }; + + /* +--- a/kernel/trace/trace.c ++++ b/kernel/trace/trace.c +@@ -6384,7 +6384,7 @@ static int instance_mkdir (struct inode + int ret; + + /* Paranoid: Make sure the parent is the "instances" directory */ +- parent = hlist_entry(inode->i_dentry.first, struct dentry, d_alias); ++ parent = hlist_entry(inode->i_dentry.first, struct dentry, d_u.d_alias); + if (WARN_ON_ONCE(parent != trace_instance_dir)) + return -ENOENT; + +@@ -6411,7 +6411,7 @@ static int instance_rmdir(struct inode * + int ret; + + /* Paranoid: Make sure the parent is the "instances" directory */ +- parent = hlist_entry(inode->i_dentry.first, struct dentry, d_alias); ++ parent = hlist_entry(inode->i_dentry.first, struct dentry, d_u.d_alias); + if (WARN_ON_ONCE(parent != trace_instance_dir)) + return -ENOENT; + +--- a/kernel/trace/trace_events.c ++++ b/kernel/trace/trace_events.c +@@ -459,7 +459,7 @@ static void remove_event_file_dir(struct + + if (dir) { + spin_lock(&dir->d_lock); /* probably unneeded */ +- list_for_each_entry(child, &dir->d_subdirs, d_u.d_child) { ++ list_for_each_entry(child, &dir->d_subdirs, d_child) { + if (child->d_inode) /* probably unneeded */ + child->d_inode->i_private = NULL; + } +--- a/security/selinux/selinuxfs.c ++++ b/security/selinux/selinuxfs.c +@@ -1200,7 +1200,7 @@ static void sel_remove_entries(struct de + spin_lock(&de->d_lock); + node = de->d_subdirs.next; + while (node != &de->d_subdirs) { +- struct dentry *d = list_entry(node, struct dentry, d_u.d_child); ++ struct dentry *d = list_entry(node, struct dentry, d_child); + + spin_lock_nested(&d->d_lock, DENTRY_D_LOCK_NESTED); + list_del_init(node); +@@ -1674,12 +1674,12 @@ static void sel_remove_classes(void) + + list_for_each(class_node, &class_dir->d_subdirs) { + struct dentry *class_subdir = list_entry(class_node, +- struct dentry, d_u.d_child); ++ struct dentry, d_child); + struct list_head *class_subdir_node; + + list_for_each(class_subdir_node, &class_subdir->d_subdirs) { + struct dentry *d = list_entry(class_subdir_node, +- struct dentry, d_u.d_child); ++ struct dentry, d_child); + + if (d->d_inode) + if (d->d_inode->i_mode & S_IFDIR) diff --git a/debian/patches/debian/vfs-avoid-abi-change-for-dentry-union-changes.patch b/debian/patches/debian/vfs-avoid-abi-change-for-dentry-union-changes.patch new file mode 100644 index 000000000..4f5f51082 --- /dev/null +++ b/debian/patches/debian/vfs-avoid-abi-change-for-dentry-union-changes.patch @@ -0,0 +1,76 @@ +From: Ben Hutchings +Date: Mon, 12 Jan 2015 04:54:59 +0000 +Subject: vfs: Avoid ABI change for dentry union changes +Forwarded: not-needed + +Commit 946e51f2bf37f1656916eb75bd0742ba33983c28 ("move d_rcu from +overlapping d_child to overlapping d_alias") looks disruptive and +it is an API change since the union is named. However, it doesn't +actually move anything that modules need, so it is not an ABI +change and we can safely hide it from genksysms. + +Verify this by adding an unused function with some BUILD_BUG_ONs +to assert the size and alignment of fields remain the same. + +--- +--- a/include/linux/dcache.h ++++ b/include/linux/dcache.h +@@ -124,15 +124,31 @@ struct dentry { + void *d_fsdata; /* fs-specific data */ + + struct list_head d_lru; /* LRU list */ ++#ifdef __GENKSYMS__ ++ /* ++ * bwh: The union changes here don't move anything other than ++ * d_rcu (which modules definitely should not touch). This is ++ * checked by dcache_abi_check(). ++ */ ++ union { ++#endif + struct list_head d_child; /* child of parent list */ ++#ifdef __GENKSYMS__ ++ struct rcu_head d_rcu; ++ } d_u; ++#endif + struct list_head d_subdirs; /* our children */ + /* + * d_alias and d_rcu can share memory + */ ++#ifndef __GENKSYMS__ + union { ++#endif + struct hlist_node d_alias; /* inode alias list */ ++#ifndef __GENKSYMS__ + struct rcu_head d_rcu; + } d_u; ++#endif + }; + + /* +--- a/fs/dcache.c ++++ b/fs/dcache.c +@@ -255,6 +255,24 @@ static void dentry_free(struct dentry *d + call_rcu(&dentry->d_u.d_rcu, __d_free); + } + ++/* ++ * bwh: Assert that dentry union changes didn't change the structure ++ * layout other than to move d_rcu. ++ */ ++static void __always_unused dcache_abi_check(void) ++{ ++ struct dentry dentry; ++ union { ++ struct list_head d_child; ++ struct rcu_head d_rcu; ++ } old_d_u; ++ BUILD_BUG_ON(sizeof(dentry.d_child) != sizeof(old_d_u) || ++ __alignof__(dentry.d_child) != __alignof__(old_d_u)); ++ BUILD_BUG_ON(sizeof(dentry.d_u.d_alias) != sizeof(dentry.d_u) || ++ __alignof__(dentry.d_u.d_alias) != ++ __alignof__(dentry.d_u)); ++} ++ + /** + * dentry_rcuwalk_barrier - invalidate in-progress rcu-walk lookups + * @dentry: the target dentry diff --git a/debian/patches/series b/debian/patches/series index 4dd35a070..c44ba9757 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -491,3 +491,7 @@ bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch +bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch +bugfix/all/aufs-move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch +debian/vfs-avoid-abi-change-for-dentry-union-changes.patch +bugfix/all/deal-with-deadlock-in-d_walk.patch From 432e36ecadee7943fba1ac935f1db6aaf8fbe670 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 12 Jan 2015 05:21:57 +0000 Subject: [PATCH 35/43] Re-group patches in series svn path=/dists/sid/linux/; revision=22251 --- debian/patches/series | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/debian/patches/series b/debian/patches/series index c44ba9757..fe26bbb22 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -58,6 +58,10 @@ bugfix/x86/drm-i915-Add-some-L3-registers-to-the-parser-whiteli.patch bugfix/parisc/parisc-reduce-sigrtmin-from-37-to-32-to-behave-like-.patch bugfix/arm64/arm64-add-missing-dts-entry-for-X-Gene-platform.patch bugfix/arm64/arm64-removed-using-of-the-mask-attribute-in-the-dts.patch +bugfix/x86/acpi-video-run-_bcl-before-deciding-registering-back.patch +bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch +bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch +bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch # Arch features features/mips/MIPS-Support-hard-limit-of-cpu-count-nr_cpu_ids.patch @@ -124,6 +128,7 @@ features/arm64/drivers-net-xgene-fix-Use-separate-resources.patch features/arm64/dtb-Add-10GbE-node-to-APM-X-Gene-SoC-device-tree.patch features/arm64/dtb-Add-SGMII-based-1GbE-node-to-APM-X-Gene-SoC-devi.patch features/arm64/dtb-xgene-fix-Backward-compatibility-with-older-firm.patch +features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch # Miscellaneous bug fixes bugfix/all/misc-bmp085-Enable-building-as-a-module.patch @@ -151,6 +156,13 @@ bugfix/all/xen-netback-Disable-NAPI-after-disabling-interrupts.patch bugfix/all/xen-netback-do-not-report-success-if-backend_create_.patch bugfix/all/netback-don-t-store-invalid-vif-pointer.patch bugfix/all/xen-netback-support-frontends-without-feature-rx-not.patch +bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch +bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch +bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch +bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch +bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch +bugfix/all/aufs-move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch +bugfix/all/deal-with-deadlock-in-d_walk.patch # memfd_create() & kdbus backport features/all/kdbus/mm-allow-drivers-to-prevent-new-writable-mappings.patch @@ -482,16 +494,4 @@ debian/truncate-fix-abi-change-in-3.16.7-ckt1.patch debian/perf-fix-abi-change-in-3.16.7-ckt2.patch debian/arm-thread_info-fix-abi-change-in-3.16.7-ckt3.patch debian/pci-fix-abi-change-in-3.16.7-ckt3.patch -features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch -bugfix/x86/acpi-video-run-_bcl-before-deciding-registering-back.patch -bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch -bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch -bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch -bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch -bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch -bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch -bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch -bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch -bugfix/all/aufs-move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch debian/vfs-avoid-abi-change-for-dentry-union-changes.patch -bugfix/all/deal-with-deadlock-in-d_walk.patch From fdf259dfb0b90dc0eec27e84f20ba941aaa07f3d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 12 Jan 2015 05:35:21 +0000 Subject: [PATCH 36/43] Ignore removal of exported variable clk_divider_ro_ops, as modules did not need or use it svn path=/dists/sid/linux/; revision=22252 --- debian/changelog | 3 ++- debian/config/defines | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e071c6a12..e97868204 100644 --- a/debian/changelog +++ b/debian/changelog @@ -92,7 +92,8 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium * [armel,armhf] thread_info: Fix ABI change in 3.16.7-ckt3 * PCI: Fix ABI change in 3.16.7-ckt3 * Ignore some ABI changes that don't appear to affect OOT modules: - - Removal of __add_pages(), __remove_pages(), of_device_is_stdout_path() + - Removal of __add_pages(), __remove_pages(), of_device_is_stdout_path(), + clk_divider_ro_ops - Changes to ASoC functions * [arm64] Enable PSTORE as built-in and EFI_VARS_PSTORE as module; ensure efivars and efi-pstore are loaded on EFI systems (Closes: #773309) diff --git a/debian/config/defines b/debian/config/defines index 8f059752d..cbc95d2de 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -10,6 +10,8 @@ ignore-changes: __remove_pages of_device_is_stdout_path module:sound/soc/* +# Not needed by modules at all + clk_divider_ro_ops [base] arches: From f90bca66d217017d6e7ce3f359ac70fc9a2a5f4c Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 12 Jan 2015 14:27:33 +0000 Subject: [PATCH 37/43] Disable TSO in mv643xx_eth driver by default again Since previous fix appears to not work on all platforms (Closes: #764162). svn path=/dists/sid/linux/; revision=22254 --- debian/changelog | 2 + .../net-mv643xx-disable-tso-by-default.patch | 53 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 56 insertions(+) create mode 100644 debian/patches/bugfix/all/net-mv643xx-disable-tso-by-default.patch diff --git a/debian/changelog b/debian/changelog index e97868204..fce28372c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -148,6 +148,8 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium Merker (Closes: #774067) * [xen] More netback fixes (including reintroducing support for feature-rx-notify, which was regressed by the fix to #767261). + * Disable TSO in mv643xx_eth driver by default again, since previous fix + appears to not work on all platforms (Closes: #764162). -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 diff --git a/debian/patches/bugfix/all/net-mv643xx-disable-tso-by-default.patch b/debian/patches/bugfix/all/net-mv643xx-disable-tso-by-default.patch new file mode 100644 index 000000000..5ceb7a47b --- /dev/null +++ b/debian/patches/bugfix/all/net-mv643xx-disable-tso-by-default.patch @@ -0,0 +1,53 @@ +From patchwork Sat Nov 1 15:30:20 2014 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [1/1] net: mv643xx_eth: Make TSO disabled by default +From: Ezequiel Garcia +X-Patchwork-Id: 405792 +Message-Id: <1414855820-15094-2-git-send-email-ezequiel.garcia@free-electrons.com> +To: , David Miller +Cc: Thomas Petazzoni , + Gregory Clement , + Tawfik Bayouk , Lior Amsalem , + Nadav Haklai , + Ezequiel Garcia +Date: Sat, 1 Nov 2014 12:30:20 -0300 + +Data corruption has been observed to be produced by TSO. For instance, +accessing files on a NFS-server with TSO enabled results in different data +transferred each time. + +This has been observed only on Kirkwood platforms, i.e. with the mv643xx_eth +driver. Same tests on platforms using the mvneta ethernet driver have +passed without errors. + +Make TSO disabled by default for now, until we can found a proper fix +for the regression. + +Fixes: 3ae8f4e0b98 ('net: mv643xx_eth: Implement software TSO') +Reported-by: Slawomir Gajzner +Reported-by: Julien D'Ascenzio +Signed-off-by: Ezequiel Garcia +--- + drivers/net/ethernet/marvell/mv643xx_eth.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c +index b151a94..8b72780 100644 +--- a/drivers/net/ethernet/marvell/mv643xx_eth.c ++++ b/drivers/net/ethernet/marvell/mv643xx_eth.c +@@ -3110,11 +3110,11 @@ static int mv643xx_eth_probe(struct platform_device *pdev) + dev->watchdog_timeo = 2 * HZ; + dev->base_addr = 0; + +- dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO; ++ dev->features = NETIF_F_SG | NETIF_F_IP_CSUM; + dev->vlan_features = dev->features; + + dev->features |= NETIF_F_RXCSUM; +- dev->hw_features = dev->features; ++ dev->hw_features = dev->features | NETIF_F_TSO; + + dev->priv_flags |= IFF_UNICAST_FLT; + dev->gso_max_segs = MV643XX_MAX_TSO_SEGS; diff --git a/debian/patches/series b/debian/patches/series index fe26bbb22..76bef6eb2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -163,6 +163,7 @@ bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch bugfix/all/aufs-move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch bugfix/all/deal-with-deadlock-in-d_walk.patch +bugfix/all/net-mv643xx-disable-tso-by-default.patch # memfd_create() & kdbus backport features/all/kdbus/mm-allow-drivers-to-prevent-new-writable-mappings.patch From c3a49aefa1e0e9d63920de8e83eae892ed8c2724 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 12 Jan 2015 14:27:37 +0000 Subject: [PATCH 38/43] Do ignore /.gitignore and /.mailmap in the context of pkg-kernel via git svn svn path=/dists/sid/linux/; revision=22255 --- debian/patches/debian/gitignore.patch | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/patches/debian/gitignore.patch b/debian/patches/debian/gitignore.patch index a9f70fe77..22547eac3 100644 --- a/debian/patches/debian/gitignore.patch +++ b/debian/patches/debian/gitignore.patch @@ -5,7 +5,7 @@ Forwarded: not-needed --- a/.gitignore +++ b/.gitignore -@@ -46,11 +46,6 @@ +@@ -47,17 +47,6 @@ /Module.markers # @@ -14,6 +14,12 @@ Forwarded: not-needed -/debian/ - -# - # git files that we don't want to ignore even it they are dot-files +-# git files that we don't want to ignore even it they are dot-files +-# +-!.gitignore +-!.mailmap +- +-# + # Generated include files # - !.gitignore + include/config From cf3dd6dd9ad01bca5939a76274efdcbfb666dd81 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 12 Jan 2015 14:34:44 +0000 Subject: [PATCH 39/43] efi: Expose underlying UEFI firmware platform size to userland, to support installation on Bay Trail systems (Closes: #775191) svn path=/dists/sid/linux/; revision=22256 --- debian/changelog | 2 + ...lying-uefi-firmware-platform-size-to.patch | 49 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 52 insertions(+) create mode 100644 debian/patches/features/all/efi-expose-underlying-uefi-firmware-platform-size-to.patch diff --git a/debian/changelog b/debian/changelog index fce28372c..e5ad83c0e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -105,6 +105,8 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium * [x86] ACPI / video: Run _BCL before deciding registering backlight (regression in 3.16) (Closes: #762285) * [amd64] Enable EFI_MIXED to support Bay Trail systems + * efi: Expose underlying UEFI firmware platform size to userland, to + support installation on Bay Trail systems (Closes: #775191) * [x86] tls: Validate TLS entries to protect espfix (CVE-2014-8133) * [x86] kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit (CVE-2014-8134) diff --git a/debian/patches/features/all/efi-expose-underlying-uefi-firmware-platform-size-to.patch b/debian/patches/features/all/efi-expose-underlying-uefi-firmware-platform-size-to.patch new file mode 100644 index 000000000..e85d69280 --- /dev/null +++ b/debian/patches/features/all/efi-expose-underlying-uefi-firmware-platform-size-to.patch @@ -0,0 +1,49 @@ +From: Steve McIntyre +Date: Fri, 9 Jan 2015 15:29:53 +0000 +Subject: efi: Expose underlying UEFI firmware platform size to userland +Origin: https://git.kernel.org/cgit/linux/kernel/git/mfleming/efi.git//commit?id=2859dff97e54db4795b8b7d9606cb8efcec722ff + +In some cases (e.g. Intel Bay Trail machines), the kernel will happily +run in 64-bit even if the underlying UEFI firmware platform is +32-bit. That's great, but it's difficult for userland utilities like +grub-install to do the right thing in such a situation. + +The kernel already knows about the size of the firmware via +efi_enabled(EFI_64BIT). Add an extra sysfs interface +/sys/firmware/efi/fw_platform_size to expose that information to +userland for low-level utilities to use. + +Signed-off-by: Steve McIntyre +Cc: Matthew Garrett +Signed-off-by: Matt Fleming +--- + drivers/firmware/efi/efi.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/drivers/firmware/efi/efi.c ++++ b/drivers/firmware/efi/efi.c +@@ -90,15 +90,24 @@ EFI_ATTR_SHOW(fw_vendor); + EFI_ATTR_SHOW(runtime); + EFI_ATTR_SHOW(config_table); + ++static ssize_t fw_platform_size_show(struct kobject *kobj, ++ struct kobj_attribute *attr, char *buf) ++{ ++ return sprintf(buf, "%d\n", efi_enabled(EFI_64BIT) ? 64 : 32); ++} ++ + static struct kobj_attribute efi_attr_fw_vendor = __ATTR_RO(fw_vendor); + static struct kobj_attribute efi_attr_runtime = __ATTR_RO(runtime); + static struct kobj_attribute efi_attr_config_table = __ATTR_RO(config_table); ++static struct kobj_attribute efi_attr_fw_platform_size = ++ __ATTR_RO(fw_platform_size); + + static struct attribute *efi_subsys_attrs[] = { + &efi_attr_systab.attr, + &efi_attr_fw_vendor.attr, + &efi_attr_runtime.attr, + &efi_attr_config_table.attr, ++ &efi_attr_fw_platform_size.attr, + NULL, + }; + diff --git a/debian/patches/series b/debian/patches/series index 76bef6eb2..6dd2b6677 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -195,6 +195,7 @@ features/all/of-Enable-console-on-serial-ports-specified-by-chose.patch features/all/of-correct-of_console_check-s-return-value.patch features/all/of-add-optional-options-parameter-to-of_find_node_by.patch features/all/of-support-passing-console-options-with-stdout-path.patch +features/all/efi-expose-underlying-uefi-firmware-platform-size-to.patch # Update r8723au to 3.17 features/all/r8723au/0001-staging-rtl8723au-rtw_get_wps_ie23a-Remove-unused-de.patch From e50021ff04381bdfb69c65d0ff2f9511e02c4546 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 14 Jan 2015 12:43:36 +0000 Subject: [PATCH 40/43] [powerpc/powerpc{,-smp}] video/fb: Change FB_RADEON back to module (Closes: #748398) Thanks to John Paul Adrian Glaubitz for thoroughly testing this change. svn path=/dists/sid/linux/; revision=22260 --- debian/changelog | 3 +++ debian/config/powerpc/config.powerpc | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e5ad83c0e..d448b5bf0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -122,6 +122,9 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium - aufs: move d_rcu from overlapping d_child to overlapping d_alias - vfs: Avoid ABI change for dentry union changes - deal with deadlock in d_walk() + * [powerpc/powerpc{,-smp}] video/fb: Change FB_RADEON back to module + (Closes: #748398) (thanks to John Paul Adrian Glaubitz for thoroughly + testing this change) [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/config/powerpc/config.powerpc b/debian/config/powerpc/config.powerpc index c5897951c..63a07fb2e 100644 --- a/debian/config/powerpc/config.powerpc +++ b/debian/config/powerpc/config.powerpc @@ -91,7 +91,6 @@ CONFIG_FB_VALKYRIE=y CONFIG_FB_CT65550=y CONFIG_FB_IMSTT=y CONFIG_FB_MATROX=y -CONFIG_FB_RADEON=y CONFIG_FB_ATY128=y CONFIG_FB_ATY=y CONFIG_FB_SIS=y From 167d9fdacce9284b07fa75bae2174f075235d02b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 16 Jan 2015 00:04:09 +0000 Subject: [PATCH 41/43] Update to 3.16.7-ckt4 - Drop various patches that were applied upstream - Refresh "add sysctl to disallow unprivileged CLONE_NEWUSER by default" - Fix/ignore ABI changes as appropriate - Explicitly disable the new CONFIG_IWLWIFI_UAPSD symbol svn path=/dists/sid/linux/; revision=22261 --- debian/changelog | 174 ++++- debian/config/config | 1 + debian/config/defines | 2 + ...late-extra-tail-size-based-on-queued.patch | 58 -- .../all/deal-with-deadlock-in-d_walk.patch | 82 -- ...fix-infinite-looping-over-ce-entries.patch | 52 -- ...fix-unchecked-printing-of-er-records.patch | 30 - ...-race-between-key-lookup-and-freeing.patch | 42 -- ...overlapping-d_child-to-overlapping-d.patch | 714 ------------------ .../s390-3215-fix-hanging-console-issue.patch | 69 -- ...-3215-fix-tty-output-containing-tabs.patch | 65 -- ...ravirt_enabled-on-kvm-guests-for-esp.patch | 63 -- ...lidate-tls-entries-to-protect-espfix.patch | 75 -- ...-load-tls-descriptors-before-switchi.patch | 304 -------- ...nprivileged-CLONE_NEWUSER-by-default.patch | 12 +- ...userns-fix-abi-change-in-3.16.7-ckt4.patch | 45 ++ ...chromeos_laptop-add-support-for-acer.patch | 124 --- debian/patches/series | 13 +- 18 files changed, 212 insertions(+), 1713 deletions(-) delete mode 100644 debian/patches/bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch delete mode 100644 debian/patches/bugfix/all/deal-with-deadlock-in-d_walk.patch delete mode 100644 debian/patches/bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch delete mode 100644 debian/patches/bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch delete mode 100644 debian/patches/bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch delete mode 100644 debian/patches/bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch delete mode 100644 debian/patches/bugfix/s390/s390-3215-fix-hanging-console-issue.patch delete mode 100644 debian/patches/bugfix/s390/s390-3215-fix-tty-output-containing-tabs.patch delete mode 100644 debian/patches/bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch delete mode 100644 debian/patches/bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch delete mode 100644 debian/patches/bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch create mode 100644 debian/patches/debian/userns-fix-abi-change-in-3.16.7-ckt4.patch delete mode 100644 debian/patches/features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch diff --git a/debian/changelog b/debian/changelog index d448b5bf0..88349f0fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium +linux (3.16.7-ckt4-1) UNRELEASED; urgency=medium * New upstream stable update: http://kernel.ubuntu.com/stable/ChangeLog-3.16.7-ckt3 @@ -83,6 +83,159 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium - bond: Check length of IFLA_BOND_ARP_IP_TARGET attributes - gre: Set inner mac header in gro complete (regression in 3.16.7-ckt1) - [mips*] bpf: Fix broken BPF_MOD + http://kernel.ubuntu.com/stable/ChangeLog-3.16.7-ckt4 + - [x86] drm/i915: don't warn if backlight unexpectedly enabled + (Closes: #757805) + - [x86] drm/i915/dp: only use training pattern 3 on platforms that + support it (regression in 3.15) + - btrfs: don't go readonly on existing qgroup items + - writeback: fix a subtle race condition in I_DIRTY clearing + - [s390*] KVM: flush CPU on load control + - UBI: Fix double free after do_sync_erase() + - [x86] Drivers: hv: util: make struct hv_do_fcopy match Hyper-V host + messages (regression for amd64 in 3.16.7) + - Drivers: hv: vmbus: Fix a race condition when unregistering a device + - misc: genwqe: check for error from get_user_pages_fast() + - drbd: merge_bvec_fn: properly remap bvm->bi_bdev + - PCI: Restore detection of read-only BARs + - scsi: correct return values for .eh_abort_handler implementations + - genhd: check for int overflow in disk_expand_part_tbl() + - Btrfs: make sure we wait on logged extents when fsycning two subvols + - Btrfs: make sure logged extents complete in the current transaction V3 + - Btrfs: do not move em to modified list when unpinning + - [armhf] mvebu: disable I/O coherency on non-SMP situations on + Armada 370/375/38x/XP + - nfs41: fix nfs4_proc_layoutget error handling + - USB: cdc-acm: check for valid interfaces + - HID: i2c-hid: fix race condition reading reports + - [armhf] mfd: twl4030-power: Fix regression with missing compatible flag + (regression in 3.16) + - [armhf] serial: samsung: wait for transfer completion before clock + disable + - n_tty: Fix read_buf race condition, increment read_head after pushing + data (regression in 3.12) + - dm cache: only use overwrite optimisation for promotion when in + writeback mode + - dm cache: dirty flag was mistakenly being cleared when promoting via + overwrite + - dm bufio: fix memleak when using a dm_buffer's inline bio + - iwlwifi: dvm: fix flush support for old firmware (regression in + 3.16.7-ckt1) + - iwlwifi: mvm: update values for Smart Fifo (regression in 3.14) + - iommu/vt-d: Fix an off-by-one bug in __domain_mapping() + - dm crypt: use memzero_explicit for on-stack buffer + - mnt: Implicitly add MNT_NODEV on remount when it was implicitly added by + mount (regression in 3.16.3) + - umount: Disallow unprivileged mount force + - md/raid5: fetch_block must fetch all the blocks handle_stripe_dirtying + wants. + - [x86] drm/i915: Only warn the first time we attempt to mmio whilst + suspended (regression in 3.15) + - drm/vmwgfx: Fix error printout on signals pending + - drm/radeon: check the right ring in radeon_evict_flags() + - swiotlb-xen: pass dev_addr to xen_dma_unmap_page and + xen_dma_sync_single_for_cpu + - [armhf/armmp] swiotlb-xen: remove BUG_ON in xen_bus_to_phys + - swiotlb-xen: call xen_dma_sync_single_for_device when appropriate + - swiotlb-xen: pass dev_addr to swiotlb_tbl_unmap_single + - [powerpc] book3s: Fix partial invalidation of TLBs in MCE code. + - [armhf] clocksource: arch_timer: Fix code to use physical timers when + requested (regression in 3.11) + - userns: Prevent evasion of group negative permissions through a userns + (CVE-2014-8989): + + Don't allow setgroups until a gid mapping has been setablished + + Don't allow unprivileged creation of gid mappings + + Add a knob to disable setgroups on a per user namespace basis + + Allow setting gid_maps without privilege when setgroups is disabled + - KEYS: Fix stale key registration at error path + - blk-mq: Fix a use-after-free + - blk-mq: Fix a race between bt_clear_tag() and bt_get() + - nfsd4: fix xdr4 count of server in fs_location4 (regression in 3.16) + - [x86] drm/i915: Don't complain about stolen conflicts on gen3 + (regression in 3.12) + - [x86] kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit + (CVE-2014-8134) + - blk-mq: Fix uninitialized kobject at CPU hotplugging + - ncpfs: return proper error from NCP_IOC_SETROOT ioctl + - [armhf] rtc: omap: fix clock-source configuration (regression in 3.16) + - exit: pidns: alloc_pid() leaks pid_namespace if child_reaper is exiting + - [amd64] switch_to(): Load TLS descriptors before switching DS and ES + (CVE-2014-9419) + - [x86] KVM: nVMX: Disable unrestricted mode if ept=0 (regression in 3.13) + - [x86] KVM: em_ret_far overrides cpl (follow-up to CVE-2014-3647 fix) + - pstore-ram: Fix hangs by using write-combine mappings + - HID: i2c-hid: prevent buffer overflow in early IRQ + - mac80211: fix multicast LED blinking and counter (regression in + 3.16.7-ckt2) + - cfg80211: avoid mem leak on driver hint set + - nl80211: check matches array length before acessing it + - cfg80211: don't WARN about two consecutive Country IE hint + (regression in 3.14) + - tracing/sched: Check preempt_count() for current when reading task->state + (regression in 3.13) + - [x86] tls: Validate TLS entries to protect espfix (CVE-2014-8133) + - [x86] tls: Disallow unusual TLS segments + - isofs: Fix infinite looping over CE entries (CVE-2014-9420) + - mac80211: free management frame keys when removing station + - ceph: do_sync is never initialized (regression in 3.12) + - mnt: Fix a memory stomp in umount (regression in 3.14) + - ocfs2: fix journal commit deadlock + - md/bitmap: always wait for writes on unplug. + - [armhf] mmc: omap_hsmmc: Fix UHS card with DDR50 support (regression in + 3.16) + - [x86] mmc: sdhci-pci-o2micro: Fix Dell E5440 issue (regression in 3.14) + - dm space map metadata: fix sm_bootstrap_get_nr_blocks() + - dm thin: fix a race in thin_dtr + - eCryptfs: Force RO mount when encrypted view is enabled + - eCryptfs: Remove buggy and unnecessary write in file name decode routine + - tcm_loop: Fix wrong I_T nexus association + - Btrfs: fix fs corruption on transaction abort if device supports discard + - [x86] perf/intel/uncore: Make sure only uncore events are collected + - perf: Fix events installation during moving group + - iscsi,iser-target: Initiate termination only once (regression in 3.16.4) + - iser-target: Fix flush + disconnect completion handling + - iser-target: Parallelize CM connection establishment + - iser-target: Fix connected_handler + teardown flow race + - iser-target: Handle ADDR_CHANGE event for listener cm_id + - iser-target: Fix implicit termination of connections + - iser-target: Allocate PI contexts dynamically + - iser-target: Fix NULL dereference in SW mode DIF + - iscsi,iser-target: Expose supported protection ops according to t10_pi + - genirq: Prevent proc race against freeing of irq descriptors + - [powerpc] powernv: Switch off MMU before entering nap/sleep/rvwinkle mode + - [x86] storvsc: ring buffer failures may result in I/O freeze + - iscsi-target: Fail connection on short sendmsg writes + - [x86] drm/i915: Invalidate media caches on gen7 + - [x86] drm/i915: Force the CS stall for invalidate flushes + - dm thin: fix inability to discard blocks when in out-of-data-space mode + - dm thin: fix missing out-of-data-space to write mode transition if blocks + are released + - dm: fix missed error code if .end_io isn't implemented by target_type + - [armhf] i2c: mv64xxx: rework offload support to fix several problems + (regression in 3.12) + - [x86] tls: Don't validate lm in set_thread_area() after all + - ALSA: usb-audio: extend KEF X300A FU 10 tweak to Arcam rPAC + - tick/powerclamp: Remove tick_nohz_idle abuse + - audit: don't attempt to lookup PIDs when changing PID filtering audit + rules (regression in 3.15) + - audit: use supplied gfp_mask from audit_buffer in + kauditd_send_multicast_skb (regression in 3.16) + - [arm64] kernel: fix __cpu_suspend mm switch on warm-boot + - audit: restore AUDIT_LOGINUID unset ABI (regression in 3.10) + - Btrfs: fix loop writing of async reclaim + - isofs: Fix unchecked printing of ER records (CVE-2014-9584) + - crypto: af_alg - fix backlog handling + - udf: Check path length when reading symlink + - udf: Verify i_size when loading inode + - udf: Verify symlink size before loading it + - udf: Check component length before reading it + - [x86] platform/chrome: chromeos_laptop - Add support for Acer C720 + (Closes: #774209) + - batman-adv: Calculate extra tail size based on queued fragments + (Closes: #774155) (CVE-2014-9428) + - vfs: move d_rcu from overlapping d_child to overlapping d_alias + - vfs: deal with deadlock in d_walk() (CVE-2014-8559) + - KEYS: close race between key lookup and freeing (CVE-2014-9529) [ Ben Hutchings ] * [sh4] Build with gcc-4.8 (Closes: #772602) @@ -93,13 +246,11 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium * PCI: Fix ABI change in 3.16.7-ckt3 * Ignore some ABI changes that don't appear to affect OOT modules: - Removal of __add_pages(), __remove_pages(), of_device_is_stdout_path(), - clk_divider_ro_ops + clk_divider_ro_ops, tick_nohz_idle_enter, tick_nohz_idle_exit - Changes to ASoC functions * [arm64] Enable PSTORE as built-in and EFI_VARS_PSTORE as module; ensure efivars and efi-pstore are loaded on EFI systems (Closes: #773309) * hwmon: Enable SENSORS_NCT6683 as module (Closes: #774372) - * [x86] platform/chrome: chromeos_laptop - Add support for Acer C720 - (Closes: #774209) * udeb: Add i2c-designware-{core,platform} to i2c-modules and i2c-hid to input-modules (Closes: #772578) * [x86] ACPI / video: Run _BCL before deciding registering backlight @@ -107,24 +258,13 @@ linux (3.16.7-ckt3-1) UNRELEASED; urgency=medium * [amd64] Enable EFI_MIXED to support Bay Trail systems * efi: Expose underlying UEFI firmware platform size to userland, to support installation on Bay Trail systems (Closes: #775191) - * [x86] tls: Validate TLS entries to protect espfix (CVE-2014-8133) - * [x86] kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit - (CVE-2014-8134) - * [amd64] switch_to(): Load TLS descriptors before switching DS and ES - (CVE-2014-9419) - * isofs: Fix infinite looping over CE entries (CVE-2014-9420) - * batman-adv: Calculate extra tail size based on queued fragments - (Closes: #774155) (CVE-2014-9428) - * KEYS: close race between key lookup and freeing (CVE-2014-9529) - * isofs: Fix unchecked printing of ER records (CVE-2014-9584) - * vfs: Fix potential deadlock in dcache (CVE-2014-8559) - - move d_rcu from overlapping d_child to overlapping d_alias + * vfs: Changes for compatibility with CVE-2014-8559 fix: - aufs: move d_rcu from overlapping d_child to overlapping d_alias - vfs: Avoid ABI change for dentry union changes - - deal with deadlock in d_walk() * [powerpc/powerpc{,-smp}] video/fb: Change FB_RADEON back to module (Closes: #748398) (thanks to John Paul Adrian Glaubitz for thoroughly testing this change) + * userns: Fix ABI change in 3.16.7-ckt4 [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/config/config b/debian/config/config index 036c4a381..f75818fd4 100644 --- a/debian/config/config +++ b/debian/config/config @@ -3051,6 +3051,7 @@ CONFIG_IWLWIFI=m CONFIG_IWLDVM=m CONFIG_IWLMVM=m # CONFIG_IWLWIFI_BCAST_FILTERING is not set +# CONFIG_IWLWIFI_UAPSD is not set # CONFIG_IWLWIFI_DEBUG is not set # CONFIG_IWLWIFI_DEVICE_TRACING is not set diff --git a/debian/config/defines b/debian/config/defines index cbc95d2de..1e81d7559 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -12,6 +12,8 @@ ignore-changes: module:sound/soc/* # Not needed by modules at all clk_divider_ro_ops + tick_nohz_idle_enter + tick_nohz_idle_exit [base] arches: diff --git a/debian/patches/bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch b/debian/patches/bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch deleted file mode 100644 index 31486c9fe..000000000 --- a/debian/patches/bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Sven Eckelmann -Date: Sat, 20 Dec 2014 13:48:55 +0100 -Subject: batman-adv: Calculate extra tail size based on queued fragments -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -Origin: https://git.kernel.org/linus/5b6698b0e4a37053de35cc24ee695b98a7eb712b - -The fragmentation code was replaced in 610bfc6bc99bc83680d190ebc69359a05fc7f605 -("batman-adv: Receive fragmented packets and merge"). The new code provided a -mostly unused parameter skb for the merging function. It is used inside the -function to calculate the additionally needed skb tailroom. But instead of -increasing its own tailroom, it is only increasing the tailroom of the first -queued skb. This is not correct in some situations because the first queued -entry can be a different one than the parameter. - -An observed problem was: - -1. packet with size 104, total_size 1464, fragno 1 was received - - packet is queued -2. packet with size 1400, total_size 1464, fragno 0 was received - - packet is queued at the end of the list -3. enough data was received and can be given to the merge function - (1464 == (1400 - 20) + (104 - 20)) - - merge functions gets 1400 byte large packet as skb argument -4. merge function gets first entry in queue (104 byte) - - stored as skb_out -5. merge function calculates the required extra tail as total_size - skb->len - - pskb_expand_head tail of skb_out with 64 bytes -6. merge function tries to squeeze the extra 1380 bytes from the second queued - skb (1400 byte aka skb parameter) in the 64 extra tail bytes of skb_out - -Instead calculate the extra required tail bytes for skb_out also using skb_out -instead of using the parameter skb. The skb parameter is only used to get the -total_size from the last received packet. This is also the total_size used to -decide that all fragments were received. - -Reported-by: Philipp Psurek -Signed-off-by: Sven Eckelmann -Acked-by: Martin Hundebøll -Signed-off-by: David S. Miller ---- - net/batman-adv/fragmentation.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c -index fc1835c..8af3461 100644 ---- a/net/batman-adv/fragmentation.c -+++ b/net/batman-adv/fragmentation.c -@@ -251,7 +251,7 @@ batadv_frag_merge_packets(struct hlist_head *chain, struct sk_buff *skb) - kfree(entry); - - /* Make room for the rest of the fragments. */ -- if (pskb_expand_head(skb_out, 0, size - skb->len, GFP_ATOMIC) < 0) { -+ if (pskb_expand_head(skb_out, 0, size - skb_out->len, GFP_ATOMIC) < 0) { - kfree_skb(skb_out); - skb_out = NULL; - goto free; diff --git a/debian/patches/bugfix/all/deal-with-deadlock-in-d_walk.patch b/debian/patches/bugfix/all/deal-with-deadlock-in-d_walk.patch deleted file mode 100644 index 87c868341..000000000 --- a/debian/patches/bugfix/all/deal-with-deadlock-in-d_walk.patch +++ /dev/null @@ -1,82 +0,0 @@ -From: Al Viro -Date: Sun, 26 Oct 2014 19:31:10 -0400 -Subject: deal with deadlock in d_walk() -Origin: https://git.kernel.org/linus/ca5358ef75fc69fee5322a38a340f5739d997c10 - -... by not hitting rename_retry for reasons other than rename having -happened. In other words, do _not_ restart when finding that -between unlocking the child and locking the parent the former got -into __dentry_kill(). Skip the killed siblings instead... - -Signed-off-by: Al Viro ---- - fs/dcache.c | 31 ++++++++++++++++--------------- - 1 file changed, 16 insertions(+), 15 deletions(-) - ---- a/fs/dcache.c -+++ b/fs/dcache.c -@@ -484,7 +484,7 @@ static void __dentry_kill(struct dentry - } - /* if it was on the hash then remove it */ - __d_drop(dentry); -- list_del(&dentry->d_child); -+ __list_del_entry(&dentry->d_child); - /* - * Inform d_walk() that we are no longer attached to the - * dentry tree -@@ -1138,33 +1138,31 @@ resume: - /* - * All done at this level ... ascend and resume the search. - */ -+ rcu_read_lock(); -+ascend: - if (this_parent != parent) { - struct dentry *child = this_parent; - this_parent = child->d_parent; - -- rcu_read_lock(); - spin_unlock(&child->d_lock); - spin_lock(&this_parent->d_lock); - -- /* -- * might go back up the wrong parent if we have had a rename -- * or deletion -- */ -- if (this_parent != child->d_parent || -- (child->d_flags & DCACHE_DENTRY_KILLED) || -- need_seqretry(&rename_lock, seq)) { -- spin_unlock(&this_parent->d_lock); -- rcu_read_unlock(); -+ /* might go back up the wrong parent if we have had a rename. */ -+ if (need_seqretry(&rename_lock, seq)) - goto rename_retry; -+ next = child->d_child.next; -+ while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED)) { -+ if (next == &this_parent->d_subdirs) -+ goto ascend; -+ child = list_entry(next, struct dentry, d_child); -+ next = next->next; - } - rcu_read_unlock(); -- next = child->d_child.next; - goto resume; - } -- if (need_seqretry(&rename_lock, seq)) { -- spin_unlock(&this_parent->d_lock); -+ if (need_seqretry(&rename_lock, seq)) - goto rename_retry; -- } -+ rcu_read_unlock(); - if (finish) - finish(data); - -@@ -1174,6 +1172,9 @@ out_unlock: - return; - - rename_retry: -+ spin_unlock(&this_parent->d_lock); -+ rcu_read_unlock(); -+ BUG_ON(seq & 1); - if (!retry) - return; - seq = 1; diff --git a/debian/patches/bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch b/debian/patches/bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch deleted file mode 100644 index c9fbb27bc..000000000 --- a/debian/patches/bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Jan Kara -Date: Mon, 15 Dec 2014 14:22:46 +0100 -Subject: isofs: Fix infinite looping over CE entries -Origin: https://git.kernel.org/linus/f54e18f1b831c92f6512d2eedb224cd63d607d3d - -Rock Ridge extensions define so called Continuation Entries (CE) which -define where is further space with Rock Ridge data. Corrupted isofs -image can contain arbitrarily long chain of these, including a one -containing loop and thus causing kernel to end in an infinite loop when -traversing these entries. - -Limit the traversal to 32 entries which should be more than enough space -to store all the Rock Ridge data. - -Reported-by: P J P -CC: stable@vger.kernel.org -Signed-off-by: Jan Kara ---- - fs/isofs/rock.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c -index f488bba..bb63254 100644 ---- a/fs/isofs/rock.c -+++ b/fs/isofs/rock.c -@@ -30,6 +30,7 @@ struct rock_state { - int cont_size; - int cont_extent; - int cont_offset; -+ int cont_loops; - struct inode *inode; - }; - -@@ -73,6 +74,9 @@ static void init_rock_state(struct rock_state *rs, struct inode *inode) - rs->inode = inode; - } - -+/* Maximum number of Rock Ridge continuation entries */ -+#define RR_MAX_CE_ENTRIES 32 -+ - /* - * Returns 0 if the caller should continue scanning, 1 if the scan must end - * and -ve on error. -@@ -105,6 +109,8 @@ static int rock_continue(struct rock_state *rs) - goto out; - } - ret = -EIO; -+ if (++rs->cont_loops >= RR_MAX_CE_ENTRIES) -+ goto out; - bh = sb_bread(rs->inode->i_sb, rs->cont_extent); - if (bh) { - memcpy(rs->buffer, bh->b_data + rs->cont_offset, diff --git a/debian/patches/bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch b/debian/patches/bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch deleted file mode 100644 index 125951e1a..000000000 --- a/debian/patches/bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Jan Kara -Date: Thu, 18 Dec 2014 17:26:10 +0100 -Subject: isofs: Fix unchecked printing of ER records -Origin: https://git.kernel.org/linus/4e2024624e678f0ebb916e6192bd23c1f9fdf696 - -We didn't check length of rock ridge ER records before printing them. -Thus corrupted isofs image can cause us to access and print some memory -behind the buffer with obvious consequences. - -Reported-and-tested-by: Carl Henrik Lunde -CC: stable@vger.kernel.org -Signed-off-by: Jan Kara ---- - fs/isofs/rock.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c -index bb63254..735d752 100644 ---- a/fs/isofs/rock.c -+++ b/fs/isofs/rock.c -@@ -362,6 +362,9 @@ repeat: - rs.cont_size = isonum_733(rr->u.CE.size); - break; - case SIG('E', 'R'): -+ /* Invalid length of ER tag id? */ -+ if (rr->u.ER.len_id + offsetof(struct rock_ridge, u.ER.data) > rr->len) -+ goto out; - ISOFS_SB(inode->i_sb)->s_rock = 1; - printk(KERN_DEBUG "ISO 9660 Extensions: "); - { diff --git a/debian/patches/bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch b/debian/patches/bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch deleted file mode 100644 index ada785fef..000000000 --- a/debian/patches/bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Sasha Levin -Date: Mon, 29 Dec 2014 09:39:01 -0500 -Subject: KEYS: close race between key lookup and freeing -Origin: https://git.kernel.org/linus/a3a8784454692dd72e5d5d34dcdab17b4420e74c - -When a key is being garbage collected, it's key->user would get put before -the ->destroy() callback is called, where the key is removed from it's -respective tracking structures. - -This leaves a key hanging in a semi-invalid state which leaves a window open -for a different task to try an access key->user. An example is -find_keyring_by_name() which would dereference key->user for a key that is -in the process of being garbage collected (where key->user was freed but -->destroy() wasn't called yet - so it's still present in the linked list). - -This would cause either a panic, or corrupt memory. - -Fixes CVE-2014-9529. - -Signed-off-by: Sasha Levin -Signed-off-by: David Howells ---- - security/keys/gc.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/security/keys/gc.c -+++ b/security/keys/gc.c -@@ -157,12 +157,12 @@ static noinline void key_gc_unused_keys( - if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags)) - atomic_dec(&key->user->nikeys); - -- key_user_put(key->user); -- - /* now throw away the key memory */ - if (key->type->destroy) - key->type->destroy(key); - -+ key_user_put(key->user); -+ - kfree(key->description); - - #ifdef KEY_DEBUGGING diff --git a/debian/patches/bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch b/debian/patches/bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch deleted file mode 100644 index f5957410e..000000000 --- a/debian/patches/bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch +++ /dev/null @@ -1,714 +0,0 @@ -From: Al Viro -Date: Sun, 26 Oct 2014 19:19:16 -0400 -Subject: move d_rcu from overlapping d_child to overlapping d_alias -Origin: https://git.kernel.org/linus/946e51f2bf37f1656916eb75bd0742ba33983c28 - -Signed-off-by: Al Viro -[bwh: Backported to 3.16: - - Apply name changes in all the different places we use d_alias and d_child - - Adjust context] ---- - arch/powerpc/platforms/cell/spufs/inode.c | 2 +- - drivers/staging/lustre/lustre/llite/dcache.c | 2 +- - drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- - drivers/staging/lustre/lustre/llite/namei.c | 8 ++-- - fs/affs/amigaffs.c | 2 +- - fs/autofs4/expire.c | 12 +++--- - fs/autofs4/root.c | 2 +- - fs/ceph/dir.c | 8 ++-- - fs/ceph/inode.c | 2 +- - fs/cifs/inode.c | 2 +- - fs/coda/cache.c | 2 +- - fs/dcache.c | 53 ++++++++++++------------- - fs/debugfs/inode.c | 2 +- - fs/exportfs/expfs.c | 2 +- - fs/libfs.c | 12 +++--- - fs/ncpfs/dir.c | 2 +- - fs/ncpfs/ncplib_kernel.h | 4 +- - fs/nfs/getroot.c | 2 +- - fs/notify/fsnotify.c | 4 +- - fs/ocfs2/dcache.c | 2 +- - include/linux/dcache.h | 8 ++-- - kernel/trace/trace.c | 4 +- - kernel/trace/trace_events.c | 2 +- - security/selinux/selinuxfs.c | 6 +-- - 24 files changed, 73 insertions(+), 74 deletions(-) - ---- a/arch/powerpc/platforms/cell/spufs/inode.c -+++ b/arch/powerpc/platforms/cell/spufs/inode.c -@@ -164,7 +164,7 @@ static void spufs_prune_dir(struct dentr - struct dentry *dentry, *tmp; - - mutex_lock(&dir->d_inode->i_mutex); -- list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_u.d_child) { -+ list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_child) { - spin_lock(&dentry->d_lock); - if (!(d_unhashed(dentry)) && dentry->d_inode) { - dget_dlock(dentry); ---- a/drivers/staging/lustre/lustre/llite/dcache.c -+++ b/drivers/staging/lustre/lustre/llite/dcache.c -@@ -258,7 +258,7 @@ void ll_invalidate_aliases(struct inode - inode->i_ino, inode->i_generation, inode); - - ll_lock_dcache(inode); -- ll_d_hlist_for_each_entry(dentry, p, &inode->i_dentry, d_alias) { -+ ll_d_hlist_for_each_entry(dentry, p, &inode->i_dentry, d_u.d_alias) { - CDEBUG(D_DENTRY, "dentry in drop %.*s (%p) parent %p " - "inode %p flags %d\n", dentry->d_name.len, - dentry->d_name.name, dentry, dentry->d_parent, ---- a/drivers/staging/lustre/lustre/llite/llite_lib.c -+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c -@@ -704,7 +704,7 @@ void lustre_dump_dentry(struct dentry *d - return; - - list_for_each(tmp, &dentry->d_subdirs) { -- struct dentry *d = list_entry(tmp, struct dentry, d_u.d_child); -+ struct dentry *d = list_entry(tmp, struct dentry, d_child); - lustre_dump_dentry(d, recur - 1); - } - } ---- a/drivers/staging/lustre/lustre/llite/namei.c -+++ b/drivers/staging/lustre/lustre/llite/namei.c -@@ -167,14 +167,14 @@ static void ll_invalidate_negative_child - struct ll_d_hlist_node *p; - - ll_lock_dcache(dir); -- ll_d_hlist_for_each_entry(dentry, p, &dir->i_dentry, d_alias) { -+ ll_d_hlist_for_each_entry(dentry, p, &dir->i_dentry, d_u.d_alias) { - spin_lock(&dentry->d_lock); - if (!list_empty(&dentry->d_subdirs)) { - struct dentry *child; - - list_for_each_entry_safe(child, tmp_subdir, - &dentry->d_subdirs, -- d_u.d_child) { -+ d_child) { - if (child->d_inode == NULL) - d_lustre_invalidate(child, 1); - } -@@ -362,7 +362,7 @@ static struct dentry *ll_find_alias(stru - discon_alias = invalid_alias = NULL; - - ll_lock_dcache(inode); -- ll_d_hlist_for_each_entry(alias, p, &inode->i_dentry, d_alias) { -+ ll_d_hlist_for_each_entry(alias, p, &inode->i_dentry, d_u.d_alias) { - LASSERT(alias != dentry); - - spin_lock(&alias->d_lock); -@@ -943,7 +943,7 @@ static void ll_get_child_fid(struct inod - { - struct dentry *parent, *child; - -- parent = ll_d_hlist_entry(dir->i_dentry, struct dentry, d_alias); -+ parent = ll_d_hlist_entry(dir->i_dentry, struct dentry, d_u.d_alias); - child = d_lookup(parent, name); - if (child) { - if (child->d_inode) ---- a/fs/affs/amigaffs.c -+++ b/fs/affs/amigaffs.c -@@ -127,7 +127,7 @@ affs_fix_dcache(struct inode *inode, u32 - { - struct dentry *dentry; - spin_lock(&inode->i_lock); -- hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { -+ hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { - if (entry_ino == (u32)(long)dentry->d_fsdata) { - dentry->d_fsdata = (void *)inode->i_ino; - break; ---- a/fs/autofs4/expire.c -+++ b/fs/autofs4/expire.c -@@ -91,7 +91,7 @@ static struct dentry *get_next_positive_ - spin_lock(&root->d_lock); - - if (prev) -- next = prev->d_u.d_child.next; -+ next = prev->d_child.next; - else { - prev = dget_dlock(root); - next = prev->d_subdirs.next; -@@ -105,13 +105,13 @@ cont: - return NULL; - } - -- q = list_entry(next, struct dentry, d_u.d_child); -+ q = list_entry(next, struct dentry, d_child); - - spin_lock_nested(&q->d_lock, DENTRY_D_LOCK_NESTED); - /* Already gone or negative dentry (under construction) - try next */ - if (!d_count(q) || !simple_positive(q)) { - spin_unlock(&q->d_lock); -- next = q->d_u.d_child.next; -+ next = q->d_child.next; - goto cont; - } - dget_dlock(q); -@@ -161,13 +161,13 @@ again: - goto relock; - } - spin_unlock(&p->d_lock); -- next = p->d_u.d_child.next; -+ next = p->d_child.next; - p = parent; - if (next != &parent->d_subdirs) - break; - } - } -- ret = list_entry(next, struct dentry, d_u.d_child); -+ ret = list_entry(next, struct dentry, d_child); - - spin_lock_nested(&ret->d_lock, DENTRY_D_LOCK_NESTED); - /* Negative dentry - try next */ -@@ -461,7 +461,7 @@ found: - spin_lock(&sbi->lookup_lock); - spin_lock(&expired->d_parent->d_lock); - spin_lock_nested(&expired->d_lock, DENTRY_D_LOCK_NESTED); -- list_move(&expired->d_parent->d_subdirs, &expired->d_u.d_child); -+ list_move(&expired->d_parent->d_subdirs, &expired->d_child); - spin_unlock(&expired->d_lock); - spin_unlock(&expired->d_parent->d_lock); - spin_unlock(&sbi->lookup_lock); ---- a/fs/autofs4/root.c -+++ b/fs/autofs4/root.c -@@ -655,7 +655,7 @@ static void autofs_clear_leaf_automount_ - /* only consider parents below dentrys in the root */ - if (IS_ROOT(parent->d_parent)) - return; -- d_child = &dentry->d_u.d_child; -+ d_child = &dentry->d_child; - /* Set parent managed if it's becoming empty */ - if (d_child->next == &parent->d_subdirs && - d_child->prev == &parent->d_subdirs) ---- a/fs/ceph/dir.c -+++ b/fs/ceph/dir.c -@@ -111,7 +111,7 @@ static int fpos_cmp(loff_t l, loff_t r) - /* - * When possible, we try to satisfy a readdir by peeking at the - * dcache. We make this work by carefully ordering dentries on -- * d_u.d_child when we initially get results back from the MDS, and -+ * d_child when we initially get results back from the MDS, and - * falling back to a "normal" sync readdir if any dentries in the dir - * are dropped. - * -@@ -147,11 +147,11 @@ static int __dcache_readdir(struct file - p = parent->d_subdirs.prev; - dout(" initial p %p/%p\n", p->prev, p->next); - } else { -- p = last->d_u.d_child.prev; -+ p = last->d_child.prev; - } - - more: -- dentry = list_entry(p, struct dentry, d_u.d_child); -+ dentry = list_entry(p, struct dentry, d_child); - di = ceph_dentry(dentry); - while (1) { - dout(" p %p/%p %s d_subdirs %p/%p\n", p->prev, p->next, -@@ -174,7 +174,7 @@ more: - !dentry->d_inode ? " null" : ""); - spin_unlock(&dentry->d_lock); - p = p->prev; -- dentry = list_entry(p, struct dentry, d_u.d_child); -+ dentry = list_entry(p, struct dentry, d_child); - di = ceph_dentry(dentry); - } - ---- a/fs/ceph/inode.c -+++ b/fs/ceph/inode.c -@@ -1399,7 +1399,7 @@ retry_lookup: - /* reorder parent's d_subdirs */ - spin_lock(&parent->d_lock); - spin_lock_nested(&dn->d_lock, DENTRY_D_LOCK_NESTED); -- list_move(&dn->d_u.d_child, &parent->d_subdirs); -+ list_move(&dn->d_child, &parent->d_subdirs); - spin_unlock(&dn->d_lock); - spin_unlock(&parent->d_lock); - } ---- a/fs/cifs/inode.c -+++ b/fs/cifs/inode.c -@@ -887,7 +887,7 @@ inode_has_hashed_dentries(struct inode * - struct dentry *dentry; - - spin_lock(&inode->i_lock); -- hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { -+ hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { - if (!d_unhashed(dentry) || IS_ROOT(dentry)) { - spin_unlock(&inode->i_lock); - return true; ---- a/fs/coda/cache.c -+++ b/fs/coda/cache.c -@@ -92,7 +92,7 @@ static void coda_flag_children(struct de - struct dentry *de; - - spin_lock(&parent->d_lock); -- list_for_each_entry(de, &parent->d_subdirs, d_u.d_child) { -+ list_for_each_entry(de, &parent->d_subdirs, d_child) { - /* don't know what to do with negative dentries */ - if (de->d_inode ) - coda_flag_inode(de->d_inode, flag); ---- a/fs/dcache.c -+++ b/fs/dcache.c -@@ -44,7 +44,7 @@ - /* - * Usage: - * dcache->d_inode->i_lock protects: -- * - i_dentry, d_alias, d_inode of aliases -+ * - i_dentry, d_u.d_alias, d_inode of aliases - * dcache_hash_bucket lock protects: - * - the dcache hash table - * s_anon bl list spinlock protects: -@@ -59,7 +59,7 @@ - * - d_unhashed() - * - d_parent and d_subdirs - * - childrens' d_child and d_parent -- * - d_alias, d_inode -+ * - d_u.d_alias, d_inode - * - * Ordering: - * dentry->d_inode->i_lock -@@ -239,7 +239,6 @@ static void __d_free(struct rcu_head *he - { - struct dentry *dentry = container_of(head, struct dentry, d_u.d_rcu); - -- WARN_ON(!hlist_unhashed(&dentry->d_alias)); - if (dname_external(dentry)) - kfree(dentry->d_name.name); - kmem_cache_free(dentry_cache, dentry); -@@ -247,6 +246,8 @@ static void __d_free(struct rcu_head *he - - static void dentry_free(struct dentry *dentry) - { -+ WARN_ON(!hlist_unhashed(&dentry->d_u.d_alias)); -+ - /* if dentry was never visible to RCU, immediate free is OK */ - if (!(dentry->d_flags & DCACHE_RCUACCESS)) - __d_free(&dentry->d_u.d_rcu); -@@ -280,7 +281,7 @@ static void dentry_iput(struct dentry * - struct inode *inode = dentry->d_inode; - if (inode) { - dentry->d_inode = NULL; -- hlist_del_init(&dentry->d_alias); -+ hlist_del_init(&dentry->d_u.d_alias); - spin_unlock(&dentry->d_lock); - spin_unlock(&inode->i_lock); - if (!inode->i_nlink) -@@ -305,7 +306,7 @@ static void dentry_unlink_inode(struct d - struct inode *inode = dentry->d_inode; - __d_clear_type(dentry); - dentry->d_inode = NULL; -- hlist_del_init(&dentry->d_alias); -+ hlist_del_init(&dentry->d_u.d_alias); - dentry_rcuwalk_barrier(dentry); - spin_unlock(&dentry->d_lock); - spin_unlock(&inode->i_lock); -@@ -465,7 +466,7 @@ static void __dentry_kill(struct dentry - } - /* if it was on the hash then remove it */ - __d_drop(dentry); -- list_del(&dentry->d_u.d_child); -+ list_del(&dentry->d_child); - /* - * Inform d_walk() that we are no longer attached to the - * dentry tree -@@ -749,7 +750,7 @@ static struct dentry *__d_find_alias(str - - again: - discon_alias = NULL; -- hlist_for_each_entry(alias, &inode->i_dentry, d_alias) { -+ hlist_for_each_entry(alias, &inode->i_dentry, d_u.d_alias) { - spin_lock(&alias->d_lock); - if (S_ISDIR(inode->i_mode) || !d_unhashed(alias)) { - if (IS_ROOT(alias) && -@@ -802,7 +803,7 @@ void d_prune_aliases(struct inode *inode - struct dentry *dentry; - restart: - spin_lock(&inode->i_lock); -- hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { -+ hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { - spin_lock(&dentry->d_lock); - if (!dentry->d_lockref.count) { - /* -@@ -1087,7 +1088,7 @@ repeat: - resume: - while (next != &this_parent->d_subdirs) { - struct list_head *tmp = next; -- struct dentry *dentry = list_entry(tmp, struct dentry, d_u.d_child); -+ struct dentry *dentry = list_entry(tmp, struct dentry, d_child); - next = tmp->next; - - spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); -@@ -1139,7 +1140,7 @@ resume: - goto rename_retry; - } - rcu_read_unlock(); -- next = child->d_u.d_child.next; -+ next = child->d_child.next; - goto resume; - } - if (need_seqretry(&rename_lock, seq)) { -@@ -1474,8 +1475,8 @@ struct dentry *__d_alloc(struct super_bl - INIT_HLIST_BL_NODE(&dentry->d_hash); - INIT_LIST_HEAD(&dentry->d_lru); - INIT_LIST_HEAD(&dentry->d_subdirs); -- INIT_HLIST_NODE(&dentry->d_alias); -- INIT_LIST_HEAD(&dentry->d_u.d_child); -+ INIT_HLIST_NODE(&dentry->d_u.d_alias); -+ INIT_LIST_HEAD(&dentry->d_child); - d_set_d_op(dentry, dentry->d_sb->s_d_op); - - this_cpu_inc(nr_dentry); -@@ -1505,7 +1506,7 @@ struct dentry *d_alloc(struct dentry * p - */ - __dget_dlock(parent); - dentry->d_parent = parent; -- list_add(&dentry->d_u.d_child, &parent->d_subdirs); -+ list_add(&dentry->d_child, &parent->d_subdirs); - spin_unlock(&parent->d_lock); - - return dentry; -@@ -1598,7 +1599,7 @@ static void __d_instantiate(struct dentr - spin_lock(&dentry->d_lock); - __d_set_type(dentry, add_flags); - if (inode) -- hlist_add_head(&dentry->d_alias, &inode->i_dentry); -+ hlist_add_head(&dentry->d_u.d_alias, &inode->i_dentry); - dentry->d_inode = inode; - dentry_rcuwalk_barrier(dentry); - spin_unlock(&dentry->d_lock); -@@ -1622,7 +1623,7 @@ static void __d_instantiate(struct dentr - - void d_instantiate(struct dentry *entry, struct inode * inode) - { -- BUG_ON(!hlist_unhashed(&entry->d_alias)); -+ BUG_ON(!hlist_unhashed(&entry->d_u.d_alias)); - if (inode) - spin_lock(&inode->i_lock); - __d_instantiate(entry, inode); -@@ -1661,7 +1662,7 @@ static struct dentry *__d_instantiate_un - return NULL; - } - -- hlist_for_each_entry(alias, &inode->i_dentry, d_alias) { -+ hlist_for_each_entry(alias, &inode->i_dentry, d_u.d_alias) { - /* - * Don't need alias->d_lock here, because aliases with - * d_parent == entry->d_parent are not subject to name or -@@ -1687,7 +1688,7 @@ struct dentry *d_instantiate_unique(stru - { - struct dentry *result; - -- BUG_ON(!hlist_unhashed(&entry->d_alias)); -+ BUG_ON(!hlist_unhashed(&entry->d_u.d_alias)); - - if (inode) - spin_lock(&inode->i_lock); -@@ -1718,7 +1719,7 @@ EXPORT_SYMBOL(d_instantiate_unique); - */ - int d_instantiate_no_diralias(struct dentry *entry, struct inode *inode) - { -- BUG_ON(!hlist_unhashed(&entry->d_alias)); -+ BUG_ON(!hlist_unhashed(&entry->d_u.d_alias)); - - spin_lock(&inode->i_lock); - if (S_ISDIR(inode->i_mode) && !hlist_empty(&inode->i_dentry)) { -@@ -1757,7 +1758,7 @@ static struct dentry * __d_find_any_alia - - if (hlist_empty(&inode->i_dentry)) - return NULL; -- alias = hlist_entry(inode->i_dentry.first, struct dentry, d_alias); -+ alias = hlist_entry(inode->i_dentry.first, struct dentry, d_u.d_alias); - __dget(alias); - return alias; - } -@@ -1834,7 +1835,7 @@ struct dentry *d_obtain_alias(struct ino - spin_lock(&tmp->d_lock); - tmp->d_inode = inode; - tmp->d_flags |= add_flags; -- hlist_add_head(&tmp->d_alias, &inode->i_dentry); -+ hlist_add_head(&tmp->d_u.d_alias, &inode->i_dentry); - hlist_bl_lock(&tmp->d_sb->s_anon); - hlist_bl_add_head(&tmp->d_hash, &tmp->d_sb->s_anon); - hlist_bl_unlock(&tmp->d_sb->s_anon); -@@ -2277,7 +2278,7 @@ int d_validate(struct dentry *dentry, st - struct dentry *child; - - spin_lock(&dparent->d_lock); -- list_for_each_entry(child, &dparent->d_subdirs, d_u.d_child) { -+ list_for_each_entry(child, &dparent->d_subdirs, d_child) { - if (dentry == child) { - spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); - __dget_dlock(dentry); -@@ -2545,8 +2546,8 @@ static void __d_move(struct dentry *dent - d_hash(dentry->d_parent, dentry->d_name.hash)); - } - -- list_del(&dentry->d_u.d_child); -- list_del(&target->d_u.d_child); -+ list_del(&dentry->d_child); -+ list_del(&target->d_child); - - /* Switch the names.. */ - switch_names(dentry, target, exchange); -@@ -2555,15 +2556,15 @@ static void __d_move(struct dentry *dent - if (IS_ROOT(dentry)) { - dentry->d_parent = target->d_parent; - target->d_parent = target; -- INIT_LIST_HEAD(&target->d_u.d_child); -+ INIT_LIST_HEAD(&target->d_child); - } else { - swap(dentry->d_parent, target->d_parent); - - /* And add them back to the (new) parent lists */ -- list_add(&target->d_u.d_child, &target->d_parent->d_subdirs); -+ list_add(&target->d_child, &target->d_parent->d_subdirs); - } - -- list_add(&dentry->d_u.d_child, &dentry->d_parent->d_subdirs); -+ list_add(&dentry->d_child, &dentry->d_parent->d_subdirs); - - write_seqcount_end(&target->d_seq); - write_seqcount_end(&dentry->d_seq); -@@ -2690,9 +2691,9 @@ static void __d_materialise_dentry(struc - switch_names(dentry, anon, false); - - dentry->d_parent = dentry; -- list_del_init(&dentry->d_u.d_child); -+ list_del_init(&dentry->d_child); - anon->d_parent = dparent; -- list_move(&anon->d_u.d_child, &dparent->d_subdirs); -+ list_move(&anon->d_child, &dparent->d_subdirs); - - write_seqcount_end(&dentry->d_seq); - write_seqcount_end(&anon->d_seq); -@@ -3324,7 +3325,7 @@ void d_tmpfile(struct dentry *dentry, st - { - inode_dec_link_count(inode); - BUG_ON(dentry->d_name.name != dentry->d_iname || -- !hlist_unhashed(&dentry->d_alias) || -+ !hlist_unhashed(&dentry->d_u.d_alias) || - !d_unlinked(dentry)); - spin_lock(&dentry->d_parent->d_lock); - spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); ---- a/fs/debugfs/inode.c -+++ b/fs/debugfs/inode.c -@@ -553,7 +553,7 @@ void debugfs_remove_recursive(struct den - * use the d_u.d_child as the rcu head and corrupt this list. - */ - spin_lock(&parent->d_lock); -- list_for_each_entry(child, &parent->d_subdirs, d_u.d_child) { -+ list_for_each_entry(child, &parent->d_subdirs, d_child) { - if (!debugfs_positive(child)) - continue; - ---- a/fs/exportfs/expfs.c -+++ b/fs/exportfs/expfs.c -@@ -50,7 +50,7 @@ find_acceptable_alias(struct dentry *res - - inode = result->d_inode; - spin_lock(&inode->i_lock); -- hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { -+ hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { - dget(dentry); - spin_unlock(&inode->i_lock); - if (toput) ---- a/fs/libfs.c -+++ b/fs/libfs.c -@@ -114,18 +114,18 @@ loff_t dcache_dir_lseek(struct file *fil - - spin_lock(&dentry->d_lock); - /* d_lock not required for cursor */ -- list_del(&cursor->d_u.d_child); -+ list_del(&cursor->d_child); - p = dentry->d_subdirs.next; - while (n && p != &dentry->d_subdirs) { - struct dentry *next; -- next = list_entry(p, struct dentry, d_u.d_child); -+ next = list_entry(p, struct dentry, d_child); - spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED); - if (simple_positive(next)) - n--; - spin_unlock(&next->d_lock); - p = p->next; - } -- list_add_tail(&cursor->d_u.d_child, p); -+ list_add_tail(&cursor->d_child, p); - spin_unlock(&dentry->d_lock); - } - } -@@ -150,7 +150,7 @@ int dcache_readdir(struct file *file, st - { - struct dentry *dentry = file->f_path.dentry; - struct dentry *cursor = file->private_data; -- struct list_head *p, *q = &cursor->d_u.d_child; -+ struct list_head *p, *q = &cursor->d_child; - - if (!dir_emit_dots(file, ctx)) - return 0; -@@ -159,7 +159,7 @@ int dcache_readdir(struct file *file, st - list_move(q, &dentry->d_subdirs); - - for (p = q->next; p != &dentry->d_subdirs; p = p->next) { -- struct dentry *next = list_entry(p, struct dentry, d_u.d_child); -+ struct dentry *next = list_entry(p, struct dentry, d_child); - spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED); - if (!simple_positive(next)) { - spin_unlock(&next->d_lock); -@@ -287,7 +287,7 @@ int simple_empty(struct dentry *dentry) - int ret = 0; - - spin_lock(&dentry->d_lock); -- list_for_each_entry(child, &dentry->d_subdirs, d_u.d_child) { -+ list_for_each_entry(child, &dentry->d_subdirs, d_child) { - spin_lock_nested(&child->d_lock, DENTRY_D_LOCK_NESTED); - if (simple_positive(child)) { - spin_unlock(&child->d_lock); ---- a/fs/ncpfs/dir.c -+++ b/fs/ncpfs/dir.c -@@ -406,7 +406,7 @@ ncp_dget_fpos(struct dentry *dentry, str - spin_lock(&parent->d_lock); - next = parent->d_subdirs.next; - while (next != &parent->d_subdirs) { -- dent = list_entry(next, struct dentry, d_u.d_child); -+ dent = list_entry(next, struct dentry, d_child); - if ((unsigned long)dent->d_fsdata == fpos) { - if (dent->d_inode) - dget(dent); ---- a/fs/ncpfs/ncplib_kernel.h -+++ b/fs/ncpfs/ncplib_kernel.h -@@ -194,7 +194,7 @@ ncp_renew_dentries(struct dentry *parent - spin_lock(&parent->d_lock); - next = parent->d_subdirs.next; - while (next != &parent->d_subdirs) { -- dentry = list_entry(next, struct dentry, d_u.d_child); -+ dentry = list_entry(next, struct dentry, d_child); - - if (dentry->d_fsdata == NULL) - ncp_age_dentry(server, dentry); -@@ -216,7 +216,7 @@ ncp_invalidate_dircache_entries(struct d - spin_lock(&parent->d_lock); - next = parent->d_subdirs.next; - while (next != &parent->d_subdirs) { -- dentry = list_entry(next, struct dentry, d_u.d_child); -+ dentry = list_entry(next, struct dentry, d_child); - dentry->d_fsdata = NULL; - ncp_age_dentry(server, dentry); - next = next->next; ---- a/fs/nfs/getroot.c -+++ b/fs/nfs/getroot.c -@@ -58,7 +58,7 @@ static int nfs_superblock_set_dummy_root - */ - spin_lock(&sb->s_root->d_inode->i_lock); - spin_lock(&sb->s_root->d_lock); -- hlist_del_init(&sb->s_root->d_alias); -+ hlist_del_init(&sb->s_root->d_u.d_alias); - spin_unlock(&sb->s_root->d_lock); - spin_unlock(&sb->s_root->d_inode->i_lock); - } ---- a/fs/notify/fsnotify.c -+++ b/fs/notify/fsnotify.c -@@ -63,14 +63,14 @@ void __fsnotify_update_child_dentry_flag - spin_lock(&inode->i_lock); - /* run all of the dentries associated with this inode. Since this is a - * directory, there damn well better only be one item on this list */ -- hlist_for_each_entry(alias, &inode->i_dentry, d_alias) { -+ hlist_for_each_entry(alias, &inode->i_dentry, d_u.d_alias) { - struct dentry *child; - - /* run all of the children of the original inode and fix their - * d_flags to indicate parental interest (their parent is the - * original inode) */ - spin_lock(&alias->d_lock); -- list_for_each_entry(child, &alias->d_subdirs, d_u.d_child) { -+ list_for_each_entry(child, &alias->d_subdirs, d_child) { - if (!child->d_inode) - continue; - ---- a/fs/ocfs2/dcache.c -+++ b/fs/ocfs2/dcache.c -@@ -172,7 +172,7 @@ struct dentry *ocfs2_find_local_alias(st - struct dentry *dentry; - - spin_lock(&inode->i_lock); -- hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) { -+ hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { - spin_lock(&dentry->d_lock); - if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) { - trace_ocfs2_find_local_alias(dentry->d_name.len, ---- a/include/linux/dcache.h -+++ b/include/linux/dcache.h -@@ -124,15 +124,15 @@ struct dentry { - void *d_fsdata; /* fs-specific data */ - - struct list_head d_lru; /* LRU list */ -+ struct list_head d_child; /* child of parent list */ -+ struct list_head d_subdirs; /* our children */ - /* -- * d_child and d_rcu can share memory -+ * d_alias and d_rcu can share memory - */ - union { -- struct list_head d_child; /* child of parent list */ -+ struct hlist_node d_alias; /* inode alias list */ - struct rcu_head d_rcu; - } d_u; -- struct list_head d_subdirs; /* our children */ -- struct hlist_node d_alias; /* inode alias list */ - }; - - /* ---- a/kernel/trace/trace.c -+++ b/kernel/trace/trace.c -@@ -6384,7 +6384,7 @@ static int instance_mkdir (struct inode - int ret; - - /* Paranoid: Make sure the parent is the "instances" directory */ -- parent = hlist_entry(inode->i_dentry.first, struct dentry, d_alias); -+ parent = hlist_entry(inode->i_dentry.first, struct dentry, d_u.d_alias); - if (WARN_ON_ONCE(parent != trace_instance_dir)) - return -ENOENT; - -@@ -6411,7 +6411,7 @@ static int instance_rmdir(struct inode * - int ret; - - /* Paranoid: Make sure the parent is the "instances" directory */ -- parent = hlist_entry(inode->i_dentry.first, struct dentry, d_alias); -+ parent = hlist_entry(inode->i_dentry.first, struct dentry, d_u.d_alias); - if (WARN_ON_ONCE(parent != trace_instance_dir)) - return -ENOENT; - ---- a/kernel/trace/trace_events.c -+++ b/kernel/trace/trace_events.c -@@ -459,7 +459,7 @@ static void remove_event_file_dir(struct - - if (dir) { - spin_lock(&dir->d_lock); /* probably unneeded */ -- list_for_each_entry(child, &dir->d_subdirs, d_u.d_child) { -+ list_for_each_entry(child, &dir->d_subdirs, d_child) { - if (child->d_inode) /* probably unneeded */ - child->d_inode->i_private = NULL; - } ---- a/security/selinux/selinuxfs.c -+++ b/security/selinux/selinuxfs.c -@@ -1200,7 +1200,7 @@ static void sel_remove_entries(struct de - spin_lock(&de->d_lock); - node = de->d_subdirs.next; - while (node != &de->d_subdirs) { -- struct dentry *d = list_entry(node, struct dentry, d_u.d_child); -+ struct dentry *d = list_entry(node, struct dentry, d_child); - - spin_lock_nested(&d->d_lock, DENTRY_D_LOCK_NESTED); - list_del_init(node); -@@ -1674,12 +1674,12 @@ static void sel_remove_classes(void) - - list_for_each(class_node, &class_dir->d_subdirs) { - struct dentry *class_subdir = list_entry(class_node, -- struct dentry, d_u.d_child); -+ struct dentry, d_child); - struct list_head *class_subdir_node; - - list_for_each(class_subdir_node, &class_subdir->d_subdirs) { - struct dentry *d = list_entry(class_subdir_node, -- struct dentry, d_u.d_child); -+ struct dentry, d_child); - - if (d->d_inode) - if (d->d_inode->i_mode & S_IFDIR) diff --git a/debian/patches/bugfix/s390/s390-3215-fix-hanging-console-issue.patch b/debian/patches/bugfix/s390/s390-3215-fix-hanging-console-issue.patch deleted file mode 100644 index b9e7f5435..000000000 --- a/debian/patches/bugfix/s390/s390-3215-fix-hanging-console-issue.patch +++ /dev/null @@ -1,69 +0,0 @@ -From: Martin Schwidefsky -Date: Tue, 15 Jul 2014 17:53:12 +0200 -Subject: s390/3215: fix hanging console issue -Origin: https://git.kernel.org/cgit/linux/kernel/git/s390/linux.git/commit?id=26d766c60f4ea08cd14f0f3435a6db3d6cc2ae96 -Bug-Debian: https://bugs.debian.org/747922 - -The ccw_device_start in raw3215_start_io can fail. raw3215_try_io -does not check if the request could be started and removes any -pending timer. This can leave the system in a hanging state. -Check for pending request after raw3215_start_io and start a -timer if necessary. - -Signed-off-by: Martin Schwidefsky ---- - drivers/s390/char/con3215.c | 32 +++++++++++++++++--------------- - 1 file changed, 17 insertions(+), 15 deletions(-) - -diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c -index 5af7f0b..a6d47e5 100644 ---- a/drivers/s390/char/con3215.c -+++ b/drivers/s390/char/con3215.c -@@ -288,12 +288,16 @@ static void raw3215_timeout(unsigned long __data) - unsigned long flags; - - spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); -- if (raw->flags & RAW3215_TIMER_RUNS) { -- del_timer(&raw->timer); -- raw->flags &= ~RAW3215_TIMER_RUNS; -- if (!(raw->port.flags & ASYNC_SUSPENDED)) { -- raw3215_mk_write_req(raw); -- raw3215_start_io(raw); -+ raw->flags &= ~RAW3215_TIMER_RUNS; -+ if (!(raw->port.flags & ASYNC_SUSPENDED)) { -+ raw3215_mk_write_req(raw); -+ raw3215_start_io(raw); -+ if ((raw->queued_read || raw->queued_write) && -+ !(raw->flags & RAW3215_WORKING) && -+ !(raw->flags & RAW3215_TIMER_RUNS)) { -+ raw->timer.expires = RAW3215_TIMEOUT + jiffies; -+ add_timer(&raw->timer); -+ raw->flags |= RAW3215_TIMER_RUNS; - } - } - spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags); -@@ -317,17 +321,15 @@ static inline void raw3215_try_io(struct raw3215_info *raw) - (raw->flags & RAW3215_FLUSHING)) { - /* execute write requests bigger than minimum size */ - raw3215_start_io(raw); -- if (raw->flags & RAW3215_TIMER_RUNS) { -- del_timer(&raw->timer); -- raw->flags &= ~RAW3215_TIMER_RUNS; -- } -- } else if (!(raw->flags & RAW3215_TIMER_RUNS)) { -- /* delay small writes */ -- raw->timer.expires = RAW3215_TIMEOUT + jiffies; -- add_timer(&raw->timer); -- raw->flags |= RAW3215_TIMER_RUNS; - } - } -+ if ((raw->queued_read || raw->queued_write) && -+ !(raw->flags & RAW3215_WORKING) && -+ !(raw->flags & RAW3215_TIMER_RUNS)) { -+ raw->timer.expires = RAW3215_TIMEOUT + jiffies; -+ add_timer(&raw->timer); -+ raw->flags |= RAW3215_TIMER_RUNS; -+ } - } - - /* diff --git a/debian/patches/bugfix/s390/s390-3215-fix-tty-output-containing-tabs.patch b/debian/patches/bugfix/s390/s390-3215-fix-tty-output-containing-tabs.patch deleted file mode 100644 index cc6ac17dd..000000000 --- a/debian/patches/bugfix/s390/s390-3215-fix-tty-output-containing-tabs.patch +++ /dev/null @@ -1,65 +0,0 @@ -From: Martin Schwidefsky -Date: Wed, 13 Aug 2014 12:01:30 +0200 -Subject: s390/3215: fix tty output containing tabs -Origin: https://git.kernel.org/linus/e512d56c799517f33b301d81e9a5e0ebf30c2d1e - -git commit 37f81fa1f63ad38e16125526bb2769ae0ea8d332 -"n_tty: do O_ONLCR translation as a single write" -surfaced a bug in the 3215 device driver. In combination this -broke tab expansion for tty ouput. - -The cause is an asymmetry in the behaviour of tty3215_ops->write -vs tty3215_ops->put_char. The put_char function scans for '\t' -but the write function does not. - -As the driver has logic for the '\t' expansion remove XTABS -from c_oflag of the initial termios as well. - -Reported-by: Stephen Powell -Signed-off-by: Martin Schwidefsky ---- - drivers/s390/char/con3215.c | 20 +++++++++++++++++--- - 1 file changed, 17 insertions(+), 3 deletions(-) - -diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c -index a6d47e5..c43aca6 100644 ---- a/drivers/s390/char/con3215.c -+++ b/drivers/s390/char/con3215.c -@@ -1035,12 +1035,26 @@ static int tty3215_write(struct tty_struct * tty, - const unsigned char *buf, int count) - { - struct raw3215_info *raw; -+ int i, written; - - if (!tty) - return 0; - raw = (struct raw3215_info *) tty->driver_data; -- raw3215_write(raw, buf, count); -- return count; -+ written = count; -+ while (count > 0) { -+ for (i = 0; i < count; i++) -+ if (buf[i] == '\t' || buf[i] == '\n') -+ break; -+ raw3215_write(raw, buf, i); -+ count -= i; -+ buf += i; -+ if (count > 0) { -+ raw3215_putchar(raw, *buf); -+ count--; -+ buf++; -+ } -+ } -+ return written; - } - - /* -@@ -1188,7 +1202,7 @@ static int __init tty3215_init(void) - driver->subtype = SYSTEM_TYPE_TTY; - driver->init_termios = tty_std_termios; - driver->init_termios.c_iflag = IGNBRK | IGNPAR; -- driver->init_termios.c_oflag = ONLCR | XTABS; -+ driver->init_termios.c_oflag = ONLCR; - driver->init_termios.c_lflag = ISIG; - driver->flags = TTY_DRIVER_REAL_RAW; - tty_set_operations(driver, &tty3215_ops); diff --git a/debian/patches/bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch b/debian/patches/bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch deleted file mode 100644 index 372a7160a..000000000 --- a/debian/patches/bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Andy Lutomirski -Date: Fri, 5 Dec 2014 19:03:28 -0800 -Subject: x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit -Origin: https://git.kernel.org/linus/29fa6825463c97e5157284db80107d1bfac5d77b - -paravirt_enabled has the following effects: - - - Disables the F00F bug workaround warning. There is no F00F bug - workaround any more because Linux's standard IDT handling already - works around the F00F bug, but the warning still exists. This - is only cosmetic, and, in any event, there is no such thing as - KVM on a CPU with the F00F bug. - - - Disables 32-bit APM BIOS detection. On a KVM paravirt system, - there should be no APM BIOS anyway. - - - Disables tboot. I think that the tboot code should check the - CPUID hypervisor bit directly if it matters. - - - paravirt_enabled disables espfix32. espfix32 should *not* be - disabled under KVM paravirt. - -The last point is the purpose of this patch. It fixes a leak of the -high 16 bits of the kernel stack address on 32-bit KVM paravirt -guests. Fixes CVE-2014-8134. - -Cc: stable@vger.kernel.org -Suggested-by: Konrad Rzeszutek Wilk -Signed-off-by: Andy Lutomirski -Signed-off-by: Paolo Bonzini ---- - arch/x86/kernel/kvm.c | 9 ++++++++- - arch/x86/kernel/kvmclock.c | 1 - - 2 files changed, 8 insertions(+), 2 deletions(-) - ---- a/arch/x86/kernel/kvm.c -+++ b/arch/x86/kernel/kvm.c -@@ -282,7 +282,14 @@ NOKPROBE_SYMBOL(do_async_page_fault); - static void __init paravirt_ops_setup(void) - { - pv_info.name = "KVM"; -- pv_info.paravirt_enabled = 1; -+ -+ /* -+ * KVM isn't paravirt in the sense of paravirt_enabled. A KVM -+ * guest kernel works like a bare metal kernel with additional -+ * features, and paravirt_enabled is about features that are -+ * missing. -+ */ -+ pv_info.paravirt_enabled = 0; - - if (kvm_para_has_feature(KVM_FEATURE_NOP_IO_DELAY)) - pv_cpu_ops.io_delay = kvm_io_delay; ---- a/arch/x86/kernel/kvmclock.c -+++ b/arch/x86/kernel/kvmclock.c -@@ -263,7 +263,6 @@ void __init kvmclock_init(void) - #endif - kvm_get_preset_lpj(); - clocksource_register_hz(&kvm_clock, NSEC_PER_SEC); -- pv_info.paravirt_enabled = 1; - pv_info.name = "KVM"; - - if (kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE_STABLE_BIT)) diff --git a/debian/patches/bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch b/debian/patches/bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch deleted file mode 100644 index bf7690eec..000000000 --- a/debian/patches/bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch +++ /dev/null @@ -1,75 +0,0 @@ -From: Andy Lutomirski -Date: Thu, 4 Dec 2014 16:48:16 -0800 -Subject: x86/tls: Validate TLS entries to protect espfix -Origin: https://git.kernel.org/linus/41bdc78544b8a93a9c6814b8bbbfef966272abbe - -Installing a 16-bit RW data segment into the GDT defeats espfix. -AFAICT this will not affect glibc, Wine, or dosemu at all. - -Signed-off-by: Andy Lutomirski -Acked-by: H. Peter Anvin -Cc: stable@vger.kernel.org -Cc: Konrad Rzeszutek Wilk -Cc: Linus Torvalds -Cc: security@kernel.org -Cc: Willy Tarreau -Signed-off-by: Ingo Molnar ---- - arch/x86/kernel/tls.c | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c -index f7fec09..e7650bd 100644 ---- a/arch/x86/kernel/tls.c -+++ b/arch/x86/kernel/tls.c -@@ -27,6 +27,21 @@ static int get_free_idx(void) - return -ESRCH; - } - -+static bool tls_desc_okay(const struct user_desc *info) -+{ -+ if (LDT_empty(info)) -+ return true; -+ -+ /* -+ * espfix is required for 16-bit data segments, but espfix -+ * only works for LDT segments. -+ */ -+ if (!info->seg_32bit) -+ return false; -+ -+ return true; -+} -+ - static void set_tls_desc(struct task_struct *p, int idx, - const struct user_desc *info, int n) - { -@@ -66,6 +81,9 @@ int do_set_thread_area(struct task_struct *p, int idx, - if (copy_from_user(&info, u_info, sizeof(info))) - return -EFAULT; - -+ if (!tls_desc_okay(&info)) -+ return -EINVAL; -+ - if (idx == -1) - idx = info.entry_number; - -@@ -192,6 +210,7 @@ int regset_tls_set(struct task_struct *target, const struct user_regset *regset, - { - struct user_desc infobuf[GDT_ENTRY_TLS_ENTRIES]; - const struct user_desc *info; -+ int i; - - if (pos >= GDT_ENTRY_TLS_ENTRIES * sizeof(struct user_desc) || - (pos % sizeof(struct user_desc)) != 0 || -@@ -205,6 +224,10 @@ int regset_tls_set(struct task_struct *target, const struct user_regset *regset, - else - info = infobuf; - -+ for (i = 0; i < count / sizeof(struct user_desc); i++) -+ if (!tls_desc_okay(info + i)) -+ return -EINVAL; -+ - set_tls_desc(target, - GDT_ENTRY_TLS_MIN + (pos / sizeof(struct user_desc)), - info, count / sizeof(struct user_desc)); diff --git a/debian/patches/bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch b/debian/patches/bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch deleted file mode 100644 index e426b726d..000000000 --- a/debian/patches/bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch +++ /dev/null @@ -1,304 +0,0 @@ -From: Andy Lutomirski -Date: Mon, 8 Dec 2014 13:55:20 -0800 -Subject: x86_64, switch_to(): Load TLS descriptors before switching DS and ES -Origin: https://git.kernel.org/linus/f647d7c155f069c1a068030255c300663516420e - -Otherwise, if buggy user code points DS or ES into the TLS -array, they would be corrupted after a context switch. - -This also significantly improves the comments and documents some -gotchas in the code. - -Before this patch, the both tests below failed. With this -patch, the es test passes, although the gsbase test still fails. - - ----- begin es test ----- - -/* - * Copyright (c) 2014 Andy Lutomirski - * GPL v2 - */ - -static unsigned short GDT3(int idx) -{ - return (idx << 3) | 3; -} - -static int create_tls(int idx, unsigned int base) -{ - struct user_desc desc = { - .entry_number = idx, - .base_addr = base, - .limit = 0xfffff, - .seg_32bit = 1, - .contents = 0, /* Data, grow-up */ - .read_exec_only = 0, - .limit_in_pages = 1, - .seg_not_present = 0, - .useable = 0, - }; - - if (syscall(SYS_set_thread_area, &desc) != 0) - err(1, "set_thread_area"); - - return desc.entry_number; -} - -int main() -{ - int idx = create_tls(-1, 0); - printf("Allocated GDT index %d\n", idx); - - unsigned short orig_es; - asm volatile ("mov %%es,%0" : "=rm" (orig_es)); - - int errors = 0; - int total = 1000; - for (int i = 0; i < total; i++) { - asm volatile ("mov %0,%%es" : : "rm" (GDT3(idx))); - usleep(100); - - unsigned short es; - asm volatile ("mov %%es,%0" : "=rm" (es)); - asm volatile ("mov %0,%%es" : : "rm" (orig_es)); - if (es != GDT3(idx)) { - if (errors == 0) - printf("[FAIL]\tES changed from 0x%hx to 0x%hx\n", - GDT3(idx), es); - errors++; - } - } - - if (errors) { - printf("[FAIL]\tES was corrupted %d/%d times\n", errors, total); - return 1; - } else { - printf("[OK]\tES was preserved\n"); - return 0; - } -} - - ----- end es test ----- - - ----- begin gsbase test ----- - -/* - * gsbase.c, a gsbase test - * Copyright (c) 2014 Andy Lutomirski - * GPL v2 - */ - -static unsigned char *testptr, *testptr2; - -static unsigned char read_gs_testvals(void) -{ - unsigned char ret; - asm volatile ("movb %%gs:%1, %0" : "=r" (ret) : "m" (*testptr)); - return ret; -} - -int main() -{ - int errors = 0; - - testptr = mmap((void *)0x200000000UL, 1, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS, -1, 0); - if (testptr == MAP_FAILED) - err(1, "mmap"); - - testptr2 = mmap((void *)0x300000000UL, 1, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS, -1, 0); - if (testptr2 == MAP_FAILED) - err(1, "mmap"); - - *testptr = 0; - *testptr2 = 1; - - if (syscall(SYS_arch_prctl, ARCH_SET_GS, - (unsigned long)testptr2 - (unsigned long)testptr) != 0) - err(1, "ARCH_SET_GS"); - - usleep(100); - - if (read_gs_testvals() == 1) { - printf("[OK]\tARCH_SET_GS worked\n"); - } else { - printf("[FAIL]\tARCH_SET_GS failed\n"); - errors++; - } - - asm volatile ("mov %0,%%gs" : : "r" (0)); - - if (read_gs_testvals() == 0) { - printf("[OK]\tWriting 0 to gs worked\n"); - } else { - printf("[FAIL]\tWriting 0 to gs failed\n"); - errors++; - } - - usleep(100); - - if (read_gs_testvals() == 0) { - printf("[OK]\tgsbase is still zero\n"); - } else { - printf("[FAIL]\tgsbase was corrupted\n"); - errors++; - } - - return errors == 0 ? 0 : 1; -} - - ----- end gsbase test ----- - -Signed-off-by: Andy Lutomirski -Cc: -Cc: Andi Kleen -Cc: Linus Torvalds -Link: http://lkml.kernel.org/r/509d27c9fec78217691c3dad91cec87e1006b34a.1418075657.git.luto@amacapital.net -Signed-off-by: Ingo Molnar ---- - arch/x86/kernel/process_64.c | 101 +++++++++++++++++++++++++++++++------------ - 1 file changed, 73 insertions(+), 28 deletions(-) - ---- a/arch/x86/kernel/process_64.c -+++ b/arch/x86/kernel/process_64.c -@@ -286,24 +286,9 @@ __switch_to(struct task_struct *prev_p, - - fpu = switch_fpu_prepare(prev_p, next_p, cpu); - -- /* -- * Reload esp0, LDT and the page table pointer: -- */ -+ /* Reload esp0 and ss1. */ - load_sp0(tss, next); - -- /* -- * Switch DS and ES. -- * This won't pick up thread selector changes, but I guess that is ok. -- */ -- savesegment(es, prev->es); -- if (unlikely(next->es | prev->es)) -- loadsegment(es, next->es); -- -- savesegment(ds, prev->ds); -- if (unlikely(next->ds | prev->ds)) -- loadsegment(ds, next->ds); -- -- - /* We must save %fs and %gs before load_TLS() because - * %fs and %gs may be cleared by load_TLS(). - * -@@ -312,41 +297,101 @@ __switch_to(struct task_struct *prev_p, - savesegment(fs, fsindex); - savesegment(gs, gsindex); - -+ /* -+ * Load TLS before restoring any segments so that segment loads -+ * reference the correct GDT entries. -+ */ - load_TLS(next, cpu); - - /* -- * Leave lazy mode, flushing any hypercalls made here. -- * This must be done before restoring TLS segments so -- * the GDT and LDT are properly updated, and must be -- * done before math_state_restore, so the TS bit is up -- * to date. -+ * Leave lazy mode, flushing any hypercalls made here. This -+ * must be done after loading TLS entries in the GDT but before -+ * loading segments that might reference them, and and it must -+ * be done before math_state_restore, so the TS bit is up to -+ * date. - */ - arch_end_context_switch(next_p); - -+ /* Switch DS and ES. -+ * -+ * Reading them only returns the selectors, but writing them (if -+ * nonzero) loads the full descriptor from the GDT or LDT. The -+ * LDT for next is loaded in switch_mm, and the GDT is loaded -+ * above. -+ * -+ * We therefore need to write new values to the segment -+ * registers on every context switch unless both the new and old -+ * values are zero. -+ * -+ * Note that we don't need to do anything for CS and SS, as -+ * those are saved and restored as part of pt_regs. -+ */ -+ savesegment(es, prev->es); -+ if (unlikely(next->es | prev->es)) -+ loadsegment(es, next->es); -+ -+ savesegment(ds, prev->ds); -+ if (unlikely(next->ds | prev->ds)) -+ loadsegment(ds, next->ds); -+ - /* - * Switch FS and GS. - * -- * Segment register != 0 always requires a reload. Also -- * reload when it has changed. When prev process used 64bit -- * base always reload to avoid an information leak. -+ * These are even more complicated than FS and GS: they have -+ * 64-bit bases are that controlled by arch_prctl. Those bases -+ * only differ from the values in the GDT or LDT if the selector -+ * is 0. -+ * -+ * Loading the segment register resets the hidden base part of -+ * the register to 0 or the value from the GDT / LDT. If the -+ * next base address zero, writing 0 to the segment register is -+ * much faster than using wrmsr to explicitly zero the base. -+ * -+ * The thread_struct.fs and thread_struct.gs values are 0 -+ * if the fs and gs bases respectively are not overridden -+ * from the values implied by fsindex and gsindex. They -+ * are nonzero, and store the nonzero base addresses, if -+ * the bases are overridden. -+ * -+ * (fs != 0 && fsindex != 0) || (gs != 0 && gsindex != 0) should -+ * be impossible. -+ * -+ * Therefore we need to reload the segment registers if either -+ * the old or new selector is nonzero, and we need to override -+ * the base address if next thread expects it to be overridden. -+ * -+ * This code is unnecessarily slow in the case where the old and -+ * new indexes are zero and the new base is nonzero -- it will -+ * unnecessarily write 0 to the selector before writing the new -+ * base address. -+ * -+ * Note: This all depends on arch_prctl being the only way that -+ * user code can override the segment base. Once wrfsbase and -+ * wrgsbase are enabled, most of this code will need to change. - */ - if (unlikely(fsindex | next->fsindex | prev->fs)) { - loadsegment(fs, next->fsindex); -+ - /* -- * Check if the user used a selector != 0; if yes -- * clear 64bit base, since overloaded base is always -- * mapped to the Null selector -+ * If user code wrote a nonzero value to FS, then it also -+ * cleared the overridden base address. -+ * -+ * XXX: if user code wrote 0 to FS and cleared the base -+ * address itself, we won't notice and we'll incorrectly -+ * restore the prior base address next time we reschdule -+ * the process. - */ - if (fsindex) - prev->fs = 0; - } -- /* when next process has a 64bit base use it */ - if (next->fs) - wrmsrl(MSR_FS_BASE, next->fs); - prev->fsindex = fsindex; - - if (unlikely(gsindex | next->gsindex | prev->gs)) { - load_gs_index(next->gsindex); -+ -+ /* This works (and fails) the same way as fsindex above. */ - if (gsindex) - prev->gs = 0; - } diff --git a/debian/patches/debian/add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch b/debian/patches/debian/add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch index 53f45b13d..568569418 100644 --- a/debian/patches/debian/add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch +++ b/debian/patches/debian/add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch @@ -15,7 +15,7 @@ Signed-off-by: Serge Hallyn --- --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -83,6 +83,11 @@ +@@ -86,6 +86,11 @@ #define CREATE_TRACE_POINTS #include @@ -27,7 +27,7 @@ Signed-off-by: Serge Hallyn /* * Protected counters by write_lock_irq(&tasklist_lock) -@@ -1144,6 +1149,10 @@ static struct task_struct *copy_process( +@@ -1149,6 +1154,10 @@ static struct task_struct *copy_process( if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) return ERR_PTR(-EINVAL); @@ -38,7 +38,7 @@ Signed-off-by: Serge Hallyn /* * Thread groups must share signals as well, and detached threads * can only be started up within the thread group. -@@ -1831,6 +1840,12 @@ SYSCALL_DEFINE1(unshare, unsigned long, +@@ -1843,6 +1852,12 @@ SYSCALL_DEFINE1(unshare, unsigned long, if (unshare_flags & CLONE_NEWNS) unshare_flags |= CLONE_FS; @@ -53,7 +53,7 @@ Signed-off-by: Serge Hallyn goto bad_unshare_out; --- a/kernel/sysctl.c +++ b/kernel/sysctl.c -@@ -104,6 +104,9 @@ extern int core_uses_pid; +@@ -103,6 +103,9 @@ extern int core_uses_pid; extern char core_pattern[]; extern unsigned int core_pipe_limit; #endif @@ -63,7 +63,7 @@ Signed-off-by: Serge Hallyn extern int pid_max; extern int pid_max_min, pid_max_max; extern int percpu_pagelist_fraction; -@@ -482,6 +485,15 @@ static struct ctl_table kern_table[] = { +@@ -489,6 +492,15 @@ static struct ctl_table kern_table[] = { .mode = 0644, .proc_handler = proc_dointvec, }, @@ -89,5 +89,5 @@ Signed-off-by: Serge Hallyn +int unprivileged_userns_clone; + static struct kmem_cache *user_ns_cachep __read_mostly; + static DEFINE_MUTEX(userns_state_mutex); - static bool new_idmap_permitted(const struct file *file, diff --git a/debian/patches/debian/userns-fix-abi-change-in-3.16.7-ckt4.patch b/debian/patches/debian/userns-fix-abi-change-in-3.16.7-ckt4.patch new file mode 100644 index 000000000..017392155 --- /dev/null +++ b/debian/patches/debian/userns-fix-abi-change-in-3.16.7-ckt4.patch @@ -0,0 +1,45 @@ +From: Ben Hutchings +Date: Thu, 15 Jan 2015 23:16:35 +0000 +Subject: userns: Fix ABI change in 3.16.7-ckt4 +Forwarded: not-needed + +The fix for CVE-2014-8989 added a new member to struct user_namespace. +This is always allocated, and the new member is always used, in +non-modular code. Move it to the end of the structure and hide it +from genksyms. + +Also hide the new #include in kernel/groups.c. + +--- +--- a/include/linux/user_namespace.h ++++ b/include/linux/user_namespace.h +@@ -31,13 +31,16 @@ struct user_namespace { + kuid_t owner; + kgid_t group; + unsigned int proc_inum; +- unsigned long flags; + + /* Register of per-UID persistent keyrings for this namespace */ + #ifdef CONFIG_PERSISTENT_KEYRINGS + struct key *persistent_keyring_register; + struct rw_semaphore persistent_keyring_register_sem; + #endif ++ ++#ifndef __GENKSYMS__ ++ unsigned long flags; ++#endif + }; + + extern struct user_namespace init_user_ns; +--- a/kernel/groups.c ++++ b/kernel/groups.c +@@ -6,7 +6,9 @@ + #include + #include + #include ++#ifndef __GENKSYMS__ + #include ++#endif + #include + + /* init to 2 - one for init_task, one to ensure it is never freed */ diff --git a/debian/patches/features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch b/debian/patches/features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch deleted file mode 100644 index 9caf443ea..000000000 --- a/debian/patches/features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch +++ /dev/null @@ -1,124 +0,0 @@ -From: Mika Westerberg -Date: Tue, 17 Jun 2014 14:02:00 -0700 -Subject: platform/chrome: chromeos_laptop - Add support for Acer C720 -Origin: https://git.kernel.org/linus/da3b0ab75aadab63d1ffd5563100c9386e444dad - -Acer C720 has touchpad and light sensor connected to a separate I2C buses. -Since the designware I2C host controller driver has two instances on this -particular machine we need a way to match the correct instance. Add support -for this and then register both C720 touchpad and light sensor. - -This code is based on following patch from Benson Leung: - -https://patchwork.kernel.org/patch/3074411/ - -Signed-off-by: Mika Westerberg -Tested-by: Kirill A. Shutemov -Signed-off-by: Benson Leung -Reviewed-by: Mika Westerberg -Signed-off-by: Olof Johansson ---- - drivers/platform/chrome/chromeos_laptop.c | 45 ++++++++++++++++++++++++++----- - 1 file changed, 39 insertions(+), 6 deletions(-) - -diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c -index 7f1a2e2..a241e5f 100644 ---- a/drivers/platform/chrome/chromeos_laptop.c -+++ b/drivers/platform/chrome/chromeos_laptop.c -@@ -45,6 +45,8 @@ static const char *i2c_adapter_names[] = { - "SMBus I801 adapter", - "i915 gmbus vga", - "i915 gmbus panel", -+ "i2c-designware-pci", -+ "i2c-designware-pci", - }; - - /* Keep this enum consistent with i2c_adapter_names */ -@@ -52,6 +54,8 @@ enum i2c_adapter_type { - I2C_ADAPTER_SMBUS = 0, - I2C_ADAPTER_VGADDC, - I2C_ADAPTER_PANEL, -+ I2C_ADAPTER_DESIGNWARE_0, -+ I2C_ADAPTER_DESIGNWARE_1, - }; - - struct i2c_peripheral { -@@ -172,29 +176,42 @@ static struct i2c_client *__add_probed_i2c_device( - return client; - } - -+struct i2c_lookup { -+ const char *name; -+ int instance; -+ int n; -+}; -+ - static int __find_i2c_adap(struct device *dev, void *data) - { -- const char *name = data; -+ struct i2c_lookup *lookup = data; - static const char *prefix = "i2c-"; - struct i2c_adapter *adapter; - if (strncmp(dev_name(dev), prefix, strlen(prefix)) != 0) - return 0; - adapter = to_i2c_adapter(dev); -- return (strncmp(adapter->name, name, strlen(name)) == 0); -+ if (strncmp(adapter->name, lookup->name, strlen(lookup->name)) == 0 && -+ lookup->n++ == lookup->instance) -+ return 1; -+ return 0; - } - - static int find_i2c_adapter_num(enum i2c_adapter_type type) - { - struct device *dev = NULL; - struct i2c_adapter *adapter; -- const char *name = i2c_adapter_names[type]; -+ struct i2c_lookup lookup; -+ -+ memset(&lookup, 0, sizeof(lookup)); -+ lookup.name = i2c_adapter_names[type]; -+ lookup.instance = (type == I2C_ADAPTER_DESIGNWARE_1) ? 1 : 0; -+ - /* find the adapter by name */ -- dev = bus_find_device(&i2c_bus_type, NULL, (void *)name, -- __find_i2c_adap); -+ dev = bus_find_device(&i2c_bus_type, NULL, &lookup, __find_i2c_adap); - if (!dev) { - /* Adapters may appear later. Deferred probing will retry */ - pr_notice("%s: i2c adapter %s not found on system.\n", __func__, -- name); -+ lookup.name); - return -ENODEV; - } - adapter = to_i2c_adapter(dev); -@@ -377,6 +394,15 @@ static struct chromeos_laptop acer_ac700 = { - }, - }; - -+static struct chromeos_laptop acer_c720 = { -+ .i2c_peripherals = { -+ /* Touchpad. */ -+ { .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 }, -+ /* Light Sensor. */ -+ { .add = setup_isl29018_als, I2C_ADAPTER_DESIGNWARE_1 }, -+ }, -+}; -+ - static struct chromeos_laptop hp_pavilion_14_chromebook = { - .i2c_peripherals = { - /* Touchpad. */ -@@ -434,6 +460,13 @@ static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = { - _CBDD(acer_ac700), - }, - { -+ .ident = "Acer C720", -+ .matches = { -+ DMI_MATCH(DMI_PRODUCT_NAME, "Peppy"), -+ }, -+ _CBDD(acer_c720), -+ }, -+ { - .ident = "HP Pavilion 14 Chromebook", - .matches = { - DMI_MATCH(DMI_PRODUCT_NAME, "Butterfly"), diff --git a/debian/patches/series b/debian/patches/series index 6dd2b6677..4dd02191d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -51,17 +51,12 @@ bugfix/arm/omap-musb-choice.patch bugfix/mips/disable-advansys.patch bugfix/arm/ixp4xx_iobe.patch bugfix/m68k/ethernat-kconfig.patch -bugfix/s390/s390-3215-fix-hanging-console-issue.patch -bugfix/s390/s390-3215-fix-tty-output-containing-tabs.patch bugfix/x86/drm-i915-initialise-userptr-mmu_notifier-serial-to-1.patch bugfix/x86/drm-i915-Add-some-L3-registers-to-the-parser-whiteli.patch bugfix/parisc/parisc-reduce-sigrtmin-from-37-to-32-to-behave-like-.patch bugfix/arm64/arm64-add-missing-dts-entry-for-X-Gene-platform.patch bugfix/arm64/arm64-removed-using-of-the-mask-attribute-in-the-dts.patch bugfix/x86/acpi-video-run-_bcl-before-deciding-registering-back.patch -bugfix/x86/x86-tls-validate-tls-entries-to-protect-espfix.patch -bugfix/x86/x86-kvm-clear-paravirt_enabled-on-kvm-guests-for-esp.patch -bugfix/x86/x86_64-switch_to-load-tls-descriptors-before-switchi.patch # Arch features features/mips/MIPS-Support-hard-limit-of-cpu-count-nr_cpu_ids.patch @@ -128,7 +123,6 @@ features/arm64/drivers-net-xgene-fix-Use-separate-resources.patch features/arm64/dtb-Add-10GbE-node-to-APM-X-Gene-SoC-device-tree.patch features/arm64/dtb-Add-SGMII-based-1GbE-node-to-APM-X-Gene-SoC-devi.patch features/arm64/dtb-xgene-fix-Backward-compatibility-with-older-firm.patch -features/x86/platform-chrome-chromeos_laptop-add-support-for-acer.patch # Miscellaneous bug fixes bugfix/all/misc-bmp085-Enable-building-as-a-module.patch @@ -156,13 +150,7 @@ bugfix/all/xen-netback-Disable-NAPI-after-disabling-interrupts.patch bugfix/all/xen-netback-do-not-report-success-if-backend_create_.patch bugfix/all/netback-don-t-store-invalid-vif-pointer.patch bugfix/all/xen-netback-support-frontends-without-feature-rx-not.patch -bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch -bugfix/all/batman-adv-calculate-extra-tail-size-based-on-queued.patch -bugfix/all/keys-close-race-between-key-lookup-and-freeing.patch -bugfix/all/isofs-fix-unchecked-printing-of-er-records.patch -bugfix/all/move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch bugfix/all/aufs-move-d_rcu-from-overlapping-d_child-to-overlapping-d.patch -bugfix/all/deal-with-deadlock-in-d_walk.patch bugfix/all/net-mv643xx-disable-tso-by-default.patch # memfd_create() & kdbus backport @@ -497,3 +485,4 @@ debian/perf-fix-abi-change-in-3.16.7-ckt2.patch debian/arm-thread_info-fix-abi-change-in-3.16.7-ckt3.patch debian/pci-fix-abi-change-in-3.16.7-ckt3.patch debian/vfs-avoid-abi-change-for-dentry-union-changes.patch +debian/userns-fix-abi-change-in-3.16.7-ckt4.patch From ca7ceedfad928f06e8e00c7b403810d866143de3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 16 Jan 2015 00:15:01 +0000 Subject: [PATCH 42/43] Add two security fixes svn path=/dists/sid/linux/; revision=22262 --- debian/changelog | 3 + ...ack-disable-generic-tracking-for-kno.patch | 87 ++++++++++++ ...the-vdso-address-randomization-algor.patch | 124 ++++++++++++++++++ debian/patches/series | 2 + 4 files changed, 216 insertions(+) create mode 100644 debian/patches/bugfix/all/netfilter-conntrack-disable-generic-tracking-for-kno.patch create mode 100644 debian/patches/bugfix/x86/x86_64-vdso-fix-the-vdso-address-randomization-algor.patch diff --git a/debian/changelog b/debian/changelog index 88349f0fd..b459048bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -265,6 +265,9 @@ linux (3.16.7-ckt4-1) UNRELEASED; urgency=medium (Closes: #748398) (thanks to John Paul Adrian Glaubitz for thoroughly testing this change) * userns: Fix ABI change in 3.16.7-ckt4 + * netfilter: conntrack: disable generic tracking for known protocols + (CVE-2014-8160) + * [amd64] vdso: Fix the vdso address randomization algorithm (CVE-2014-9585) [ Ian Campbell ] * [armhf] Enable support for support OMAP5432 uEVM by enabling: diff --git a/debian/patches/bugfix/all/netfilter-conntrack-disable-generic-tracking-for-kno.patch b/debian/patches/bugfix/all/netfilter-conntrack-disable-generic-tracking-for-kno.patch new file mode 100644 index 000000000..ede639194 --- /dev/null +++ b/debian/patches/bugfix/all/netfilter-conntrack-disable-generic-tracking-for-kno.patch @@ -0,0 +1,87 @@ +From: Florian Westphal +Date: Fri, 26 Sep 2014 11:35:42 +0200 +Subject: netfilter: conntrack: disable generic tracking for known protocols +Origin: https://git.kernel.org/linus/db29a9508a9246e77087c5531e45b2c88ec6988b + +Given following iptables ruleset: + +-P FORWARD DROP +-A FORWARD -m sctp --dport 9 -j ACCEPT +-A FORWARD -p tcp --dport 80 -j ACCEPT +-A FORWARD -p tcp -m conntrack -m state ESTABLISHED,RELATED -j ACCEPT + +One would assume that this allows SCTP on port 9 and TCP on port 80. +Unfortunately, if the SCTP conntrack module is not loaded, this allows +*all* SCTP communication, to pass though, i.e. -p sctp -j ACCEPT, +which we think is a security issue. + +This is because on the first SCTP packet on port 9, we create a dummy +"generic l4" conntrack entry without any port information (since +conntrack doesn't know how to extract this information). + +All subsequent packets that are unknown will then be in established +state since they will fallback to proto_generic and will match the +'generic' entry. + +Our originally proposed version [1] completely disabled generic protocol +tracking, but Jozsef suggests to not track protocols for which a more +suitable helper is available, hence we now mitigate the issue for in +tree known ct protocol helpers only, so that at least NAT and direction +information will still be preserved for others. + + [1] http://www.spinics.net/lists/netfilter-devel/msg33430.html + +Joint work with Daniel Borkmann. + +Signed-off-by: Florian Westphal +Signed-off-by: Daniel Borkmann +Acked-by: Jozsef Kadlecsik +Signed-off-by: Pablo Neira Ayuso +--- + net/netfilter/nf_conntrack_proto_generic.c | 26 +++++++++++++++++++++++++- + 1 file changed, 25 insertions(+), 1 deletion(-) + +diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c +index d25f293..957c1db 100644 +--- a/net/netfilter/nf_conntrack_proto_generic.c ++++ b/net/netfilter/nf_conntrack_proto_generic.c +@@ -14,6 +14,30 @@ + + static unsigned int nf_ct_generic_timeout __read_mostly = 600*HZ; + ++static bool nf_generic_should_process(u8 proto) ++{ ++ switch (proto) { ++#ifdef CONFIG_NF_CT_PROTO_SCTP_MODULE ++ case IPPROTO_SCTP: ++ return false; ++#endif ++#ifdef CONFIG_NF_CT_PROTO_DCCP_MODULE ++ case IPPROTO_DCCP: ++ return false; ++#endif ++#ifdef CONFIG_NF_CT_PROTO_GRE_MODULE ++ case IPPROTO_GRE: ++ return false; ++#endif ++#ifdef CONFIG_NF_CT_PROTO_UDPLITE_MODULE ++ case IPPROTO_UDPLITE: ++ return false; ++#endif ++ default: ++ return true; ++ } ++} ++ + static inline struct nf_generic_net *generic_pernet(struct net *net) + { + return &net->ct.nf_ct_proto.generic; +@@ -67,7 +91,7 @@ static int generic_packet(struct nf_conn *ct, + static bool generic_new(struct nf_conn *ct, const struct sk_buff *skb, + unsigned int dataoff, unsigned int *timeouts) + { +- return true; ++ return nf_generic_should_process(nf_ct_protonum(ct)); + } + + #if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT) diff --git a/debian/patches/bugfix/x86/x86_64-vdso-fix-the-vdso-address-randomization-algor.patch b/debian/patches/bugfix/x86/x86_64-vdso-fix-the-vdso-address-randomization-algor.patch new file mode 100644 index 000000000..76a33ae26 --- /dev/null +++ b/debian/patches/bugfix/x86/x86_64-vdso-fix-the-vdso-address-randomization-algor.patch @@ -0,0 +1,124 @@ +From: Andy Lutomirski +Date: Fri, 19 Dec 2014 16:04:11 -0800 +Subject: x86_64, vdso: Fix the vdso address randomization algorithm +Origin: https://git.kernel.org/linus/394f56fe480140877304d342dec46d50dc823d46 + +The theory behind vdso randomization is that it's mapped at a random +offset above the top of the stack. To avoid wasting a page of +memory for an extra page table, the vdso isn't supposed to extend +past the lowest PMD into which it can fit. Other than that, the +address should be a uniformly distributed address that meets all of +the alignment requirements. + +The current algorithm is buggy: the vdso has about a 50% probability +of being at the very end of a PMD. The current algorithm also has a +decent chance of failing outright due to incorrect handling of the +case where the top of the stack is near the top of its PMD. + +This fixes the implementation. The paxtest estimate of vdso +"randomisation" improves from 11 bits to 18 bits. (Disclaimer: I +don't know what the paxtest code is actually calculating.) + +It's worth noting that this algorithm is inherently biased: the vdso +is more likely to end up near the end of its PMD than near the +beginning. Ideally we would either nix the PMD sharing requirement +or jointly randomize the vdso and the stack to reduce the bias. + +In the mean time, this is a considerable improvement with basically +no risk of compatibility issues, since the allowed outputs of the +algorithm are unchanged. + +As an easy test, doing this: + +for i in `seq 10000` + do grep -P vdso /proc/self/maps |cut -d- -f1 +done |sort |uniq -d + +used to produce lots of output (1445 lines on my most recent run). +A tiny subset looks like this: + +7fffdfffe000 +7fffe01fe000 +7fffe05fe000 +7fffe07fe000 +7fffe09fe000 +7fffe0bfe000 +7fffe0dfe000 + +Note the suspicious fe000 endings. With the fix, I get a much more +palatable 76 repeated addresses. + +Reviewed-by: Kees Cook +Cc: stable@vger.kernel.org +Signed-off-by: Andy Lutomirski +--- + arch/x86/vdso/vma.c | 45 +++++++++++++++++++++++++++++---------------- + 1 file changed, 29 insertions(+), 16 deletions(-) + +--- a/arch/x86/vdso/vma.c ++++ b/arch/x86/vdso/vma.c +@@ -54,12 +54,17 @@ subsys_initcall(init_vdso); + + struct linux_binprm; + +-/* Put the vdso above the (randomized) stack with another randomized offset. +- This way there is no hole in the middle of address space. +- To save memory make sure it is still in the same PTE as the stack top. +- This doesn't give that many random bits. +- +- Only used for the 64-bit and x32 vdsos. */ ++/* ++ * Put the vdso above the (randomized) stack with another randomized ++ * offset. This way there is no hole in the middle of address space. ++ * To save memory make sure it is still in the same PTE as the stack ++ * top. This doesn't give that many random bits. ++ * ++ * Note that this algorithm is imperfect: the distribution of the vdso ++ * start address within a PMD is biased toward the end. ++ * ++ * Only used for the 64-bit and x32 vdsos. ++ */ + static unsigned long vdso_addr(unsigned long start, unsigned len) + { + #ifdef CONFIG_X86_32 +@@ -67,22 +72,30 @@ static unsigned long vdso_addr(unsigned + #else + unsigned long addr, end; + unsigned offset; +- end = (start + PMD_SIZE - 1) & PMD_MASK; ++ ++ /* ++ * Round up the start address. It can start out unaligned as a result ++ * of stack start randomization. ++ */ ++ start = PAGE_ALIGN(start); ++ ++ /* Round the lowest possible end address up to a PMD boundary. */ ++ end = (start + len + PMD_SIZE - 1) & PMD_MASK; + if (end >= TASK_SIZE_MAX) + end = TASK_SIZE_MAX; + end -= len; +- /* This loses some more bits than a modulo, but is cheaper */ +- offset = get_random_int() & (PTRS_PER_PTE - 1); +- addr = start + (offset << PAGE_SHIFT); +- if (addr >= end) +- addr = end; ++ ++ if (end > start) { ++ offset = get_random_int() % (((end - start) >> PAGE_SHIFT) + 1); ++ addr = start + (offset << PAGE_SHIFT); ++ } else { ++ addr = start; ++ } + + /* +- * page-align it here so that get_unmapped_area doesn't +- * align it wrongfully again to the next page. addr can come in 4K +- * unaligned here as a result of stack start randomization. ++ * Forcibly align the final address in case we have a hardware ++ * issue that requires alignment for performance reasons. + */ +- addr = PAGE_ALIGN(addr); + addr = align_vdso_addr(addr); + + return addr; diff --git a/debian/patches/series b/debian/patches/series index 4dd02191d..506d74a5a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -486,3 +486,5 @@ debian/arm-thread_info-fix-abi-change-in-3.16.7-ckt3.patch debian/pci-fix-abi-change-in-3.16.7-ckt3.patch debian/vfs-avoid-abi-change-for-dentry-union-changes.patch debian/userns-fix-abi-change-in-3.16.7-ckt4.patch +bugfix/all/netfilter-conntrack-disable-generic-tracking-for-kno.patch +bugfix/x86/x86_64-vdso-fix-the-vdso-address-randomization-algor.patch From 62b7971540866e2d63256140ff1324dfc1cce8b6 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 16 Jan 2015 02:01:31 +0000 Subject: [PATCH 43/43] Prepare to release linux (3.16.7-ckt4-1). svn path=/dists/sid/linux/; revision=22263 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b459048bb..d3bf4d52d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux (3.16.7-ckt4-1) UNRELEASED; urgency=medium +linux (3.16.7-ckt4-1) unstable; urgency=medium * New upstream stable update: http://kernel.ubuntu.com/stable/ChangeLog-3.16.7-ckt3 @@ -299,7 +299,7 @@ linux (3.16.7-ckt4-1) UNRELEASED; urgency=medium * Disable TSO in mv643xx_eth driver by default again, since previous fix appears to not work on all platforms (Closes: #764162). - -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000 + -- Ben Hutchings Fri, 16 Jan 2015 00:15:12 +0000 linux (3.16.7-ckt2-1) unstable; urgency=high