Skip to content
  1. Apr 17, 2017
    • Ard Biesheuvel's avatar
      efi/libstub/arm: Don't use TASK_SIZE when randomizing the RT space · 197decef
      Ard Biesheuvel authored
      As reported by James, Catalin and Mark, commit:
      
        e69176d6
      
       ("ef/libstub/arm/arm64: Randomize the base of the UEFI rt services region")
      
      ... results in a crash in the firmware, regardless of whether KASLR
      is in effect or not and whether the firmware implements EFI_RNG_PROTOCOL
      or not.
      
      Mark has identified the root cause to be the inappropriate use of
      TASK_SIZE in the stub, which arm64 defines as:
      
        #define TASK_SIZE             (test_thread_flag(TIF_32BIT) ? \
                                      TASK_SIZE_32 : TASK_SIZE_64)
      
      and testing thread flags at this point results in the dereference of
      pointers in uninitialized structures.
      
      So instead, introduce a preprocessor symbol EFI_RT_VIRTUAL_LIMIT and
      define it to TASK_SIZE_64 on arm64 and TASK_SIZE on ARM, both of which
      are compile time constants. Also, change the 'headroom' variable to
      static const to force an error if this might change in the future.
      
      Tested-by: default avatarMark Rutland <mark.rutland@arm.com>
      Tested-by: default avatarJames Morse <james.morse@arm.com>
      Tested-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20170417093201.10181-2-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      197decef
  2. Apr 05, 2017
    • Ard Biesheuvel's avatar
      ef/libstub/arm/arm64: Randomize the base of the UEFI rt services region · e69176d6
      Ard Biesheuvel authored
      
      
      Update the allocation logic for the virtual mapping of the UEFI runtime
      services to start from a randomized base address if KASLR is in effect,
      and if the UEFI firmware exposes an implementation of EFI_RNG_PROTOCOL.
      
      This makes it more difficult to predict the location of exploitable
      data structures in the runtime UEFI firmware, which increases robustness
      against attacks. Note that these regions are only mapped during the
      time a runtime service call is in progress, and only on a single CPU
      at a time, bit given the lack of a downside, let's enable it nonetheless.
      
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: bhe@redhat.com
      Cc: bhsharma@redhat.com
      Cc: eugene@hp.com
      Cc: evgeny.kalugin@intel.com
      Cc: jhugo@codeaurora.org
      Cc: leif.lindholm@linaro.org
      Cc: linux-efi@vger.kernel.org
      Cc: mark.rutland@arm.com
      Cc: roy.franz@cavium.com
      Cc: rruigrok@codeaurora.org
      Link: http://lkml.kernel.org/r/20170404160910.28115-3-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e69176d6
    • Ard Biesheuvel's avatar
      efi/libstub/arm/arm64: Disable debug prints on 'quiet' cmdline arg · eeff7d63
      Ard Biesheuvel authored
      
      
      The EFI stub currently prints a number of diagnostic messages that do
      not carry a lot of information. Since these prints are not controlled
      by 'loglevel' or other command line parameters, and since they appear on
      the EFI framebuffer as well (if enabled), it would be nice if we could
      turn them off.
      
      So let's add support for the 'quiet' command line parameter in the stub,
      and disable the non-error prints if it is passed.
      
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: bhe@redhat.com
      Cc: bhsharma@redhat.com
      Cc: bp@alien8.de
      Cc: eugene@hp.com
      Cc: evgeny.kalugin@intel.com
      Cc: jhugo@codeaurora.org
      Cc: leif.lindholm@linaro.org
      Cc: linux-efi@vger.kernel.org
      Cc: roy.franz@cavium.com
      Cc: rruigrok@codeaurora.org
      Link: http://lkml.kernel.org/r/20170404160910.28115-2-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      eeff7d63
    • Ard Biesheuvel's avatar
      efi/libstub: Unify command line param parsing · 60f38de7
      Ard Biesheuvel authored
      
      
      Merge the parsing of the command line carried out in arm-stub.c with
      the handling in efi_parse_options(). Note that this also fixes the
      missing handling of CONFIG_CMDLINE_FORCE=y, in which case the builtin
      command line should supersede the one passed by the firmware.
      
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: bhe@redhat.com
      Cc: bhsharma@redhat.com
      Cc: bp@alien8.de
      Cc: eugene@hp.com
      Cc: evgeny.kalugin@intel.com
      Cc: jhugo@codeaurora.org
      Cc: leif.lindholm@linaro.org
      Cc: linux-efi@vger.kernel.org
      Cc: mark.rutland@arm.com
      Cc: roy.franz@cavium.com
      Cc: rruigrok@codeaurora.org
      Link: http://lkml.kernel.org/r/20170404160910.28115-1-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      60f38de7
    • Ard Biesheuvel's avatar
      efi/libstub: Fix harmless command line parsing bug · 4c3f14bb
      Ard Biesheuvel authored
      
      
      When we parse the 'efi=' command line parameter in the stub, we
      fail to take spaces into account. Currently, the only way this
      could result in unexpected behavior is when the string 'nochunk'
      appears as a separate command line argument after 'efi=xxx,yyy,zzz ',
      so this is harmless in practice. But let's fix it nonetheless.
      
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20170404160245.27812-12-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4c3f14bb
    • Ard Biesheuvel's avatar
      efi/arm32-stub: Allow boot-time allocations in the vmlinux region · 318532bf
      Ard Biesheuvel authored
      
      
      The arm32 kernel decompresses itself to the base of DRAM unconditionally,
      and so it is the EFI stub's job to ensure that the region is available.
      
      Currently, we do this by creating an allocation there, and giving up if
      that fails. However, any boot services regions occupying this area are
      not an issue, given that the decompressor executes strictly after the
      stub calls ExitBootServices().
      
      So let's try a bit harder to proceed if the initial allocation fails,
      and check whether any memory map entries occupying the region may be
      considered safe.
      
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Reviewed-by: default avatarLeif Lindholm <leif.lindholm@linaro.org>
      Reviewed-by: default avatarEugene Cohen <eugene@hp.com>
      Reviewed-by: default avatarRoy Franz <roy.franz@cavium.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20170404160245.27812-11-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      318532bf
    • Baoquan He's avatar
      x86/efi: Clean up a minor mistake in comment · b1d17761
      Baoquan He authored
      EFI allocates runtime services regions from EFI_VA_START, -4G, down
      to -68G, EFI_VA_END - 64G altogether, top-down.
      
      The mechanism was introduced in commit:
      
        d2f7cbe7
      
       ("x86/efi: Runtime services virtual mapping")
      
      Fix the comment that still says bottom-up.
      
      Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20170404160245.27812-10-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b1d17761
    • Evgeny Kalugin's avatar
      efi/pstore: Return error code (if any) from efi_pstore_write() · fee929ba
      Evgeny Kalugin authored
      
      
      For some reason return value from actual variable setting was ignored.
      With this change error code get transferred upwards through call stack.
      
      Signed-off-by: default avatarEvgeny Kalugin <evgeny.kalugin@intel.com>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20170404160245.27812-9-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      fee929ba
    • Bhupesh Sharma's avatar
      efi/bgrt: Enable ACPI BGRT handling on arm64 · 6e7300cf
      Bhupesh Sharma authored
      
      
      Now that the ACPI BGRT handling code has been made generic, we can
      enable it for arm64.
      
      Signed-off-by: default avatarBhupesh Sharma <bhsharma@redhat.com>
      [ Updated commit log to reflect that BGRT is only enabled for arm64, and added
        missing 'return' statement to the dummy acpi_parse_bgrt() function. ]
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20170404160245.27812-8-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      6e7300cf
    • Bhupesh Sharma's avatar
      x86/efi/bgrt: Move efi-bgrt handling out of arch/x86 · 75def552
      Bhupesh Sharma authored
      
      
      Now with open-source boot firmware (EDK2) supporting ACPI BGRT table
      addition even for architectures like AARCH64, it makes sense to move
      out the 'efi-bgrt.c' file and supporting infrastructure from 'arch/x86'
      directory and house it inside 'drivers/firmware/efi', so that this common
      code can be used across architectures.
      
      Signed-off-by: default avatarBhupesh Sharma <bhsharma@redhat.com>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20170404160245.27812-7-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      75def552
    • Ard Biesheuvel's avatar
      efi/arm-stub: Round up FDT allocation to mapping size · 24d7c494
      Ard Biesheuvel authored
      
      
      The FDT is mapped via a fixmap entry that is at least 2 MB in size and
      2 MB aligned on 4 KB page size kernels.
      
      On UEFI systems, the FDT allocation may share this 2 MB mapping with a
      reserved region (or another memory region that we should never map),
      unless we account for this in the size of the allocation (the alignment
      is already 2 MB)
      
      So instead of taking guesses at the needed space, simply allocate 2 MB
      immediately. The allocation will be recorded as EFI_LOADER_DATA, and the
      kernel only memblock_reserve()'s the actual size of the FDT, so the
      unused space will be released back to the kernel.
      
      Reviewed-By: default avatarJeffrey Hugo <jhugo@codeaurora.org>
      Tested-by: default avatarRichard Ruigrok <rruigrok@codeaurora.org>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20170404160245.27812-6-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      24d7c494
    • Ard Biesheuvel's avatar
      efi/arm-stub: Correct FDT and initrd allocation rules for arm64 · 138728dd
      Ard Biesheuvel authored
      
      
      On arm64, we have made some changes over the past year to the way the
      kernel itself is allocated and to how it deals with the initrd and FDT.
      This patch brings the allocation logic in the EFI stub in line with that,
      which is necessary because the introduction of KASLR has created the
      possibility for the initrd to be allocated in a place where the kernel
      may not be able to map it. (This is mostly a theoretical scenario, since
      it only affects systems where the physical memory footprint exceeds the
      size of the linear mapping.)
      
      Since we know the kernel itself will be covered by the linear mapping,
      choose a suitably sized window (i.e., based on the size of the linear
      region) covering the kernel when allocating memory for the initrd.
      
      The FDT may be anywhere in memory on arm64 now that we map it via the
      fixmap, so we can lift the address restriction there completely.
      
      Tested-by: default avatarRichard Ruigrok <rruigrok@codeaurora.org>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Reviewed-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20170404160245.27812-4-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      138728dd
    • Ard Biesheuvel's avatar
      efi/fb: Avoid reconfiguration of BAR that covers the framebuffer · 55d728a4
      Ard Biesheuvel authored
      
      
      On UEFI systems, the PCI subsystem is enumerated by the firmware,
      and if a graphical framebuffer is exposed via a PCI device, its base
      address and size are exposed to the OS via the Graphics Output
      Protocol (GOP).
      
      On arm64 PCI systems, the entire PCI hierarchy is reconfigured from
      scratch at boot. This may result in the GOP framebuffer address to
      become stale, if the BAR covering the framebuffer is modified. This
      will cause the framebuffer to become unresponsive, and may in some
      cases result in unpredictable behavior if the range is reassigned to
      another device.
      
      So add a non-x86 quirk to the EFI fb driver to find the BAR associated
      with the GOP base address, and claim the BAR resource so that the PCI
      core will not move it.
      
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: <stable@vger.kernel.org> # v4.7+
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Jones <pjones@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: leif.lindholm@linaro.org
      Cc: linux-efi@vger.kernel.org
      Cc: lorenzo.pieralisi@arm.com
      Fixes: 9822504c
      
       ("efifb: Enable the efi-framebuffer platform driver ...")
      Link: http://lkml.kernel.org/r/20170404152744.26687-3-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      55d728a4
    • Cohen, Eugene's avatar
      efi/libstub: Skip GOP with PIXEL_BLT_ONLY format · 540f4c0e
      Cohen, Eugene authored
      
      
      The UEFI Specification permits Graphics Output Protocol (GOP) instances
      without direct framebuffer access. This is indicated in the Mode structure
      with a PixelFormat enumeration value of PIXEL_BLT_ONLY. Given that the
      kernel does not know how to drive a Blt() only framebuffer (which is only
      permitted before ExitBootServices() anyway), we should disregard such
      framebuffers when looking for a GOP instance that is suitable for use as
      the boot console.
      
      So modify the EFI GOP initialization to not use a PIXEL_BLT_ONLY instance,
      preventing attempts later in boot to use an invalid screen_info.lfb_base
      address.
      
      Signed-off-by: default avatarEugene Cohen <eugene@hp.com>
      [ Moved the Blt() only check into the loop and clarified that Blt() only GOPs are unusable by the kernel. ]
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: <stable@vger.kernel.org> # v4.7+
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: leif.lindholm@linaro.org
      Cc: linux-efi@vger.kernel.org
      Cc: lorenzo.pieralisi@arm.com
      Fixes: 9822504c
      
       ("efifb: Enable the efi-framebuffer platform driver ...")
      Link: http://lkml.kernel.org/r/20170404152744.26687-2-ard.biesheuvel@linaro.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      540f4c0e
    • Linus Torvalds's avatar
      Merge tag 'gpio-v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 308ac756
      Linus Torvalds authored
      Pull late GPIO fixes from Linus Walleij:
       "Some late coming ACPI fixes for GPIO.
      
        We're dealing with ACPI issues here. The first is related to wake IRQs
        on Bay Trail/Cherry Trail CPUs which are common in laptops. The second
        is about proper probe deferral when reading _CRS properties.
      
        For my untrained eye it seems there was some quarrel between the BIOS
        and the kernel about who is supposed to deal with wakeups from GPIO
        lines"
      
      * tag 'gpio-v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        ACPI / gpio: do not fall back to parsing _CRS when we get a deferral
        gpio: acpi: Call enable_irq_wake for _IAE GpioInts with Wake set
      308ac756
    • Linus Torvalds's avatar
      Merge tag 'nios2-v4.11-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 · b824a957
      Linus Torvalds authored
      Pull nios2 fix from Ley Foon Tan:
      
       - nios2: reserve boot memory for device tree
      
      * tag 'nios2-v4.11-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
        nios2: reserve boot memory for device tree
      b824a957
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.11-rc6' of git://people.freedesktop.org/~airlied/linux · 1a589c04
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This is just mostly stuff that missed rc5, from vmwgfx and msm
        drivers"
      
      * tag 'drm-fixes-for-v4.11-rc6' of git://people.freedesktop.org/~airlied/linux:
        drm/msm: Make sure to detach the MMU during GPU cleanup
        drm/msm/hdmi: redefinitions of macros not required
        drm/msm/mdp5: Update SSPP_MAX value
        drm/msm/dsi: Fix bug in dsi_mgr_phy_enable
        drm/msm: Don't allow zero sized buffer objects
        drm/msm: Fix wrong pointer check in a5xx_destroy
        drm/msm: adreno: fix build error without debugfs
        drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl()
        drm/vmwgfx: Remove getparam error message
        drm/ttm: Avoid calling drm_ht_remove from atomic context
        drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces
        drm/vmwgfx: avoid calling vzalloc with a 0 size in vmw_get_cap_3d_ioctl()
        drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl()
        drm/vmwgfx: Type-check lookups of fence objects
      1a589c04
  3. Apr 04, 2017
  4. Apr 03, 2017
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 4ad72555
      Linus Torvalds authored
      Pull s390 fixes from Martin Schwidefsky:
       "Four bug fixes, two of them for stable:
      
         - avoid initrd corruptions in the kernel decompressor
      
         - prevent inconsistent dumps if the boot CPU does not have address
           zero
      
         - fix the new pkey interface added with the merge window for 4.11
      
         - a fix for a fix, another issue with user copy zero padding"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/uaccess: get_user() should zero on failure (again)
        s390/pkey: Fix wrong handling of secure key with old MKVP
        s390/smp: fix ipl from cpu with non-zero address
        s390/decompressor: fix initrd corruption caused by bss clear
      4ad72555
    • Linus Torvalds's avatar
      Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3ccfcdc9
      Linus Torvalds authored
      Pull RAS fix from Thomas Gleixner:
       "Prevent dmesg from being spammed when MCE logging is active"
      
      * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Don't print MCEs when mcelog is active
      3ccfcdc9
    • Tobias Klauser's avatar
      nios2: reserve boot memory for device tree · 921d701e
      Tobias Klauser authored
      
      
      Make sure to reserve the boot memory for the flattened device tree.
      Otherwise it might get overwritten, e.g. when initial_boot_params is
      copied, leading to a corrupted FDT and a boot hang/crash:
      
        bootconsole [early0] enabled
        Early console on uart16650 initialized at 0xf8001600
        OF: fdt: Error -11 processing FDT
        Kernel panic - not syncing: setup_cpuinfo: No CPU found in devicetree!
      
        ---[ end Kernel panic - not syncing: setup_cpuinfo: No CPU found in devicetree!
      
      Guenter Roeck says:
      
      > I think I found the problem. In unflatten_and_copy_device_tree(), with added
      > debug information:
      >
      > OF: fdt: initial_boot_params=c861e400, dt=c861f000 size=28874 (0x70ca)
      >
      > ... and then initial_boot_params is copied to dt, which results in corrupted
      > fdt since the memory overlaps. Looks like the initial_boot_params memory
      > is not reserved and (re-)allocated by early_init_dt_alloc_memory_arch().
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Reference: http://lkml.kernel.org/r/20170226210338.GA19476@roeck-us.net
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Acked-by: default avatarLey Foon Tan <ley.foon.tan@intel.com>
      921d701e
    • Linus Torvalds's avatar
      Linux 4.11-rc5 · a71c9a1c
      Linus Torvalds authored
      a71c9a1c
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-4.11-rc5' of git://git.infradead.org/users/vkoul/slave-dma · f49237bf
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "A couple of minor fixes for 4.11:
      
         - array bound fix for __get_unmap_pool()
      
         - cyclic period splitting for bcm2835"
      
      * tag 'dmaengine-fix-4.11-rc5' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: Fix array index out of bounds warning in __get_unmap_pool()
        dmaengine: bcm2835: Fix cyclic DMA period splitting
      f49237bf
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 496dcc50
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "This update provides:
      
         - prevent KASLR from randomizing EFI regions
      
         - restrict the usage of -maccumulate-outgoing-args and document when
           and why it is required.
      
         - make the Global Physical Address calculation for UV4 systems work
           correctly.
      
         - address a copy->paste->forgot-edit problem in the MCE exception
           table entries.
      
         - assign a name to AMD MCA bank 3, so the sysfs file registration
           works.
      
         - add a missing include in the boot code"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot: Include missing header file
        x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs
        x86/build: Mostly disable '-maccumulate-outgoing-args'
        x86/mm/KASLR: Exclude EFI region from KASLR VA space randomization
        x86/mce: Fix copy/paste error in exception table entries
        x86/platform/uv: Fix calculation of Global Physical Address
      496dcc50
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 128c434a
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "This update provides:
      
         - make the scheduler clock switch to unstable mode smooth so the
           timestamps stay at microseconds granularity instead of switching to
           tick granularity.
      
         - unbreak perf test tsc by taking the new offset into account which
           was added in order to proveide better sched clock continuity
      
         - switching sched clock to unstable mode runs all clock related
           computations which affect the sched clock output itself from a work
           queue. In case of preemption sched clock uses half updated data and
           provides wrong timestamps. Keep the math in the protected context
           and delegate only the static key switch to workqueue context.
      
         - remove a duplicate header include"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/headers: Remove duplicate #include <linux/sched/debug.h> line
        sched/clock: Fix broken stable to unstable transfer
        sched/clock, x86/perf: Fix "perf test tsc"
        sched/clock: Fix clear_sched_clock_stable() preempt wobbly
      128c434a
    • Linus Torvalds's avatar
      Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0a89b5eb
      Linus Torvalds authored
      Pull EFI fix from Thomas Gleixner:
       "Downgrade the missing ESRT header printk to warning level and remove a
        useless error printk which just generates noise for no value"
      
      * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi/esrt: Cleanup bad memory map log messages
      0a89b5eb
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4a6808f3
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "Two small fixes for the new CLKEVT_OF infrastructure"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        vmlinux.lds: Add __clkevt_of_table to kernel
        clockevents: Fix syntax error in clkevt-of macro
      4a6808f3
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 907977b2
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "Two small fixlets:
      
         - select a required Kconfig to make the MVEBU driver compile
      
         - add the missing MIPS local GIC interrupts which prevent drivers to
           probe successfully"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/mips-gic: Fix Local compare interrupt
        irqchip/mvebu-odmi: Select GENERIC_MSI_IRQ_DOMAIN
      907977b2
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ada63c61
      Linus Torvalds authored
      Pull core fix from Thomas Gleixner:
       "Prevent leaking kernel memory via /proc/$pid/syscall when the queried
        task is not in a syscall"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        lib/syscall: Clear return values when no stack
      ada63c61
  5. Apr 02, 2017
    • Linus Torvalds's avatar
      Merge branch 'parisc-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 346ce1d7
      Linus Torvalds authored
      Pull parisc fixes from Helge Deller:
       "Al Viro reported that - in case of read faults - our copy_from_user()
        implementation may claim to have copied more bytes than it actually
        did. In order to fix this bug and because of the way how gcc optimizes
        register usage for inline assembly in C code, we had to replace our
        pa_memcpy() function with a pure assembler implementation.
      
        While fixing the memcpy bug we noticed some other issues with our
        get_user() and put_user() functions, e.g. nested faults may return
        wrong data. This is now fixed by a common fixup handler for
        get_user/put_user in the exception handler which additionally makes
        generated code smaller and faster.
      
        The third patch is a trivial one-line fix for a patch which went in
        during 4.11-rc and which avoids stalled CPU warnings after power
        shutdown (for parisc machines which can't plug power off themselves).
      
        Due to the rewrite of pa_memcpy() into assembly this patch got bigger
        than what I wanted to have sent at this stage.
      
        Those patches have been running in production during the last few days
        on our debian build servers without any further issues"
      
      * 'parisc-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Avoid stalled CPU warnings after system shutdown
        parisc: Clean up fixup routines for get_user()/put_user()
        parisc: Fix access fault handling in pa_memcpy()
      346ce1d7
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 7d34ddbe
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Thirteen small fixes: The hopefully final effort to get the lpfc nvme
        kconfig problems sorted, there's one important sg fix (user can induce
        read after end of buffer) and one minor enhancement (adding an extra
        PCI ID to qedi). The rest are a set of minor fixes, which mostly occur
        as user visible in error legs or on specific devices"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ufs: remove the duplicated checking for supporting clkscaling
        scsi: lpfc: fix building without debugfs support
        scsi: lpfc: Fix PT2PT PRLI reject
        scsi: hpsa: fix volume offline state
        scsi: libsas: fix ata xfer length
        scsi: scsi_dh_alua: Warn if the first argument of alua_rtpg_queue() is NULL
        scsi: scsi_dh_alua: Ensure that alua_activate() calls the completion function
        scsi: scsi_dh_alua: Check scsi_device_get() return value
        scsi: sg: check length passed to SG_NEXT_CMD_LEN
        scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR
        scsi: qedi: Add PCI device-ID for QL41xxx adapters.
        scsi: aacraid: Fix potential null access
        scsi: qla2xxx: Fix crash in qla2xxx_eh_abort on bad ptr
      7d34ddbe