From eb41819c9142b2d06c861d33982174acf9f7cbc4 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 8 Mar 2016 11:37:02 +0000 Subject: [PATCH 01/27] [ppc64el] Suppress false-positive ABI change detected after fixing #808043 --- debian/changelog | 7 +++++++ debian/config/ppc64el/defines | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/debian/changelog b/debian/changelog index cb8ebd0a5..8b36ae948 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux (4.4.4-2) UNRELEASED; urgency=medium + + * [ppc64el] Suppress false-positive ABI change detected after fixing #808043 + (fixes FTBFS) + + -- Ben Hutchings Tue, 08 Mar 2016 11:36:41 +0000 + linux (4.4.4-1) unstable; urgency=medium [ Salvatore Bonaccorso ] diff --git a/debian/config/ppc64el/defines b/debian/config/ppc64el/defines index 987ab7df1..815971bad 100644 --- a/debian/config/ppc64el/defines +++ b/debian/config/ppc64el/defines @@ -1,3 +1,8 @@ +[abi] +ignore-changes: +# This symbol is magic - see bugfix/powerpc/powerpc-simplify-module-toc-handling.patch + TOC. + [base] flavours: powerpc64le From 7501823f99e181a53f88bba845218788dc6e3338 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 8 Mar 2016 11:37:52 +0000 Subject: [PATCH 02/27] Ignore ABI changes in sdhci* modules (fixes FTBFS on armhf) --- debian/changelog | 1 + debian/config/defines | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8b36ae948..72aa5a354 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ linux (4.4.4-2) UNRELEASED; urgency=medium * [ppc64el] Suppress false-positive ABI change detected after fixing #808043 (fixes FTBFS) + * Ignore ABI changes in sdhci* modules (fixes FTBFS on armhf) -- Ben Hutchings Tue, 08 Mar 2016 11:36:41 +0000 diff --git a/debian/config/defines b/debian/config/defines index c9eb92218..4101815aa 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -14,6 +14,7 @@ ignore-changes: module:drivers/hv/hv_vmbus module:drivers/md/dm-snapshot module:drivers/mmc/host/sdhci + module:drivers/mmc/host/sdhci* module:net/ceph/libceph [base] From ad4d5a01527e9653e39d08921c044a69d846e872 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 8 Mar 2016 11:39:34 +0000 Subject: [PATCH 03/27] udeb: Add dependency from mmc-modules to crc-modules (fixes FTBFS on arm64) --- debian/changelog | 1 + debian/installer/package-list | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 72aa5a354..a8b6ace76 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ linux (4.4.4-2) UNRELEASED; urgency=medium * [ppc64el] Suppress false-positive ABI change detected after fixing #808043 (fixes FTBFS) * Ignore ABI changes in sdhci* modules (fixes FTBFS on armhf) + * udeb: Add dependency from mmc-modules to crc-modules (fixes FTBFS on arm64) -- Ben Hutchings Tue, 08 Mar 2016 11:36:41 +0000 diff --git a/debian/installer/package-list b/debian/installer/package-list index f51c4436b..874264295 100644 --- a/debian/installer/package-list +++ b/debian/installer/package-list @@ -300,7 +300,7 @@ Description: MMC/SD/SDIO core modules This package contains core modules for MMC/SD/SDIO support. Package: mmc-modules -Depends: kernel-image, core-modules, mmc-core-modules, usb-modules +Depends: kernel-image, core-modules, mmc-core-modules, usb-modules, crc-modules Priority: extra Description: MMC/SD card modules This package contains modules needed to support MMC (multimedia) and From ba86c1fe494908af841ce0345ecd57948a17337c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 8 Mar 2016 20:00:14 +0000 Subject: [PATCH 04/27] [hppa] Ignore ABI changes in built-in drm_kms_helper code (fixes FTBFS) --- debian/changelog | 1 + debian/config/hppa/defines | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index a8b6ace76..28efd05f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ linux (4.4.4-2) UNRELEASED; urgency=medium (fixes FTBFS) * Ignore ABI changes in sdhci* modules (fixes FTBFS on armhf) * udeb: Add dependency from mmc-modules to crc-modules (fixes FTBFS on arm64) + * [hppa] Ignore ABI changes in built-in drm_kms_helper code (fixes FTBFS) -- Ben Hutchings Tue, 08 Mar 2016 11:36:41 +0000 diff --git a/debian/config/hppa/defines b/debian/config/hppa/defines index b8572021c..105fda434 100644 --- a/debian/config/hppa/defines +++ b/debian/config/hppa/defines @@ -1,3 +1,8 @@ +[abi] +ignore-changes: +# drm is built-in on hppa so listing the drm_kms_helper module doesn't work + drm_dp_* + [base] flavours: parisc parisc64-smp kernel-arch: parisc From f909b077b65c74a8677c7a0b4f4a440563abdc24 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 9 Mar 2016 02:12:55 +0000 Subject: [PATCH 05/27] [powerpc*] Revert "powerpc: Simplify module TOC handling" It is not needed to fix #808043 and causes a regression on ppc64el. See http://thread.gmane.org/gmane.linux.kernel.stable/166201/focus=166415 --- debian/changelog | 4 +- debian/config/ppc64el/defines | 5 - ...werpc-fix-dedotify-for-binutils-2.26.patch | 12 +- ...powerpc-simplify-module-toc-handling.patch | 125 ------------------ debian/patches/series | 1 - 5 files changed, 7 insertions(+), 140 deletions(-) delete mode 100644 debian/patches/bugfix/powerpc/powerpc-simplify-module-toc-handling.patch diff --git a/debian/changelog b/debian/changelog index 28efd05f9..524b178ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ linux (4.4.4-2) UNRELEASED; urgency=medium - * [ppc64el] Suppress false-positive ABI change detected after fixing #808043 - (fixes FTBFS) * Ignore ABI changes in sdhci* modules (fixes FTBFS on armhf) * udeb: Add dependency from mmc-modules to crc-modules (fixes FTBFS on arm64) * [hppa] Ignore ABI changes in built-in drm_kms_helper code (fixes FTBFS) + * [powerpc*] Revert "powerpc: Simplify module TOC handling"; it is not needed + to fix #808043 and causes a regression on ppc64el -- Ben Hutchings Tue, 08 Mar 2016 11:36:41 +0000 diff --git a/debian/config/ppc64el/defines b/debian/config/ppc64el/defines index 815971bad..987ab7df1 100644 --- a/debian/config/ppc64el/defines +++ b/debian/config/ppc64el/defines @@ -1,8 +1,3 @@ -[abi] -ignore-changes: -# This symbol is magic - see bugfix/powerpc/powerpc-simplify-module-toc-handling.patch - TOC. - [base] flavours: powerpc64le diff --git a/debian/patches/bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch b/debian/patches/bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch index a438f560a..fb93c4a5c 100644 --- a/debian/patches/bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch +++ b/debian/patches/bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch @@ -19,16 +19,14 @@ Signed-off-by: Michael Ellerman arch/powerpc/kernel/module_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c -index ac64ffdb52c8..08b7a40de5f8 100644 --- a/arch/powerpc/kernel/module_64.c +++ b/arch/powerpc/kernel/module_64.c -@@ -340,7 +340,7 @@ static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab) - if (name[0] == '.') { - if (strcmp(name+1, "TOC.") == 0) - syms[i].st_shndx = SHN_ABS; +@@ -335,7 +335,7 @@ static void dedotify(Elf64_Sym *syms, un + if (syms[i].st_shndx == SHN_UNDEF) { + char *name = strtab + syms[i].st_name; + if (name[0] == '.') - memmove(name, name+1, strlen(name)); + syms[i].st_name++; - } } } + } diff --git a/debian/patches/bugfix/powerpc/powerpc-simplify-module-toc-handling.patch b/debian/patches/bugfix/powerpc/powerpc-simplify-module-toc-handling.patch deleted file mode 100644 index 3caeb018f..000000000 --- a/debian/patches/bugfix/powerpc/powerpc-simplify-module-toc-handling.patch +++ /dev/null @@ -1,125 +0,0 @@ -From: Alan Modra -Date: Fri, 15 Jan 2016 20:52:22 +1100 -Subject: powerpc: Simplify module TOC handling -Origin: https://git.kernel.org/linus/c153693d7eb9eeb28478aa2deaaf0b4e7b5ff5e9 - -PowerPC64 uses the symbol .TOC. much as other targets use -_GLOBAL_OFFSET_TABLE_. It identifies the value of the GOT pointer (or in -powerpc parlance, the TOC pointer). Global offset tables are generally -local to an executable or shared library, or in the kernel, module. Thus -it does not make sense for a module to resolve a relocation against -.TOC. to the kernel's .TOC. value. A module has its own .TOC., and -indeed the powerpc64 module relocation processing ignores the kernel -value of .TOC. and instead calculates a module-local value. - -This patch removes code involved in exporting the kernel .TOC., tweaks -modpost to ignore an undefined .TOC., and the module loader to twiddle -the section symbol so that .TOC. isn't seen as undefined. - -Note that if the kernel was compiled with -msingle-pic-base then ELFv2 -would not have function global entry code setting up r2. In that case -the module call stubs would need to be modified to set up r2 using the -kernel .TOC. value, requiring some of this code to be reinstated. - -mpe: Furthermore a change in binutils master (not yet released) causes -the current way we handle the TOC to no longer work when building with -MODVERSIONS=y and RELOCATABLE=n. The symptom is that modules can not be -loaded due to there being no version found for TOC. - -Cc: stable@vger.kernel.org # 3.16+ -Signed-off-by: Alan Modra -Signed-off-by: Michael Ellerman ---- - arch/powerpc/kernel/misc_64.S | 28 ---------------------------- - arch/powerpc/kernel/module_64.c | 12 +++++++++--- - scripts/mod/modpost.c | 3 ++- - 3 files changed, 11 insertions(+), 32 deletions(-) - -diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S -index db475d41b57a..f28754c497e5 100644 ---- a/arch/powerpc/kernel/misc_64.S -+++ b/arch/powerpc/kernel/misc_64.S -@@ -701,31 +701,3 @@ _GLOBAL(kexec_sequence) - li r5,0 - blr /* image->start(physid, image->start, 0); */ - #endif /* CONFIG_KEXEC */ -- --#ifdef CONFIG_MODULES --#if defined(_CALL_ELF) && _CALL_ELF == 2 -- --#ifdef CONFIG_MODVERSIONS --.weak __crc_TOC. --.section "___kcrctab+TOC.","a" --.globl __kcrctab_TOC. --__kcrctab_TOC.: -- .llong __crc_TOC. --#endif -- --/* -- * Export a fake .TOC. since both modpost and depmod will complain otherwise. -- * Both modpost and depmod strip the leading . so we do the same here. -- */ --.section "__ksymtab_strings","a" --__kstrtab_TOC.: -- .asciz "TOC." -- --.section "___ksymtab+TOC.","a" --/* This symbol name is important: it's used by modpost to find exported syms */ --.globl __ksymtab_TOC. --__ksymtab_TOC.: -- .llong 0 /* .value */ -- .llong __kstrtab_TOC. --#endif /* ELFv2 */ --#endif /* MODULES */ -diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c -index 59663af9315f..ac64ffdb52c8 100644 ---- a/arch/powerpc/kernel/module_64.c -+++ b/arch/powerpc/kernel/module_64.c -@@ -326,7 +326,10 @@ static void dedotify_versions(struct modversion_info *vers, - } - } - --/* Undefined symbols which refer to .funcname, hack to funcname (or .TOC.) */ -+/* -+ * Undefined symbols which refer to .funcname, hack to funcname. Make .TOC. -+ * seem to be defined (value set later). -+ */ - static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab) - { - unsigned int i; -@@ -334,8 +337,11 @@ static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab) - for (i = 1; i < numsyms; i++) { - if (syms[i].st_shndx == SHN_UNDEF) { - char *name = strtab + syms[i].st_name; -- if (name[0] == '.') -+ if (name[0] == '.') { -+ if (strcmp(name+1, "TOC.") == 0) -+ syms[i].st_shndx = SHN_ABS; - memmove(name, name+1, strlen(name)); -+ } - } - } - } -@@ -351,7 +357,7 @@ static Elf64_Sym *find_dot_toc(Elf64_Shdr *sechdrs, - numsyms = sechdrs[symindex].sh_size / sizeof(Elf64_Sym); - - for (i = 1; i < numsyms; i++) { -- if (syms[i].st_shndx == SHN_UNDEF -+ if (syms[i].st_shndx == SHN_ABS - && strcmp(strtab + syms[i].st_name, "TOC.") == 0) - return &syms[i]; - } -diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c -index e080746e1a6b..48958d3cec9e 100644 ---- a/scripts/mod/modpost.c -+++ b/scripts/mod/modpost.c -@@ -594,7 +594,8 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname) - if (strncmp(symname, "_restgpr0_", sizeof("_restgpr0_") - 1) == 0 || - strncmp(symname, "_savegpr0_", sizeof("_savegpr0_") - 1) == 0 || - strncmp(symname, "_restvr_", sizeof("_restvr_") - 1) == 0 || -- strncmp(symname, "_savevr_", sizeof("_savevr_") - 1) == 0) -+ strncmp(symname, "_savevr_", sizeof("_savevr_") - 1) == 0 || -+ strcmp(symname, ".TOC.") == 0) - return 1; - /* Do not ignore this symbol */ - return 0; diff --git a/debian/patches/series b/debian/patches/series index 26e324b70..f84ef292a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -133,5 +133,4 @@ debian/thermal-fix-abi-change-in-4.4.4.patch debian/ipv4-fix-abi-change-in-4.4.4.patch debian/ipv6-fix-abi-change-in-4.4.4.patch bugfix/all/revert-drm-radeon-call-hpd_irq_event-on-resume.patch -bugfix/powerpc/powerpc-simplify-module-toc-handling.patch bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch From fb59ba6b3b0dd3fc8467eec2c72fccd44b8143d4 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 9 Mar 2016 02:15:48 +0000 Subject: [PATCH 06/27] Prepare to release linux (4.4.4-2). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 524b178ef..c0f67131b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux (4.4.4-2) UNRELEASED; urgency=medium +linux (4.4.4-2) unstable; urgency=medium * Ignore ABI changes in sdhci* modules (fixes FTBFS on armhf) * udeb: Add dependency from mmc-modules to crc-modules (fixes FTBFS on arm64) @@ -6,7 +6,7 @@ linux (4.4.4-2) UNRELEASED; urgency=medium * [powerpc*] Revert "powerpc: Simplify module TOC handling"; it is not needed to fix #808043 and causes a regression on ppc64el - -- Ben Hutchings Tue, 08 Mar 2016 11:36:41 +0000 + -- Ben Hutchings Wed, 09 Mar 2016 02:15:48 +0000 linux (4.4.4-1) unstable; urgency=medium From f0dae39dd61cde88e0efbd10eaba0ac9344630a5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 12 Mar 2016 12:13:53 +0000 Subject: [PATCH 07/27] [x86] drm/i915: Fix oops caused by fbdev initialization failure --- ...s-caused-by-fbdev-initialization-fai.patch | 111 ++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 112 insertions(+) create mode 100644 debian/patches/bugfix/x86/drm-i915-Fix-oops-caused-by-fbdev-initialization-fai.patch diff --git a/debian/patches/bugfix/x86/drm-i915-Fix-oops-caused-by-fbdev-initialization-fai.patch b/debian/patches/bugfix/x86/drm-i915-Fix-oops-caused-by-fbdev-initialization-fai.patch new file mode 100644 index 000000000..233ce5db8 --- /dev/null +++ b/debian/patches/bugfix/x86/drm-i915-Fix-oops-caused-by-fbdev-initialization-fai.patch @@ -0,0 +1,111 @@ +From: Lukas Wunner +Date: Wed, 18 Nov 2015 13:43:20 +0100 +Subject: drm/i915: Fix oops caused by fbdev initialization failure +Origin: https://git.kernel.org/linus/54632abe8ca3db8621673b186c7cc0e869c0032f + +intelfb_create() is called once on driver initialization. If it fails, +ifbdev->helper.fbdev, ifbdev->fb or ifbdev->fb->obj may be NULL. + +Further up in the call stack, intel_fbdev_initial_config() calls +intel_fbdev_fini() to tear down the ifbdev on failure. This calls +intel_fbdev_destroy() which dereferences ifbdev->fb. Fix the ensuing +oops. + +Also check in these functions if ifbdev is not NULL to avoid oops: + +i915_gem_framebuffer_info() is called on access to debugfs file +"i915_gem_framebuffer" and dereferences ifbdev, ifbdev->helper.fb +and ifbdev->helper.fb->obj. + +intel_connector_add_to_fbdev() / intel_connector_remove_from_fbdev() +are called when registering / unregistering an mst connector and +dereference ifbdev. + +v3: Drop additional null pointer checks in intel_fbdev_set_suspend(), + intel_fbdev_output_poll_changed() and intel_fbdev_restore_mode() + since they already check if ifbdev is not NULL, which is sufficient + now that intel_fbdev_fini() is called on initialization failure. + (Requested by Daniel Vetter ) + +Signed-off-by: Lukas Wunner +Link: http://patchwork.freedesktop.org/patch/msgid/d05f0edf121264a9d0adb8ca713fd8cc4ae068bf.1447938059.git.lukas@wunner.de +Signed-off-by: Daniel Vetter +--- + drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++++++++----------- + drivers/gpu/drm/i915/intel_dp_mst.c | 10 ++++++++-- + drivers/gpu/drm/i915/intel_fbdev.c | 6 ++++-- + 3 files changed, 25 insertions(+), 15 deletions(-) + +--- a/drivers/gpu/drm/i915/i915_debugfs.c ++++ b/drivers/gpu/drm/i915/i915_debugfs.c +@@ -1873,17 +1873,19 @@ static int i915_gem_framebuffer_info(str + struct drm_i915_private *dev_priv = dev->dev_private; + + ifbdev = dev_priv->fbdev; +- fb = to_intel_framebuffer(ifbdev->helper.fb); ++ if (ifbdev) { ++ fb = to_intel_framebuffer(ifbdev->helper.fb); + +- seq_printf(m, "fbcon size: %d x %d, depth %d, %d bpp, modifier 0x%llx, refcount %d, obj ", +- fb->base.width, +- fb->base.height, +- fb->base.depth, +- fb->base.bits_per_pixel, +- fb->base.modifier[0], +- atomic_read(&fb->base.refcount.refcount)); +- describe_obj(m, fb->obj); +- seq_putc(m, '\n'); ++ seq_printf(m, "fbcon size: %d x %d, depth %d, %d bpp, modifier 0x%llx, refcount %d, obj ", ++ fb->base.width, ++ fb->base.height, ++ fb->base.depth, ++ fb->base.bits_per_pixel, ++ fb->base.modifier[0], ++ atomic_read(&fb->base.refcount.refcount)); ++ describe_obj(m, fb->obj); ++ seq_putc(m, '\n'); ++ } + #endif + + mutex_lock(&dev->mode_config.fb_lock); +--- a/drivers/gpu/drm/i915/intel_dp_mst.c ++++ b/drivers/gpu/drm/i915/intel_dp_mst.c +@@ -414,7 +414,10 @@ static void intel_connector_add_to_fbdev + { + #ifdef CONFIG_DRM_FBDEV_EMULATION + struct drm_i915_private *dev_priv = to_i915(connector->base.dev); +- drm_fb_helper_add_one_connector(&dev_priv->fbdev->helper, &connector->base); ++ ++ if (dev_priv->fbdev) ++ drm_fb_helper_add_one_connector(&dev_priv->fbdev->helper, ++ &connector->base); + #endif + } + +@@ -422,7 +425,10 @@ static void intel_connector_remove_from_ + { + #ifdef CONFIG_DRM_FBDEV_EMULATION + struct drm_i915_private *dev_priv = to_i915(connector->base.dev); +- drm_fb_helper_remove_one_connector(&dev_priv->fbdev->helper, &connector->base); ++ ++ if (dev_priv->fbdev) ++ drm_fb_helper_remove_one_connector(&dev_priv->fbdev->helper, ++ &connector->base); + #endif + } + +--- a/drivers/gpu/drm/i915/intel_fbdev.c ++++ b/drivers/gpu/drm/i915/intel_fbdev.c +@@ -526,8 +526,10 @@ static void intel_fbdev_destroy(struct d + + drm_fb_helper_fini(&ifbdev->helper); + +- drm_framebuffer_unregister_private(&ifbdev->fb->base); +- drm_framebuffer_remove(&ifbdev->fb->base); ++ if (ifbdev->fb) { ++ drm_framebuffer_unregister_private(&ifbdev->fb->base); ++ drm_framebuffer_remove(&ifbdev->fb->base); ++ } + } + + /* diff --git a/debian/patches/series b/debian/patches/series index f84ef292a..5c5814eea 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -134,3 +134,4 @@ debian/ipv4-fix-abi-change-in-4.4.4.patch debian/ipv6-fix-abi-change-in-4.4.4.patch bugfix/all/revert-drm-radeon-call-hpd_irq_event-on-resume.patch bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch +bugfix/x86/drm-i915-Fix-oops-caused-by-fbdev-initialization-fai.patch From f24b957c78207e233dc1e19f6084fff1b45cbcd3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 12 Mar 2016 14:08:30 +0000 Subject: [PATCH 08/27] debian/changelog: Note previous fix for i915 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index c0f67131b..7ff5a270f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux (4.4.4-3) UNRELEASED; urgency=medium + + * [x86] drm/i915: Fix oops caused by fbdev initialization failure + + -- Ben Hutchings Sat, 12 Mar 2016 14:08:10 +0000 + linux (4.4.4-2) unstable; urgency=medium * Ignore ABI changes in sdhci* modules (fixes FTBFS on armhf) From b180599ae57027f239fe796f561b55fc872bd81c Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Sun, 13 Mar 2016 17:53:22 +0000 Subject: [PATCH 09/27] [arm64] Enable ARCH_HISI (Hisilicon) (Closes: #812540) --- debian/changelog | 5 +++++ debian/config/arm64/config | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7ff5a270f..9590c51a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,12 @@ linux (4.4.4-3) UNRELEASED; urgency=medium + [ Ben Hutchings ] * [x86] drm/i915: Fix oops caused by fbdev initialization failure + [ Ian Campbell ] + * [arm64] Enable ARCH_HISI (Hisilicon) and the set of currently available + drivers (Power, Thermal, MMC) (Closes: #812540) + -- Ben Hutchings Sat, 12 Mar 2016 14:08:10 +0000 linux (4.4.4-2) unstable; urgency=medium diff --git a/debian/config/arm64/config b/debian/config/arm64/config index e68bf9668..ddfea304a 100644 --- a/debian/config/arm64/config +++ b/debian/config/arm64/config @@ -24,6 +24,7 @@ CONFIG_CRYPTO_CRC32_ARM64=y ## ## file: arch/arm64/Kconfig.platforms ## +CONFIG_ARCH_HISI=y CONFIG_ARCH_QCOM=y CONFIG_ARCH_SEATTLE=y CONFIG_ARCH_VEXPRESS=y @@ -98,6 +99,7 @@ CONFIG_HWSPINLOCK_QCOM=m ## ## file: drivers/i2c/busses/Kconfig ## +CONFIG_I2C_DESIGNWARE_PLATFORM=m CONFIG_I2C_QUP=m ## @@ -122,6 +124,8 @@ CONFIG_MMC=y CONFIG_MMC_ARMMMCI=m CONFIG_MMC_QCOM_DML=m CONFIG_MMC_SPI=m +CONFIG_MMC_DW=m +CONFIG_MMC_DW_K3=m ## ## file: drivers/net/ethernet/Kconfig @@ -240,6 +244,7 @@ CONFIG_PHY_XGENE=m ## ## file: drivers/power/reset/Kconfig ## +CONFIG_POWER_RESET_HISI=y CONFIG_POWER_RESET_MSM=y CONFIG_POWER_RESET_VEXPRESS=y CONFIG_POWER_RESET_XGENE=y @@ -283,6 +288,11 @@ CONFIG_QCOM_SMD_RPM=m ## CONFIG_SPI_QUP=m +## +## file: drivers/thermal/Kconfig +## +CONFIG_HISI_THERMAL=m + ## ## file: drivers/tty/serial/Kconfig ## From 5f102cfc8bb2ae2084dc63a13ec5d3d49d0d3f5e Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sun, 13 Mar 2016 17:13:54 +0100 Subject: [PATCH 10/27] Update to 4.4.5 --- debian/changelog | 82 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9590c51a8..648e7a2ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,82 @@ -linux (4.4.4-3) UNRELEASED; urgency=medium +linux (4.4.5-1) UNRELEASED; urgency=medium + + [ Salvatore Bonaccorso ] + * New upstream stable update: + https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.5 + - use ->d_seq to get coherency between ->d_inode and ->d_flags + - drivers: sh: Restore legacy clock domain on SuperH platforms + - Btrfs: fix deadlock running delayed iputs at transaction commit time + - btrfs: Fix no_space in write and rm loop + - btrfs: async-thread: Fix a use-after-free error for trace + - drm/amdgpu: mask out WC from BO on unsupported arches + - block: Initialize max_dev_sectors to 0 + - PCI: keystone: Fix MSI code that retrieves struct pcie_port pointer + - parisc: Fix ptrace syscall number and return value modification + - mips/kvm: fix ioctl error handling + - kvm: x86: Update tsc multiplier on change. + - fbcon: set a default value to blink interval + - cifs: fix out-of-bounds access in lease parsing + - CIFS: Fix SMB2+ interim response processing for read requests + - Fix cifs_uniqueid_to_ino_t() function for s390x + - vfio: fix ioctl error handling + - KVM: x86: fix root cause for missed hardware breakpoints + - arm/arm64: KVM: Fix ioctl error handling + - iommu/amd: Apply workaround for ATS write permission check + - iommu/amd: Fix boot warning when device 00:00.0 is not iommu covered + - iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path + - target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors + - drm/ast: Fix incorrect register check for DRAM width + - drm/radeon/pm: update current crtc info after setting the powerstate + - drm/amdgpu/pm: update current crtc info after setting the powerstate + - drm/amdgpu: apply gfx_v8 fixes to gfx_v7 as well + - drm/amdgpu/gfx8: specify which engine to wait before vm flush + - drm/amdgpu: return from atombios_dp_get_dpcd only when error + - libata: fix HDIO_GET_32BIT ioctl + - libata: Align ata_device's id on a cacheline + - block: bio: introduce helpers to get the 1st and last bvec + - writeback: flush inode cgroup wb switches instead of pinning super_block + - Adding Intel Lewisburg device IDs for SATA + - arm64: vmemmap: use virtual projection of linear region + - PM / sleep / x86: Fix crash on graph trace through x86 suspend + - ata: ahci: don't mark HotPlugCapable Ports as external/removable + - tracing: Do not have 'comm' filter override event 'comm' field + - pata-rb532-cf: get rid of the irq_to_gpio() call + - Btrfs: fix loading of orphan roots leading to BUG_ON + - Revert "jffs2: Fix lock acquisition order bug in jffs2_write_begin" + - jffs2: Fix page lock / f->sem deadlock + - Fix directory hardlinks from deleted directories + - dmaengine: pxa_dma: fix cyclic transfers + - adv7604: fix tx 5v detect regression + - ALSA: usb-audio: Add a quirk for Plantronics DA45 + - ALSA: ctl: Fix ioctls for X32 ABI + - ALSA: hda - Fix mic issues on Acer Aspire E1-472 + - ALSA: rawmidi: Fix ioctls X32 ABI + - ALSA: timer: Fix ioctls for X32 ABI + - ALSA: pcm: Fix ioctls for X32 ABI + - ALSA: seq: oss: Don't drain at closing a client + - ALSA: hdspm: Fix wrong boolean ctl value accesses + - ALSA: hdsp: Fix wrong boolean ctl value accesses + - ALSA: hdspm: Fix zero-division + - ALSA: timer: Fix broken compat timer user status ioctl + - usb: chipidea: otg: change workqueue ci_otg as freezable + - USB: cp210x: Add ID for Parrot NMEA GPS Flight Recorder + - USB: qcserial: add Dell Wireless 5809e Gobi 4G HSPA+ (rev3) + - USB: qcserial: add Sierra Wireless EM74xx device ID + - USB: serial: option: add support for Telit LE922 PID 0x1045 + - USB: serial: option: add support for Quectel UC20 + - MIPS: scache: Fix scache init with invalid line size. + - MIPS: traps: Fix SIGFPE information leak from `do_ov' and `do_trap_or_bp' + - cxl: Fix PSL timebase synchronization detection + - ubi: Fix out of bounds write in volume update code + - i2c: brcmstb: allocate correct amount of memory for regmap + - thermal: cpu_cooling: fix out of bounds access in time_in_idle + - drm/amdgpu: Use drm_calloc_large for VM page_tables array + - block: check virt boundary in bio_will_gap() + - block: get the 1st and last bvec via helpers + - drm/i915: more virtual south bridge detection + - drm/i915: refine qemu south bridge detection + - modules: fix longstanding /proc/kallsyms vs module insertion race. + - drm/amdgpu: fix topaz/tonga gmc assignment in 4.4 stable [ Ben Hutchings ] * [x86] drm/i915: Fix oops caused by fbdev initialization failure @@ -7,7 +85,7 @@ linux (4.4.4-3) UNRELEASED; urgency=medium * [arm64] Enable ARCH_HISI (Hisilicon) and the set of currently available drivers (Power, Thermal, MMC) (Closes: #812540) - -- Ben Hutchings Sat, 12 Mar 2016 14:08:10 +0000 + -- Salvatore Bonaccorso Sun, 13 Mar 2016 17:04:02 +0100 linux (4.4.4-2) unstable; urgency=medium From 278c9dc0b15d3613a1fb36e3a24a2774741b9353 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sun, 13 Mar 2016 19:33:03 +0100 Subject: [PATCH 11/27] Improve changelog for stable update 4.4.5 --- debian/changelog | 64 +++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 36 deletions(-) diff --git a/debian/changelog b/debian/changelog index 648e7a2ce..32d20366f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,50 +3,45 @@ linux (4.4.5-1) UNRELEASED; urgency=medium [ Salvatore Bonaccorso ] * New upstream stable update: https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.5 - - use ->d_seq to get coherency between ->d_inode and ->d_flags - - drivers: sh: Restore legacy clock domain on SuperH platforms - Btrfs: fix deadlock running delayed iputs at transaction commit time + (regression in 4.1) - btrfs: Fix no_space in write and rm loop + (regression in 4.4) - btrfs: async-thread: Fix a use-after-free error for trace - - drm/amdgpu: mask out WC from BO on unsupported arches + - [x86] drm/amdgpu: mask out WC from BO on unsupported arches - block: Initialize max_dev_sectors to 0 - - PCI: keystone: Fix MSI code that retrieves struct pcie_port pointer - - parisc: Fix ptrace syscall number and return value modification - - mips/kvm: fix ioctl error handling - - kvm: x86: Update tsc multiplier on change. + - [hppa] Fix ptrace syscall number and return value modification + - [x86] kvm: Update tsc multiplier on change. + (regression in 4.4) - fbcon: set a default value to blink interval - cifs: fix out-of-bounds access in lease parsing - CIFS: Fix SMB2+ interim response processing for read requests - - Fix cifs_uniqueid_to_ino_t() function for s390x - - vfio: fix ioctl error handling - - KVM: x86: fix root cause for missed hardware breakpoints - - arm/arm64: KVM: Fix ioctl error handling - - iommu/amd: Apply workaround for ATS write permission check - - iommu/amd: Fix boot warning when device 00:00.0 is not iommu covered - - iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path + - [x86] vfio: fix ioctl error handling + - [x86] KVM: fix root cause for missed hardware breakpoints + - [arm,arm64] KVM: Fix ioctl error handling + - [amd64] iommu: Apply workaround for ATS write permission check + - [amd64] iommu: Fix boot warning when device 00:00.0 is not iommu covered + - [x86] iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path - target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors - - drm/ast: Fix incorrect register check for DRAM width + - [x86,powerpc] drm/ast: Fix incorrect register check for DRAM width - drm/radeon/pm: update current crtc info after setting the powerstate - - drm/amdgpu/pm: update current crtc info after setting the powerstate - - drm/amdgpu: apply gfx_v8 fixes to gfx_v7 as well - - drm/amdgpu/gfx8: specify which engine to wait before vm flush - - drm/amdgpu: return from atombios_dp_get_dpcd only when error + - [x86] drm/amdgpu/pm: update current crtc info after setting the powerstate + - [x86] drm/amdgpu: apply gfx_v8 fixes to gfx_v7 as well + - [x86] drm/amdgpu/gfx8: specify which engine to wait before vm flush + - [x86] drm/amdgpu: return from atombios_dp_get_dpcd only when error - libata: fix HDIO_GET_32BIT ioctl - libata: Align ata_device's id on a cacheline - - block: bio: introduce helpers to get the 1st and last bvec - writeback: flush inode cgroup wb switches instead of pinning super_block - Adding Intel Lewisburg device IDs for SATA - - arm64: vmemmap: use virtual projection of linear region - - PM / sleep / x86: Fix crash on graph trace through x86 suspend + - [arm64] vmemmap: use virtual projection of linear region + (regression in 4.1) - ata: ahci: don't mark HotPlugCapable Ports as external/removable - tracing: Do not have 'comm' filter override event 'comm' field - - pata-rb532-cf: get rid of the irq_to_gpio() call + (regression in 4.3) - Btrfs: fix loading of orphan roots leading to BUG_ON - Revert "jffs2: Fix lock acquisition order bug in jffs2_write_begin" - jffs2: Fix page lock / f->sem deadlock - - Fix directory hardlinks from deleted directories - - dmaengine: pxa_dma: fix cyclic transfers - - adv7604: fix tx 5v detect regression + - jffs2: Fix directory hardlinks from deleted directories - ALSA: usb-audio: Add a quirk for Plantronics DA45 - ALSA: ctl: Fix ioctls for X32 ABI - ALSA: hda - Fix mic issues on Acer Aspire E1-472 @@ -58,25 +53,22 @@ linux (4.4.5-1) UNRELEASED; urgency=medium - ALSA: hdsp: Fix wrong boolean ctl value accesses - ALSA: hdspm: Fix zero-division - ALSA: timer: Fix broken compat timer user status ioctl - - usb: chipidea: otg: change workqueue ci_otg as freezable + - [armhf] usb: chipidea: otg: change workqueue ci_otg as freezable - USB: cp210x: Add ID for Parrot NMEA GPS Flight Recorder - USB: qcserial: add Dell Wireless 5809e Gobi 4G HSPA+ (rev3) - USB: qcserial: add Sierra Wireless EM74xx device ID - USB: serial: option: add support for Telit LE922 PID 0x1045 - USB: serial: option: add support for Quectel UC20 - - MIPS: scache: Fix scache init with invalid line size. - - MIPS: traps: Fix SIGFPE information leak from `do_ov' and `do_trap_or_bp' - - cxl: Fix PSL timebase synchronization detection + - [mips] scache: Fix scache init with invalid line size. + - [mips]: traps: Fix SIGFPE information leak from `do_ov' and `do_trap_or_bp' - ubi: Fix out of bounds write in volume update code - - i2c: brcmstb: allocate correct amount of memory for regmap - thermal: cpu_cooling: fix out of bounds access in time_in_idle - - drm/amdgpu: Use drm_calloc_large for VM page_tables array + - [x86] drm/amdgpu: Use drm_calloc_large for VM page_tables array - block: check virt boundary in bio_will_gap() - - block: get the 1st and last bvec via helpers - - drm/i915: more virtual south bridge detection - - drm/i915: refine qemu south bridge detection + - [x86] drm/i915: more virtual south bridge detection + - [x86] drm/i915: refine qemu south bridge detection - modules: fix longstanding /proc/kallsyms vs module insertion race. - - drm/amdgpu: fix topaz/tonga gmc assignment in 4.4 stable + - [x86] drm/amdgpu: fix topaz/tonga gmc assignment in 4.4 stable [ Ben Hutchings ] * [x86] drm/i915: Fix oops caused by fbdev initialization failure From 20994ffba490a88ede3e16e841961ab79d1501e4 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 14 Mar 2016 23:33:23 +0000 Subject: [PATCH 12/27] Fix ABI changes in 4.4.5 --- debian/changelog | 3 +- .../module-fix-abi-change-in-4.4.5.patch | 40 +++++++++++++++++++ ...align-ata_device-s-id-on-a-cacheline.patch | 24 +++++++++++ debian/patches/series | 2 + 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 debian/patches/debian/module-fix-abi-change-in-4.4.5.patch create mode 100644 debian/patches/debian/revert-libata-align-ata_device-s-id-on-a-cacheline.patch diff --git a/debian/changelog b/debian/changelog index 32d20366f..ebb606343 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,7 +30,6 @@ linux (4.4.5-1) UNRELEASED; urgency=medium - [x86] drm/amdgpu/gfx8: specify which engine to wait before vm flush - [x86] drm/amdgpu: return from atombios_dp_get_dpcd only when error - libata: fix HDIO_GET_32BIT ioctl - - libata: Align ata_device's id on a cacheline - writeback: flush inode cgroup wb switches instead of pinning super_block - Adding Intel Lewisburg device IDs for SATA - [arm64] vmemmap: use virtual projection of linear region @@ -72,6 +71,8 @@ linux (4.4.5-1) UNRELEASED; urgency=medium [ Ben Hutchings ] * [x86] drm/i915: Fix oops caused by fbdev initialization failure + * module: Fix ABI change in 4.4.5 + * Revert "libata: Align ata_device's id on a cacheline" to avoid ABI change [ Ian Campbell ] * [arm64] Enable ARCH_HISI (Hisilicon) and the set of currently available diff --git a/debian/patches/debian/module-fix-abi-change-in-4.4.5.patch b/debian/patches/debian/module-fix-abi-change-in-4.4.5.patch new file mode 100644 index 000000000..57711a297 --- /dev/null +++ b/debian/patches/debian/module-fix-abi-change-in-4.4.5.patch @@ -0,0 +1,40 @@ +From: Ben Hutchings +Date: Mon, 14 Mar 2016 23:20:37 +0000 +Subject: module: Fix ABI change in 4.4.5 +Forwarded: not-needed + +Move the new kallsyms fields in struct module to the end and hide +them from genksyms. Restore the old fields but leave them zeroed - +nothing outside the module loader and /proc/kallsyms implementation +should be, or appears to be, using them. + +--- +--- a/include/linux/module.h ++++ b/include/linux/module.h +@@ -417,9 +417,10 @@ struct module { + #endif + + #ifdef CONFIG_KALLSYMS +- /* Protected by RCU and/or module_mutex: use rcu_dereference() */ +- struct mod_kallsyms *kallsyms; +- struct mod_kallsyms core_kallsyms; ++ /* bwh: Old kallsyms state; now just padding for ABI compat */ ++ Elf_Sym *symtab, *core_symtab; ++ unsigned int num_symtab, core_num_syms; ++ char *strtab, *core_strtab; + + /* Section attributes */ + struct module_sect_attrs *sect_attrs; +@@ -482,6 +483,12 @@ struct module { + ctor_fn_t *ctors; + unsigned int num_ctors; + #endif ++ ++#if defined(CONFIG_KALLSYMS) && !defined(__GENKSYMS__) ++ /* Protected by RCU and/or module_mutex: use rcu_dereference() */ ++ struct mod_kallsyms *kallsyms; ++ struct mod_kallsyms core_kallsyms; ++#endif + } ____cacheline_aligned; + #ifndef MODULE_ARCH_INIT + #define MODULE_ARCH_INIT {} diff --git a/debian/patches/debian/revert-libata-align-ata_device-s-id-on-a-cacheline.patch b/debian/patches/debian/revert-libata-align-ata_device-s-id-on-a-cacheline.patch new file mode 100644 index 000000000..bb4f8403c --- /dev/null +++ b/debian/patches/debian/revert-libata-align-ata_device-s-id-on-a-cacheline.patch @@ -0,0 +1,24 @@ +From: Ben Hutchings +Date: Mon, 14 Mar 2016 17:47:16 +0000 +Subject: Revert "libata: Align ata_device's id on a cacheline" +Forwarded: not-needed + +This reverts commit cea2cbff57c5b65375adb6fe65612c10a7301327, which +was commit 4ee34ea3a12396f35b26d90a094c75db95080baa upstream. It's a +real fix but we've lived with the problem for many years and it +doesn't seem worth breaking ABI to fix it right now. +--- + include/linux/libata.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/linux/libata.h ++++ b/include/linux/libata.h +@@ -718,7 +718,7 @@ struct ata_device { + union { + u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ + u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ +- } ____cacheline_aligned; ++ }; + + /* DEVSLP Timing Variables from Identify Device Data Log */ + u8 devslp_timing[ATA_LOG_DEVSLP_SIZE]; diff --git a/debian/patches/series b/debian/patches/series index 5c5814eea..51d58160a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -135,3 +135,5 @@ debian/ipv6-fix-abi-change-in-4.4.4.patch bugfix/all/revert-drm-radeon-call-hpd_irq_event-on-resume.patch bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch bugfix/x86/drm-i915-Fix-oops-caused-by-fbdev-initialization-fai.patch +debian/revert-libata-align-ata_device-s-id-on-a-cacheline.patch +debian/module-fix-abi-change-in-4.4.5.patch From 328762c833dc5274b168936d15222338c06fecbc Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 14 Mar 2016 23:45:22 +0000 Subject: [PATCH 13/27] [amd64] Fix more regressions due to "efi: Build our own page table structure" - efi: Fix boot crash by always mapping boot service regions into new EFI page tables (Closes: #815125) - mm/pat: Fix boot crash when 1GB pages are not supported by cpu Although I don't have confirmation from Norbert Preining for #815125, it does look like these fix all the remaining regressions. --- debian/changelog | 5 + ...-crash-by-always-mapping-boot-servic.patch | 197 ++++++++++++++++++ ...ash-when-1gb-pages-are-not-supported.patch | 58 ++++++ debian/patches/series | 2 + 4 files changed, 262 insertions(+) create mode 100644 debian/patches/bugfix/x86/x86-efi-fix-boot-crash-by-always-mapping-boot-servic.patch create mode 100644 debian/patches/bugfix/x86/x86-mm-pat-fix-boot-crash-when-1gb-pages-are-not-supported.patch diff --git a/debian/changelog b/debian/changelog index ebb606343..8626fbb29 100644 --- a/debian/changelog +++ b/debian/changelog @@ -73,6 +73,11 @@ linux (4.4.5-1) UNRELEASED; urgency=medium * [x86] drm/i915: Fix oops caused by fbdev initialization failure * module: Fix ABI change in 4.4.5 * Revert "libata: Align ata_device's id on a cacheline" to avoid ABI change + * [amd64] Fix more regressions due to "efi: Build our own page table + structure": + - efi: Fix boot crash by always mapping boot service regions into new EFI + page tables (Closes: #815125) + - mm/pat: Fix boot crash when 1GB pages are not supported by cpu [ Ian Campbell ] * [arm64] Enable ARCH_HISI (Hisilicon) and the set of currently available diff --git a/debian/patches/bugfix/x86/x86-efi-fix-boot-crash-by-always-mapping-boot-servic.patch b/debian/patches/bugfix/x86/x86-efi-fix-boot-crash-by-always-mapping-boot-servic.patch new file mode 100644 index 000000000..56e8485aa --- /dev/null +++ b/debian/patches/bugfix/x86/x86-efi-fix-boot-crash-by-always-mapping-boot-servic.patch @@ -0,0 +1,197 @@ +From: Matt Fleming +Date: Fri, 11 Mar 2016 11:19:23 +0000 +Subject: x86/efi: Fix boot crash by always mapping boot service regions into + new EFI page tables +Origin: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit?id=452308de61056a539352a9306c46716d7af8a1f1 +Bug-Debian: https://bugs.debian.org/815125 + +Some machines have EFI regions in page zero (physical address +0x00000000) and historically that region has been added to the e820 +map via trim_bios_range(), and ultimately mapped into the kernel page +tables. It was not mapped via efi_map_regions() as one would expect. + +Alexis reports that with the new separate EFI page tables some boot +services regions, such as page zero, are not mapped. This triggers an +oops during the SetVirtualAddressMap() runtime call. + +For the EFI boot services quirk on x86 we need to memblock_reserve() +boot services regions until after SetVirtualAddressMap(). Doing that +while respecting the ownership of regions that may have already been +reserved by the kernel was the motivation behind this commit: + + 7d68dc3f1003 ("x86, efi: Do not reserve boot services regions within reserved areas") + +That patch was merged at a time when the EFI runtime virtual mappings +were inserted into the kernel page tables as described above, and the +trick of setting ->numpages (and hence the region size) to zero to +track regions that should not be freed in efi_free_boot_services() +meant that we never mapped those regions in efi_map_regions(). Instead +we were relying solely on the existing kernel mappings. + +Now that we have separate page tables we need to make sure the EFI +boot services regions are mapped correctly, even if someone else has +already called memblock_reserve(). Instead of stashing a tag in +->numpages, set the EFI_MEMORY_RUNTIME bit of ->attribute. Since it +generally makes no sense to mark a boot services region as required at +runtime, it's pretty much guaranteed the firmware will not have +already set this bit. + +For the record, the specific circumstances under which Alexis +triggered this bug was that an EFI runtime driver on his machine was +responding to the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event during +SetVirtualAddressMap(). + +The event handler for this driver looks like this, + + sub rsp,0x28 + lea rdx,[rip+0x2445] # 0xaa948720 + mov ecx,0x4 + call func_aa9447c0 ; call to ConvertPointer(4, & 0xaa948720) + mov r11,QWORD PTR [rip+0x2434] # 0xaa948720 + xor eax,eax + mov BYTE PTR [r11+0x1],0x1 + add rsp,0x28 + ret + +Which is pretty typical code for an EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE +handler. The "mov r11, QWORD PTR [rip+0x2424]" was the faulting +instruction because ConvertPointer() was being called to convert the +address 0x0000000000000000, which when converted is left unchanged and +remains 0x0000000000000000. + +The output of the oops trace gave the impression of a standard NULL +pointer dereference bug, but because we're accessing physical +addresses during ConvertPointer(), it wasn't. EFI boot services code +is stored at that address on Alexis' machine. + +Reported-by: Alexis Murzeau +Signed-off-by: Matt Fleming +Cc: Andy Lutomirski +Cc: Ard Biesheuvel +Cc: Ben Hutchings +Cc: Borislav Petkov +Cc: Brian Gerst +Cc: Denys Vlasenko +Cc: H. Peter Anvin +Cc: Linus Torvalds +Cc: Maarten Lankhorst +Cc: Matthew Garrett +Cc: Peter Zijlstra +Cc: Raphael Hertzog +Cc: Roger Shimizu +Cc: Thomas Gleixner +Cc: linux-efi@vger.kernel.org +Link: http://lkml.kernel.org/r/1457695163-29632-2-git-send-email-matt@codeblueprint.co.uk +Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815125 +Signed-off-by: Ingo Molnar +--- + arch/x86/platform/efi/quirks.c | 79 +++++++++++++++++++++++++++++++++--------- + 1 file changed, 62 insertions(+), 17 deletions(-) + +--- a/arch/x86/platform/efi/quirks.c ++++ b/arch/x86/platform/efi/quirks.c +@@ -130,6 +130,27 @@ efi_status_t efi_query_variable_store(u3 + EXPORT_SYMBOL_GPL(efi_query_variable_store); + + /* ++ * Helper function for efi_reserve_boot_services() to figure out if we ++ * can free regions in efi_free_boot_services(). ++ * ++ * Use this function to ensure we do not free regions owned by somebody ++ * else. We must only reserve (and then free) regions: ++ * ++ * - Not within any part of the kernel ++ * - Not the BIOS reserved area (E820_RESERVED, E820_NVS, etc) ++ */ ++static bool can_free_region(u64 start, u64 size) ++{ ++ if (start + size > __pa_symbol(_text) && start <= __pa_symbol(_end)) ++ return false; ++ ++ if (!e820_all_mapped(start, start+size, E820_RAM)) ++ return false; ++ ++ return true; ++} ++ ++/* + * The UEFI specification makes it clear that the operating system is free to do + * whatever it wants with boot services code after ExitBootServices() has been + * called. Ignoring this recommendation a significant bunch of EFI implementations +@@ -146,26 +167,50 @@ void __init efi_reserve_boot_services(vo + efi_memory_desc_t *md = p; + u64 start = md->phys_addr; + u64 size = md->num_pages << EFI_PAGE_SHIFT; ++ bool already_reserved; + + if (md->type != EFI_BOOT_SERVICES_CODE && + md->type != EFI_BOOT_SERVICES_DATA) + continue; +- /* Only reserve where possible: +- * - Not within any already allocated areas +- * - Not over any memory area (really needed, if above?) +- * - Not within any part of the kernel +- * - Not the bios reserved area +- */ +- if ((start + size > __pa_symbol(_text) +- && start <= __pa_symbol(_end)) || +- !e820_all_mapped(start, start+size, E820_RAM) || +- memblock_is_region_reserved(start, size)) { +- /* Could not reserve, skip it */ +- md->num_pages = 0; +- memblock_dbg("Could not reserve boot range [0x%010llx-0x%010llx]\n", +- start, start+size-1); +- } else ++ ++ already_reserved = memblock_is_region_reserved(start, size); ++ ++ /* ++ * Because the following memblock_reserve() is paired ++ * with free_bootmem_late() for this region in ++ * efi_free_boot_services(), we must be extremely ++ * careful not to reserve, and subsequently free, ++ * critical regions of memory (like the kernel image) or ++ * those regions that somebody else has already ++ * reserved. ++ * ++ * A good example of a critical region that must not be ++ * freed is page zero (first 4Kb of memory), which may ++ * contain boot services code/data but is marked ++ * E820_RESERVED by trim_bios_range(). ++ */ ++ if (!already_reserved) { + memblock_reserve(start, size); ++ ++ /* ++ * If we are the first to reserve the region, no ++ * one else cares about it. We own it and can ++ * free it later. ++ */ ++ if (can_free_region(start, size)) ++ continue; ++ } ++ ++ /* ++ * We don't own the region. We must not free it. ++ * ++ * Setting this bit for a boot services region really ++ * doesn't make sense as far as the firmware is ++ * concerned, but it does provide us with a way to tag ++ * those regions that must not be paired with ++ * free_bootmem_late(). ++ */ ++ md->attribute |= EFI_MEMORY_RUNTIME; + } + } + +@@ -182,8 +227,8 @@ void __init efi_free_boot_services(void) + md->type != EFI_BOOT_SERVICES_DATA) + continue; + +- /* Could not reserve boot area */ +- if (!size) ++ /* Do not free, someone else owns it: */ ++ if (md->attribute & EFI_MEMORY_RUNTIME) + continue; + + free_bootmem_late(start, size); diff --git a/debian/patches/bugfix/x86/x86-mm-pat-fix-boot-crash-when-1gb-pages-are-not-supported.patch b/debian/patches/bugfix/x86/x86-mm-pat-fix-boot-crash-when-1gb-pages-are-not-supported.patch new file mode 100644 index 000000000..bae631eb3 --- /dev/null +++ b/debian/patches/bugfix/x86/x86-mm-pat-fix-boot-crash-when-1gb-pages-are-not-supported.patch @@ -0,0 +1,58 @@ +From: Matt Fleming +Date: Mon, 14 Mar 2016 10:33:01 +0000 +Subject: x86/mm/pat: Fix boot crash when 1GB pages are not supported by cpu +Origin: http://mid.gmane.org/1457951581-27353-2-git-send-email-matt@codeblueprint.co.uk + +Scott reports that with the new separate EFI page tables he's seeing +the following error on boot, caused by setting reserved bits in the +page table structures (fault code is PF_RSVD | PF_PROT), + + swapper/0: Corrupted page table at address 17b102020 + PGD 17b0e5063 PUD 1400000e3 + Bad pagetable: 0009 [#1] SMP + +On first inspection the PUD is using a 1GB page size (_PAGE_PSE) and +looks fine but that's only true if support for 1GB PUD pages +("pdpe1gb") is present in the cpu. + +Scott's Intel Celeron N2820 does not have that feature and so the +_PAGE_PSE bit is reserved. Fix this issue by making the 1GB mapping +code in conditional on "cpu_has_gbpages". + +This issue didn't come up in the past because the required mapping for +the faulting address (0x17b102020) will already have been setup by the +kernel in early boot before we got to efi_map_regions(), but we no +longer use the standard kernel page tables during EFI calls. + +Reported-by: Scott Ashcroft +Tested-by: Scott Ashcroft +Cc: Ard Biesheuvel +Cc: Ben Hutchings +Cc: Borislav Petkov +Cc: Brian Gerst +Cc: Denys Vlasenko +Cc: "H. Peter Anvin" +Cc: Linus Torvalds +Cc: Maarten Lankhorst +Cc: Matthew Garrett +Cc: Peter Zijlstra +Cc: Raphael Hertzog +Cc: Roger Shimizu +Cc: Thomas Gleixner +Cc: linux-efi@vger.kernel.org +Signed-off-by: Matt Fleming +--- + arch/x86/mm/pageattr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/mm/pageattr.c ++++ b/arch/x86/mm/pageattr.c +@@ -1036,7 +1036,7 @@ static int populate_pud(struct cpa_data + /* + * Map everything starting from the Gb boundary, possibly with 1G pages + */ +- while (end - start >= PUD_SIZE) { ++ while (cpu_has_gbpages && end - start >= PUD_SIZE) { + set_pud(pud, __pud(cpa->pfn << PAGE_SHIFT | _PAGE_PSE | + massage_pgprot(pud_pgprot))); + diff --git a/debian/patches/series b/debian/patches/series index 51d58160a..e4b136c10 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -137,3 +137,5 @@ bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch bugfix/x86/drm-i915-Fix-oops-caused-by-fbdev-initialization-fai.patch debian/revert-libata-align-ata_device-s-id-on-a-cacheline.patch debian/module-fix-abi-change-in-4.4.5.patch +bugfix/x86/x86-efi-fix-boot-crash-by-always-mapping-boot-servic.patch +bugfix/x86/x86-mm-pat-fix-boot-crash-when-1gb-pages-are-not-supported.patch From c4460bf84d28a36e9dbb1a3d573b1735f445504d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 14 Mar 2016 23:59:57 +0000 Subject: [PATCH 14/27] README.source: Update "Updating the upstream source" to reflect current practice * Recommend using git rather than tarballs * We compress upstream source with xz, not gzip * Don't mention the complicated alternative to debian/rules orig --- debian/README.source | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/debian/README.source b/debian/README.source index e963e35a4..62d9cefeb 100644 --- a/debian/README.source +++ b/debian/README.source @@ -1,24 +1,25 @@ Updating the upstream source ============================ -1) You can use either: - a) a git repository of the kernel source - b) a kernel tarball from kernel.org (e.g. linux-3.4.tar.bz2) - and, optionally, a patch (e.g. patch-3.5-rc1.bz2). +In addition to the build-dependencies, you will need the rsync and +unifdef packages installed. -2) Run ./debian/bin/genorig.py - or ./debian/bin/genorig.py [patch] - This will produce ../orig/linux_.orig.tar.gz - (e.g. linux_3.5~rc1.orig.tar.gz). +1) It is recommended to fetch the release tag from the relevant upstream git + repository, one of: - (genorig.py requires the python and unifdef packages to be - installed) + * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git + * https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git + * git://kernel.ubuntu.com/ubuntu/linux.git -3) Unpack linux_.orig.tar.gz, cd into the new directory, - and do a 'git archive' to get the debian/ subdirectory. - Alternatively unpack using "make -f debian/rules orig". + However, it is also possible to use upstream tarball and patch releases. - (the orig target of the Makefiles requires rsync) +2) Run: ./debian/bin/genorig.py + or: ./debian/bin/genorig.py [patch] + + This will produce ../orig/linux_.orig.tar.xz + (e.g. linux_3.5~rc1.orig.tar.xz). + +3) Run: make -f debian/rules orig Applying patches to the Debian kernel tree ========================================== From e4a0845da31aedce4550c2fd187cf4a07e195539 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 15 Mar 2016 00:59:32 +0000 Subject: [PATCH 15/27] README.source: Add instructions to verify upstream tag and file signatures --- debian/README.source | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/debian/README.source b/debian/README.source index 62d9cefeb..0d604ce5c 100644 --- a/debian/README.source +++ b/debian/README.source @@ -12,6 +12,30 @@ unifdef packages installed. * git://kernel.ubuntu.com/ubuntu/linux.git However, it is also possible to use upstream tarball and patch releases. + Both tags and files should be signed by the relevant maintainer, which + you *must* verify using commands such as: + + $ git tag -v v4.5 + $ xzcat linux-4.5.tar.xz | gpg --verify linux-4.5.tar.sign - + $ xzcat patch-4.5.1.xz | gpg --verify patch-4.5.1.sign - + + The upstream maintainers' key fingerprints are: + + pub 2048R/00411886 2011-09-20 + Key fingerprint = ABAF 11C6 5A29 70B1 30AB E3C4 79BE 3E43 0041 1886 + uid Linus Torvalds + sub 2048R/012F54CA 2011-09-20 + + pub 4096R/6092693E 2011-09-23 + Key fingerprint = 647F 2865 4894 E3BD 4571 99BE 38DB BDC8 6092 693E + uid Greg Kroah-Hartman (Linux kernel stable release signing key) + sub 4096R/76D54749 2011-09-23 + + pub 4096R/FDCE24FC 2011-12-10 + Key fingerprint = D4E1 E317 4470 9144 B0F8 101A DB74 AEB8 FDCE 24FC + uid Luis Henriques + uid Luis Henriques + sub 4096R/EFBC394A 2011-12-10 2) Run: ./debian/bin/genorig.py or: ./debian/bin/genorig.py [patch] From 5bb08e79303123ce16be056708edc590c942f401 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 15 Mar 2016 01:04:33 +0000 Subject: [PATCH 16/27] README.source: Mention need to refresh patches when updating upstream source --- debian/README.source | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/README.source b/debian/README.source index 0d604ce5c..39894e003 100644 --- a/debian/README.source +++ b/debian/README.source @@ -43,8 +43,16 @@ unifdef packages installed. This will produce ../orig/linux_.orig.tar.xz (e.g. linux_3.5~rc1.orig.tar.xz). + It involves applying several patches and file deletions for DFSG + compliance, as listed in debian/patches/series-orig. Occasionally + you will need to refresh these. + 3) Run: make -f debian/rules orig + This will apply the main quilt series to the upstream source, which + will usually fail due to conflicts with upstream changes. You need + to resolve those by dropping or refreshing patches. + Applying patches to the Debian kernel tree ========================================== From 316fdb166af6751e9c5fdee779d507cd1a68b34a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 15 Mar 2016 01:17:42 +0000 Subject: [PATCH 17/27] README.source: Document how to update the changelog for a new upstream version --- debian/README.source | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/debian/README.source b/debian/README.source index 39894e003..98569e08b 100644 --- a/debian/README.source +++ b/debian/README.source @@ -53,6 +53,36 @@ unifdef packages installed. will usually fail due to conflicts with upstream changes. You need to resolve those by dropping or refreshing patches. +Recording updates in the changelog +---------------------------------- + +Upstream commits that we already cherry-picked and included in a +previous package upload should not be mentioned, since they don't make +any difference to the package. Any other commits that fix a Debian +bug report and/or a security issue with a CVE ID should always be +listed, along with the (Closes: #nnnnnn) and/or (CVE-yyyy-nnnn) +reference. + +Aside from those general rules: + +* For an upstream release candidate, don't attempt to list the changes + +* For a stable release by Linus, refer to the summary at + kernelnewbies.org, e.g. http://kernelnewbies.org/Linux_4.5 + +* For a stable update, refer to the changelog on kernel.org, e.g. + https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.1, and + list all changes that are relevant to our package and that fix bugs + that we would consider 'important' or higher severity + + - The script debian/bin/stable-update.sh updates the changelog + version and inserts the list of changes (but it doesn't always + put it in the right place!). It doesn't attempt to filter out + irrelevant or unimportant changes. + + - The script debian/bin/ckt-stable-update.sh does the same for + stable updates by the Canonical Kernel Team. + Applying patches to the Debian kernel tree ========================================== From 46dfca5a3c7ea0d1707fe8e5119d02cbcbcb22fd Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 15 Mar 2016 01:23:43 +0000 Subject: [PATCH 18/27] README.source: Add examples of irrelevant upstream changes --- debian/README.source | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/README.source b/debian/README.source index 98569e08b..2a9f02ced 100644 --- a/debian/README.source +++ b/debian/README.source @@ -83,6 +83,12 @@ Aside from those general rules: - The script debian/bin/ckt-stable-update.sh does the same for stable updates by the Canonical Kernel Team. + - If you have time, please delete irrelevant changes such as: + + Fixes for architectures not supported by the package + + Fixes for drivers that aren't enabled in any of our configurations + + Build fixes for configurations that we don't use + + Fixes for lockdep false positives + Applying patches to the Debian kernel tree ========================================== From 0f3b517e44873de3dd0398cb5341dd356d5b4967 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 15 Mar 2016 01:29:45 +0000 Subject: [PATCH 19/27] README.source: Document convention for bracketted prefixes in changelog --- debian/README.source | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/debian/README.source b/debian/README.source index 2a9f02ced..057189075 100644 --- a/debian/README.source +++ b/debian/README.source @@ -89,6 +89,9 @@ Aside from those general rules: + Build fixes for configurations that we don't use + Fixes for lockdep false positives +If you have time, please add bracketted prefixes to the upstream +change list as described below under "Changelog conventions". + Applying patches to the Debian kernel tree ========================================== @@ -108,6 +111,25 @@ make -f debian/rules source The resulting source can be found below debian/build. +Changelog conventions +===================== + +If a change only affects some architectures, flavours or featuresets, +this should be noted with a bracketted prefix on the changelog line: + +* [] Change to featureset +* [] Change that affects Debian architecture +* [,...] Change that affects Debian architectures + , , ... +* [/] Change that affects kernel flavour + on Debian architecture +* [/{,...}] Change that affects kernel + flavours , , ... on Debian architecture + +You can use wildcards to cover multiple values, e.g. 'arm*' for armel, +armhf and arm64 architectures. Also 'x86' is used to cover the Debian +architectures amd64, i386 and x32. + Kernel config files =================== Configuration files are constructed dynamically from a number of config From 35ecf69e71f84641f994471f9f23cdc33641a87a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 16 Mar 2016 03:52:18 +0000 Subject: [PATCH 20/27] Revert "drm/radeon/pm: adjust display configuration after powerstate" Reported to cause a regression on some older hardware. --- debian/changelog | 2 + ...n-pm-adjust-display-configuration-af.patch | 39 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 42 insertions(+) create mode 100644 debian/patches/bugfix/all/revert-drm-radeon-pm-adjust-display-configuration-af.patch diff --git a/debian/changelog b/debian/changelog index 8626fbb29..68dff03b3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -78,6 +78,8 @@ linux (4.4.5-1) UNRELEASED; urgency=medium - efi: Fix boot crash by always mapping boot service regions into new EFI page tables (Closes: #815125) - mm/pat: Fix boot crash when 1GB pages are not supported by cpu + * Revert "drm/radeon/pm: adjust display configuration after powerstate", + which caused a regression on some older hardware [ Ian Campbell ] * [arm64] Enable ARCH_HISI (Hisilicon) and the set of currently available diff --git a/debian/patches/bugfix/all/revert-drm-radeon-pm-adjust-display-configuration-af.patch b/debian/patches/bugfix/all/revert-drm-radeon-pm-adjust-display-configuration-af.patch new file mode 100644 index 000000000..17e8020ad --- /dev/null +++ b/debian/patches/bugfix/all/revert-drm-radeon-pm-adjust-display-configuration-af.patch @@ -0,0 +1,39 @@ +From: Alex Deucher +Date: Tue, 8 Mar 2016 11:31:00 -0500 +Subject: Revert "drm/radeon/pm: adjust display configuration after powerstate" +Origin: https://git.kernel.org/linus/d74e766e1916d0e09b86e4b5b9d0f819628fd546 + +This reverts commit 39d4275058baf53e89203407bf3841ff2c74fa32. + +This caused a regression on some older hardware. + +bug: +https://bugzilla.kernel.org/show_bug.cgi?id=113891 + +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org +--- + drivers/gpu/drm/radeon/radeon_pm.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/radeon/radeon_pm.c ++++ b/drivers/gpu/drm/radeon/radeon_pm.c +@@ -1075,6 +1075,8 @@ force: + + /* update display watermarks based on new power state */ + radeon_bandwidth_update(rdev); ++ /* update displays */ ++ radeon_dpm_display_configuration_changed(rdev); + + /* wait for the rings to drain */ + for (i = 0; i < RADEON_NUM_RINGS; i++) { +@@ -1091,9 +1093,6 @@ force: + + radeon_dpm_post_set_power_state(rdev); + +- /* update displays */ +- radeon_dpm_display_configuration_changed(rdev); +- + rdev->pm.dpm.current_active_crtcs = rdev->pm.dpm.new_active_crtcs; + rdev->pm.dpm.current_active_crtc_count = rdev->pm.dpm.new_active_crtc_count; + rdev->pm.dpm.single_display = single_display; diff --git a/debian/patches/series b/debian/patches/series index e4b136c10..6df23b031 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -139,3 +139,4 @@ debian/revert-libata-align-ata_device-s-id-on-a-cacheline.patch debian/module-fix-abi-change-in-4.4.5.patch bugfix/x86/x86-efi-fix-boot-crash-by-always-mapping-boot-servic.patch bugfix/x86/x86-mm-pat-fix-boot-crash-when-1gb-pages-are-not-supported.patch +bugfix/all/revert-drm-radeon-pm-adjust-display-configuration-af.patch From d0eb57c9f352e2f95e0c3bf027c9ac0ebcd6219d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 16 Mar 2016 16:47:20 +0000 Subject: [PATCH 21/27] [armhf] gpio: Enable GPIO_PCF857X as module, needed by TI DRA7xx EVMs The armmp kernel is supposed to support DRA7xx systems, but currently fails to boot on the EVM as it's missing the driver for the GPIO expanders. --- debian/changelog | 1 + debian/config/armhf/config.armmp | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 68dff03b3..2539eaffd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -80,6 +80,7 @@ linux (4.4.5-1) UNRELEASED; urgency=medium - mm/pat: Fix boot crash when 1GB pages are not supported by cpu * Revert "drm/radeon/pm: adjust display configuration after powerstate", which caused a regression on some older hardware + * [armhf] gpio: Enable GPIO_PCF857X as module, needed by TI DRA7xx EVMs [ Ian Campbell ] * [arm64] Enable ARCH_HISI (Hisilicon) and the set of currently available diff --git a/debian/config/armhf/config.armmp b/debian/config/armhf/config.armmp index 1c71d6d24..af73db29f 100644 --- a/debian/config/armhf/config.armmp +++ b/debian/config/armhf/config.armmp @@ -235,6 +235,7 @@ CONFIG_RASPBERRYPI_FIRMWARE=y CONFIG_GPIOLIB=y CONFIG_GPIO_GENERIC_PLATFORM=m CONFIG_GPIO_PCA953X=m +CONFIG_GPIO_PCF857X=m CONFIG_GPIO_DA9052=m CONFIG_GPIO_PALMAS=y CONFIG_GPIO_TWL4030=y From 65a9f754ff09be1b8517d7e1733079a998b74094 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 16 Mar 2016 17:19:47 +0000 Subject: [PATCH 22/27] Add bug closure for GPIO_PCF857X --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index 2539eaffd..6915b6bfe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -81,6 +81,7 @@ linux (4.4.5-1) UNRELEASED; urgency=medium * Revert "drm/radeon/pm: adjust display configuration after powerstate", which caused a regression on some older hardware * [armhf] gpio: Enable GPIO_PCF857X as module, needed by TI DRA7xx EVMs + (Closes: #818386) [ Ian Campbell ] * [arm64] Enable ARCH_HISI (Hisilicon) and the set of currently available From 67517892da4890e90df73a3503fd123f07b69ffe Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 16 Mar 2016 13:22:40 +0000 Subject: [PATCH 23/27] Update to 4.4.6 --- debian/changelog | 53 +++++++++++++++++-- ...-radeon-call-hpd_irq_event-on-resume.patch | 22 -------- ...n-pm-adjust-display-configuration-af.patch | 39 -------------- ...werpc-fix-dedotify-for-binutils-2.26.patch | 32 ----------- debian/patches/series | 3 -- 5 files changed, 50 insertions(+), 99 deletions(-) delete mode 100644 debian/patches/bugfix/all/revert-drm-radeon-call-hpd_irq_event-on-resume.patch delete mode 100644 debian/patches/bugfix/all/revert-drm-radeon-pm-adjust-display-configuration-af.patch delete mode 100644 debian/patches/bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch diff --git a/debian/changelog b/debian/changelog index 6915b6bfe..2ab215a6b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux (4.4.5-1) UNRELEASED; urgency=medium +linux (4.4.6-1) UNRELEASED; urgency=medium [ Salvatore Bonaccorso ] * New upstream stable update: @@ -78,10 +78,57 @@ linux (4.4.5-1) UNRELEASED; urgency=medium - efi: Fix boot crash by always mapping boot service regions into new EFI page tables (Closes: #815125) - mm/pat: Fix boot crash when 1GB pages are not supported by cpu - * Revert "drm/radeon/pm: adjust display configuration after powerstate", - which caused a regression on some older hardware * [armhf] gpio: Enable GPIO_PCF857X as module, needed by TI DRA7xx EVMs (Closes: #818386) + * New upstream stable update: + https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.6 + - [arm64] account for sparsemem section alignment when choosing vmemmap + offset + - [armel,armhf] mvebu: fix overlap of Crypto SRAM with PCIe memory window + - [armhf] dts: dra7: do not gate cpsw clock due to errata i877 + - [armhf] OMAP2+: hwmod: Introduce ti,no-idle dt property + - PCI: Allow a NULL "parent" pointer in pci_bus_assign_domain_nr() + - kvm: cap halt polling at exactly halt_poll_ns + - [x86] KVM: VMX: disable PEBS before a guest entry + - [s390x] KVM: correct fprs on SIGP (STOP AND) STORE STATUS + - [powerpc*] KVM: Book3S HV: Sanitize special-purpose register values on + guest exit + - [x86] KVM: MMU: fix ept=0/pte.u=1/pte.w=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0 + combo + - [x86] KVM: MMU: fix reserved bit check for + ept=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0 + - [s390x] mm: four page table levels vs. fork (CVE-2016-XXXX) + - [s390x] dasd: fix diag 0x250 inline assembly + - tracing: Fix check for cpu online when event is disabled + - jffs2: reduce the breakage on recovery from halfway failed rename() + - ncpfs: fix a braino in OOM handling in ncp_fill_cache() + - ASoC: dapm: Fix ctl value accesses in a wrong type + - ovl: ignore lower entries when checking purity of non-directory entries + - ovl: fix working on distributed fs as lower layer + - wext: fix message delay/ordering + - cfg80211/wext: fix message ordering + - can: gs_usb: fixed disconnect bug by removing erroneous use of kfree() + - iwlwifi: mvm: inc pending frames counter also when txing non-sta + - mac80211: minstrel: Change expected throughput unit back to Kbps + - mac80211: fix use of uninitialised values in RX aggregation + - mac80211: minstrel_ht: set default tx aggregation timeout to 0 + - mac80211: minstrel_ht: fix a logic error in RTS/CTS handling + - mac80211: check PN correctly for GCMP-encrypted fragmented MPDUs + - mac80211: Fix Public Action frame RX in AP mode + - [armhf] gpu: ipu-v3: Do not bail out on missing optional port nodes + - [i386/686-pae] mm: Fix slow_virt_to_phys() for X86_PAE again + - Revert "drm/radeon: call hpd_irq_event on resume" + - drm/amdgpu: Fix error handling in amdgpu_flip_work_func. + - drm/radeon: Fix error handling in radeon_flip_work_func. + - Revert "drm/radeon/pm: adjust display configuration after powerstate" + - [powerpc*] powernv: Add a kmsg_dumper that flushes console output on panic + - [powerpc*] powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages + - userfaultfd: don't block on the last VM updates at exit time + - ovl: copy new uid/gid into overlayfs runtime inode + - ovl: fix getcwd() failure after unsuccessful rmdir + - [mips*] smp.c: Fix uninitialised temp_foreign_map + - block: don't optimize for non-cloned bio in bio_get_last_bvec() + - target: Drop incorrect ABORT_TASK put for completed commands [ Ian Campbell ] * [arm64] Enable ARCH_HISI (Hisilicon) and the set of currently available diff --git a/debian/patches/bugfix/all/revert-drm-radeon-call-hpd_irq_event-on-resume.patch b/debian/patches/bugfix/all/revert-drm-radeon-call-hpd_irq_event-on-resume.patch deleted file mode 100644 index 8ad228d9f..000000000 --- a/debian/patches/bugfix/all/revert-drm-radeon-call-hpd_irq_event-on-resume.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Ben Hutchings -Date: Mon, 7 Mar 2016 07:55:44 +0000 -Subject: Revert "drm/radeon: call hpd_irq_event on resume" - -This reverts commit dbb17a21c131eca94eb31136eee9a7fe5aff00d9, -reported to cause regressions (crash/hang) on some systems. ---- - drivers/gpu/drm/radeon/radeon_device.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c -index 902b59cebac5..4197ca1bb1e4 100644 ---- a/drivers/gpu/drm/radeon/radeon_device.c -+++ b/drivers/gpu/drm/radeon/radeon_device.c -@@ -1744,7 +1744,6 @@ int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon) - } - - drm_kms_helper_poll_enable(dev); -- drm_helper_hpd_irq_event(dev); - - /* set the power state here in case we are a PX system or headless */ - if ((rdev->pm.pm_method == PM_METHOD_DPM) && rdev->pm.dpm_enabled) diff --git a/debian/patches/bugfix/all/revert-drm-radeon-pm-adjust-display-configuration-af.patch b/debian/patches/bugfix/all/revert-drm-radeon-pm-adjust-display-configuration-af.patch deleted file mode 100644 index 17e8020ad..000000000 --- a/debian/patches/bugfix/all/revert-drm-radeon-pm-adjust-display-configuration-af.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Alex Deucher -Date: Tue, 8 Mar 2016 11:31:00 -0500 -Subject: Revert "drm/radeon/pm: adjust display configuration after powerstate" -Origin: https://git.kernel.org/linus/d74e766e1916d0e09b86e4b5b9d0f819628fd546 - -This reverts commit 39d4275058baf53e89203407bf3841ff2c74fa32. - -This caused a regression on some older hardware. - -bug: -https://bugzilla.kernel.org/show_bug.cgi?id=113891 - -Signed-off-by: Alex Deucher -Cc: stable@vger.kernel.org ---- - drivers/gpu/drm/radeon/radeon_pm.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - ---- a/drivers/gpu/drm/radeon/radeon_pm.c -+++ b/drivers/gpu/drm/radeon/radeon_pm.c -@@ -1075,6 +1075,8 @@ force: - - /* update display watermarks based on new power state */ - radeon_bandwidth_update(rdev); -+ /* update displays */ -+ radeon_dpm_display_configuration_changed(rdev); - - /* wait for the rings to drain */ - for (i = 0; i < RADEON_NUM_RINGS; i++) { -@@ -1091,9 +1093,6 @@ force: - - radeon_dpm_post_set_power_state(rdev); - -- /* update displays */ -- radeon_dpm_display_configuration_changed(rdev); -- - rdev->pm.dpm.current_active_crtcs = rdev->pm.dpm.new_active_crtcs; - rdev->pm.dpm.current_active_crtc_count = rdev->pm.dpm.new_active_crtc_count; - rdev->pm.dpm.single_display = single_display; diff --git a/debian/patches/bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch b/debian/patches/bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch deleted file mode 100644 index fb93c4a5c..000000000 --- a/debian/patches/bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Andreas Schwab -Date: Fri, 5 Feb 2016 19:50:03 +0100 -Subject: powerpc: Fix dedotify for binutils >= 2.26 -Origin: https://git.kernel.org/linus/f15838e9cac8f78f0cc506529bb9d3b9fa589c1f - -Since binutils 2.26 BFD is doing suffix merging on STRTAB sections. But -dedotify modifies the symbol names in place, which can also modify -unrelated symbols with a name that matches a suffix of a dotted name. To -remove the leading dot of a symbol name we can just increment the pointer -into the STRTAB section instead. - -Backport to all stables to avoid breakage when people update their -binutils - mpe. - -Cc: stable@vger.kernel.org -Signed-off-by: Andreas Schwab -Signed-off-by: Michael Ellerman ---- - arch/powerpc/kernel/module_64.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/powerpc/kernel/module_64.c -+++ b/arch/powerpc/kernel/module_64.c -@@ -335,7 +335,7 @@ static void dedotify(Elf64_Sym *syms, un - if (syms[i].st_shndx == SHN_UNDEF) { - char *name = strtab + syms[i].st_name; - if (name[0] == '.') -- memmove(name, name+1, strlen(name)); -+ syms[i].st_name++; - } - } - } diff --git a/debian/patches/series b/debian/patches/series index 6df23b031..d2f87343e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -132,11 +132,8 @@ debian/revert-cgroup-make-sure-a-parent-css-isn-t-offlined.patch debian/thermal-fix-abi-change-in-4.4.4.patch debian/ipv4-fix-abi-change-in-4.4.4.patch debian/ipv6-fix-abi-change-in-4.4.4.patch -bugfix/all/revert-drm-radeon-call-hpd_irq_event-on-resume.patch -bugfix/powerpc/powerpc-fix-dedotify-for-binutils-2.26.patch bugfix/x86/drm-i915-Fix-oops-caused-by-fbdev-initialization-fai.patch debian/revert-libata-align-ata_device-s-id-on-a-cacheline.patch debian/module-fix-abi-change-in-4.4.5.patch bugfix/x86/x86-efi-fix-boot-crash-by-always-mapping-boot-servic.patch bugfix/x86/x86-mm-pat-fix-boot-crash-when-1gb-pages-are-not-supported.patch -bugfix/all/revert-drm-radeon-pm-adjust-display-configuration-af.patch From 29f3f5a875ecf3c19c74139bcb517db1dc1fc4dd Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 17 Mar 2016 01:12:20 +0000 Subject: [PATCH 24/27] Fix reference to CVE-2016-2143 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 2ab215a6b..dd6475ec3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -97,7 +97,7 @@ linux (4.4.6-1) UNRELEASED; urgency=medium combo - [x86] KVM: MMU: fix reserved bit check for ept=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0 - - [s390x] mm: four page table levels vs. fork (CVE-2016-XXXX) + - [s390x] mm: four page table levels vs. fork (CVE-2016-2143) - [s390x] dasd: fix diag 0x250 inline assembly - tracing: Fix check for cpu online when event is disabled - jffs2: reduce the breakage on recovery from halfway failed rename() From 37886b6ea3146b3bd8da4706e1ecac119bb597b2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 17 Mar 2016 01:15:05 +0000 Subject: [PATCH 25/27] netfilter: x_tables: check for size overflow (CVE-2016-3135) --- debian/changelog | 1 + ...ter-x_tables-check-for-size-overflow.patch | 29 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 31 insertions(+) create mode 100644 debian/patches/bugfix/all/netfilter-x_tables-check-for-size-overflow.patch diff --git a/debian/changelog b/debian/changelog index dd6475ec3..fea1085eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -129,6 +129,7 @@ linux (4.4.6-1) UNRELEASED; urgency=medium - [mips*] smp.c: Fix uninitialised temp_foreign_map - block: don't optimize for non-cloned bio in bio_get_last_bvec() - target: Drop incorrect ABORT_TASK put for completed commands + * netfilter: x_tables: check for size overflow (CVE-2016-3135) [ Ian Campbell ] * [arm64] Enable ARCH_HISI (Hisilicon) and the set of currently available diff --git a/debian/patches/bugfix/all/netfilter-x_tables-check-for-size-overflow.patch b/debian/patches/bugfix/all/netfilter-x_tables-check-for-size-overflow.patch new file mode 100644 index 000000000..914a9f087 --- /dev/null +++ b/debian/patches/bugfix/all/netfilter-x_tables-check-for-size-overflow.patch @@ -0,0 +1,29 @@ +From: Florian Westphal +Date: Thu, 10 Mar 2016 01:56:23 +0100 +Subject: netfilter: x_tables: check for size overflow +Origin: https://git.kernel.org/cgit/linux/kernel/git/pablo/nf-next.git/commit?id=d157bd761585605b7882935ffb86286919f62ea1 + +Ben Hawkes says: + integer overflow in xt_alloc_table_info, which on 32-bit systems can + lead to small structure allocation and a copy_from_user based heap + corruption. + +Reported-by: Ben Hawkes +Signed-off-by: Florian Westphal +Signed-off-by: Pablo Neira Ayuso +--- + net/netfilter/x_tables.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/net/netfilter/x_tables.c ++++ b/net/netfilter/x_tables.c +@@ -658,6 +658,9 @@ struct xt_table_info *xt_alloc_table_inf + struct xt_table_info *info = NULL; + size_t sz = sizeof(*info) + size; + ++ if (sz < sizeof(*info)) ++ return NULL; ++ + /* Pedantry: prevent them from hitting BUG() in vmalloc.c --RR */ + if ((SMP_ALIGN(size) >> PAGE_SHIFT) + 2 > totalram_pages) + return NULL; diff --git a/debian/patches/series b/debian/patches/series index d2f87343e..6f300e254 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -137,3 +137,4 @@ debian/revert-libata-align-ata_device-s-id-on-a-cacheline.patch debian/module-fix-abi-change-in-4.4.5.patch bugfix/x86/x86-efi-fix-boot-crash-by-always-mapping-boot-servic.patch bugfix/x86/x86-mm-pat-fix-boot-crash-when-1gb-pages-are-not-supported.patch +bugfix/all/netfilter-x_tables-check-for-size-overflow.patch From 6a9bf9b4b425f56d010ce17684f540328f5645f8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 17 Mar 2016 01:25:18 +0000 Subject: [PATCH 26/27] changelog: Fix some architecture prefixes --- debian/changelog | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index fea1085eb..62d694bc4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,12 +18,12 @@ linux (4.4.6-1) UNRELEASED; urgency=medium - CIFS: Fix SMB2+ interim response processing for read requests - [x86] vfio: fix ioctl error handling - [x86] KVM: fix root cause for missed hardware breakpoints - - [arm,arm64] KVM: Fix ioctl error handling + - [arm*] KVM: Fix ioctl error handling - [amd64] iommu: Apply workaround for ATS write permission check - [amd64] iommu: Fix boot warning when device 00:00.0 is not iommu covered - [x86] iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path - target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors - - [x86,powerpc] drm/ast: Fix incorrect register check for DRAM width + - [x86,powerpc*] drm/ast: Fix incorrect register check for DRAM width - drm/radeon/pm: update current crtc info after setting the powerstate - [x86] drm/amdgpu/pm: update current crtc info after setting the powerstate - [x86] drm/amdgpu: apply gfx_v8 fixes to gfx_v7 as well @@ -42,11 +42,11 @@ linux (4.4.6-1) UNRELEASED; urgency=medium - jffs2: Fix page lock / f->sem deadlock - jffs2: Fix directory hardlinks from deleted directories - ALSA: usb-audio: Add a quirk for Plantronics DA45 - - ALSA: ctl: Fix ioctls for X32 ABI - - ALSA: hda - Fix mic issues on Acer Aspire E1-472 - - ALSA: rawmidi: Fix ioctls X32 ABI - - ALSA: timer: Fix ioctls for X32 ABI - - ALSA: pcm: Fix ioctls for X32 ABI + - [amd64] ALSA: ctl: Fix ioctls for X32 ABI + - [x86] ALSA: hda - Fix mic issues on Acer Aspire E1-472 + - [amd64] ALSA: rawmidi: Fix ioctls X32 ABI + - [amd64] ALSA: timer: Fix ioctls for X32 ABI + - [amd64] ALSA: pcm: Fix ioctls for X32 ABI - ALSA: seq: oss: Don't drain at closing a client - ALSA: hdspm: Fix wrong boolean ctl value accesses - ALSA: hdsp: Fix wrong boolean ctl value accesses @@ -58,8 +58,9 @@ linux (4.4.6-1) UNRELEASED; urgency=medium - USB: qcserial: add Sierra Wireless EM74xx device ID - USB: serial: option: add support for Telit LE922 PID 0x1045 - USB: serial: option: add support for Quectel UC20 - - [mips] scache: Fix scache init with invalid line size. - - [mips]: traps: Fix SIGFPE information leak from `do_ov' and `do_trap_or_bp' + - [mips*] scache: Fix scache init with invalid line size. + - [mips*] traps: Fix SIGFPE information leak from `do_ov' and + `do_trap_or_bp' - ubi: Fix out of bounds write in volume update code - thermal: cpu_cooling: fix out of bounds access in time_in_idle - [x86] drm/amdgpu: Use drm_calloc_large for VM page_tables array @@ -118,7 +119,7 @@ linux (4.4.6-1) UNRELEASED; urgency=medium - [armhf] gpu: ipu-v3: Do not bail out on missing optional port nodes - [i386/686-pae] mm: Fix slow_virt_to_phys() for X86_PAE again - Revert "drm/radeon: call hpd_irq_event on resume" - - drm/amdgpu: Fix error handling in amdgpu_flip_work_func. + - [x86] drm/amdgpu: Fix error handling in amdgpu_flip_work_func. - drm/radeon: Fix error handling in radeon_flip_work_func. - Revert "drm/radeon/pm: adjust display configuration after powerstate" - [powerpc*] powernv: Add a kmsg_dumper that flushes console output on panic From 5b884b50ae10397afbd47f99317b1b4484722ecd Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 17 Mar 2016 01:25:23 +0000 Subject: [PATCH 27/27] Prepare to release linux (4.4.6-1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 62d694bc4..796ce6345 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux (4.4.6-1) UNRELEASED; urgency=medium +linux (4.4.6-1) unstable; urgency=medium [ Salvatore Bonaccorso ] * New upstream stable update: @@ -136,7 +136,7 @@ linux (4.4.6-1) UNRELEASED; urgency=medium * [arm64] Enable ARCH_HISI (Hisilicon) and the set of currently available drivers (Power, Thermal, MMC) (Closes: #812540) - -- Salvatore Bonaccorso Sun, 13 Mar 2016 17:04:02 +0100 + -- Ben Hutchings Thu, 17 Mar 2016 01:25:23 +0000 linux (4.4.4-2) unstable; urgency=medium