From b101f08c765a1c1c91afc4bb79d8a7375ce88021 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Wed, 11 May 2016 00:15:41 +0200 Subject: [PATCH 01/36] [mips*] Fix PR_SET_FPMODE issues with multi-threaded programs. --- debian/changelog | 7 ++ ...eemption-during-prctl-PR_SET_FP_MODE.patch | 42 +++++++ ...to-lose-FP-context-during-mode-switc.patch | 104 ++++++++++++++++++ debian/patches/series | 2 + 4 files changed, 155 insertions(+) create mode 100644 debian/patches/bugfix/mips/MIPS-Disable-preemption-during-prctl-PR_SET_FP_MODE.patch create mode 100644 debian/patches/bugfix/mips/MIPS-Force-CPUs-to-lose-FP-context-during-mode-switc.patch diff --git a/debian/changelog b/debian/changelog index f01683d77..76dd3feed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux (4.5.3-3) UNRELEASED; urgency=medium + + [ Aurelien Jarno ] + * [mips*] Fix PR_SET_FPMODE issues with multi-threaded programs. + + -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 + linux (4.5.3-2) unstable; urgency=medium * [s390x] PCI: Ignore zpci ABI changes; these functions are not used by diff --git a/debian/patches/bugfix/mips/MIPS-Disable-preemption-during-prctl-PR_SET_FP_MODE.patch b/debian/patches/bugfix/mips/MIPS-Disable-preemption-during-prctl-PR_SET_FP_MODE.patch new file mode 100644 index 000000000..4aac015c3 --- /dev/null +++ b/debian/patches/bugfix/mips/MIPS-Disable-preemption-during-prctl-PR_SET_FP_MODE.patch @@ -0,0 +1,42 @@ +From: Paul Burton +Date: Thu, 21 Apr 2016 12:43:57 +0100 +Subject: [1/2] MIPS: Disable preemption during prctl(PR_SET_FP_MODE, ...) +Origin: https://patchwork.linux-mips.org/patch/13144/ + +Whilst a PR_SET_FP_MODE prctl is performed there are decisions made +based upon whether the task is executing on the current CPU. This may +change if we're preempted, so disable preemption to avoid such changes +for the lifetime of the mode switch. + +Signed-off-by: Paul Burton +Fixes: 9791554b45a2 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS") +Cc: stable # v4.0+ +--- + arch/mips/kernel/process.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c +index 92880ce..ce55ea0 100644 +--- a/arch/mips/kernel/process.c ++++ b/arch/mips/kernel/process.c +@@ -601,6 +601,9 @@ int mips_set_process_fp_mode(struct task_struct *task, unsigned int value) + if (!(value & PR_FP_MODE_FR) && cpu_has_fpu && cpu_has_mips_r6) + return -EOPNOTSUPP; + ++ /* Proceed with the mode switch */ ++ preempt_disable(); ++ + /* Save FP & vector context, then disable FPU & MSA */ + if (task->signal == current->signal) + lose_fpu(1); +@@ -659,6 +662,7 @@ int mips_set_process_fp_mode(struct task_struct *task, unsigned int value) + + /* Allow threads to use FP again */ + atomic_set(&task->mm->context.fp_mode_switching, 0); ++ preempt_enable(); + + return 0; + } +-- +2.8.1 + diff --git a/debian/patches/bugfix/mips/MIPS-Force-CPUs-to-lose-FP-context-during-mode-switc.patch b/debian/patches/bugfix/mips/MIPS-Force-CPUs-to-lose-FP-context-during-mode-switc.patch new file mode 100644 index 000000000..9619c587e --- /dev/null +++ b/debian/patches/bugfix/mips/MIPS-Force-CPUs-to-lose-FP-context-during-mode-switc.patch @@ -0,0 +1,104 @@ +From: Paul Burton +Date: Thu, 21 Apr 2016 12:43:58 +0100 +Subject: [2/2] MIPS: Force CPUs to lose FP context during mode switches +Origin: https://patchwork.linux-mips.org/patch/13145/ + +Commit 9791554b45a2 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options +for MIPS") added support for the PR_SET_FP_MODE prctl, which allows a +userland program to modify its FP mode at runtime. This is most notably +required if dynamic linking leads to the FP mode requirement changing at +runtime from that indicated in the initial executable's ELF header. In +order to avoid overhead in the general FP context restore code, it aimed +to have threads in the process become unable to enable the FPU during a +mode switch & have the thread calling the prctl syscall wait for all +other threads in the process to be context switched at least once. Once +that happens we can know that no thread in the process whose mode will +be switched has live FP context, and it's safe to perform the mode +switch. However in the (rare) case of modeswitches occurring in +multithreaded programs this can lead to indeterminate delays for the +thread invoking the prctl syscall, and the code monitoring for those +context switches was woefully inadequate for all but the simplest cases. + +Fix this by broadcasting an IPI if other CPUs may have live FP context +for an affected thread, with a handler causing those CPUs to relinquish +their FPU ownership. Threads will then be allowed to continue running +but will stall on the wait_on_atomic_t in enable_restore_fp_context if +they attempt to use FP again whilst the mode switch is still in +progress. The end result is less fragile poking at scheduler context +switch counts & a more expedient completion of the mode switch. + +Signed-off-by: Paul Burton +Fixes: 9791554b45a2 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS") +Cc: stable # v4.0+ +--- + arch/mips/kernel/process.c | 40 +++++++++++++++++----------------------- + 1 file changed, 17 insertions(+), 23 deletions(-) + +diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c +index ce55ea0..e1b36a4 100644 +--- a/arch/mips/kernel/process.c ++++ b/arch/mips/kernel/process.c +@@ -580,11 +580,19 @@ int mips_get_process_fp_mode(struct task_struct *task) + return value; + } + ++static void prepare_for_fp_mode_switch(void *info) ++{ ++ struct mm_struct *mm = info; ++ ++ if (current->mm == mm) ++ lose_fpu(1); ++} ++ + int mips_set_process_fp_mode(struct task_struct *task, unsigned int value) + { + const unsigned int known_bits = PR_FP_MODE_FR | PR_FP_MODE_FRE; +- unsigned long switch_count; + struct task_struct *t; ++ int max_users; + + /* Check the value is valid */ + if (value & ~known_bits) +@@ -613,31 +621,17 @@ int mips_set_process_fp_mode(struct task_struct *task, unsigned int value) + smp_mb__after_atomic(); + + /* +- * If there are multiple online CPUs then wait until all threads whose +- * FP mode is about to change have been context switched. This approach +- * allows us to only worry about whether an FP mode switch is in +- * progress when FP is first used in a tasks time slice. Pretty much all +- * of the mode switch overhead can thus be confined to cases where mode +- * switches are actually occuring. That is, to here. However for the +- * thread performing the mode switch it may take a while... ++ * If there are multiple online CPUs then force any which are running ++ * threads in this process to lose their FPU context, which they can't ++ * regain until fp_mode_switching is cleared later. + */ + if (num_online_cpus() > 1) { +- spin_lock_irq(&task->sighand->siglock); +- +- for_each_thread(task, t) { +- if (t == current) +- continue; +- +- switch_count = t->nvcsw + t->nivcsw; +- +- do { +- spin_unlock_irq(&task->sighand->siglock); +- cond_resched(); +- spin_lock_irq(&task->sighand->siglock); +- } while ((t->nvcsw + t->nivcsw) == switch_count); +- } ++ /* No need to send an IPI for the local CPU */ ++ max_users = (task->mm == current->mm) ? 1 : 0; + +- spin_unlock_irq(&task->sighand->siglock); ++ if (atomic_read(¤t->mm->mm_users) > max_users) ++ smp_call_function(prepare_for_fp_mode_switch, ++ (void *)current->mm, 1); + } + + /* +-- +2.8.1 + diff --git a/debian/patches/series b/debian/patches/series index d4fe6923d..7bacabe55 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -46,6 +46,8 @@ bugfix/x86/viafb-autoload-on-olpc-xo1.5-only.patch # Arch bug fixes bugfix/mips/MIPS-Allow-emulation-for-unaligned-LSDXC1-instructions.patch +bugfix/mips/MIPS-Disable-preemption-during-prctl-PR_SET_FP_MODE.patch +bugfix/mips/MIPS-Force-CPUs-to-lose-FP-context-during-mode-switc.patch bugfix/x86/vmxnet3-fix-lock-imbalance-in-vmxnet3_tq_xmit.patch bugfix/x86/acpi-processor-request-native-thermal-interrupt-hand.patch bugfix/arm/arm-dts-kirkwood-fix-sd-slot-default-configuration-f.patch From 102221d3f43275c93b6846569daa6d3698d19c30 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Thu, 12 May 2016 14:34:03 +0200 Subject: [PATCH 02/36] [i386] Stop recommending libc6-i686. --- debian/changelog | 1 + debian/config/i386/defines | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 76dd3feed..5439aeb45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ linux (4.5.3-3) UNRELEASED; urgency=medium [ Aurelien Jarno ] * [mips*] Fix PR_SET_FPMODE issues with multi-threaded programs. + * [i386] Stop recommending libc6-i686. -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 diff --git a/debian/config/i386/defines b/debian/config/i386/defines index b988c322a..db545bacc 100644 --- a/debian/config/i386/defines +++ b/debian/config/i386/defines @@ -45,4 +45,3 @@ parts: pae configs: kernelarch-x86/config-arch-32 i386/config.686-pae -recommends: libc6-i686 From 2c6d72a09eecba0ba3e7b08a28915a41207bc0bb Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Thu, 12 May 2016 21:20:31 +0200 Subject: [PATCH 03/36] Update to 4.5.4 --- debian/changelog | 93 +++++++++- ...equest-native-thermal-interrupt-hand.patch | 166 ------------------ debian/patches/series | 1 - 3 files changed, 92 insertions(+), 168 deletions(-) delete mode 100644 debian/patches/bugfix/x86/acpi-processor-request-native-thermal-interrupt-hand.patch diff --git a/debian/changelog b/debian/changelog index 5439aeb45..6b92ff27e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,95 @@ -linux (4.5.3-3) UNRELEASED; urgency=medium +linux (4.5.4-1) UNRELEASED; urgency=medium + + * New upstream stable update: + https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.4 + - clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test + - RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips + - net/mlx5_core: Fix caching ATOMIC endian mode capability + - ipvs: handle ip_vs_fill_iph_skb_off failure + - ipvs: correct initial offset of Call-ID header search in SIP persistence engine + - ipvs: drop first packet to redirect conntrack + - rtlwifi: Fix size of wireless mode variable + - mfd: intel-lpss: Remove clock tree on error path + - nbd: ratelimit error msgs after socket close + - lightnvm: update closed list outside of intr context + - null_blk: add lightnvm null_blk device to the nullb_list + - ata: ahci_xgene: dereferencing uninitialized pointer in probe + - wlcore: fix error handling in wlcore_event_fw_logger + - ath10k: fix pktlog in QCA99X0 + - mwifiex: fix corner case association failure + - CNS3xxx: Fix PCI cns3xxx_write_config() + - clk-divider: make sure read-only dividers do not write to their register + - soc: rockchip: power-domain: fix err handle while probing + - clk: rockchip: fix wrong mmc phase shift for rk3228 + - clk: rockchip: free memory in error cases when registering clock branches + - clk: meson: Fix meson_clk_register_clks() signature type mismatch + - clk: qcom: msm8960: fix ce3_core clk enable register + - clk: versatile: sp810: support reentrance + - clk: qcom: msm8960: Fix ce3_src register offset + - clk: sunxi: Fix sun8i-a23-apb0-clk divider flags + - clk: xgene: Add missing parenthesis when clearing divider value + - clk: bcm2835: fix check of error code returned by devm_ioremap_resource() + - pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations + - pwm: omap-dmtimer: Add sanity checking for load and match values + - pwm: omap-dmtimer: Round load and match values rather than truncate + - lpfc: fix misleading indentation + - gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup list + - ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation + - mac80211: fix statistics leak if dev_alloc_name() fails + - tracing: Don't display trigger file for events that can't be enabled + - MD: make bio mergeable + - Minimal fix-up of bad hashing behavior of hash_64() + - mm: memcontrol: let v2 cgroups follow changes in system swappiness + - mm, cma: prevent nr_isolated_* counters from going negative + - mm/zswap: provide unique zpool name + - propogate_mnt: Handle the first propogated copy being a slave + - modpost: fix module autoloading for OF devices with generic compatible property + - ARM: EXYNOS: Properly skip unitialized parent clock in power domain on + - ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel + - xen: Fix page <-> pfn conversion on 32 bit systems + - xen/balloon: Fix crash when ballooning on x86 32 bit PAE + - xen/evtchn: fix ring resize when binding new events + - HID: wacom: Add support for DTK-1651 + - HID: Fix boot delay for Creative SB Omni Surround 5.1 with quirk + - Input: zforce_ts - fix dual touch recognition + - proc: prevent accessing /proc//environ until it's ready + - mm: update min_free_kbytes from khugepaged after core initialization + - batman-adv: fix DAT candidate selection (must use vid) + - batman-adv: Check skb size before using encapsulated ETH+VLAN header + - batman-adv: Fix broadcast/ogm queue limit on a removed interface + - batman-adv: Reduce refcnt of removed router when updating route + - libnvdimm, pfn: fix memmap reservation sizing + - writeback: Fix performance regression in wb_over_bg_thresh() + - MAINTAINERS: Remove asterisk from EFI directory names + - x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO + - ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value + - parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls + - cpufreq: st: enable selective initialization based on the platform + - ARC: Add missing io barriers to io{read,write}{16,32}be() + - x86/sysfb_efi: Fix valid BAR address range check + - ARM: dts: apq8064: add ahci ports-implemented mask + - ACPICA: Dispatcher: Update thread ID for recursive method calls + - powerpc: Fix bad inline asm constraint in create_zero_mask() + - libahci: save port map for forced port map + - ata: ahci-platform: Add ports-implemented DT bindings. + - USB: serial: cp210x: add ID for Link ECU + - USB: serial: cp210x: add Straizona Focusers device ids + - Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" + - nvmem: mxs-ocotp: fix buffer overflow in read + - Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() + - gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading + - drm/amdgpu: make sure vertical front porch is at least 1 + - drm/amdgpu: set metadata pointer to NULL after freeing. + - iio: ak8975: Fix NULL pointer exception on early interrupt + - iio: ak8975: fix maybe-uninitialized warning + - drm/radeon: make sure vertical front porch is at least 1 + - drm/i915: Avoid stalling on pending flips for legacy cursor updates + - drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume + - drm/i915: Fix system resume if PCI device remained enabled + - drm/i915: Fix eDP low vswing for Broadwell + - drm/i915: Make RPS EI/thresholds multiple of 25 on SNB-BDW + - drm/i915: Fake HDMI live status + - ACPI / processor: Request native thermal interrupt handling via _OSC [ Aurelien Jarno ] * [mips*] Fix PR_SET_FPMODE issues with multi-threaded programs. diff --git a/debian/patches/bugfix/x86/acpi-processor-request-native-thermal-interrupt-hand.patch b/debian/patches/bugfix/x86/acpi-processor-request-native-thermal-interrupt-hand.patch deleted file mode 100644 index cc527fabf..000000000 --- a/debian/patches/bugfix/x86/acpi-processor-request-native-thermal-interrupt-hand.patch +++ /dev/null @@ -1,166 +0,0 @@ -From: Srinivas Pandruvada -Date: Wed, 23 Mar 2016 21:07:39 -0700 -Subject: ACPI / processor: Request native thermal interrupt handling via _OSC -Origin: https://git.kernel.org/linus/a21211672c9a1d730a39aa65d4a5b3414700adfb -Bug-Debian: https://bugs.debian.org/817016 - -There are several reports of freeze on enabling HWP (Hardware PStates) -feature on Skylake-based systems by the Intel P-states driver. The root -cause is identified as the HWP interrupts causing BIOS code to freeze. - -HWP interrupts use the thermal LVT which can be handled by Linux -natively, but on the affected Skylake-based systems SMM will respond -to it by default. This is a problem for several reasons: - - On the affected systems the SMM thermal LVT handler is broken (it - will crash when invoked) and a BIOS update is necessary to fix it. - - With thermal interrupt handled in SMM we lose all of the reporting - features of the arch/x86/kernel/cpu/mcheck/therm_throt driver. - - Some thermal drivers like x86-package-temp depend on the thermal - threshold interrupts signaled via the thermal LVT. - - The HWP interrupts are useful for debugging and tuning - performance (if the kernel can handle them). -The native handling of thermal interrupts needs to be enabled -because of that. - -This requires some way to tell SMM that the OS can handle thermal -interrupts. That can be done by using _OSC/_PDC in processor -scope very early during ACPI initialization. - -The meaning of _OSC/_PDC bit 12 in processor scope is whether or -not the OS supports native handling of interrupts for Collaborative -Processor Performance Control (CPPC) notifications. Since on -HWP-capable systems CPPC is a firmware interface to HWP, setting -this bit effectively tells the firmware that the OS will handle -thermal interrupts natively going forward. - -For details on _OSC/_PDC refer to: -http://www.intel.com/content/www/us/en/standards/processor-vendor-specific-acpi-specification.html - -To implement the _OSC/_PDC handshake as described, introduce a new -function, acpi_early_processor_osc(), that walks the ACPI -namespace looking for ACPI processor objects and invokes _OSC for -them with bit 12 in the capabilities buffer set and terminates the -namespace walk on the first success. - -Also modify intel_thermal_interrupt() to clear HWP status bits in -the HWP_STATUS MSR to acknowledge HWP interrupts (which prevents -them from firing continuously). - -Signed-off-by: Srinivas Pandruvada -[ rjw: Subject & changelog, function rename ] -Signed-off-by: Rafael J. Wysocki ---- - arch/x86/kernel/cpu/mcheck/therm_throt.c | 3 ++ - drivers/acpi/acpi_processor.c | 52 ++++++++++++++++++++++++++++++++ - drivers/acpi/bus.c | 3 ++ - drivers/acpi/internal.h | 6 ++++ - 4 files changed, 64 insertions(+) - -diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c -index 2c5aaf8c2e2f..05538582a809 100644 ---- a/arch/x86/kernel/cpu/mcheck/therm_throt.c -+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c -@@ -385,6 +385,9 @@ static void intel_thermal_interrupt(void) - { - __u64 msr_val; - -+ if (static_cpu_has(X86_FEATURE_HWP)) -+ wrmsrl_safe(MSR_HWP_STATUS, 0); -+ - rdmsrl(MSR_IA32_THERM_STATUS, msr_val); - - /* Check for violation of core thermal thresholds*/ -diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c -index b5e54f2da53d..0d92d0f915e9 100644 ---- a/drivers/acpi/acpi_processor.c -+++ b/drivers/acpi/acpi_processor.c -@@ -491,6 +491,58 @@ static void acpi_processor_remove(struct acpi_device *device) - } - #endif /* CONFIG_ACPI_HOTPLUG_CPU */ - -+#ifdef CONFIG_X86 -+static bool acpi_hwp_native_thermal_lvt_set; -+static acpi_status __init acpi_hwp_native_thermal_lvt_osc(acpi_handle handle, -+ u32 lvl, -+ void *context, -+ void **rv) -+{ -+ u8 sb_uuid_str[] = "4077A616-290C-47BE-9EBD-D87058713953"; -+ u32 capbuf[2]; -+ struct acpi_osc_context osc_context = { -+ .uuid_str = sb_uuid_str, -+ .rev = 1, -+ .cap.length = 8, -+ .cap.pointer = capbuf, -+ }; -+ -+ if (acpi_hwp_native_thermal_lvt_set) -+ return AE_CTRL_TERMINATE; -+ -+ capbuf[0] = 0x0000; -+ capbuf[1] = 0x1000; /* set bit 12 */ -+ -+ if (ACPI_SUCCESS(acpi_run_osc(handle, &osc_context))) { -+ if (osc_context.ret.pointer && osc_context.ret.length > 1) { -+ u32 *capbuf_ret = osc_context.ret.pointer; -+ -+ if (capbuf_ret[1] & 0x1000) { -+ acpi_handle_info(handle, -+ "_OSC native thermal LVT Acked\n"); -+ acpi_hwp_native_thermal_lvt_set = true; -+ } -+ } -+ kfree(osc_context.ret.pointer); -+ } -+ -+ return AE_OK; -+} -+ -+void __init acpi_early_processor_osc(void) -+{ -+ if (boot_cpu_has(X86_FEATURE_HWP)) { -+ acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, -+ ACPI_UINT32_MAX, -+ acpi_hwp_native_thermal_lvt_osc, -+ NULL, NULL, NULL); -+ acpi_get_devices(ACPI_PROCESSOR_DEVICE_HID, -+ acpi_hwp_native_thermal_lvt_osc, -+ NULL, NULL); -+ } -+} -+#endif -+ - /* - * The following ACPI IDs are known to be suitable for representing as - * processor devices. -diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c -index 891c42d1cd65..f9081b791b81 100644 ---- a/drivers/acpi/bus.c -+++ b/drivers/acpi/bus.c -@@ -1005,6 +1005,9 @@ static int __init acpi_bus_init(void) - goto error1; - } - -+ /* Set capability bits for _OSC under processor scope */ -+ acpi_early_processor_osc(); -+ - /* - * _OSC method may exist in module level code, - * so it must be run after ACPI_FULL_INITIALIZATION -diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h -index 1e6833a5cd44..6f41c73f82bb 100644 ---- a/drivers/acpi/internal.h -+++ b/drivers/acpi/internal.h -@@ -138,6 +138,12 @@ void acpi_early_processor_set_pdc(void); - static inline void acpi_early_processor_set_pdc(void) {} - #endif - -+#ifdef CONFIG_X86 -+void acpi_early_processor_osc(void); -+#else -+static inline void acpi_early_processor_osc(void) {} -+#endif -+ - /* -------------------------------------------------------------------------- - Embedded Controller - -------------------------------------------------------------------------- */ diff --git a/debian/patches/series b/debian/patches/series index 7bacabe55..8ce39e08e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -49,7 +49,6 @@ bugfix/mips/MIPS-Allow-emulation-for-unaligned-LSDXC1-instructions.patch bugfix/mips/MIPS-Disable-preemption-during-prctl-PR_SET_FP_MODE.patch bugfix/mips/MIPS-Force-CPUs-to-lose-FP-context-during-mode-switc.patch bugfix/x86/vmxnet3-fix-lock-imbalance-in-vmxnet3_tq_xmit.patch -bugfix/x86/acpi-processor-request-native-thermal-interrupt-hand.patch bugfix/arm/arm-dts-kirkwood-fix-sd-slot-default-configuration-f.patch bugfix/sparc/sparc-implement-and-wire-up-modalias_show-for-vio.patch bugfix/sparc/sparc-implement-and-wire-up-vio_hotplug-for-vio.patch From 09efe199c6a352908637c8e78c70eb4f6e2a8c34 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Thu, 12 May 2016 21:23:34 +0200 Subject: [PATCH 04/36] Add CVE-2016-4581 to changelog entry --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index 6b92ff27e..bc817295a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,6 +43,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - mm, cma: prevent nr_isolated_* counters from going negative - mm/zswap: provide unique zpool name - propogate_mnt: Handle the first propogated copy being a slave + (CVE-2016-4581) - modpost: fix module autoloading for OF devices with generic compatible property - ARM: EXYNOS: Properly skip unitialized parent clock in power domain on - ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel From 99cf691f48fc11f0e183b424d031c868acc16a62 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Thu, 12 May 2016 21:48:36 +0200 Subject: [PATCH 05/36] Improve changelog for stable update 4.5.4 --- debian/changelog | 52 +++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/debian/changelog b/debian/changelog index bc817295a..031f055a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,6 @@ linux (4.5.4-1) UNRELEASED; urgency=medium * New upstream stable update: https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.4 - - clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test - RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips - net/mlx5_core: Fix caching ATOMIC endian mode capability - ipvs: handle ip_vs_fill_iph_skb_off failure @@ -11,21 +10,16 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - rtlwifi: Fix size of wireless mode variable - mfd: intel-lpss: Remove clock tree on error path - nbd: ratelimit error msgs after socket close - - lightnvm: update closed list outside of intr context - null_blk: add lightnvm null_blk device to the nullb_list - - ata: ahci_xgene: dereferencing uninitialized pointer in probe - - wlcore: fix error handling in wlcore_event_fw_logger + - [arm64] ata: ahci_xgene: dereferencing uninitialized pointer in probe + - [armhf] wlcore: fix error handling in wlcore_event_fw_logger - ath10k: fix pktlog in QCA99X0 - mwifiex: fix corner case association failure - - CNS3xxx: Fix PCI cns3xxx_write_config() - clk-divider: make sure read-only dividers do not write to their register - - soc: rockchip: power-domain: fix err handle while probing - clk: rockchip: fix wrong mmc phase shift for rk3228 - clk: rockchip: free memory in error cases when registering clock branches - clk: meson: Fix meson_clk_register_clks() signature type mismatch - - clk: qcom: msm8960: fix ce3_core clk enable register - clk: versatile: sp810: support reentrance - - clk: qcom: msm8960: Fix ce3_src register offset - clk: sunxi: Fix sun8i-a23-apb0-clk divider flags - clk: xgene: Add missing parenthesis when clearing divider value - clk: bcm2835: fix check of error code returned by devm_ioremap_resource() @@ -45,32 +39,26 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - propogate_mnt: Handle the first propogated copy being a slave (CVE-2016-4581) - modpost: fix module autoloading for OF devices with generic compatible property - - ARM: EXYNOS: Properly skip unitialized parent clock in power domain on - - ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel + - [armhf] EXYNOS: Properly skip unitialized parent clock in power domain on + - [armhf] SoCFPGA: Fix secondary CPU startup in thumb2 kernel - xen: Fix page <-> pfn conversion on 32 bit systems - xen/balloon: Fix crash when ballooning on x86 32 bit PAE - xen/evtchn: fix ring resize when binding new events - HID: wacom: Add support for DTK-1651 - - HID: Fix boot delay for Creative SB Omni Surround 5.1 with quirk - - Input: zforce_ts - fix dual touch recognition - proc: prevent accessing /proc//environ until it's ready - mm: update min_free_kbytes from khugepaged after core initialization - batman-adv: fix DAT candidate selection (must use vid) - batman-adv: Check skb size before using encapsulated ETH+VLAN header - batman-adv: Fix broadcast/ogm queue limit on a removed interface - batman-adv: Reduce refcnt of removed router when updating route - - libnvdimm, pfn: fix memmap reservation sizing + - [x86] libnvdimm, pfn: fix memmap reservation sizing - writeback: Fix performance regression in wb_over_bg_thresh() - - MAINTAINERS: Remove asterisk from EFI directory names - - x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO - - ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value - - parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls - - cpufreq: st: enable selective initialization based on the platform - - ARC: Add missing io barriers to io{read,write}{16,32}be() - - x86/sysfb_efi: Fix valid BAR address range check - - ARM: dts: apq8064: add ahci ports-implemented mask + - [x86] tsc: Read all ratio bits from MSR_PLATFORM_INFO + - [arm64] cpuidle: Pass on arm_cpuidle_suspend()'s return value + - [x86] sysfb_efi: Fix valid BAR address range check + - [arm*] dts: apq8064: add ahci ports-implemented mask - ACPICA: Dispatcher: Update thread ID for recursive method calls - - powerpc: Fix bad inline asm constraint in create_zero_mask() + - [powerpc*] Fix bad inline asm constraint in create_zero_mask() - libahci: save port map for forced port map - ata: ahci-platform: Add ports-implemented DT bindings. - USB: serial: cp210x: add ID for Link ECU @@ -78,19 +66,19 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" - nvmem: mxs-ocotp: fix buffer overflow in read - Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() - - gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading + - [armhf] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading - drm/amdgpu: make sure vertical front porch is at least 1 - drm/amdgpu: set metadata pointer to NULL after freeing. - - iio: ak8975: Fix NULL pointer exception on early interrupt - - iio: ak8975: fix maybe-uninitialized warning + - [x86] iio: ak8975: Fix NULL pointer exception on early interrupt + - [x86] iio: ak8975: fix maybe-uninitialized warning - drm/radeon: make sure vertical front porch is at least 1 - - drm/i915: Avoid stalling on pending flips for legacy cursor updates - - drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume - - drm/i915: Fix system resume if PCI device remained enabled - - drm/i915: Fix eDP low vswing for Broadwell - - drm/i915: Make RPS EI/thresholds multiple of 25 on SNB-BDW - - drm/i915: Fake HDMI live status - - ACPI / processor: Request native thermal interrupt handling via _OSC + - [x86] drm/i915: Avoid stalling on pending flips for legacy cursor updates + - [x86] drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume + - [x86] drm/i915: Fix system resume if PCI device remained enabled + - [x86] drm/i915: Fix eDP low vswing for Broadwell + - [x86] drm/i915: Make RPS EI/thresholds multiple of 25 on SNB-BDW + - [x86] drm/i915: Fake HDMI live status + - [x86] ACPI / processor: Request native thermal interrupt handling via _OSC [ Aurelien Jarno ] * [mips*] Fix PR_SET_FPMODE issues with multi-threaded programs. From 1275559aac5f3fc90488d1285b2e2902801ab383 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Thu, 12 May 2016 23:52:30 +0200 Subject: [PATCH 06/36] [arm,x86] Fix memory corruption in KVM with THP enabled. --- debian/changelog | 1 + ...emory-corruption-in-KVM-with-THP-ena.patch | 143 ++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 145 insertions(+) create mode 100644 debian/patches/bugfix/all/mm-thp-kvm-fix-memory-corruption-in-KVM-with-THP-ena.patch diff --git a/debian/changelog b/debian/changelog index 031f055a5..30cccb4f2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -83,6 +83,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium [ Aurelien Jarno ] * [mips*] Fix PR_SET_FPMODE issues with multi-threaded programs. * [i386] Stop recommending libc6-i686. + * [arm,x86] Fix memory corruption in KVM with THP enabled. -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 diff --git a/debian/patches/bugfix/all/mm-thp-kvm-fix-memory-corruption-in-KVM-with-THP-ena.patch b/debian/patches/bugfix/all/mm-thp-kvm-fix-memory-corruption-in-KVM-with-THP-ena.patch new file mode 100644 index 000000000..0546c7321 --- /dev/null +++ b/debian/patches/bugfix/all/mm-thp-kvm-fix-memory-corruption-in-KVM-with-THP-ena.patch @@ -0,0 +1,143 @@ +From: Andrea Arcangeli +Date: Thu, 5 May 2016 16:22:20 -0700 +Subject: mm: thp: kvm: fix memory corruption in KVM with THP enabled +Origin: https://git.kernel.org/linus/127393fbe597dd85863a9bdccaa11007e7d4948f + +After the THP refcounting change, obtaining a compound pages from +get_user_pages() no longer allows us to assume the entire compound page +is immediately mappable from a secondary MMU. + +A secondary MMU doesn't want to call get_user_pages() more than once for +each compound page, in order to know if it can map the whole compound +page. So a secondary MMU needs to know from a single get_user_pages() +invocation when it can map immediately the entire compound page to avoid +a flood of unnecessary secondary MMU faults and spurious +atomic_inc()/atomic_dec() (pages don't have to be pinned by MMU notifier +users). + +Ideally instead of the page->_mapcount < 1 check, get_user_pages() +should return the granularity of the "page" mapping in the "mm" passed +to get_user_pages(). However it's non trivial change to pass the "pmd" +status belonging to the "mm" walked by get_user_pages up the stack (up +to the caller of get_user_pages). So the fix just checks if there is +not a single pte mapping on the page returned by get_user_pages, and in +turn if the caller can assume that the whole compound page is mapped in +the current "mm" (in a pmd_trans_huge()). In such case the entire +compound page is safe to map into the secondary MMU without additional +get_user_pages() calls on the surrounding tail/head pages. In addition +of being faster, not having to run other get_user_pages() calls also +reduces the memory footprint of the secondary MMU fault in case the pmd +split happened as result of memory pressure. + +Without this fix after a MADV_DONTNEED (like invoked by QEMU during +postcopy live migration or balloning) or after generic swapping (with a +failure in split_huge_page() that would only result in pmd splitting and +not a physical page split), KVM would map the whole compound page into +the shadow pagetables, despite regular faults or userfaults (like +UFFDIO_COPY) may map regular pages into the primary MMU as result of the +pte faults, leading to the guest mode and userland mode going out of +sync and not working on the same memory at all times. + +Any other secondary MMU notifier manager (KVM is just one of the many +MMU notifier users) will need the same information if it doesn't want to +run a flood of get_user_pages_fast and it can support multiple +granularity in the secondary MMU mappings, so I think it is justified to +be exposed not just to KVM. + +The other option would be to move transparent_hugepage_adjust to +mm/huge_memory.c but that currently has all kind of KVM data structures +in it, so it's definitely not a cut-and-paste work, so I couldn't do a +fix as cleaner as this one for 4.6. + +Signed-off-by: Andrea Arcangeli +Cc: "Dr. David Alan Gilbert" +Cc: "Kirill A. Shutemov" +Cc: "Li, Liang Z" +Cc: Amit Shah +Cc: Paolo Bonzini +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + arch/arm/kvm/mmu.c | 2 +- + arch/x86/kvm/mmu.c | 4 ++-- + include/linux/page-flags.h | 22 ++++++++++++++++++++++ + 3 files changed, 25 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c +index 58dbd5c..d6d4191 100644 +--- a/arch/arm/kvm/mmu.c ++++ b/arch/arm/kvm/mmu.c +@@ -1004,7 +1004,7 @@ static bool transparent_hugepage_adjust(kvm_pfn_t *pfnp, phys_addr_t *ipap) + kvm_pfn_t pfn = *pfnp; + gfn_t gfn = *ipap >> PAGE_SHIFT; + +- if (PageTransCompound(pfn_to_page(pfn))) { ++ if (PageTransCompoundMap(pfn_to_page(pfn))) { + unsigned long mask; + /* + * The address we faulted on is backed by a transparent huge +diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c +index 1ff4dbb..b6f50e8 100644 +--- a/arch/x86/kvm/mmu.c ++++ b/arch/x86/kvm/mmu.c +@@ -2823,7 +2823,7 @@ static void transparent_hugepage_adjust(struct kvm_vcpu *vcpu, + */ + if (!is_error_noslot_pfn(pfn) && !kvm_is_reserved_pfn(pfn) && + level == PT_PAGE_TABLE_LEVEL && +- PageTransCompound(pfn_to_page(pfn)) && ++ PageTransCompoundMap(pfn_to_page(pfn)) && + !has_wrprotected_page(vcpu, gfn, PT_DIRECTORY_LEVEL)) { + unsigned long mask; + /* +@@ -4785,7 +4785,7 @@ restart: + */ + if (sp->role.direct && + !kvm_is_reserved_pfn(pfn) && +- PageTransCompound(pfn_to_page(pfn))) { ++ PageTransCompoundMap(pfn_to_page(pfn))) { + drop_spte(kvm, sptep); + need_tlb_flush = 1; + goto restart; +diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h +index f4ed4f1b..6b052aa 100644 +--- a/include/linux/page-flags.h ++++ b/include/linux/page-flags.h +@@ -517,6 +517,27 @@ static inline int PageTransCompound(struct page *page) + } + + /* ++ * PageTransCompoundMap is the same as PageTransCompound, but it also ++ * guarantees the primary MMU has the entire compound page mapped ++ * through pmd_trans_huge, which in turn guarantees the secondary MMUs ++ * can also map the entire compound page. This allows the secondary ++ * MMUs to call get_user_pages() only once for each compound page and ++ * to immediately map the entire compound page with a single secondary ++ * MMU fault. If there will be a pmd split later, the secondary MMUs ++ * will get an update through the MMU notifier invalidation through ++ * split_huge_pmd(). ++ * ++ * Unlike PageTransCompound, this is safe to be called only while ++ * split_huge_pmd() cannot run from under us, like if protected by the ++ * MMU notifier, otherwise it may result in page->_mapcount < 0 false ++ * positives. ++ */ ++static inline int PageTransCompoundMap(struct page *page) ++{ ++ return PageTransCompound(page) && atomic_read(&page->_mapcount) < 0; ++} ++ ++/* + * PageTransTail returns true for both transparent huge pages + * and hugetlbfs pages, so it should only be called when it's known + * that hugetlbfs pages aren't involved. +@@ -559,6 +580,7 @@ static inline int TestClearPageDoubleMap(struct page *page) + #else + TESTPAGEFLAG_FALSE(TransHuge) + TESTPAGEFLAG_FALSE(TransCompound) ++TESTPAGEFLAG_FALSE(TransCompoundMap) + TESTPAGEFLAG_FALSE(TransTail) + TESTPAGEFLAG_FALSE(DoubleMap) + TESTSETFLAG_FALSE(DoubleMap) +-- +2.8.1 + diff --git a/debian/patches/series b/debian/patches/series index 8ce39e08e..8e8976ebf 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -83,6 +83,7 @@ bugfix/all/mm-zone_device-depends-on-sparsemem_vmemmap.patch bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch bugfix/all/atl2-disable-unimplemented-scatter-gather-feature.patch bugfix/all/module-invalidate-signatures-on-force-loaded-modules.patch +bugfix/all/mm-thp-kvm-fix-memory-corruption-in-KVM-with-THP-ena.patch # Miscellaneous features features/all/mm-exclude-zone_device-from-gfp_zone_table.patch From 1f6b038c6f3459e87bdb2076fbe960d02953768c Mon Sep 17 00:00:00 2001 From: Roger Shimizu Date: Fri, 13 May 2016 19:26:17 +0900 Subject: [PATCH 07/36] netfilter: Enable NF_DUP_NETDEV / NFT_DUP_NETDEV / NFT_FWD_NETDEV as module Recommended by Arturo Borrero Gonzalez. --- debian/changelog | 4 ++++ debian/config/config | 3 +++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 30cccb4f2..f9ef705ad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -85,6 +85,10 @@ linux (4.5.4-1) UNRELEASED; urgency=medium * [i386] Stop recommending libc6-i686. * [arm,x86] Fix memory corruption in KVM with THP enabled. + [ Roger Shimizu ] + * netfilter: Enable NF_DUP_NETDEV / NFT_DUP_NETDEV / NFT_FWD_NETDEV + as module, as recommended by Arturo Borrero Gonzalez. + -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 linux (4.5.3-2) unstable; urgency=medium diff --git a/debian/config/config b/debian/config/config index 7f9a54fc3..5f2968d15 100644 --- a/debian/config/config +++ b/debian/config/config @@ -6322,6 +6322,9 @@ CONFIG_NFT_NAT=m CONFIG_NFT_QUEUE=m CONFIG_NFT_REJECT=m CONFIG_NFT_COMPAT=m +CONFIG_NF_DUP_NETDEV=m +CONFIG_NFT_DUP_NETDEV=m +CONFIG_NFT_FWD_NETDEV=m CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_SET=m CONFIG_NETFILTER_XT_TARGET_AUDIT=m From 594eaf7125526b7a8c7d6fb77224f43f8e6d91d0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 13 May 2016 12:14:39 +0100 Subject: [PATCH 08/36] Add bug closure for new netfilter modules --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f9ef705ad..7ee756362 100644 --- a/debian/changelog +++ b/debian/changelog @@ -87,7 +87,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium [ Roger Shimizu ] * netfilter: Enable NF_DUP_NETDEV / NFT_DUP_NETDEV / NFT_FWD_NETDEV - as module, as recommended by Arturo Borrero Gonzalez. + as module, as recommended by Arturo Borrero Gonzalez. (Closes: #824162) -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 From 4a8b374466940239cd7c2a78446882bc4b2e9306 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Fri, 13 May 2016 18:54:45 +0200 Subject: [PATCH 09/36] [mips*/octeon] Add support for byte swapped initramfs to handle u-boot and kernel running with a different endianness. --- debian/changelog | 2 + ...etect-and-fix-byte-swapped-initramfs.patch | 83 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 86 insertions(+) create mode 100644 debian/patches/features/mips/MIPS-Octeon-detect-and-fix-byte-swapped-initramfs.patch diff --git a/debian/changelog b/debian/changelog index 7ee756362..8f84100b3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -84,6 +84,8 @@ linux (4.5.4-1) UNRELEASED; urgency=medium * [mips*] Fix PR_SET_FPMODE issues with multi-threaded programs. * [i386] Stop recommending libc6-i686. * [arm,x86] Fix memory corruption in KVM with THP enabled. + * [mips*/octeon] Add support for byte swapped initramfs to handle u-boot and + kernel running with a different endianness. [ Roger Shimizu ] * netfilter: Enable NF_DUP_NETDEV / NFT_DUP_NETDEV / NFT_FWD_NETDEV diff --git a/debian/patches/features/mips/MIPS-Octeon-detect-and-fix-byte-swapped-initramfs.patch b/debian/patches/features/mips/MIPS-Octeon-detect-and-fix-byte-swapped-initramfs.patch new file mode 100644 index 000000000..15ad40b30 --- /dev/null +++ b/debian/patches/features/mips/MIPS-Octeon-detect-and-fix-byte-swapped-initramfs.patch @@ -0,0 +1,83 @@ +From: Aurelien Jarno +Date: Wed, 11 May 2016 00:37:42 +0200 +Subject: MIPS: Octeon: detect and fix byte swapped initramfs +Origin: https://patchwork.linux-mips.org/patch/13219/ + +Octeon machines support running in little endian mode. U-Boot usually +runs in big endian-mode. Therefore the initramfs is loaded in big endian +mode, and the kernel later tries to access it in little endian mode. + +This patch fixes that by detecting byte swapped initramfs using either the +CPIO header or the header from standard compression methods, and +byte swaps it if needed. It first checks that the header doesn't match +in the native endianness to avoid false detections. It uses the kernel +decompress library so that we don't have to maintain the list of magics +if some decompression methods are added to the kernel. + +Cc: Ralf Baechle +Acked-by: David Daney +Signed-off-by: Aurelien Jarno +--- + arch/mips/kernel/setup.c | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c +index 4f60734..8841d7982 100644 +--- a/arch/mips/kernel/setup.c ++++ b/arch/mips/kernel/setup.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -250,6 +251,35 @@ disable: + return 0; + } + ++/* In some conditions (e.g. big endian bootloader with a little endian ++ kernel), the initrd might appear byte swapped. Try to detect this and ++ byte swap it if needed. */ ++static void __init maybe_bswap_initrd(void) ++{ ++#if defined(CONFIG_CPU_CAVIUM_OCTEON) ++ u64 buf; ++ ++ /* Check for CPIO signature */ ++ if (!memcmp((void *)initrd_start, "070701", 6)) ++ return; ++ ++ /* Check for compressed initrd */ ++ if (decompress_method((unsigned char *)initrd_start, 8, NULL)) ++ return; ++ ++ /* Try again with a byte swapped header */ ++ buf = swab64p((u64 *)initrd_start); ++ if (!memcmp(&buf, "070701", 6) || ++ decompress_method((unsigned char *)(&buf), 8, NULL)) { ++ unsigned long i; ++ ++ pr_info("Byteswapped initrd detected\n"); ++ for (i = initrd_start; i < ALIGN(initrd_end, 8); i += 8) ++ swab64s((u64 *)i); ++ } ++#endif ++} ++ + static void __init finalize_initrd(void) + { + unsigned long size = initrd_end - initrd_start; +@@ -263,6 +293,8 @@ static void __init finalize_initrd(void) + goto disable; + } + ++ maybe_bswap_initrd(); ++ + reserve_bootmem(__pa(initrd_start), size, BOOTMEM_DEFAULT); + initrd_below_start_ok = 1; + +-- +2.8.1 + diff --git a/debian/patches/series b/debian/patches/series index 8e8976ebf..8f0bc96fa 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -61,6 +61,7 @@ features/mips/MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch features/mips/MIPS-octeon-Add-support-for-the-UBNT-E200-board.patch features/mips/libata-support-AHCI-on-OCTEON-platform.patch features/mips/MIPS-Octeon-Add-Octeon-III-CN7xxx-interface-detection.patch +features/mips/MIPS-Octeon-detect-and-fix-byte-swapped-initramfs.patch features/x86/x86-memtest-WARN-if-bad-RAM-found.patch features/x86/x86-make-x32-syscall-support-conditional.patch features/sparc/hwrng-n2-attach-on-t5-m5-t7-m7-sparc-cpus.patch From 3ec9fea9ef883a410f7e3d56376b001032fb4905 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Fri, 13 May 2016 18:58:54 +0200 Subject: [PATCH 10/36] [mipsel/octeon] Activate flavour on mipsel. --- debian/changelog | 1 + debian/config/mipsel/defines | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8f84100b3..99b8bb60a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -86,6 +86,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium * [arm,x86] Fix memory corruption in KVM with THP enabled. * [mips*/octeon] Add support for byte swapped initramfs to handle u-boot and kernel running with a different endianness. + * [mipsel/octeon] Activate flavour on mipsel. [ Roger Shimizu ] * netfilter: Enable NF_DUP_NETDEV / NFT_DUP_NETDEV / NFT_FWD_NETDEV diff --git a/debian/config/mipsel/defines b/debian/config/mipsel/defines index 536455a4a..30682f72f 100644 --- a/debian/config/mipsel/defines +++ b/debian/config/mipsel/defines @@ -5,6 +5,7 @@ flavours: loongson-2e loongson-2f loongson-3 + octeon kernel-arch: mips [build] @@ -51,3 +52,9 @@ hardware-long: Loongson 3A or 3B based systems (e.g. from Loongson or Lemote) [loongson-3_image] configs: kernelarch-mips/config.loongson-3 +[octeon_description] +hardware: Octeon +hardware-long: Cavium Networks Octeon + +[octeon_image] +configs: kernelarch-mips/config.octeon From 5bd961d21f8086c9994ab105c3bc3052c258242b Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Fri, 13 May 2016 19:27:17 +0200 Subject: [PATCH 11/36] Add bug number --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 99b8bb60a..1689d45b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -83,7 +83,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium [ Aurelien Jarno ] * [mips*] Fix PR_SET_FPMODE issues with multi-threaded programs. * [i386] Stop recommending libc6-i686. - * [arm,x86] Fix memory corruption in KVM with THP enabled. + * [arm,x86] Fix memory corruption in KVM with THP enabled. (Closes: #821225) * [mips*/octeon] Add support for byte swapped initramfs to handle u-boot and kernel running with a different endianness. * [mipsel/octeon] Activate flavour on mipsel. From de9a44e36f1d9f791f49491c348445527b00c4ff Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sat, 14 May 2016 05:16:11 +0200 Subject: [PATCH 12/36] KEYS: Fix ASN.1 indefinite length object parsing (CVE-2016-0758) --- debian/changelog | 3 + ...N.1-indefinite-length-object-parsing.patch | 91 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 95 insertions(+) create mode 100644 debian/patches/bugfix/all/KEYS-Fix-ASN.1-indefinite-length-object-parsing.patch diff --git a/debian/changelog b/debian/changelog index 1689d45b0..de47552ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -92,6 +92,9 @@ linux (4.5.4-1) UNRELEASED; urgency=medium * netfilter: Enable NF_DUP_NETDEV / NFT_DUP_NETDEV / NFT_FWD_NETDEV as module, as recommended by Arturo Borrero Gonzalez. (Closes: #824162) + [ Salvatore Bonaccorso ] + * KEYS: Fix ASN.1 indefinite length object parsing (CVE-2016-0758) + -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 linux (4.5.3-2) unstable; urgency=medium diff --git a/debian/patches/bugfix/all/KEYS-Fix-ASN.1-indefinite-length-object-parsing.patch b/debian/patches/bugfix/all/KEYS-Fix-ASN.1-indefinite-length-object-parsing.patch new file mode 100644 index 000000000..37b83dd23 --- /dev/null +++ b/debian/patches/bugfix/all/KEYS-Fix-ASN.1-indefinite-length-object-parsing.patch @@ -0,0 +1,91 @@ +From: David Howells +Date: Tue, 23 Feb 2016 11:03:12 +0000 +Subject: KEYS: Fix ASN.1 indefinite length object parsing +Origin: https://git.kernel.org/linus/23c8a812dc3c621009e4f0e5342aa4e2ede1ceaa + +This fixes CVE-2016-0758. + +In the ASN.1 decoder, when the length field of an ASN.1 value is extracted, +it isn't validated against the remaining amount of data before being added +to the cursor. With a sufficiently large size indicated, the check: + + datalen - dp < 2 + +may then fail due to integer overflow. + +Fix this by checking the length indicated against the amount of remaining +data in both places a definite length is determined. + +Whilst we're at it, make the following changes: + + (1) Check the maximum size of extended length does not exceed the capacity + of the variable it's being stored in (len) rather than the type that + variable is assumed to be (size_t). + + (2) Compare the EOC tag to the symbolic constant ASN1_EOC rather than the + integer 0. + + (3) To reduce confusion, move the initialisation of len outside of: + + for (len = 0; n > 0; n--) { + + since it doesn't have anything to do with the loop counter n. + +Signed-off-by: David Howells +Reviewed-by: Mimi Zohar +Acked-by: David Woodhouse +Acked-by: Peter Jones +--- + lib/asn1_decoder.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c +index 2b3f46c..5545229 100644 +--- a/lib/asn1_decoder.c ++++ b/lib/asn1_decoder.c +@@ -74,7 +74,7 @@ next_tag: + + /* Extract a tag from the data */ + tag = data[dp++]; +- if (tag == 0) { ++ if (tag == ASN1_EOC) { + /* It appears to be an EOC. */ + if (data[dp++] != 0) + goto invalid_eoc; +@@ -96,10 +96,8 @@ next_tag: + + /* Extract the length */ + len = data[dp++]; +- if (len <= 0x7f) { +- dp += len; +- goto next_tag; +- } ++ if (len <= 0x7f) ++ goto check_length; + + if (unlikely(len == ASN1_INDEFINITE_LENGTH)) { + /* Indefinite length */ +@@ -110,14 +108,18 @@ next_tag: + } + + n = len - 0x80; +- if (unlikely(n > sizeof(size_t) - 1)) ++ if (unlikely(n > sizeof(len) - 1)) + goto length_too_long; + if (unlikely(n > datalen - dp)) + goto data_overrun_error; +- for (len = 0; n > 0; n--) { ++ len = 0; ++ for (; n > 0; n--) { + len <<= 8; + len |= data[dp++]; + } ++check_length: ++ if (len > datalen - dp) ++ goto data_overrun_error; + dp += len; + goto next_tag; + +-- +2.8.1 + diff --git a/debian/patches/series b/debian/patches/series index 8f0bc96fa..65d8a3bad 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -135,6 +135,7 @@ bugfix/x86/x86-mm-32-enable-full-randomization-on-i386-and-x86_.patch bugfix/all/bpf-fix-double-fdput-in-replace_map_fd_with_map_ptr.patch bugfix/all/bpf-fix-refcnt-overflow.patch bugfix/all/bpf-fix-check_map_func_compatibility-logic.patch +bugfix/all/KEYS-Fix-ASN.1-indefinite-length-object-parsing.patch # ABI maintenance debian/ib-fix-abi-change-in-4.5.3.patch From 0dd643da08422f584bd89e4e9a89b178fe979e8d Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Mon, 9 May 2016 13:44:27 +0200 Subject: [PATCH 13/36] fix tools disabling in arch-specific rules (cherry picked from commit 3aa2269f2b3162772d052154d8bed726ff18df1e) [bwh: Note this in debian/changelog. Neaten vertical spacing.] --- debian/bin/gencontrol.py | 2 ++ debian/changelog | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 6584b7cce..434b9fd7c 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -175,6 +175,8 @@ class Gencontrol(Base): else: makeflags['DO_LIBC'] = False + if not self.config.merge('packages').get('tools', True): + makeflags['DO_TOOLS'] = False self.merge_packages(packages, packages_headers_arch, arch) diff --git a/debian/changelog b/debian/changelog index de47552ea..34cd161a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -95,6 +95,10 @@ linux (4.5.4-1) UNRELEASED; urgency=medium [ Salvatore Bonaccorso ] * KEYS: Fix ASN.1 indefinite length object parsing (CVE-2016-0758) + [ Ben Hutchings ] + * gencontrol.py: Fix implementation of [packages]tools config option, + thanks to Yves-Alexis Perez + -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 linux (4.5.3-2) unstable; urgency=medium From 5917a891aa51ee88e41f1f77638220a6040c0599 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 14 May 2016 19:13:56 +0100 Subject: [PATCH 14/36] debian/templates/control.source.in: Put each build-dependency on its own line The list is getting hard to read as we add build profiles. It's also easier to merge and cherry-pick changes when each dependency is on a separate line. --- debian/templates/control.source.in | 43 +++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 43677eba7..c8d803c5d 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,12 +3,43 @@ Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank , maximilian attems , Ben Hutchings Standards-Version: 3.9.5 -Build-Depends: debhelper, python3:any, quilt, - cpio , kmod , xz-utils , kernel-wedge (>= 2.93~) , bc , libssl-dev , openssl , - asciidoc , bison , flex , gcc-multilib [amd64 ppc64 s390x sparc64] , libaudit-dev , libdw-dev , libelf-dev , libiberty-dev | binutils-dev (<< 2.23.91.20131123-1) , libnewt-dev , libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32] , libperl-dev , libunwind8-dev [amd64 armel armhf arm64 i386] , python-dev , xmlto , - autoconf , automake , libtool , libglib2.0-dev , libudev-dev , libwrap0-dev , libpci-dev , - dh-python , dh-systemd -Build-Depends-Indep: patchutils , xmlto +Build-Depends: + debhelper, + python3:any, + quilt, + cpio , + kmod , + xz-utils , + kernel-wedge (>= 2.93~) , + bc , + libssl-dev , + openssl , + asciidoc , + bison , + flex , + gcc-multilib [amd64 ppc64 s390x sparc64] , + libaudit-dev , + libdw-dev , + libelf-dev , + libiberty-dev | binutils-dev (<< 2.23.91.20131123-1) , + libnewt-dev , + libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32] , + libperl-dev , + libunwind8-dev [amd64 armel armhf arm64 i386] , + python-dev , + xmlto , + autoconf , + automake , + libtool , + libglib2.0-dev , + libudev-dev , + libwrap0-dev , + libpci-dev , + dh-python , + dh-systemd , +Build-Depends-Indep: + patchutils , + xmlto , Vcs-Git: https://anonscm.debian.org/git/kernel/linux.git Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux.git Homepage: https://www.kernel.org/ From 581d83dbf0de4d957fd642b1c5cd7c18bdab45b1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 14 May 2016 19:54:34 +0100 Subject: [PATCH 15/36] debian_linux.utils._read_rfc822: Parse and ignore comments --- debian/lib/python/debian_linux/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/lib/python/debian_linux/utils.py b/debian/lib/python/debian_linux/utils.py index f2fb6c39c..5d6a7d473 100644 --- a/debian/lib/python/debian_linux/utils.py +++ b/debian/lib/python/debian_linux/utils.py @@ -61,6 +61,9 @@ def _read_rfc822(f, cls): if not line: eof = True break + # Strip comments rather than trying to preserve them + if line[0] == '#': + continue line = line.strip('\n') if not line: break From 203fac302f1cf7a19bf310b9b56a6026f5492933 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 14 May 2016 19:56:13 +0100 Subject: [PATCH 16/36] debian/templates/control.source.in: Comment all the build-dependencies Also re-order them slightly. --- debian/templates/control.source.in | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index c8d803c5d..f82c9b266 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -5,16 +5,27 @@ Uploaders: Bastian Blank , maximilian attems Standards-Version: 3.9.5 Build-Depends: debhelper, +# used to run debian/bin/*.py python3:any, +# used by debian/rules.real to prepare the source quilt, +# used by debian/rules.real to build linux-doc and linux-headers cpio , - kmod , +# used by upstream to compress kernel and by debian/rules.real to build linux-source xz-utils , +# used by debian/rules.real to build udebs kernel-wedge (>= 2.93~) , +# used by kernel-wedge (only on Linux, thus not declared as a dependency) + kmod , +# used by upstream to build include/generated/timeconst.h bc , +# used by upstream to build signing tools and to process certificates libssl-dev , openssl , +# used by upstream to build perf documentation asciidoc , + xmlto , +# used by upstream to build perf bison , flex , gcc-multilib [amd64 ppc64 s390x sparc64] , @@ -27,18 +38,23 @@ Build-Depends: libperl-dev , libunwind8-dev [amd64 armel armhf arm64 i386] , python-dev , - xmlto , +# used by upstream to build usbip autoconf , automake , libtool , libglib2.0-dev , libudev-dev , libwrap0-dev , +# used by upstream to build cpupower libpci-dev , +# used by debian/rules.real to build linux-perf and linux-support dh-python , +# used by debian/rules.real to build hyperv-daemons dh-systemd , Build-Depends-Indep: +# used by debian/rules.real to build linux-source patchutils , +# used by upstream to build documentation xmlto , Vcs-Git: https://anonscm.debian.org/git/kernel/linux.git Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux.git From f865a890fd1e1a20d331e574d92dfa3e34f778e4 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 14 May 2016 20:05:06 +0100 Subject: [PATCH 17/36] debian/control: Exclude tools from 'stage1' build profile --- debian/changelog | 1 + debian/templates/control.tools.in | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/debian/changelog b/debian/changelog index 34cd161a0..d192efd22 100644 --- a/debian/changelog +++ b/debian/changelog @@ -98,6 +98,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium [ Ben Hutchings ] * gencontrol.py: Fix implementation of [packages]tools config option, thanks to Yves-Alexis Perez + * debian/control: Exclude tools from 'stage1' build profile -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 diff --git a/debian/templates/control.tools.in b/debian/templates/control.tools.in index 3b9372292..550584f17 100644 --- a/debian/templates/control.tools.in +++ b/debian/templates/control.tools.in @@ -1,4 +1,5 @@ Package: linux-kbuild-@version@ +Build-Profiles: Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Multi-Arch: foreign @@ -6,6 +7,7 @@ Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. Package: linux-cpupower +Build-Profiles: Section: admin Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} @@ -18,6 +20,7 @@ Description: CPU frequency and voltage scaling tools for Linux cpufrequtils. Package: libcpupower0 +Build-Profiles: Section: libs Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} @@ -25,6 +28,7 @@ Description: CPU frequency and voltage scaling tools for Linux (libraries) This package contains the shared library. Package: libcpupower-dev +Build-Profiles: Section: libdevel Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} @@ -35,6 +39,7 @@ Description: CPU frequency and voltage scaling tools for Linux (development file This package contains the 'power/cpupower' headers and library shared objects. Package: linux-perf-@version@ +Build-Profiles: Section: devel Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} @@ -51,6 +56,7 @@ Description: Performance analysis tools for Linux @version@ appropriate version for the running kernel. Package: libusbip-dev +Build-Profiles: Architecture: linux-any Depends: ${misc:Depends} Section: libdevel @@ -61,6 +67,7 @@ Description: USB device sharing system over IP network (development files) the library itself for static linking. Package: usbip +Build-Profiles: Architecture: linux-any Depends: usbutils, ${shlibs:Depends}, ${misc:Depends} Section: admin @@ -83,6 +90,7 @@ Description: USB device sharing system over IP network client tool 'usbip'. Package: hyperv-daemons +Build-Profiles: Architecture: i386 amd64 x32 Depends: lsb-base (>= 3.2-14), ${shlibs:Depends}, ${misc:Depends} Section: admin @@ -101,6 +109,7 @@ Description: Support daemons for Linux running on Hyper-V the host to freeze the guest filesystems while taking a snapshot. Package: lockdep +Build-Profiles: Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@ Recommends: liblockdep-dev @@ -111,6 +120,7 @@ Description: Runtime locking correctness validator actual and potential deadlocks and other locking bugs. Package: liblockdep@version@ +Build-Profiles: Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Section: libs @@ -120,6 +130,7 @@ Description: Runtime locking correctness validator (shared library) be used to detect actual and potential deadlocks and other locking bugs. Package: liblockdep-dev +Build-Profiles: Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Section: libdevel From f09015b1387dc296b56d404a5adb04b6f6984978 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sat, 14 May 2016 21:06:26 +0200 Subject: [PATCH 18/36] Build udebs for the mipsel/octeon flavour --- debian/installer/mipsel/kernel-versions | 1 + debian/installer/mipsel/modules/mipsel-octeon | 1 + 2 files changed, 2 insertions(+) create mode 120000 debian/installer/mipsel/modules/mipsel-octeon diff --git a/debian/installer/mipsel/kernel-versions b/debian/installer/mipsel/kernel-versions index 1a6bafb54..93c39a4c9 100644 --- a/debian/installer/mipsel/kernel-versions +++ b/debian/installer/mipsel/kernel-versions @@ -3,3 +3,4 @@ mipsel - 4kc-malta - y - mipsel - loongson-2e - y - mipsel - loongson-2f - y - mipsel - loongson-3 - y - +mipsel - octeon - y - diff --git a/debian/installer/mipsel/modules/mipsel-octeon b/debian/installer/mipsel/modules/mipsel-octeon new file mode 120000 index 000000000..da584c69b --- /dev/null +++ b/debian/installer/mipsel/modules/mipsel-octeon @@ -0,0 +1 @@ +../../mips/modules/mips-octeon \ No newline at end of file From 43640872d9a53f9d15e5f0054cafe4e4e2e718c6 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 14 May 2016 20:12:28 +0100 Subject: [PATCH 19/36] debian/control,debian/rules: Support a 'pkg.linux.notools' build profile ...which does not build tools packages --- debian/changelog | 2 ++ debian/rules | 3 ++ debian/templates/control.source.in | 44 +++++++++++++++--------------- debian/templates/control.tools.in | 22 +++++++-------- 4 files changed, 38 insertions(+), 33 deletions(-) diff --git a/debian/changelog b/debian/changelog index d192efd22..8fb720033 100644 --- a/debian/changelog +++ b/debian/changelog @@ -99,6 +99,8 @@ linux (4.5.4-1) UNRELEASED; urgency=medium * gencontrol.py: Fix implementation of [packages]tools config option, thanks to Yves-Alexis Perez * debian/control: Exclude tools from 'stage1' build profile + * debian/control,debian/rules: Support a 'pkg.linux.notools' build profile + which does not build tools packages -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 diff --git a/debian/rules b/debian/rules index c1bbc80d3..17646a4d5 100755 --- a/debian/rules +++ b/debian/rules @@ -16,6 +16,9 @@ ifdef DEBIAN_KERNEL_JOBS MAKEFLAGS += -j$(DEBIAN_KERNEL_JOBS) endif BUILD_STAGE1 := $(filter stage1,$(DEB_BUILD_PROFILES)) +ifneq (,$(filter pkg.linux.notools,$(DEB_BUILD_PROFILES))) + MAKEFLAGS += DO_TOOLS=False +endif .NOTPARALLEL: diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index f82c9b266..71d465d70 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -23,34 +23,34 @@ Build-Depends: libssl-dev , openssl , # used by upstream to build perf documentation - asciidoc , - xmlto , + asciidoc , + xmlto , # used by upstream to build perf - bison , - flex , - gcc-multilib [amd64 ppc64 s390x sparc64] , - libaudit-dev , - libdw-dev , - libelf-dev , - libiberty-dev | binutils-dev (<< 2.23.91.20131123-1) , - libnewt-dev , - libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32] , - libperl-dev , - libunwind8-dev [amd64 armel armhf arm64 i386] , - python-dev , + bison , + flex , + gcc-multilib [amd64 ppc64 s390x sparc64] , + libaudit-dev , + libdw-dev , + libelf-dev , + libiberty-dev | binutils-dev (<< 2.23.91.20131123-1) , + libnewt-dev , + libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32] , + libperl-dev , + libunwind8-dev [amd64 armel armhf arm64 i386] , + python-dev , # used by upstream to build usbip - autoconf , - automake , - libtool , - libglib2.0-dev , - libudev-dev , - libwrap0-dev , + autoconf , + automake , + libtool , + libglib2.0-dev , + libudev-dev , + libwrap0-dev , # used by upstream to build cpupower - libpci-dev , + libpci-dev , # used by debian/rules.real to build linux-perf and linux-support dh-python , # used by debian/rules.real to build hyperv-daemons - dh-systemd , + dh-systemd , Build-Depends-Indep: # used by debian/rules.real to build linux-source patchutils , diff --git a/debian/templates/control.tools.in b/debian/templates/control.tools.in index 550584f17..ed2d9af30 100644 --- a/debian/templates/control.tools.in +++ b/debian/templates/control.tools.in @@ -1,5 +1,5 @@ Package: linux-kbuild-@version@ -Build-Profiles: +Build-Profiles: Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Multi-Arch: foreign @@ -7,7 +7,7 @@ Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. Package: linux-cpupower -Build-Profiles: +Build-Profiles: Section: admin Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} @@ -20,7 +20,7 @@ Description: CPU frequency and voltage scaling tools for Linux cpufrequtils. Package: libcpupower0 -Build-Profiles: +Build-Profiles: Section: libs Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} @@ -28,7 +28,7 @@ Description: CPU frequency and voltage scaling tools for Linux (libraries) This package contains the shared library. Package: libcpupower-dev -Build-Profiles: +Build-Profiles: Section: libdevel Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} @@ -39,7 +39,7 @@ Description: CPU frequency and voltage scaling tools for Linux (development file This package contains the 'power/cpupower' headers and library shared objects. Package: linux-perf-@version@ -Build-Profiles: +Build-Profiles: Section: devel Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} @@ -56,7 +56,7 @@ Description: Performance analysis tools for Linux @version@ appropriate version for the running kernel. Package: libusbip-dev -Build-Profiles: +Build-Profiles: Architecture: linux-any Depends: ${misc:Depends} Section: libdevel @@ -67,7 +67,7 @@ Description: USB device sharing system over IP network (development files) the library itself for static linking. Package: usbip -Build-Profiles: +Build-Profiles: Architecture: linux-any Depends: usbutils, ${shlibs:Depends}, ${misc:Depends} Section: admin @@ -90,7 +90,7 @@ Description: USB device sharing system over IP network client tool 'usbip'. Package: hyperv-daemons -Build-Profiles: +Build-Profiles: Architecture: i386 amd64 x32 Depends: lsb-base (>= 3.2-14), ${shlibs:Depends}, ${misc:Depends} Section: admin @@ -109,7 +109,7 @@ Description: Support daemons for Linux running on Hyper-V the host to freeze the guest filesystems while taking a snapshot. Package: lockdep -Build-Profiles: +Build-Profiles: Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@ Recommends: liblockdep-dev @@ -120,7 +120,7 @@ Description: Runtime locking correctness validator actual and potential deadlocks and other locking bugs. Package: liblockdep@version@ -Build-Profiles: +Build-Profiles: Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Section: libs @@ -130,7 +130,7 @@ Description: Runtime locking correctness validator (shared library) be used to detect actual and potential deadlocks and other locking bugs. Package: liblockdep-dev -Build-Profiles: +Build-Profiles: Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Section: libdevel From 59b5fabac66ec8550bc73077608b6ffc366e22ab Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 15 May 2016 00:19:24 +0100 Subject: [PATCH 20/36] debian/control,debian/rules,debian/rules.d: Support the 'nodoc' build profile --- debian/changelog | 2 ++ debian/rules | 5 +++++ debian/rules.d/tools/perf/Makefile | 2 ++ debian/rules.d/tools/power/cpupower/Makefile | 3 +++ debian/rules.d/tools/usb/usbip/Makefile | 3 +++ debian/rules.real | 17 +++++++++++++++++ debian/templates/control.docs.in | 4 ++-- debian/templates/control.source.in | 6 +++--- debian/usbip.install | 2 -- debian/usbip.manpages | 2 ++ 10 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 debian/usbip.manpages diff --git a/debian/changelog b/debian/changelog index 8fb720033..1706bdab8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -101,6 +101,8 @@ linux (4.5.4-1) UNRELEASED; urgency=medium * debian/control: Exclude tools from 'stage1' build profile * debian/control,debian/rules: Support a 'pkg.linux.notools' build profile which does not build tools packages + * debian/control,debian/rules,debian/rules.d: Support the 'nodoc' build + profile -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 diff --git a/debian/rules b/debian/rules index 17646a4d5..fbf9eade1 100755 --- a/debian/rules +++ b/debian/rules @@ -16,6 +16,11 @@ ifdef DEBIAN_KERNEL_JOBS MAKEFLAGS += -j$(DEBIAN_KERNEL_JOBS) endif BUILD_STAGE1 := $(filter stage1,$(DEB_BUILD_PROFILES)) +ifneq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) +# This only disables building the linux-doc and linux-manual packages. +# The rules for tools packages check separately for the 'nodoc' profile. + MAKEFLAGS += DO_DOCS=False +endif ifneq (,$(filter pkg.linux.notools,$(DEB_BUILD_PROFILES))) MAKEFLAGS += DO_TOOLS=False endif diff --git a/debian/rules.d/tools/perf/Makefile b/debian/rules.d/tools/perf/Makefile index 7eb5faf5d..fc964144c 100644 --- a/debian/rules.d/tools/perf/Makefile +++ b/debian/rules.d/tools/perf/Makefile @@ -47,7 +47,9 @@ ifdef KERNEL_ARCH_PERF # set. We must define it even when building to avoid a rebuild when we # run 'make install'. +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf all VERSION=$(VERSION) DESTDIR=dummy +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) +$(MAKE_PERF) -C $(top_srcdir)/tools/perf/Documentation man VERSION=$(VERSION) +endif # Check that perf didn't get linked against libbfd type ldd ! ldd $(CURDIR)/perf | grep '\blibbfd' diff --git a/debian/rules.d/tools/power/cpupower/Makefile b/debian/rules.d/tools/power/cpupower/Makefile index 79b131430..3f994a3f1 100644 --- a/debian/rules.d/tools/power/cpupower/Makefile +++ b/debian/rules.d/tools/power/cpupower/Makefile @@ -9,6 +9,9 @@ all: install: $(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) install mandir=/usr/share/man DESTDIR=$(DESTDIR) CPUFREQ_BENCH=false +ifneq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) + rm -rf $(DESTDIR)/usr/share/man +endif clean: $(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) clean diff --git a/debian/rules.d/tools/usb/usbip/Makefile b/debian/rules.d/tools/usb/usbip/Makefile index 11d1db4ca..4c29b61a8 100644 --- a/debian/rules.d/tools/usb/usbip/Makefile +++ b/debian/rules.d/tools/usb/usbip/Makefile @@ -16,6 +16,9 @@ all: install: $(MAKE) install +ifneq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) + rm -rf $(DESTDIR)/usr/share/man +endif clean: rm -rf $(addprefix $(srcdir)/,autom4te.cache aclocal.m4 compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing) diff --git a/debian/rules.real b/debian/rules.real index 3e7839a4d..52ff4b6e4 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -190,7 +190,9 @@ $(STAMPS_DIR)/build-doc: $(STAMPS_DIR)/source @$(stamp) install-base: +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs $(INSTALLDOCS_ARGS) +endif dh_installchangelogs dh_strip dh_compress @@ -503,7 +505,9 @@ install-kbuild: $(STAMPS_DIR)/build-tools $(call make-tools,scripts) install DESTDIR=$(DIR) prefix=$(PREFIX_DIR) dh_link $(PREFIX_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_strip dh_compress dh_fixperms @@ -522,7 +526,9 @@ install-cpupower: $(STAMPS_DIR)/build-tools $(call make-tools,tools/power/cpupower) install DESTDIR=$(DIR) dh_install --sourcedir=$(DIR) dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_strip dh_compress dh_fixperms @@ -544,7 +550,9 @@ install-perf: $(STAMPS_DIR)/build-tools dh_perl /usr/share/perf_$(VERSION)-core/scripts/perl/Perf-Trace-Util/lib/ dh_python2 /usr/share/perf_$(VERSION)-core/scripts/python/Perf-Trace-Util/lib/ dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_lintian dh_strip dh_compress @@ -565,7 +573,10 @@ install-usbip: $(STAMPS_DIR)/build-tools $(call make-tools,tools/usb/usbip) install DESTDIR=$(DIR) dh_install --sourcedir=$(DIR) dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs + dh_installman +endif dh_lintian dh_strip dh_compress @@ -592,7 +603,9 @@ install-hyperv-daemons: $(STAMPS_DIR)/build-tools || break; \ done dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_systemd_enable for service in fcopy kvp vss; do \ dh_installinit --name hyperv-daemons.hv-$$service-daemon \ @@ -621,7 +634,9 @@ install-liblockdep: $(STAMPS_DIR)/build-tools 'usr/lib/*/liblockdep.so.*' dh_install --sourcedir=$(DIR) dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_strip dh_compress dh_fixperms @@ -646,7 +661,9 @@ install-lockdep: > $(DIR)/usr/bin/lockdep chmod 755 $(DIR)/usr/bin/lockdep dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_compress dh_fixperms dh_installdeb diff --git a/debian/templates/control.docs.in b/debian/templates/control.docs.in index c773bf509..9b16f0918 100644 --- a/debian/templates/control.docs.in +++ b/debian/templates/control.docs.in @@ -1,5 +1,5 @@ Package: @source_package@-doc-@version@ -Build-Profiles: +Build-Profiles: Architecture: all Depends: ${misc:Depends} Section: doc @@ -13,7 +13,7 @@ Description: Linux kernel specific documentation for version @version@ for the detailed description of the contents. Package: @source_package@-manual-@version@ -Build-Profiles: +Build-Profiles: Architecture: all Depends: ${misc:Depends} Section: doc diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 71d465d70..fb666c492 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -23,8 +23,8 @@ Build-Depends: libssl-dev , openssl , # used by upstream to build perf documentation - asciidoc , - xmlto , + asciidoc , + xmlto , # used by upstream to build perf bison , flex , @@ -55,7 +55,7 @@ Build-Depends-Indep: # used by debian/rules.real to build linux-source patchutils , # used by upstream to build documentation - xmlto , + xmlto , Vcs-Git: https://anonscm.debian.org/git/kernel/linux.git Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux.git Homepage: https://www.kernel.org/ diff --git a/debian/usbip.install b/debian/usbip.install index 4252b2807..04a6ce5b5 100644 --- a/debian/usbip.install +++ b/debian/usbip.install @@ -1,4 +1,2 @@ usr/sbin/usbip usr/sbin/usbipd -usr/share/man/man8/usbip.8 -usr/share/man/man8/usbipd.8 diff --git a/debian/usbip.manpages b/debian/usbip.manpages new file mode 100644 index 000000000..ff94009a6 --- /dev/null +++ b/debian/usbip.manpages @@ -0,0 +1,2 @@ +tools/usb/usbip/doc/usbip.8 +tools/usb/usbip/doc/usbipd.8 From a126067de67fdea6fea85ce856ff2f6b4e156254 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 15 May 2016 00:20:20 +0100 Subject: [PATCH 21/36] debian/control: Remove alternate build-dependency on binutils-dev This was used for backports from to wheezy, but we don't backport from stretch/sid to wheezy. --- debian/changelog | 2 ++ debian/templates/control.source.in | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 1706bdab8..1094ff574 100644 --- a/debian/changelog +++ b/debian/changelog @@ -103,6 +103,8 @@ linux (4.5.4-1) UNRELEASED; urgency=medium which does not build tools packages * debian/control,debian/rules,debian/rules.d: Support the 'nodoc' build profile + * debian/control: Remove alternate build-dependency on binutils-dev that was + used for backports to wheezy -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index fb666c492..cb0dce4f5 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -32,7 +32,7 @@ Build-Depends: libaudit-dev , libdw-dev , libelf-dev , - libiberty-dev | binutils-dev (<< 2.23.91.20131123-1) , + libiberty-dev , libnewt-dev , libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32] , libperl-dev , From 00d06a9006c04666a9c126169ce007a9bf27e286 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 15 May 2016 03:22:33 +0100 Subject: [PATCH 22/36] Word-wrap changelog for 4.5.4 --- debian/changelog | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1094ff574..c640f04ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,8 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips - net/mlx5_core: Fix caching ATOMIC endian mode capability - ipvs: handle ip_vs_fill_iph_skb_off failure - - ipvs: correct initial offset of Call-ID header search in SIP persistence engine + - ipvs: correct initial offset of Call-ID header search in SIP persistence + engine - ipvs: drop first packet to redirect conntrack - rtlwifi: Fix size of wireless mode variable - mfd: intel-lpss: Remove clock tree on error path @@ -27,8 +28,10 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - pwm: omap-dmtimer: Add sanity checking for load and match values - pwm: omap-dmtimer: Round load and match values rather than truncate - lpfc: fix misleading indentation - - gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup list - - ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation + - gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup + list + - ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p + initialisation - mac80211: fix statistics leak if dev_alloc_name() fails - tracing: Don't display trigger file for events that can't be enabled - MD: make bio mergeable @@ -38,7 +41,8 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - mm/zswap: provide unique zpool name - propogate_mnt: Handle the first propogated copy being a slave (CVE-2016-4581) - - modpost: fix module autoloading for OF devices with generic compatible property + - modpost: fix module autoloading for OF devices with generic compatible + property - [armhf] EXYNOS: Properly skip unitialized parent clock in power domain on - [armhf] SoCFPGA: Fix secondary CPU startup in thumb2 kernel - xen: Fix page <-> pfn conversion on 32 bit systems @@ -63,7 +67,8 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - ata: ahci-platform: Add ports-implemented DT bindings. - USB: serial: cp210x: add ID for Link ECU - USB: serial: cp210x: add Straizona Focusers device ids - - Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" + - Revert "USB / PM: Allow USB devices to remain runtime-suspended when + sleeping" - nvmem: mxs-ocotp: fix buffer overflow in read - Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() - [armhf] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading From 64ecb1331bfcdeba8ff2574d52896f11e9e26276 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 15 May 2016 03:27:53 +0100 Subject: [PATCH 23/36] Add/correct architecture prefixes to changelog for 4.5.4 Also delete mention of clk-meson, which we don't build at all. --- debian/changelog | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/debian/changelog b/debian/changelog index c640f04ce..88ed190b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,7 +9,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium engine - ipvs: drop first packet to redirect conntrack - rtlwifi: Fix size of wireless mode variable - - mfd: intel-lpss: Remove clock tree on error path + - [x86] mfd: intel-lpss: Remove clock tree on error path - nbd: ratelimit error msgs after socket close - null_blk: add lightnvm null_blk device to the nullb_list - [arm64] ata: ahci_xgene: dereferencing uninitialized pointer in probe @@ -17,16 +17,19 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - ath10k: fix pktlog in QCA99X0 - mwifiex: fix corner case association failure - clk-divider: make sure read-only dividers do not write to their register - - clk: rockchip: fix wrong mmc phase shift for rk3228 - - clk: rockchip: free memory in error cases when registering clock branches - - clk: meson: Fix meson_clk_register_clks() signature type mismatch - - clk: versatile: sp810: support reentrance - - clk: sunxi: Fix sun8i-a23-apb0-clk divider flags - - clk: xgene: Add missing parenthesis when clearing divider value - - clk: bcm2835: fix check of error code returned by devm_ioremap_resource() - - pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations - - pwm: omap-dmtimer: Add sanity checking for load and match values - - pwm: omap-dmtimer: Round load and match values rather than truncate + - [armhf] clk: rockchip: fix wrong mmc phase shift for rk3228 + - [armhf] clk: rockchip: free memory in error cases when registering clock + branches + - [armel/versatile] clk: versatile: sp810: support reentrance + - [armhf] clk: sunxi: Fix sun8i-a23-apb0-clk divider flags + - [arm64] clk: xgene: Add missing parenthesis when clearing divider value + - [armhf] clk: bcm2835: fix check of error code returned by + devm_ioremap_resource() + - [armhf] pwm: omap-dmtimer: Fix inaccurate period and duty cycle + calculations + - [armhf] pwm: omap-dmtimer: Add sanity checking for load and match values + - [armhf] pwm: omap-dmtimer: Round load and match values rather than + truncate - lpfc: fix misleading indentation - gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup list @@ -37,14 +40,14 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - MD: make bio mergeable - Minimal fix-up of bad hashing behavior of hash_64() - mm: memcontrol: let v2 cgroups follow changes in system swappiness - - mm, cma: prevent nr_isolated_* counters from going negative + - [armhf] mm, cma: prevent nr_isolated_* counters from going negative - mm/zswap: provide unique zpool name - propogate_mnt: Handle the first propogated copy being a slave (CVE-2016-4581) - modpost: fix module autoloading for OF devices with generic compatible property - [armhf] EXYNOS: Properly skip unitialized parent clock in power domain on - - [armhf] SoCFPGA: Fix secondary CPU startup in thumb2 kernel + - [armhf] SoCFPGA: Fix secondary CPU startup in thumb2 kernel - xen: Fix page <-> pfn conversion on 32 bit systems - xen/balloon: Fix crash when ballooning on x86 32 bit PAE - xen/evtchn: fix ring resize when binding new events @@ -60,7 +63,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - [x86] tsc: Read all ratio bits from MSR_PLATFORM_INFO - [arm64] cpuidle: Pass on arm_cpuidle_suspend()'s return value - [x86] sysfb_efi: Fix valid BAR address range check - - [arm*] dts: apq8064: add ahci ports-implemented mask + - [arm64] dts: apq8064: add ahci ports-implemented mask - ACPICA: Dispatcher: Update thread ID for recursive method calls - [powerpc*] Fix bad inline asm constraint in create_zero_mask() - libahci: save port map for forced port map @@ -70,10 +73,11 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" - nvmem: mxs-ocotp: fix buffer overflow in read - - Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() + - [x86] Drivers: hv: vmbus: Fix signaling logic in + hv_need_to_signal_on_read() - [armhf] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading - - drm/amdgpu: make sure vertical front porch is at least 1 - - drm/amdgpu: set metadata pointer to NULL after freeing. + - [x86] drm/amdgpu: make sure vertical front porch is at least 1 + - [x86] drm/amdgpu: set metadata pointer to NULL after freeing. - [x86] iio: ak8975: Fix NULL pointer exception on early interrupt - [x86] iio: ak8975: fix maybe-uninitialized warning - drm/radeon: make sure vertical front porch is at least 1 From 066544159a860704fcbd097d55f0cf4fafb97af9 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sun, 15 May 2016 18:44:34 +0200 Subject: [PATCH 24/36] Add CVE reference for CVE-2016-4805 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 88ed190b7..0194b044d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -368,7 +368,7 @@ linux (4.5.2-1) unstable; urgency=medium - bonding: fix bond_get_stats() - ipv4: fix broadcast packets reception - ipv4: initialize flowi4_flags before calling fib_lookup() - - ppp: take reference on channels netns + - ppp: take reference on channels netns (CVE-2016-4805) - xfrm: Fix crash observed during device unregistration and decryption - ipv6: udp: fix UDP_MIB_IGNOREDMULTI updates - bridge: Allow set bridge ageing time when switchdev disabled From 88ec3673ad65899031d62d8345ca9ea53f06becd Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sun, 15 May 2016 20:02:19 +0200 Subject: [PATCH 25/36] net: fix infoleak in llc (CVE-2016-4485) --- debian/changelog | 1 + .../bugfix/all/net-fix-infoleak-in-llc.patch | 32 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 34 insertions(+) create mode 100644 debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch diff --git a/debian/changelog b/debian/changelog index 0194b044d..1e9d7bc03 100644 --- a/debian/changelog +++ b/debian/changelog @@ -103,6 +103,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium [ Salvatore Bonaccorso ] * KEYS: Fix ASN.1 indefinite length object parsing (CVE-2016-0758) + * net: fix infoleak in llc (CVE-2016-4485) [ Ben Hutchings ] * gencontrol.py: Fix implementation of [packages]tools config option, diff --git a/debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch b/debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch new file mode 100644 index 000000000..ab034366a --- /dev/null +++ b/debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch @@ -0,0 +1,32 @@ +From b8670c09f37bdf2847cc44f36511a53afc6161fd Mon Sep 17 00:00:00 2001 +From: Kangjie Lu +Date: Tue, 3 May 2016 16:35:05 -0400 +Subject: [PATCH] net: fix infoleak in llc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The stack object “info” has a total size of 12 bytes. Its last byte +is padding which is not initialized and leaked via “put_cmsg”. + +Signed-off-by: Kangjie Lu +Signed-off-by: David S. Miller +--- + net/llc/af_llc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c +index b3c52e3..8ae3ed9 100644 +--- a/net/llc/af_llc.c ++++ b/net/llc/af_llc.c +@@ -626,6 +626,7 @@ static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) + if (llc->cmsg_flags & LLC_CMSG_PKTINFO) { + struct llc_pktinfo info; + ++ memset(&info, 0, sizeof(info)); + info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex; + llc_pdu_decode_dsap(skb, &info.lpi_sap); + llc_pdu_decode_da(skb, info.lpi_mac); +-- +2.8.1 + diff --git a/debian/patches/series b/debian/patches/series index 65d8a3bad..12b0f3932 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -136,6 +136,7 @@ bugfix/all/bpf-fix-double-fdput-in-replace_map_fd_with_map_ptr.patch bugfix/all/bpf-fix-refcnt-overflow.patch bugfix/all/bpf-fix-check_map_func_compatibility-logic.patch bugfix/all/KEYS-Fix-ASN.1-indefinite-length-object-parsing.patch +bugfix/all/net-fix-infoleak-in-llc.patch # ABI maintenance debian/ib-fix-abi-change-in-4.5.3.patch From c67a821486e7c1ab7fe127082e8e4c932b3d9cba Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sun, 15 May 2016 20:09:17 +0200 Subject: [PATCH 26/36] Use correct patch header for via git format-patch-for-debian --- debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch b/debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch index ab034366a..ad12c3d3f 100644 --- a/debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch +++ b/debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch @@ -1,10 +1,10 @@ -From b8670c09f37bdf2847cc44f36511a53afc6161fd Mon Sep 17 00:00:00 2001 From: Kangjie Lu Date: Tue, 3 May 2016 16:35:05 -0400 -Subject: [PATCH] net: fix infoleak in llc +Subject: net: fix infoleak in llc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +Origin: https://git.kernel.org/linus/b8670c09f37bdf2847cc44f36511a53afc6161fd The stack object “info” has a total size of 12 bytes. Its last byte is padding which is not initialized and leaked via “put_cmsg”. From 2365caa1f9bd648886f5322a85d9d8c07c976eff Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sun, 15 May 2016 21:58:27 +0200 Subject: [PATCH 27/36] Further cleanup patch headers for net-fix-infoleak-in-llc.patch --- debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch | 3 --- 1 file changed, 3 deletions(-) diff --git a/debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch b/debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch index ad12c3d3f..17638b413 100644 --- a/debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch +++ b/debian/patches/bugfix/all/net-fix-infoleak-in-llc.patch @@ -1,9 +1,6 @@ From: Kangjie Lu Date: Tue, 3 May 2016 16:35:05 -0400 Subject: net: fix infoleak in llc -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit Origin: https://git.kernel.org/linus/b8670c09f37bdf2847cc44f36511a53afc6161fd The stack object “info” has a total size of 12 bytes. Its last byte From 878c650ebfd134df41c940fad280b0c1d673def9 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sun, 15 May 2016 21:58:43 +0200 Subject: [PATCH 28/36] Revert "Add CVE reference for CVE-2016-4805" This reverts commit 066544159a860704fcbd097d55f0cf4fafb97af9. We do not update debian/changelog entries for already released versions. Tracked via kernel-sec and security-tracker. --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 1e9d7bc03..4ff48c81d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -369,7 +369,7 @@ linux (4.5.2-1) unstable; urgency=medium - bonding: fix bond_get_stats() - ipv4: fix broadcast packets reception - ipv4: initialize flowi4_flags before calling fib_lookup() - - ppp: take reference on channels netns (CVE-2016-4805) + - ppp: take reference on channels netns - xfrm: Fix crash observed during device unregistration and decryption - ipv6: udp: fix UDP_MIB_IGNOREDMULTI updates - bridge: Allow set bridge ageing time when switchdev disabled From 4e41e85a8c801114de88363e8baaa98e47047706 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 16 May 2016 01:42:09 +0100 Subject: [PATCH 29/36] Clean up kconfig using kconfigeditor2 --- debian/config/armhf/config.armmp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/debian/config/armhf/config.armmp b/debian/config/armhf/config.armmp index bc34a5e47..2301adab5 100644 --- a/debian/config/armhf/config.armmp +++ b/debian/config/armhf/config.armmp @@ -578,6 +578,16 @@ CONFIG_MTD_ONENAND_OMAP2=m ## CONFIG_CAN_SUN4I=m +## +## file: drivers/net/dsa/Kconfig +## +CONFIG_NET_DSA_MV88E6060=m +CONFIG_NET_DSA_MV88E6131=m +CONFIG_NET_DSA_MV88E6123_61_65=m +CONFIG_NET_DSA_MV88E6171=m +CONFIG_NET_DSA_MV88E6352=m +CONFIG_NET_DSA_BCM_SF2=m + ## ## file: drivers/net/ethernet/Kconfig ## @@ -1118,26 +1128,20 @@ CONFIG_APM_EMULATION=y CONFIG_CMA=y ## -## file: net/switchdev/Kconfig +## file: net/dsa/Kconfig ## CONFIG_NET_DSA=m -CONFIG_NET_DSA_MV88E6060=m -CONFIG_NET_DSA_MV88E6131=m -CONFIG_NET_DSA_MV88E6123_61_65=m -CONFIG_NET_DSA_MV88E6171=m -CONFIG_NET_DSA_MV88E6352=m -CONFIG_NET_DSA_BCM_SF2=m - -## -## file: net/switchdev/Kconfig -## -CONFIG_NET_SWITCHDEV=y ## ## file: net/phonet/Kconfig ## CONFIG_PHONET=m +## +## file: net/switchdev/Kconfig +## +CONFIG_NET_SWITCHDEV=y + ## ## file: sound/pci/hda/Kconfig ## From efbab1e4bf73ac7094f2f6044b8e567b7f471123 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 16 May 2016 03:02:51 +0100 Subject: [PATCH 30/36] Add various upstream fixes with known or probable security impact --- debian/changelog | 5 ++ ...ix-page-length-clamping-in-hash-walk.patch | 31 ++++++++++ ...-the-size-before-passing-to-splice_r.patch | 24 ++++++++ ...filename-handle-malformed-nm-entries.patch | 60 +++++++++++++++++++ .../all/net-fix-infoleak-in-rtnetlink.patch | 45 ++++++++++++++ ...id-kernel-pointer-value-leak-in-slab.patch | 45 ++++++++++++++ debian/patches/series | 5 ++ 7 files changed, 215 insertions(+) create mode 100644 debian/patches/bugfix/all/crypto-hash-fix-page-length-clamping-in-hash-walk.patch create mode 100644 debian/patches/bugfix/all/do_splice_to-cap-the-size-before-passing-to-splice_r.patch create mode 100644 debian/patches/bugfix/all/get_rock_ridge_filename-handle-malformed-nm-entries.patch create mode 100644 debian/patches/bugfix/all/net-fix-infoleak-in-rtnetlink.patch create mode 100644 debian/patches/bugfix/all/nf_conntrack-avoid-kernel-pointer-value-leak-in-slab.patch diff --git a/debian/changelog b/debian/changelog index 4ff48c81d..2151ea4f4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -115,6 +115,11 @@ linux (4.5.4-1) UNRELEASED; urgency=medium profile * debian/control: Remove alternate build-dependency on binutils-dev that was used for backports to wheezy + * net: fix infoleak in rtnetlink (CVE-2016-4486) + * nf_conntrack: avoid kernel pointer value leak in slab name + * vfs: do_splice_to(): cap the size before passing to ->splice_read() + * crypto: hash - Fix page length clamping in hash walk + * isofs: get_rock_ridge_filename(): handle malformed NM entries -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 diff --git a/debian/patches/bugfix/all/crypto-hash-fix-page-length-clamping-in-hash-walk.patch b/debian/patches/bugfix/all/crypto-hash-fix-page-length-clamping-in-hash-walk.patch new file mode 100644 index 000000000..aa54020ec --- /dev/null +++ b/debian/patches/bugfix/all/crypto-hash-fix-page-length-clamping-in-hash-walk.patch @@ -0,0 +1,31 @@ +From: Herbert Xu +Date: Wed, 4 May 2016 17:52:56 +0800 +Subject: crypto: hash - Fix page length clamping in hash walk +Origin: https://git.kernel.org/linus/13f4bb78cf6a312bbdec367ba3da044b09bf0e29 + +The crypto hash walk code is broken when supplied with an offset +greater than or equal to PAGE_SIZE. This patch fixes it by adjusting +walk->pg and walk->offset when this happens. + +Cc: +Reported-by: Steffen Klassert +Signed-off-by: Herbert Xu +--- + crypto/ahash.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/crypto/ahash.c b/crypto/ahash.c +index 5fc1f172963d..3887a98abcc3 100644 +--- a/crypto/ahash.c ++++ b/crypto/ahash.c +@@ -69,8 +69,9 @@ static int hash_walk_new_entry(struct crypto_hash_walk *walk) + struct scatterlist *sg; + + sg = walk->sg; +- walk->pg = sg_page(sg); + walk->offset = sg->offset; ++ walk->pg = sg_page(walk->sg) + (walk->offset >> PAGE_SHIFT); ++ walk->offset = offset_in_page(walk->offset); + walk->entrylen = sg->length; + + if (walk->entrylen > walk->total) diff --git a/debian/patches/bugfix/all/do_splice_to-cap-the-size-before-passing-to-splice_r.patch b/debian/patches/bugfix/all/do_splice_to-cap-the-size-before-passing-to-splice_r.patch new file mode 100644 index 000000000..f95a77e05 --- /dev/null +++ b/debian/patches/bugfix/all/do_splice_to-cap-the-size-before-passing-to-splice_r.patch @@ -0,0 +1,24 @@ +From: Al Viro +Date: Sat, 2 Apr 2016 14:56:58 -0400 +Subject: do_splice_to(): cap the size before passing to ->splice_read() +Origin: https://git.kernel.org/linus/03cc0789a690eb9ab07070376252961caeae7441 + +pipe capacity won't exceed 2G anyway. + +Signed-off-by: Al Viro +--- + fs/splice.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/fs/splice.c ++++ b/fs/splice.c +@@ -1144,6 +1144,9 @@ long do_splice_to(struct file *in, loff_ + if (unlikely(ret < 0)) + return ret; + ++ if (unlikely(len > MAX_RW_COUNT)) ++ len = MAX_RW_COUNT; ++ + if (in->f_op->splice_read) + splice_read = in->f_op->splice_read; + else diff --git a/debian/patches/bugfix/all/get_rock_ridge_filename-handle-malformed-nm-entries.patch b/debian/patches/bugfix/all/get_rock_ridge_filename-handle-malformed-nm-entries.patch new file mode 100644 index 000000000..995822627 --- /dev/null +++ b/debian/patches/bugfix/all/get_rock_ridge_filename-handle-malformed-nm-entries.patch @@ -0,0 +1,60 @@ +From: Al Viro +Date: Thu, 5 May 2016 16:25:35 -0400 +Subject: get_rock_ridge_filename(): handle malformed NM entries +Origin: https://git.kernel.org/linus/99d825822eade8d827a1817357cbf3f889a552d6 + +Payloads of NM entries are not supposed to contain NUL. When we run +into such, only the part prior to the first NUL goes into the +concatenation (i.e. the directory entry name being encoded by a bunch +of NM entries). We do stop when the amount collected so far + the +claimed amount in the current NM entry exceed 254. So far, so good, +but what we return as the total length is the sum of *claimed* +sizes, not the actual amount collected. And that can grow pretty +large - not unlimited, since you'd need to put CE entries in +between to be able to get more than the maximum that could be +contained in one isofs directory entry / continuation chunk and +we are stop once we'd encountered 32 CEs, but you can get about 8Kb +easily. And that's what will be passed to readdir callback as the +name length. 8Kb __copy_to_user() from a buffer allocated by +__get_free_page() + +Cc: stable@vger.kernel.org # 0.98pl6+ (yes, really) +Signed-off-by: Al Viro +--- + fs/isofs/rock.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c +index 5384ceb35b1c..98b3eb7d8eaf 100644 +--- a/fs/isofs/rock.c ++++ b/fs/isofs/rock.c +@@ -203,6 +203,8 @@ int get_rock_ridge_filename(struct iso_directory_record *de, + int retnamlen = 0; + int truncate = 0; + int ret = 0; ++ char *p; ++ int len; + + if (!ISOFS_SB(inode->i_sb)->s_rock) + return 0; +@@ -267,12 +269,17 @@ repeat: + rr->u.NM.flags); + break; + } +- if ((strlen(retname) + rr->len - 5) >= 254) { ++ len = rr->len - 5; ++ if (retnamlen + len >= 254) { + truncate = 1; + break; + } +- strncat(retname, rr->u.NM.name, rr->len - 5); +- retnamlen += rr->len - 5; ++ p = memchr(rr->u.NM.name, '\0', len); ++ if (unlikely(p)) ++ len = p - rr->u.NM.name; ++ memcpy(retname + retnamlen, rr->u.NM.name, len); ++ retnamlen += len; ++ retname[retnamlen] = '\0'; + break; + case SIG('R', 'E'): + kfree(rs.buffer); diff --git a/debian/patches/bugfix/all/net-fix-infoleak-in-rtnetlink.patch b/debian/patches/bugfix/all/net-fix-infoleak-in-rtnetlink.patch new file mode 100644 index 000000000..097daefb8 --- /dev/null +++ b/debian/patches/bugfix/all/net-fix-infoleak-in-rtnetlink.patch @@ -0,0 +1,45 @@ +From: Kangjie Lu +Date: Tue, 3 May 2016 16:46:24 -0400 +Subject: net: fix infoleak in rtnetlink +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Origin: https://git.kernel.org/linus/5f8e44741f9f216e33736ea4ec65ca9ac03036e6 + +The stack object “map” has a total size of 32 bytes. Its last 4 +bytes are padding generated by compiler. These padding bytes are +not initialized and sent out via “nla_put”. + +Signed-off-by: Kangjie Lu +Signed-off-by: David S. Miller +--- + net/core/rtnetlink.c | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +--- a/net/core/rtnetlink.c ++++ b/net/core/rtnetlink.c +@@ -1176,14 +1176,16 @@ static noinline_for_stack int rtnl_fill_ + + static int rtnl_fill_link_ifmap(struct sk_buff *skb, struct net_device *dev) + { +- struct rtnl_link_ifmap map = { +- .mem_start = dev->mem_start, +- .mem_end = dev->mem_end, +- .base_addr = dev->base_addr, +- .irq = dev->irq, +- .dma = dev->dma, +- .port = dev->if_port, +- }; ++ struct rtnl_link_ifmap map; ++ ++ memset(&map, 0, sizeof(map)); ++ map.mem_start = dev->mem_start; ++ map.mem_end = dev->mem_end; ++ map.base_addr = dev->base_addr; ++ map.irq = dev->irq; ++ map.dma = dev->dma; ++ map.port = dev->if_port; ++ + if (nla_put(skb, IFLA_MAP, sizeof(map), &map)) + return -EMSGSIZE; + diff --git a/debian/patches/bugfix/all/nf_conntrack-avoid-kernel-pointer-value-leak-in-slab.patch b/debian/patches/bugfix/all/nf_conntrack-avoid-kernel-pointer-value-leak-in-slab.patch new file mode 100644 index 000000000..84c2beb25 --- /dev/null +++ b/debian/patches/bugfix/all/nf_conntrack-avoid-kernel-pointer-value-leak-in-slab.patch @@ -0,0 +1,45 @@ +From: Linus Torvalds +Date: Sat, 14 May 2016 11:11:44 -0700 +Subject: nf_conntrack: avoid kernel pointer value leak in slab name +Origin: https://git.kernel.org/linus/31b0b385f69d8d5491a4bca288e25e63f1d945d0 + +The slab name ends up being visible in the directory structure under +/sys, and even if you don't have access rights to the file you can see +the filenames. + +Just use a 64-bit counter instead of the pointer to the 'net' structure +to generate a unique name. + +This code will go away in 4.7 when the conntrack code moves to a single +kmemcache, but this is the backportable simple solution to avoiding +leaking kernel pointers to user space. + +Fixes: 5b3501faa874 ("netfilter: nf_conntrack: per netns nf_conntrack_cachep") +Signed-off-by: Linus Torvalds +Acked-by: Eric Dumazet +Cc: stable@vger.kernel.org +Signed-off-by: David S. Miller +--- + net/netfilter/nf_conntrack_core.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/net/netfilter/nf_conntrack_core.c ++++ b/net/netfilter/nf_conntrack_core.c +@@ -1780,6 +1780,7 @@ void nf_conntrack_init_end(void) + + int nf_conntrack_init_net(struct net *net) + { ++ static atomic64_t unique_id; + int ret = -ENOMEM; + int cpu; + +@@ -1802,7 +1803,8 @@ int nf_conntrack_init_net(struct net *ne + if (!net->ct.stat) + goto err_pcpu_lists; + +- net->ct.slabname = kasprintf(GFP_KERNEL, "nf_conntrack_%p", net); ++ net->ct.slabname = kasprintf(GFP_KERNEL, "nf_conntrack_%llu", ++ (u64)atomic64_inc_return(&unique_id)); + if (!net->ct.slabname) + goto err_slabname; + diff --git a/debian/patches/series b/debian/patches/series index 12b0f3932..05548edef 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -137,6 +137,11 @@ bugfix/all/bpf-fix-refcnt-overflow.patch bugfix/all/bpf-fix-check_map_func_compatibility-logic.patch bugfix/all/KEYS-Fix-ASN.1-indefinite-length-object-parsing.patch bugfix/all/net-fix-infoleak-in-llc.patch +bugfix/all/net-fix-infoleak-in-rtnetlink.patch +bugfix/all/nf_conntrack-avoid-kernel-pointer-value-leak-in-slab.patch +bugfix/all/do_splice_to-cap-the-size-before-passing-to-splice_r.patch +bugfix/all/crypto-hash-fix-page-length-clamping-in-hash-walk.patch +bugfix/all/get_rock_ridge_filename-handle-malformed-nm-entries.patch # ABI maintenance debian/ib-fix-abi-change-in-4.5.3.patch From 3eae053b8538b91b2d839ce58eaa8c519c70318f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 16 May 2016 03:14:49 +0100 Subject: [PATCH 31/36] uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h Closes: #822393 --- debian/changelog | 2 + ...t-fix-compile-errors-when-glibc-net-.patch | 245 ++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 248 insertions(+) create mode 100644 debian/patches/bugfix/all/uapi-glibc-compat-fix-compile-errors-when-glibc-net-.patch diff --git a/debian/changelog b/debian/changelog index 2151ea4f4..639802ab5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -120,6 +120,8 @@ linux (4.5.4-1) UNRELEASED; urgency=medium * vfs: do_splice_to(): cap the size before passing to ->splice_read() * crypto: hash - Fix page length clamping in hash walk * isofs: get_rock_ridge_filename(): handle malformed NM entries + * uapi glibc compat: fix compile errors when glibc net/if.h included + before linux/if.h (Closes: #822393) -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 diff --git a/debian/patches/bugfix/all/uapi-glibc-compat-fix-compile-errors-when-glibc-net-.patch b/debian/patches/bugfix/all/uapi-glibc-compat-fix-compile-errors-when-glibc-net-.patch new file mode 100644 index 000000000..80c3e7a91 --- /dev/null +++ b/debian/patches/bugfix/all/uapi-glibc-compat-fix-compile-errors-when-glibc-net-.patch @@ -0,0 +1,245 @@ +From: Mikko Rapeli +Date: Sun, 24 Apr 2016 17:45:00 +0200 +Subject: uapi glibc compat: fix compile errors when glibc net/if.h included + before linux/if.h +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Origin: https://git.kernel.org/linus/4a91cb61bb995e5571098188092e296192309c77 +Bug-Debian: https://bugs.debian.org/822393 + +glibc's net/if.h contains copies of definitions from linux/if.h and these +conflict and cause build failures if both files are included by application +source code. Changes in uapi headers, which fixed header file dependencies to +include linux/if.h when it was needed, e.g. commit 1ffad83d, made the +net/if.h and linux/if.h incompatibilities visible as build failures for +userspace applications like iproute2 and xtables-addons. + +This patch fixes compile errors when glibc net/if.h is included before +linux/if.h: + +./linux/if.h:99:21: error: redeclaration of enumerator ‘IFF_NOARP’ +./linux/if.h:98:23: error: redeclaration of enumerator ‘IFF_RUNNING’ +./linux/if.h:97:26: error: redeclaration of enumerator ‘IFF_NOTRAILERS’ +./linux/if.h:96:27: error: redeclaration of enumerator ‘IFF_POINTOPOINT’ +./linux/if.h:95:24: error: redeclaration of enumerator ‘IFF_LOOPBACK’ +./linux/if.h:94:21: error: redeclaration of enumerator ‘IFF_DEBUG’ +./linux/if.h:93:25: error: redeclaration of enumerator ‘IFF_BROADCAST’ +./linux/if.h:92:19: error: redeclaration of enumerator ‘IFF_UP’ +./linux/if.h:252:8: error: redefinition of ‘struct ifconf’ +./linux/if.h:203:8: error: redefinition of ‘struct ifreq’ +./linux/if.h:169:8: error: redefinition of ‘struct ifmap’ +./linux/if.h:107:23: error: redeclaration of enumerator ‘IFF_DYNAMIC’ +./linux/if.h:106:25: error: redeclaration of enumerator ‘IFF_AUTOMEDIA’ +./linux/if.h:105:23: error: redeclaration of enumerator ‘IFF_PORTSEL’ +./linux/if.h:104:25: error: redeclaration of enumerator ‘IFF_MULTICAST’ +./linux/if.h:103:21: error: redeclaration of enumerator ‘IFF_SLAVE’ +./linux/if.h:102:22: error: redeclaration of enumerator ‘IFF_MASTER’ +./linux/if.h:101:24: error: redeclaration of enumerator ‘IFF_ALLMULTI’ +./linux/if.h:100:23: error: redeclaration of enumerator ‘IFF_PROMISC’ + +The cases where linux/if.h is included before net/if.h need a similar fix in +the glibc side, or the order of include files can be changed userspace +code as a workaround. + +This change was tested in x86 userspace on Debian unstable with +scripts/headers_compile_test.sh: + +$ make headers_install && \ + cd usr/include && ../../scripts/headers_compile_test.sh -l -k +... +cc -Wall -c -nostdinc -I /usr/lib/gcc/i586-linux-gnu/5/include -I /usr/lib/gcc/i586-linux-gnu/5/include-fixed -I . -I /home/mcfrisk/src/linux-2.6/usr/headers_compile_test_include.2uX2zH -I /home/mcfrisk/src/linux-2.6/usr/headers_compile_test_include.2uX2zH/i586-linux-gnu -o /dev/null ./linux/if.h_libc_before_kernel.h +PASSED libc before kernel test: ./linux/if.h + +Reported-by: Jan Engelhardt +Reported-by: Josh Boyer +Reported-by: Stephen Hemminger +Reported-by: Waldemar Brodkorb +Cc: Gabriel Laskar +Signed-off-by: Mikko Rapeli +Signed-off-by: David S. Miller +--- + include/uapi/linux/if.h | 28 +++++++++++++++++++++++++ + include/uapi/linux/libc-compat.h | 44 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 72 insertions(+) + +diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h +index f80277569f24..e601c8c3bdc7 100644 +--- a/include/uapi/linux/if.h ++++ b/include/uapi/linux/if.h +@@ -19,14 +19,20 @@ + #ifndef _LINUX_IF_H + #define _LINUX_IF_H + ++#include /* for compatibility with glibc */ + #include /* for "__kernel_caddr_t" et al */ + #include /* for "struct sockaddr" et al */ + #include /* for "__user" et al */ + ++#if __UAPI_DEF_IF_IFNAMSIZ + #define IFNAMSIZ 16 ++#endif /* __UAPI_DEF_IF_IFNAMSIZ */ + #define IFALIASZ 256 + #include + ++/* For glibc compatibility. An empty enum does not compile. */ ++#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && \ ++ __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 + /** + * enum net_device_flags - &struct net_device flags + * +@@ -68,6 +74,8 @@ + * @IFF_ECHO: echo sent packets. Volatile. + */ + enum net_device_flags { ++/* for compatibility with glibc net/if.h */ ++#if __UAPI_DEF_IF_NET_DEVICE_FLAGS + IFF_UP = 1<<0, /* sysfs */ + IFF_BROADCAST = 1<<1, /* volatile */ + IFF_DEBUG = 1<<2, /* sysfs */ +@@ -84,11 +92,17 @@ enum net_device_flags { + IFF_PORTSEL = 1<<13, /* sysfs */ + IFF_AUTOMEDIA = 1<<14, /* sysfs */ + IFF_DYNAMIC = 1<<15, /* sysfs */ ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */ ++#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO + IFF_LOWER_UP = 1<<16, /* volatile */ + IFF_DORMANT = 1<<17, /* volatile */ + IFF_ECHO = 1<<18, /* volatile */ ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ + }; ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */ + ++/* for compatibility with glibc net/if.h */ ++#if __UAPI_DEF_IF_NET_DEVICE_FLAGS + #define IFF_UP IFF_UP + #define IFF_BROADCAST IFF_BROADCAST + #define IFF_DEBUG IFF_DEBUG +@@ -105,9 +119,13 @@ enum net_device_flags { + #define IFF_PORTSEL IFF_PORTSEL + #define IFF_AUTOMEDIA IFF_AUTOMEDIA + #define IFF_DYNAMIC IFF_DYNAMIC ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */ ++ ++#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO + #define IFF_LOWER_UP IFF_LOWER_UP + #define IFF_DORMANT IFF_DORMANT + #define IFF_ECHO IFF_ECHO ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ + + #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\ + IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT) +@@ -166,6 +184,8 @@ enum { + * being very small might be worth keeping for clean configuration. + */ + ++/* for compatibility with glibc net/if.h */ ++#if __UAPI_DEF_IF_IFMAP + struct ifmap { + unsigned long mem_start; + unsigned long mem_end; +@@ -175,6 +195,7 @@ struct ifmap { + unsigned char port; + /* 3 bytes spare */ + }; ++#endif /* __UAPI_DEF_IF_IFMAP */ + + struct if_settings { + unsigned int type; /* Type of physical device or protocol */ +@@ -200,6 +221,8 @@ struct if_settings { + * remainder may be interface specific. + */ + ++/* for compatibility with glibc net/if.h */ ++#if __UAPI_DEF_IF_IFREQ + struct ifreq { + #define IFHWADDRLEN 6 + union +@@ -223,6 +246,7 @@ struct ifreq { + struct if_settings ifru_settings; + } ifr_ifru; + }; ++#endif /* __UAPI_DEF_IF_IFREQ */ + + #define ifr_name ifr_ifrn.ifrn_name /* interface name */ + #define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ +@@ -249,6 +273,8 @@ struct ifreq { + * must know all networks accessible). + */ + ++/* for compatibility with glibc net/if.h */ ++#if __UAPI_DEF_IF_IFCONF + struct ifconf { + int ifc_len; /* size of buffer */ + union { +@@ -256,6 +282,8 @@ struct ifconf { + struct ifreq __user *ifcu_req; + } ifc_ifcu; + }; ++#endif /* __UAPI_DEF_IF_IFCONF */ ++ + #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ + #define ifc_req ifc_ifcu.ifcu_req /* array of structures */ + +diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h +index 7d024ceb075d..d5e38c73377c 100644 +--- a/include/uapi/linux/libc-compat.h ++++ b/include/uapi/linux/libc-compat.h +@@ -51,6 +51,40 @@ + /* We have included glibc headers... */ + #if defined(__GLIBC__) + ++/* Coordinate with glibc net/if.h header. */ ++#if defined(_NET_IF_H) ++ ++/* GLIBC headers included first so don't define anything ++ * that would already be defined. */ ++ ++#define __UAPI_DEF_IF_IFCONF 0 ++#define __UAPI_DEF_IF_IFMAP 0 ++#define __UAPI_DEF_IF_IFNAMSIZ 0 ++#define __UAPI_DEF_IF_IFREQ 0 ++/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0 ++/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ ++#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ ++ ++#else /* _NET_IF_H */ ++ ++/* Linux headers included first, and we must define everything ++ * we need. The expectation is that glibc will check the ++ * __UAPI_DEF_* defines and adjust appropriately. */ ++ ++#define __UAPI_DEF_IF_IFCONF 1 ++#define __UAPI_DEF_IF_IFMAP 1 ++#define __UAPI_DEF_IF_IFNAMSIZ 1 ++#define __UAPI_DEF_IF_IFREQ 1 ++/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 ++/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 ++ ++#endif /* _NET_IF_H */ ++ + /* Coordinate with glibc netinet/in.h header. */ + #if defined(_NETINET_IN_H) + +@@ -117,6 +151,16 @@ + * that we need. */ + #else /* !defined(__GLIBC__) */ + ++/* Definitions for if.h */ ++#define __UAPI_DEF_IF_IFCONF 1 ++#define __UAPI_DEF_IF_IFMAP 1 ++#define __UAPI_DEF_IF_IFNAMSIZ 1 ++#define __UAPI_DEF_IF_IFREQ 1 ++/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 ++/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 ++ + /* Definitions for in.h */ + #define __UAPI_DEF_IN_ADDR 1 + #define __UAPI_DEF_IN_IPPROTO 1 diff --git a/debian/patches/series b/debian/patches/series index 05548edef..488677b9d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -85,6 +85,7 @@ bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch bugfix/all/atl2-disable-unimplemented-scatter-gather-feature.patch bugfix/all/module-invalidate-signatures-on-force-loaded-modules.patch bugfix/all/mm-thp-kvm-fix-memory-corruption-in-KVM-with-THP-ena.patch +bugfix/all/uapi-glibc-compat-fix-compile-errors-when-glibc-net-.patch # Miscellaneous features features/all/mm-exclude-zone_device-from-gfp_zone_table.patch From 48902f4f1ab8ed1f8ff8a822f523bb1b85961453 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 16 May 2016 03:33:38 +0100 Subject: [PATCH 32/36] videobuf2-core: Fix crash after fixing CVE-2016-4568 --- debian/changelog | 1 + ...fix-crash-after-fixing-cve-2016-4568.patch | 25 +++++++++++++++++++ .../v4l2-fix-abi-changes-in-4.5.3.patch | 4 +-- debian/patches/series | 1 + 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 debian/patches/bugfix/all/videobuf2-core-fix-crash-after-fixing-cve-2016-4568.patch diff --git a/debian/changelog b/debian/changelog index 639802ab5..ec92e8f25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -122,6 +122,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium * isofs: get_rock_ridge_filename(): handle malformed NM entries * uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h (Closes: #822393) + * videobuf2-core: Fix crash after fixing CVE-2016-4568 -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 diff --git a/debian/patches/bugfix/all/videobuf2-core-fix-crash-after-fixing-cve-2016-4568.patch b/debian/patches/bugfix/all/videobuf2-core-fix-crash-after-fixing-cve-2016-4568.patch new file mode 100644 index 000000000..8c80f98ef --- /dev/null +++ b/debian/patches/bugfix/all/videobuf2-core-fix-crash-after-fixing-cve-2016-4568.patch @@ -0,0 +1,25 @@ +From: Ben Hutchings +Date: Mon, 16 May 2016 03:26:30 +0100 +Subject: videobuf2-core: Fix crash after fixing CVE-2016-4568 + +Commit 2c1f6951a8a8 "[media] videobuf2-v4l2: Verify planes array in buffer +dequeueing" was reverted upstream by commit 93f0750dcdae. + +It's obvious from the log in the revert commit message that pb == NULL +in __verify_planes_array(). We should treat this case as successful +because vb2_core_dqbuf() won't attempt to copy anything to user +buffers. + +Signed-off-by: Ben Hutchings +--- +--- a/drivers/media/v4l2-core/videobuf2-core.c ++++ b/drivers/media/v4l2-core/videobuf2-core.c +@@ -1665,7 +1665,7 @@ static int __vb2_get_done_vb(struct vb2_ + * Only remove the buffer from done_list if v4l2_buffer can handle all + * the planes. + */ +- ret = call_bufop(q, verify_planes_array, *vb, pb); ++ ret = pb ? call_bufop(q, verify_planes_array, *vb, pb) : 0; + if (!ret) + list_del(&(*vb)->done_entry); + spin_unlock_irqrestore(&q->done_lock, flags); diff --git a/debian/patches/debian/v4l2-fix-abi-changes-in-4.5.3.patch b/debian/patches/debian/v4l2-fix-abi-changes-in-4.5.3.patch index 4c63bff48..be324fdf1 100644 --- a/debian/patches/debian/v4l2-fix-abi-changes-in-4.5.3.patch +++ b/debian/patches/debian/v4l2-fix-abi-changes-in-4.5.3.patch @@ -17,8 +17,8 @@ genksyms. Set and check the flag as necessary. * Only remove the buffer from done_list if v4l2_buffer can handle all * the planes. */ -- ret = call_bufop(q, verify_planes_array, *vb, pb); -+ ret = q->have_verify_planes_array ? +- ret = pb ? call_bufop(q, verify_planes_array, *vb, pb) : 0; ++ ret = (pb && q->have_verify_planes_array) ? + call_bufop(q, verify_planes_array, *vb, pb) : 0; if (!ret) list_del(&(*vb)->done_entry); diff --git a/debian/patches/series b/debian/patches/series index 488677b9d..bf28b482e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -86,6 +86,7 @@ bugfix/all/atl2-disable-unimplemented-scatter-gather-feature.patch bugfix/all/module-invalidate-signatures-on-force-loaded-modules.patch bugfix/all/mm-thp-kvm-fix-memory-corruption-in-KVM-with-THP-ena.patch bugfix/all/uapi-glibc-compat-fix-compile-errors-when-glibc-net-.patch +bugfix/all/videobuf2-core-fix-crash-after-fixing-cve-2016-4568.patch # Miscellaneous features features/all/mm-exclude-zone_device-from-gfp_zone_table.patch From be1c8b16ab1fab714cc14973a280cb97e9f6f273 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Mon, 16 May 2016 07:33:42 +0200 Subject: [PATCH 33/36] KVM: MTRR: remove MSR 0x2f8 (CVE-2016-3713) --- debian/changelog | 1 + .../all/KVM-MTRR-remove-MSR-0x2f8.patch | 43 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 45 insertions(+) create mode 100644 debian/patches/bugfix/all/KVM-MTRR-remove-MSR-0x2f8.patch diff --git a/debian/changelog b/debian/changelog index ec92e8f25..fd4a3c387 100644 --- a/debian/changelog +++ b/debian/changelog @@ -104,6 +104,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium [ Salvatore Bonaccorso ] * KEYS: Fix ASN.1 indefinite length object parsing (CVE-2016-0758) * net: fix infoleak in llc (CVE-2016-4485) + * KVM: MTRR: remove MSR 0x2f8 (CVE-2016-3713) [ Ben Hutchings ] * gencontrol.py: Fix implementation of [packages]tools config option, diff --git a/debian/patches/bugfix/all/KVM-MTRR-remove-MSR-0x2f8.patch b/debian/patches/bugfix/all/KVM-MTRR-remove-MSR-0x2f8.patch new file mode 100644 index 000000000..d46c7826d --- /dev/null +++ b/debian/patches/bugfix/all/KVM-MTRR-remove-MSR-0x2f8.patch @@ -0,0 +1,43 @@ +From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= +Subject: [PATCH] KVM: MTRR: remove MSR 0x2f8 + +MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support +was introduced by 9ba075a664df ("KVM: MTRR support"). + +0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the +size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8, +which made access to index 124 out of bounds. The surrounding code only +WARNs in this situation, thus the guest gained a limited read/write +access to struct kvm_arch_vcpu. + +0x2f8 is not a valid VR MTRR MSR, because KVM has/advertises only 16 VR +MTRR MSRs, 0x200-0x20f. Every VR MTRR is set up using two MSRs, 0x2f8 +was treated as a PHYSBASE and 0x2f9 would be its PHYSMASK, but 0x2f9 was +not implemented in KVM, therefore 0x2f8 could never do anything useful +and getting rid of it is safe. + +This fixes CVE-2016-3713. + +Fixes: 910a6aae4e2e ("KVM: MTRR: exactly define the size of variable MTRRs") +Cc: stable@vger.kernel.org +Reported-by: David Matlack +Signed-off-by: Radim Krčmář +--- + arch/x86/kvm/mtrr.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm/mtrr.c +index 3f8c732117ec..c146f3c262c3 100644 +--- a/arch/x86/kvm/mtrr.c ++++ b/arch/x86/kvm/mtrr.c +@@ -44,8 +44,6 @@ static bool msr_mtrr_valid(unsigned msr) + case MSR_MTRRdefType: + case MSR_IA32_CR_PAT: + return true; +- case 0x2f8: +- return true; + } + return false; + } +-- +2.8.1 diff --git a/debian/patches/series b/debian/patches/series index bf28b482e..a89d5d3c7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -144,6 +144,7 @@ bugfix/all/nf_conntrack-avoid-kernel-pointer-value-leak-in-slab.patch bugfix/all/do_splice_to-cap-the-size-before-passing-to-splice_r.patch bugfix/all/crypto-hash-fix-page-length-clamping-in-hash-walk.patch bugfix/all/get_rock_ridge_filename-handle-malformed-nm-entries.patch +bugfix/all/KVM-MTRR-remove-MSR-0x2f8.patch # ABI maintenance debian/ib-fix-abi-change-in-4.5.3.patch From 75ad54c9511a482ad8db60b3e61480053afacc34 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 16 May 2016 13:09:35 +0100 Subject: [PATCH 34/36] [i386/686] Stop recommending libc6-i686 --- debian/config/i386/defines | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/config/i386/defines b/debian/config/i386/defines index db545bacc..b4c62fba2 100644 --- a/debian/config/i386/defines +++ b/debian/config/i386/defines @@ -31,7 +31,6 @@ hardware-long: PCs with one or more processors not supporting PAE configs: kernelarch-x86/config-arch-32 i386/config.686 -recommends: libc6-i686 [686-pae_build] debug-info: true From 4665b0730f6346d81cb400e3561a2a6e9ff83890 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 16 May 2016 19:05:37 +0100 Subject: [PATCH 35/36] [armhf] Enable Exynos video drivers (Closes: #824435) - drm: Enable DRM_EXYNOS as module, DRM_EXYNOS_MIXER, DRM_EXYNOS_FIMD, DRM_EXYNOS_DSI, DRM_EXYNOS_DP, DRM_EXYNOS_HDMI - phy: Enable PHY_EXYNOS_MIPI_VIDEO, PHY_EXYNOS_DP_VIDEO as modules - cpuidle: Enable ARM_EXYNOS_CPUIDLE - iio: Enable EXYNOS_ADC as module --- debian/changelog | 6 ++++++ debian/config/armhf/config.armmp | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/debian/changelog b/debian/changelog index fd4a3c387..197a38f26 100644 --- a/debian/changelog +++ b/debian/changelog @@ -124,6 +124,12 @@ linux (4.5.4-1) UNRELEASED; urgency=medium * uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h (Closes: #822393) * videobuf2-core: Fix crash after fixing CVE-2016-4568 + * [armhf] Enable more Exynos drivers (Closes: #824435): + - drm: Enable DRM_EXYNOS as module, DRM_EXYNOS_MIXER, DRM_EXYNOS_FIMD, + DRM_EXYNOS_DSI, DRM_EXYNOS_DP, DRM_EXYNOS_HDMI + - phy: Enable PHY_EXYNOS_MIPI_VIDEO, PHY_EXYNOS_DP_VIDEO as modules + - cpuidle: Enable ARM_EXYNOS_CPUIDLE + - iio: Enable EXYNOS_ADC as module -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 diff --git a/debian/config/armhf/config.armmp b/debian/config/armhf/config.armmp index 2301adab5..cef254e81 100644 --- a/debian/config/armhf/config.armmp +++ b/debian/config/armhf/config.armmp @@ -191,6 +191,11 @@ CONFIG_CPUFREQ_DT=m CONFIG_ARM_IMX6Q_CPUFREQ=m CONFIG_ARM_TEGRA20_CPUFREQ=y +## +## file: drivers/cpuidle/Kconfig.arm +## +CONFIG_ARM_EXYNOS_CPUIDLE=y + ## ## file: drivers/crypto/Kconfig ## @@ -251,6 +256,16 @@ CONFIG_DRM=m ## CONFIG_DRM_ETNAVIV=m +## +## file: drivers/gpu/drm/exynos/Kconfig +## +CONFIG_DRM_EXYNOS=m +CONFIG_DRM_EXYNOS_FIMD=y +CONFIG_DRM_EXYNOS_MIXER=y +CONFIG_DRM_EXYNOS_DSI=y +CONFIG_DRM_EXYNOS_DP=y +CONFIG_DRM_EXYNOS_HDMI=y + ## ## file: drivers/gpu/drm/i2c/Kconfig ## @@ -380,6 +395,7 @@ CONFIG_IIO=m ## ## file: drivers/iio/adc/Kconfig ## +CONFIG_EXYNOS_ADC=m CONFIG_ROCKCHIP_SARADC=m CONFIG_TI_AM335X_ADC=m CONFIG_TWL4030_MADC=m @@ -778,10 +794,12 @@ CONFIG_PCI_TEGRA=y ## ## file: drivers/phy/Kconfig ## +CONFIG_PHY_EXYNOS_MIPI_VIDEO=m CONFIG_OMAP_CONTROL_PHY=m CONFIG_OMAP_USB2=m CONFIG_TI_PIPE3=y CONFIG_TWL4030_USB=m +CONFIG_PHY_EXYNOS_DP_VIDEO=m CONFIG_PHY_EXYNOS5250_SATA=m CONFIG_PHY_SUN4I_USB=m CONFIG_PHY_SUN9I_USB=m From 5f0787708a340aeeb833d409a0dde8ac4e94bcf0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 16 May 2016 19:17:22 +0100 Subject: [PATCH 36/36] Prepare to release linux (4.5.4-1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 197a38f26..84cdb0272 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux (4.5.4-1) UNRELEASED; urgency=medium +linux (4.5.4-1) unstable; urgency=medium * New upstream stable update: https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.4 @@ -131,7 +131,7 @@ linux (4.5.4-1) UNRELEASED; urgency=medium - cpuidle: Enable ARM_EXYNOS_CPUIDLE - iio: Enable EXYNOS_ADC as module - -- Aurelien Jarno Tue, 10 May 2016 23:58:07 +0200 + -- Ben Hutchings Mon, 16 May 2016 19:17:22 +0100 linux (4.5.3-2) unstable; urgency=medium