26 Mar, 2016

3 commits


24 Mar, 2016

11 commits


18 Mar, 2016

5 commits


15 Mar, 2016

4 commits


14 Mar, 2016

2 commits

  • Linus Torvalds
     
  • Pull MIPS fixes from Ralf Baechle:
    "Another round of MIPS fixes for 4.5:

    - Fix JZ4780 build with DEBUG_ZBOOT and MACH_JZ4780
    - Fix build with DEBUG_ZBOOT and MACH_JZ4780
    - Fix issue with uninitialised temp_foreign_map
    - Fix awk regex compile failure with certain versions of awk. At
    this time, the sole user, ld-ifversion, is only used on MIPS"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: smp.c: Fix uninitialised temp_foreign_map
    MIPS: Fix build error when SMP is used without GIC
    ld-version: Fix awk regex compile failure
    MIPS: Fix build with DEBUG_ZBOOT and MACH_JZ4780

    Linus Torvalds
     

13 Mar, 2016

8 commits

  • When calculate_cpu_foreign_map() recalculates the cpu_foreign_map
    cpumask it uses the local variable temp_foreign_map without initialising
    it to zero. Since the calculation only ever sets bits in this cpumask
    any existing bits at that memory location will remain set and find their
    way into cpu_foreign_map too. This could potentially lead to cache
    operations suboptimally doing smp calls to multiple VPEs in the same
    core, even though the VPEs share primary caches.

    Therefore initialise temp_foreign_map using cpumask_clear() before use.

    Fixes: cccf34e9411c ("MIPS: c-r4k: Fix cache flushing for MT cores")
    Signed-off-by: James Hogan
    Cc: Paul Burton
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12759/
    Signed-off-by: Ralf Baechle

    James Hogan
     
  • The MIPS_GIC_IPI should only be selected when MIPS_GIC is also
    selected, otherwise it results in a compile error. smp-gic.c uses some
    functions from include/linux/irqchip/mips-gic.h like
    plat_ipi_call_int_xlate() which are only added to the header file when
    MIPS_GIC is set. The Lantiq SoC does not use the GIC, but supports SMP.
    The calls top the functions from smp-gic.c are already protected by
    some #ifdefs

    The first part of this was introduced in commit 72e20142b2bf ("MIPS:
    Move GIC IPI functions out of smp-cmp.c")

    Signed-off-by: Hauke Mehrtens
    Cc: Paul Burton
    Cc: stable@vger.kernel.org # v3.15+
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12774/
    Signed-off-by: Ralf Baechle

    Hauke Mehrtens
     
  • The ld-version.sh script fails on some versions of awk with the
    following error, resulting in build failures for MIPS:

    awk: scripts/ld-version.sh: line 4: regular expression compile failed (missing '(')

    This is due to the regular expression ".*)", meant to strip off the
    beginning of the ld version string up to the close bracket, however
    brackets have a meaning in regular expressions, so lets escape it so
    that awk doesn't expect a corresponding open bracket.

    Fixes: ccbef1674a15 ("Kbuild, lto: add ld-version and ld-ifversion ...")
    Reported-by: Geert Uytterhoeven
    Signed-off-by: James Hogan
    Tested-by: Michael S. Tsirkin
    Acked-by: Michael S. Tsirkin
    Tested-by: Sudip Mukherjee
    Cc: Michal Marek
    Cc: Andi Kleen
    Cc: Geert Uytterhoeven
    Cc: linux-mips@linux-mips.org
    Cc: linux-kbuild@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: stable@vger.kernel.org # 4.4.x-
    Patchwork: https://patchwork.linux-mips.org/patch/12838/
    Signed-off-by: Ralf Baechle

    James Hogan
     
  • Ingenic SoC declares ZBOOT support, but debug definitions are missing
    for MACH_JZ4780 resulting in a build failure when DEBUG_ZBOOT is set.
    The UART addresses are same as with JZ4740, so fix by covering JZ4780
    with those as well.

    Signed-off-by: Aaro Koskinen
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12830/
    Signed-off-by: Ralf Baechle

    Aaro Koskinen
     
  • Pull block merge fix from Jens Axboe.

    This fixes the block segment counting bug and resulting sg overrun
    reported by Kent Overstreet, introduced with the last block pull.

    * 'for-linus' of git://git.kernel.dk/linux-block:
    block: don't optimize for non-cloned bio in bio_get_last_bvec()

    Linus Torvalds
     
  • Pull x86 fixes from Ingo Molnar:
    "This fixes 3 FPU handling related bugs, an EFI boot crash and a
    runtime warning.

    The EFI fix arrived late but I didn't want to delay it to after v4.5
    because the effects are pretty bad for the systems that are affected
    by it"

    [ Actually, I don't think the EFI fix really matters yet, because we
    haven't switched to the separate EFI page tables in mainline yet ]

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/efi: Fix boot crash by always mapping boot service regions into new EFI page tables
    x86/fpu: Fix eager-FPU handling on legacy FPU machines
    x86/delay: Avoid preemptible context checks in delay_mwaitx()
    x86/fpu: Revert ("x86/fpu: Disable AVX when eagerfpu is off")
    x86/fpu: Fix 'no387' regression

    Linus Torvalds
     
  • Pull SCSI target bug fix from Nicholas Bellinger:
    "Here is an outstanding target-core bug-fix for v4.5 code."

    This patch addresses a recent Task Management (TMR) regression related
    to larger set of multi-port LUN_RESET bug-fixes in v4.5-rc5.

    It drops a left-over target_put_sess_cmd() of se_cmd->cmd_kref within
    ABORT_TASK failure path, once a se_cmd descriptor has already
    completed posting response to fabric driver logic, and must be skipped
    during normal ABORT_TASK se_cmd->tag lookup"

    * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    target: Drop incorrect ABORT_TASK put for completed commands

    Linus Torvalds
     
  • For !BIO_CLONED bio, we can use .bi_vcnt safely, but it
    doesn't mean we can just simply return .bi_io_vec[.bi_vcnt - 1]
    because the start postion may have been moved in the middle of
    the bvec, such as splitting in the middle of bvec.

    Fixes: 7bcd79ac50d9(block: bio: introduce helpers to get the 1st and last bvec)
    Cc: stable@vger.kernel.org
    Reported-by: Kent Overstreet
    Signed-off-by: Ming Lei
    Signed-off-by: Jens Axboe

    Ming Lei
     

12 Mar, 2016

7 commits

  • Some machines have EFI regions in page zero (physical address
    0x00000000) and historically that region has been added to the e820
    map via trim_bios_range(), and ultimately mapped into the kernel page
    tables. It was not mapped via efi_map_regions() as one would expect.

    Alexis reports that with the new separate EFI page tables some boot
    services regions, such as page zero, are not mapped. This triggers an
    oops during the SetVirtualAddressMap() runtime call.

    For the EFI boot services quirk on x86 we need to memblock_reserve()
    boot services regions until after SetVirtualAddressMap(). Doing that
    while respecting the ownership of regions that may have already been
    reserved by the kernel was the motivation behind this commit:

    7d68dc3f1003 ("x86, efi: Do not reserve boot services regions within reserved areas")

    That patch was merged at a time when the EFI runtime virtual mappings
    were inserted into the kernel page tables as described above, and the
    trick of setting ->numpages (and hence the region size) to zero to
    track regions that should not be freed in efi_free_boot_services()
    meant that we never mapped those regions in efi_map_regions(). Instead
    we were relying solely on the existing kernel mappings.

    Now that we have separate page tables we need to make sure the EFI
    boot services regions are mapped correctly, even if someone else has
    already called memblock_reserve(). Instead of stashing a tag in
    ->numpages, set the EFI_MEMORY_RUNTIME bit of ->attribute. Since it
    generally makes no sense to mark a boot services region as required at
    runtime, it's pretty much guaranteed the firmware will not have
    already set this bit.

    For the record, the specific circumstances under which Alexis
    triggered this bug was that an EFI runtime driver on his machine was
    responding to the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event during
    SetVirtualAddressMap().

    The event handler for this driver looks like this,

    sub rsp,0x28
    lea rdx,[rip+0x2445] # 0xaa948720
    mov ecx,0x4
    call func_aa9447c0 ; call to ConvertPointer(4, & 0xaa948720)
    mov r11,QWORD PTR [rip+0x2434] # 0xaa948720
    xor eax,eax
    mov BYTE PTR [r11+0x1],0x1
    add rsp,0x28
    ret

    Which is pretty typical code for an EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
    handler. The "mov r11, QWORD PTR [rip+0x2424]" was the faulting
    instruction because ConvertPointer() was being called to convert the
    address 0x0000000000000000, which when converted is left unchanged and
    remains 0x0000000000000000.

    The output of the oops trace gave the impression of a standard NULL
    pointer dereference bug, but because we're accessing physical
    addresses during ConvertPointer(), it wasn't. EFI boot services code
    is stored at that address on Alexis' machine.

    Reported-by: Alexis Murzeau
    Signed-off-by: Matt Fleming
    Cc: Andy Lutomirski
    Cc: Ard Biesheuvel
    Cc: Ben Hutchings
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Maarten Lankhorst
    Cc: Matthew Garrett
    Cc: Peter Zijlstra
    Cc: Raphael Hertzog
    Cc: Roger Shimizu
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1457695163-29632-2-git-send-email-matt@codeblueprint.co.uk
    Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815125
    Signed-off-by: Ingo Molnar

    Matt Fleming
     
  • i486 derived cores like Intel Quark support only the very old,
    legacy x87 FPU (FSAVE/FRSTOR, CPUID bit FXSR is not set), and
    our FPU code wasn't handling the saving and restoring there
    properly in the 'eagerfpu' case.

    So after we made eagerfpu the default for all CPU types:

    58122bf1d856 x86/fpu: Default eagerfpu=on on all CPUs

    these old FPU designs broke. First, Andy Shevchenko reported a splat:

    WARNING: CPU: 0 PID: 823 at arch/x86/include/asm/fpu/internal.h:163 fpu__clear+0x8c/0x160

    which was us trying to execute FXRSTOR on those machines even though
    they don't support it.

    After taking care of that, Bryan O'Donoghue reported that a simple FPU
    test still failed because we weren't initializing the FPU state properly
    on those machines.

    Take care of all that.

    Reported-and-tested-by: Bryan O'Donoghue
    Reported-by: Andy Shevchenko
    Signed-off-by: Borislav Petkov
    Acked-by: Linus Torvalds
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Dave Hansen
    Cc: Denys Vlasenko
    Cc: Fenghua Yu
    Cc: H. Peter Anvin
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Cc: Quentin Casasnovas
    Cc: Thomas Gleixner
    Cc: Yu-cheng
    Link: http://lkml.kernel.org/r/20160311113206.GD4312@pd.tnic
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     
  • Pull MTD fixes from Brian Norris:
    "Late MTD fix for v4.5:

    - A simple error code handling fix for the NAND ECC test; this was a
    regression in v4.5-rc1

    - A MAINTAINERS update, which might as well go in ASAP"

    * tag 'for-linus-20160311' of git://git.infradead.org/linux-mtd:
    MAINTAINERS: add a maintainer for the NAND subsystem
    mtd: nand: tests: fix regression introduced in mtd_nandectest

    Linus Torvalds
     
  • Pull drm/i915 fixes from Dave Airlie:
    "Just two i915 regression fixes, that should be it from me"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/i915: Actually retry with bit-banging after GMBUS timeout
    drm/i915: Fix bogus dig_port_map[] assignment for pre-HSW

    Linus Torvalds
     
  • When removing an element from the mempool, mark it as unpoisoned in KASAN
    before verifying its contents for SLUB/SLAB debugging. Otherwise KASAN
    will flag the reads checking the element use-after-free writes as
    use-after-free reads.

    Signed-off-by: Matthew Dawson
    Acked-by: Andrey Ryabinin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Dawson
     
  • Pull ARM SoC fixes from Olof Johansson:
    "Two more fixes for 4.5:

    - One is a fix for OMAP that is urgently needed to avoid DRA7xx chips
    from premature aging, by always keeping the Ethernet clock enabled.

    - The other solves a I/O memory layout issue on Armada, where SROM
    and PCI memory windows were conflicting in some configurations"

    * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: mvebu: fix overlap of Crypto SRAM with PCIe memory window
    ARM: dts: dra7: do not gate cpsw clock due to errata i877
    ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property

    Linus Torvalds
     
  • Pull media fix from Mauro Carvalho Chehab:
    "One last time fix: It adds a code that prevents some media tools like
    media-ctl to hide some entities that have their IDs out of the range
    expected by those apps"

    * tag 'media/v4.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] media-device: map new functions into old types for legacy API

    Linus Torvalds