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 97b731e8b..182eae8c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -44,6 +44,141 @@ linux (4.6~rc3-1~exp1) experimental; urgency=medium -- Ben Hutchings Thu, 14 Apr 2016 23:55:15 +0100 +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 + - 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 + - [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 + - [armhf] wlcore: fix error handling in wlcore_event_fw_logger + - ath10k: fix pktlog in QCA99X0 + - mwifiex: fix corner case association failure + - clk-divider: make sure read-only dividers do not write to their register + - [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 + - 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 + - [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 + - 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 + - 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 + - [x86] libnvdimm, pfn: fix memmap reservation sizing + - writeback: Fix performance regression in wb_over_bg_thresh() + - [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 + - [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 + - 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 + - [x86] Drivers: hv: vmbus: Fix signaling logic in + hv_need_to_signal_on_read() + - [armhf] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading + - [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 + - [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. + * [i386] Stop recommending libc6-i686. + * [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. + + [ Roger Shimizu ] + * 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) + * 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, + 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 + * 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 + * 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 + * 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 + + -- Ben Hutchings Mon, 16 May 2016 19:17:22 +0100 + linux (4.5.3-2) unstable; urgency=medium * [s390x] PCI: Ignore zpci ABI changes; these functions are not used by diff --git a/debian/config/armhf/config.armmp b/debian/config/armhf/config.armmp index b2d4b191c..b277a2adf 100644 --- a/debian/config/armhf/config.armmp +++ b/debian/config/armhf/config.armmp @@ -192,6 +192,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 ## @@ -252,6 +257,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 ## @@ -381,6 +396,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 @@ -579,6 +595,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 ## @@ -769,10 +795,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 @@ -1120,26 +1148,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 ## diff --git a/debian/config/config b/debian/config/config index 227ff5ecc..0aec094b8 100644 --- a/debian/config/config +++ b/debian/config/config @@ -6304,6 +6304,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 diff --git a/debian/config/i386/defines b/debian/config/i386/defines index b988c322a..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 @@ -45,4 +44,3 @@ parts: pae configs: kernelarch-x86/config-arch-32 i386/config.686-pae -recommends: libc6-i686 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 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 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 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/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/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..581f9bd7f --- /dev/null +++ b/debian/patches/bugfix/mips/MIPS-Force-CPUs-to-lose-FP-context-during-mode-switc.patch @@ -0,0 +1,101 @@ +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 occurring. 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); + } + + /* 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 e320a992c..ca6c1eff6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -45,6 +45,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/revert-sp5100_tco-fix-the-device-check-for-SB800-and.patch bugfix/powerpc/powerpc-fix-sstep-compile-on-powerpcspe.patch @@ -53,6 +55,7 @@ features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch 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/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/arm/device-tree/ARM-dts-kirkwood-add-kirkwood-ds112.dtb-to-Makefile.patch @@ -65,6 +68,7 @@ bugfix/all/disable-some-marvell-phys.patch bugfix/all/rtsx_usb_ms-use-msleep_interruptible-in-polling-loop.patch bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch bugfix/all/module-invalidate-signatures-on-force-loaded-modules.patch +bugfix/all/videobuf2-core-fix-crash-after-fixing-cve-2016-4568.patch # Miscellaneous features @@ -97,6 +101,7 @@ features/all/securelevel/enable-cold-boot-attack-mitigation.patch # Security fixes bugfix/all/ptrace-being-capable-wrt-a-process-requires-mapped-uids-gids.patch debian/i386-686-pae-pci-set-pci-nobios-by-default.patch +bugfix/all/KVM-MTRR-remove-MSR-0x2f8.patch # Tools bug fixes bugfix/all/usbip-document-tcp-wrappers.patch diff --git a/debian/rules b/debian/rules index c1bbc80d3..fbf9eade1 100755 --- a/debian/rules +++ b/debian/rules @@ -16,6 +16,14 @@ 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 .NOTPARALLEL: 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 bc9af3ccd..6e4776a30 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 43677eba7..cb0dce4f5 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,12 +3,59 @@ 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, +# 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 , +# 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] , + libaudit-dev , + libdw-dev , + libelf-dev , + libiberty-dev , + 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 , +# 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 Homepage: https://www.kernel.org/ diff --git a/debian/templates/control.tools.in b/debian/templates/control.tools.in index 3b9372292..ed2d9af30 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 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