04 Feb, 2018

1 commit

  • commit a5c03c31af2291f13689d11760c0b59fb70c9a5a upstream.

    Some distributions have turned on the reset attack mitigation feature,
    which is designed to force the platform to clear the contents of RAM if
    the machine is shut down uncleanly. However, in order for the platform
    to be able to determine whether the shutdown was clean or not, userspace
    has to be configured to clear the MemoryOverwriteRequest flag on
    shutdown - otherwise the firmware will end up clearing RAM on every
    reboot, which is unnecessarily time consuming. Add some additional
    clarity to the kconfig text to reduce the risk of systems being
    configured this way.

    Signed-off-by: Matthew Garrett
    Acked-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Matthew Garrett
     

10 Jan, 2018

1 commit

  • commit f24c4d478013d82bd1b943df566fff3561d52864 upstream.

    Commit:

    82c3768b8d68 ("efi/capsule-loader: Use a cached copy of the capsule header")

    ... refactored the capsule loading code that maps the capsule header,
    to avoid having to map it several times.

    However, as it turns out, the vmap() call we ended up removing did not
    just map the header, but the entire capsule image, and dropping this
    virtual mapping breaks capsules that are processed by the firmware
    immediately (i.e., without a reboot).

    Unfortunately, that change was part of a larger refactor that allowed
    a quirk to be implemented for Quark, which has a non-standard memory
    layout for capsules, and we have slightly painted ourselves into a
    corner by allowing quirk code to mangle the capsule header and memory
    layout.

    So we need to fix this without breaking Quark. Fortunately, Quark does
    not appear to care about the virtual mapping, and so we can simply
    do a partial revert of commit:

    2a457fb31df6 ("efi/capsule-loader: Use page addresses rather than struct page pointers")

    ... and create a vmap() mapping of the entire capsule (including header)
    based on the reinstated struct page array, unless running on Quark, in
    which case we pass the capsule header copy as before.

    Reported-by: Ge Song
    Tested-by: Bryan O'Donoghue
    Tested-by: Ge Song
    Signed-off-by: Ard Biesheuvel
    Cc: Dave Young
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Fixes: 82c3768b8d68 ("efi/capsule-loader: Use a cached copy of the capsule header")
    Link: http://lkml.kernel.org/r/20180102172110.17018-3-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Ard Biesheuvel
     

14 Dec, 2017

2 commits

  • commit 89c5a2d34bda58319e3075e8e7dd727ea25a435c upstream.

    The remapping result of memremap() should be freed with memunmap(), not kfree().

    Signed-off-by: Pan Bian
    Signed-off-by: Ard Biesheuvel
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20171206095010.24170-3-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Pan Bian
     
  • commit af97a77bc01ce49a466f9d4c0125479e2e2230b6 upstream.

    Thanks to the scripts/leaking_addresses.pl script, it was found that
    some EFI values should not be readable by non-root users.

    So make them root-only, and to do that, add a __ATTR_RO_MODE() macro to
    make this easier, and use it in other places at the same time.

    Reported-by: Linus Torvalds
    Tested-by: Dave Young
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Ard Biesheuvel
    Cc: H. Peter Anvin
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20171206095010.24170-2-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

05 Nov, 2017

1 commit

  • Pull ARM fixes from Russell King:

    - omit EFI memory map sorting, which was recently introduced, but
    caused problems with the decompressor due to additional sections
    being emitted.

    - avoid unaligned load fault-generating instructions in the
    decompressor by switching to a private unaligned implementation.

    - add a symbol into the decompressor to further debug non-boot
    situations (ld's documentation is extremely poor for how "." works,
    ld doesn't seem to follow its own documentation!)

    - parse endian information to sparse

    * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
    ARM: add debug ".edata_real" symbol
    ARM: 8716/1: pass endianness info to sparse
    efi/libstub: arm: omit sorting of the UEFI memory map
    ARM: 8715/1: add a private asm/unaligned.h

    Linus Torvalds
     

03 Nov, 2017

1 commit

  • …el/git/gregkh/driver-core

    Pull initial SPDX identifiers from Greg KH:
    "License cleanup: add SPDX license identifiers to some files

    Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the
    'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally
    binding shorthand, which can be used instead of the full boiler plate
    text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart
    and Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset
    of the use cases:

    - file had no licensing information it it.

    - file was a */uapi/* one with no licensing information in it,

    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to
    license had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied
    to a file was done in a spreadsheet of side by side results from of
    the output of two independent scanners (ScanCode & Windriver)
    producing SPDX tag:value files created by Philippe Ombredanne.
    Philippe prepared the base worksheet, and did an initial spot review
    of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537
    files assessed. Kate Stewart did a file by file comparison of the
    scanner results in the spreadsheet to determine which SPDX license
    identifier(s) to be applied to the file. She confirmed any
    determination that was not immediately clear with lawyers working with
    the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:

    - Files considered eligible had to be source code files.

    - Make and config files were included as candidates if they contained
    >5 lines of source

    - File already had some variant of a license header in it (even if <5
    lines).

    All documentation files were explicitly excluded.

    The following heuristics were used to determine which SPDX license
    identifiers to apply.

    - when both scanners couldn't find any license traces, file was
    considered to have no license information in it, and the top level
    COPYING file license applied.

    For non */uapi/* files that summary was:

    SPDX license identifier # files
    ---------------------------------------------------|-------
    GPL-2.0 11139

    and resulted in the first patch in this series.

    If that file was a */uapi/* path one, it was "GPL-2.0 WITH
    Linux-syscall-note" otherwise it was "GPL-2.0". Results of that
    was:

    SPDX license identifier # files
    ---------------------------------------------------|-------
    GPL-2.0 WITH Linux-syscall-note 930

    and resulted in the second patch in this series.

    - if a file had some form of licensing information in it, and was one
    of the */uapi/* ones, it was denoted with the Linux-syscall-note if
    any GPL family license was found in the file or had no licensing in
    it (per prior point). Results summary:

    SPDX license identifier # files
    ---------------------------------------------------|------
    GPL-2.0 WITH Linux-syscall-note 270
    GPL-2.0+ WITH Linux-syscall-note 169
    ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
    ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
    LGPL-2.1+ WITH Linux-syscall-note 15
    GPL-1.0+ WITH Linux-syscall-note 14
    ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
    LGPL-2.0+ WITH Linux-syscall-note 4
    LGPL-2.1 WITH Linux-syscall-note 3
    ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
    ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1

    and that resulted in the third patch in this series.

    - when the two scanners agreed on the detected license(s), that
    became the concluded license(s).

    - when there was disagreement between the two scanners (one detected
    a license but the other didn't, or they both detected different
    licenses) a manual inspection of the file occurred.

    - In most cases a manual inspection of the information in the file
    resulted in a clear resolution of the license that should apply
    (and which scanner probably needed to revisit its heuristics).

    - When it was not immediately clear, the license identifier was
    confirmed with lawyers working with the Linux Foundation.

    - If there was any question as to the appropriate license identifier,
    the file was flagged for further research and to be revisited later
    in time.

    In total, over 70 hours of logged manual review was done on the
    spreadsheet to determine the SPDX license identifiers to apply to the
    source files by Kate, Philippe, Thomas and, in some cases,
    confirmation by lawyers working with the Linux Foundation.

    Kate also obtained a third independent scan of the 4.13 code base from
    FOSSology, and compared selected files where the other two scanners
    disagreed against that SPDX file, to see if there was new insights.
    The Windriver scanner is based on an older version of FOSSology in
    part, so they are related.

    Thomas did random spot checks in about 500 files from the spreadsheets
    for the uapi headers and agreed with SPDX license identifier in the
    files he inspected. For the non-uapi files Thomas did random spot
    checks in about 15000 files.

    In initial set of patches against 4.14-rc6, 3 files were found to have
    copy/paste license identifier errors, and have been fixed to reflect
    the correct identifier.

    Additionally Philippe spent 10 hours this week doing a detailed manual
    inspection and review of the 12,461 patched files from the initial
    patch version early this week with:

    - a full scancode scan run, collecting the matched texts, detected
    license ids and scores

    - reviewing anything where there was a license detected (about 500+
    files) to ensure that the applied SPDX license was correct

    - reviewing anything where there was no detection but the patch
    license was not GPL-2.0 WITH Linux-syscall-note to ensure that the
    applied SPDX license was correct

    This produced a worksheet with 20 files needing minor correction. This
    worksheet was then exported into 3 different .csv files for the
    different types of files to be modified.

    These .csv files were then reviewed by Greg. Thomas wrote a script to
    parse the csv files and add the proper SPDX tag to the file, in the
    format that the file expected. This script was further refined by Greg
    based on the output to detect more types of files automatically and to
    distinguish between header and source .c files (which need different
    comment types.) Finally Greg ran the script using the .csv files to
    generate the patches.

    Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
    Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
    Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

    * tag 'spdx_identifiers-4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    License cleanup: add SPDX license identifier to uapi header files with a license
    License cleanup: add SPDX license identifier to uapi header files with no license
    License cleanup: add SPDX GPL-2.0 license identifier to files with no license

    Linus Torvalds
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

28 Oct, 2017

1 commit

  • ARM shares its EFI stub implementation with arm64, which has some
    special handling in the virtual remapping code to
    a) make sure that we can map everything even if the OS executes
    with 64k page size, and
    b) make sure that adjacent regions with the same attributes are not
    reordered or moved apart in memory.

    The latter is a workaround for a 'feature' that was shortly recommended
    by UEFI spec v2.5, but deprecated shortly after, due to the fact that
    it broke many OS installers, including non-Linux ones, and it was never
    widely implemented for ARM systems. Before implementing b), the arm64
    code simply rounded up all regions to 64 KB granularity, but given that
    that results in moving adjacent regions apart, it had to be refined when
    b) was implemented.

    The adjacency check requires a sort() pass, due to the fact that the
    UEFI spec does not mandate any ordering, and the inclusion of the
    lib/sort.c code into the ARM EFI stub is causing some trouble with
    the decompressor build due to the fact that its EXPORT_SYMBOL() call
    triggers the creation of ksymtab/kcrctab sections.

    So let's simply do away with the adjacency check for ARM, and simply put
    all UEFI runtime regions together if they have the same memory attributes.
    This is guaranteed to work, given that ARM only supports 4 KB pages,
    and allows us to remove the sort() call entirely.

    Signed-off-by: Ard Biesheuvel
    Acked-by: Will Deacon
    Tested-by: Jeffy Chen
    Tested-by: Gregory CLEMENT
    Tested-by: Matthias Brugger
    Signed-off-by: Russell King

    Ard Biesheuvel
     

25 Oct, 2017

2 commits

  • Commit:

    e69176d68d26 ("ef/libstub/arm/arm64: Randomize the base of the UEFI rt services region")

    implemented randomization of the virtual mapping that the OS chooses for
    the UEFI runtime services. This was motivated by the fact that UEFI usually
    does not bother to specify any permission restrictions for those regions,
    making them prime real estate for exploitation now that the OS is getting
    more and more careful not to leave any R+W+X mapped regions lying around.

    However, this randomization breaks assumptions in the resume from
    hibernation code, which expects all memory regions populated by UEFI to
    remain in the same place, including their virtual mapping into the OS
    memory space. While this assumption may not be entirely reasonable in the
    first place, breaking it deliberately does not make a lot of sense either.
    So let's refrain from this randomization pass if CONFIG_HIBERNATION=y.

    Signed-off-by: Ard Biesheuvel
    Cc: James Morse
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20171025100448.26056-3-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Ard Biesheuvel
     
  • If "qcaps.capsule_count" is ULONG_MAX then "qcaps.capsule_count + 1"
    will overflow to zero and kcalloc() will return the ZERO_SIZE_PTR. We
    try to dereference it inside the loop and crash.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Matt Fleming
    Signed-off-by: Ard Biesheuvel
    Acked-by: Ivan Hu
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Fixes: ff6301dabc3c ("efi: Add efi_test driver for exporting UEFI runtime service interfaces")
    Link: http://lkml.kernel.org/r/20171025100448.26056-2-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Dan Carpenter
     

13 Sep, 2017

1 commit


08 Sep, 2017

1 commit

  • Pull EFI updates from Ingo Molnar:
    "The main changes in this cycle were:

    - Transparently fall back to other poweroff method(s) if EFI poweroff
    fails (and returns)

    - Use separate PE/COFF section headers for the RX and RW parts of the
    ARM stub loader so that the firmware can use strict mapping
    permissions

    - Add support for requesting the firmware to wipe RAM at warm reboot

    - Increase the size of the random seed obtained from UEFI so CRNG
    fast init can complete earlier

    - Update the EFI framebuffer address if it points to a BAR that gets
    moved by the PCI resource allocation code

    - Enable "reset attack mitigation" of TPM environments: this is
    enabled if the kernel is configured with
    CONFIG_RESET_ATTACK_MITIGATION=y.

    - Clang related fixes

    - Misc cleanups, constification, refactoring, etc"

    * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    efi/bgrt: Use efi_mem_type()
    efi: Move efi_mem_type() to common code
    efi/reboot: Make function pointer orig_pm_power_off static
    efi/random: Increase size of firmware supplied randomness
    efi/libstub: Enable reset attack mitigation
    firmware/efi/esrt: Constify attribute_group structures
    firmware/efi: Constify attribute_group structures
    firmware/dcdbas: Constify attribute_group structures
    arm/efi: Split zImage code and data into separate PE/COFF sections
    arm/efi: Replace open coded constants with symbolic ones
    arm/efi: Remove pointless dummy .reloc section
    arm/efi: Remove forbidden values from the PE/COFF header
    drivers/fbdev/efifb: Allow BAR to be moved instead of claiming it
    efi/reboot: Fall back to original power-off method if EFI_RESET_SHUTDOWN returns
    efi/arm/arm64: Add missing assignment of efi.config_table
    efi/libstub/arm64: Set -fpie when building the EFI stub
    efi/libstub/arm64: Force 'hidden' visibility for section markers
    efi/libstub/arm64: Use hidden attribute for struct screen_info reference
    efi/arm: Don't mark ACPI reclaim memory as MEMBLOCK_NOMAP

    Linus Torvalds
     

06 Sep, 2017

2 commits

  • Pull ACPI updates from Rafael Wysocki:
    "These include a usual ACPICA code update (this time to upstream
    revision 20170728), a fix for a boot crash on some systems with
    Thunderbolt devices connected at boot time, a rework of the handling
    of PCI bridges when setting up device wakeup, new support for Apple
    device properties, support for DMA configurations reported via ACPI on
    ARM64, APEI-related updates, ACPI EC driver updates and assorted minor
    modifications in several places.

    Specifics:

    - Update the ACPICA code in the kernel to upstream revision 20170728
    including:
    * Alias operator handling update (Bob Moore).
    * Deferred resolution of reference package elements (Bob Moore).
    * Support for the _DMA method in walk resources (Bob Moore).
    * Tables handling update and support for deferred table
    verification (Lv Zheng).
    * Update of SMMU models for IORT (Robin Murphy).
    * Compiler and disassembler updates (Alex James, Erik Schmauss,
    Ganapatrao Kulkarni, James Morse).
    * Tools updates (Erik Schmauss, Lv Zheng).
    * Assorted minor fixes and cleanups (Bob Moore, Kees Cook, Lv
    Zheng, Shao Ming).

    - Rework the initialization of non-wakeup GPEs with method handlers
    in order to address a boot crash on some systems with Thunderbolt
    devices connected at boot time where we miss an early hotplug event
    due to a delay in GPE enabling (Rafael Wysocki).

    - Rework the handling of PCI bridges when setting up ACPI-based
    device wakeup in order to avoid disabling wakeup for bridges
    prematurely (Rafael Wysocki).

    - Consolidate Apple DMI checks throughout the tree, add support for
    Apple device properties to the device properties framework and use
    these properties for the handling of I2C and SPI devices on Apple
    systems (Lukas Wunner).

    - Add support for _DMA to the ACPI-based device properties lookup
    code and make it possible to use the information from there to
    configure DMA regions on ARM64 systems (Lorenzo Pieralisi).

    - Fix several issues in the APEI code, add support for exporting the
    BERT error region over sysfs and update APEI MAINTAINERS entry with
    reviewers information (Borislav Petkov, Dongjiu Geng, Loc Ho, Punit
    Agrawal, Tony Luck, Yazen Ghannam).

    - Fix a potential initialization ordering issue in the ACPI EC driver
    and clean it up somewhat (Lv Zheng).

    - Update the ACPI SPCR driver to extend the existing XGENE 8250
    workaround in it to a new platform (m400) and to work around an
    Xgene UART clock issue (Graeme Gregory).

    - Add a new utility function to the ACPI core to support using ACPI
    OEM ID / OEM Table ID / Revision for system identification in
    blacklisting or similar and switch over the existing code already
    using this information to this new interface (Toshi Kani).

    - Fix an xpower PMIC issue related to GPADC reads that always return
    0 without extra pin manipulations (Hans de Goede).

    - Add statements to print debug messages in a couple of places in the
    ACPI core for easier diagnostics (Rafael Wysocki).

    - Clean up the ACPI processor driver slightly (Colin Ian King, Hanjun
    Guo).

    - Clean up the ACPI x86 boot code somewhat (Andy Shevchenko).

    - Add a quirk for Dell OptiPlex 9020M to the ACPI backlight driver
    (Alex Hung).

    - Assorted fixes, cleanups and updates related to ACPI (Amitoj Kaur
    Chawla, Bhumika Goyal, Frank Rowand, Jean Delvare, Punit Agrawal,
    Ronald Tschalär, Sumeet Pawnikar)"

    * tag 'acpi-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (75 commits)
    ACPI / APEI: Suppress message if HEST not present
    intel_pstate: convert to use acpi_match_platform_list()
    ACPI / blacklist: add acpi_match_platform_list()
    ACPI, APEI, EINJ: Subtract any matching Register Region from Trigger resources
    ACPI: make device_attribute const
    ACPI / sysfs: Extend ACPI sysfs to provide access to boot error region
    ACPI: APEI: fix the wrong iteration of generic error status block
    ACPI / processor: make function acpi_processor_check_duplicates() static
    ACPI / EC: Clean up EC GPE mask flag
    ACPI: EC: Fix possible issues related to EC initialization order
    ACPI / PM: Add debug statements to acpi_pm_notify_handler()
    ACPI: Add debug statements to acpi_global_event_handler()
    ACPI / scan: Enable GPEs before scanning the namespace
    ACPICA: Make it possible to enable runtime GPEs earlier
    ACPICA: Dispatch active GPEs at init time
    ACPI: SPCR: work around clock issue on xgene UART
    ACPI: SPCR: extend XGENE 8250 workaround to m400
    ACPI / LPSS: Don't abort ACPI scan on missing mem resource
    mailbox: pcc: Drop uninformative output during boot
    ACPI/IORT: Add IORT named component memory address limits
    ...

    Linus Torvalds
     
  • Pull arm64 updates from Catalin Marinas:

    - VMAP_STACK support, allowing the kernel stacks to be allocated in the
    vmalloc space with a guard page for trapping stack overflows. One of
    the patches introduces THREAD_ALIGN and changes the generic
    alloc_thread_stack_node() to use this instead of THREAD_SIZE (no
    functional change for other architectures)

    - Contiguous PTE hugetlb support re-enabled (after being reverted a
    couple of times). We now have the semantics agreed in the generic mm
    layer together with API improvements so that the architecture code
    can detect between contiguous and non-contiguous huge PTEs

    - Initial support for persistent memory on ARM: DC CVAP instruction
    exposed to user space (HWCAP) and the in-kernel pmem API implemented

    - raid6 improvements for arm64: faster algorithm for the delta syndrome
    and implementation of the recovery routines using Neon

    - FP/SIMD refactoring and removal of support for Neon in interrupt
    context. This is in preparation for full SVE support

    - PTE accessors converted from inline asm to cmpxchg so that we can use
    LSE atomics if available (ARMv8.1)

    - Perf support for Cortex-A35 and A73

    - Non-urgent fixes and cleanups

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (75 commits)
    arm64: cleanup {COMPAT_,}SET_PERSONALITY() macro
    arm64: introduce separated bits for mm_context_t flags
    arm64: hugetlb: Cleanup setup_hugepagesz
    arm64: Re-enable support for contiguous hugepages
    arm64: hugetlb: Override set_huge_swap_pte_at() to support contiguous hugepages
    arm64: hugetlb: Override huge_pte_clear() to support contiguous hugepages
    arm64: hugetlb: Handle swap entries in huge_pte_offset() for contiguous hugepages
    arm64: hugetlb: Add break-before-make logic for contiguous entries
    arm64: hugetlb: Spring clean huge pte accessors
    arm64: hugetlb: Introduce pte_pgprot helper
    arm64: hugetlb: set_huge_pte_at Add WARN_ON on !pte_present
    arm64: kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores
    arm64: dma-mapping: Mark atomic_pool as __ro_after_init
    arm64: dma-mapping: Do not pass data to gen_pool_set_algo()
    arm64: Remove the !CONFIG_ARM64_HW_AFDBM alternative code paths
    arm64: Ignore hardware dirty bit updates in ptep_set_wrprotect()
    arm64: Move PTE_RDONLY bit handling out of set_pte_at()
    kvm: arm64: Convert kvm_set_s2pte_readonly() from inline asm to cmpxchg()
    arm64: Convert pte handling from inline asm to using (cmp)xchg
    arm64: neon/efi: Make EFI fpsimd save/restore variables static
    ...

    Linus Torvalds
     

05 Sep, 2017

1 commit

  • Pull x86 mm changes from Ingo Molnar:
    "PCID support, 5-level paging support, Secure Memory Encryption support

    The main changes in this cycle are support for three new, complex
    hardware features of x86 CPUs:

    - Add 5-level paging support, which is a new hardware feature on
    upcoming Intel CPUs allowing up to 128 PB of virtual address space
    and 4 PB of physical RAM space - a 512-fold increase over the old
    limits. (Supercomputers of the future forecasting hurricanes on an
    ever warming planet can certainly make good use of more RAM.)

    Many of the necessary changes went upstream in previous cycles,
    v4.14 is the first kernel that can enable 5-level paging.

    This feature is activated via CONFIG_X86_5LEVEL=y - disabled by
    default.

    (By Kirill A. Shutemov)

    - Add 'encrypted memory' support, which is a new hardware feature on
    upcoming AMD CPUs ('Secure Memory Encryption', SME) allowing system
    RAM to be encrypted and decrypted (mostly) transparently by the
    CPU, with a little help from the kernel to transition to/from
    encrypted RAM. Such RAM should be more secure against various
    attacks like RAM access via the memory bus and should make the
    radio signature of memory bus traffic harder to intercept (and
    decrypt) as well.

    This feature is activated via CONFIG_AMD_MEM_ENCRYPT=y - disabled
    by default.

    (By Tom Lendacky)

    - Enable PCID optimized TLB flushing on newer Intel CPUs: PCID is a
    hardware feature that attaches an address space tag to TLB entries
    and thus allows to skip TLB flushing in many cases, even if we
    switch mm's.

    (By Andy Lutomirski)

    All three of these features were in the works for a long time, and
    it's coincidence of the three independent development paths that they
    are all enabled in v4.14 at once"

    * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (65 commits)
    x86/mm: Enable RCU based page table freeing (CONFIG_HAVE_RCU_TABLE_FREE=y)
    x86/mm: Use pr_cont() in dump_pagetable()
    x86/mm: Fix SME encryption stack ptr handling
    kvm/x86: Avoid clearing the C-bit in rsvd_bits()
    x86/CPU: Align CR3 defines
    x86/mm, mm/hwpoison: Clear PRESENT bit for kernel 1:1 mappings of poison pages
    acpi, x86/mm: Remove encryption mask from ACPI page protection type
    x86/mm, kexec: Fix memory corruption with SME on successive kexecs
    x86/mm/pkeys: Fix typo in Documentation/x86/protection-keys.txt
    x86/mm/dump_pagetables: Speed up page tables dump for CONFIG_KASAN=y
    x86/mm: Implement PCID based optimization: try to preserve old TLB entries using PCID
    x86: Enable 5-level paging support via CONFIG_X86_5LEVEL=y
    x86/mm: Allow userspace have mappings above 47-bit
    x86/mm: Prepare to expose larger address space to userspace
    x86/mpx: Do not allow MPX if we have mappings above 47-bit
    x86/mm: Rename tasksize_32bit/64bit to task_size_32bit/64bit()
    x86/xen: Redefine XEN_ELFNOTE_INIT_P2M using PUD_SIZE * PTRS_PER_PUD
    x86/mm/dump_pagetables: Fix printout of p4d level
    x86/mm/dump_pagetables: Generalize address normalization
    x86/boot: Fix memremap() related build failure
    ...

    Linus Torvalds
     

04 Sep, 2017

1 commit

  • * acpi-sysfs:
    ACPI / sysfs: Extend ACPI sysfs to provide access to boot error region

    * acpi-apei:
    ACPI / APEI: Suppress message if HEST not present
    ACPI, APEI, EINJ: Subtract any matching Register Region from Trigger resources
    ACPI: APEI: fix the wrong iteration of generic error status block
    ACPI: APEI: Enable APEI multiple GHES source to share a single external IRQ

    * acpi-blacklist:
    intel_pstate: convert to use acpi_match_platform_list()
    ACPI / blacklist: add acpi_match_platform_list()

    Rafael J. Wysocki
     

30 Aug, 2017

1 commit


26 Aug, 2017

6 commits

  • Avoid effectively open-coding the function.

    Signed-off-by: Jan Beulich
    Signed-off-by: Ard Biesheuvel
    Cc: Jan Beulich
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170825155019.6740-6-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Jan Beulich
     
  • This follows efi_mem_attributes(), as it's similarly generic. Drop
    __weak from that one though (and don't introduce it for efi_mem_type()
    in the first place) to make clear that other overrides to these
    functions are really not intended.

    Signed-off-by: Jan Beulich
    Signed-off-by: Ard Biesheuvel
    Cc: Jan Beulich
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170825155019.6740-5-ard.biesheuvel@linaro.org
    [ Resolved conflict with: f99afd08a45f: (efi: Update efi_mem_type() to return an error rather than 0) ]
    Signed-off-by: Ingo Molnar

    Jan Beulich
     
  • The function pointer orig_pm_power_off is local to the source and does
    not need to be in global scope, so make it static.

    Cleans up sparse warning:
    symbol 'orig_pm_power_off' was not declared. Should it be static?

    Signed-off-by: Colin Ian King
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170825155019.6740-4-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Colin Ian King
     
  • The crng code requires at least 64 bytes (2 * CHACHA20_BLOCK_SIZE)
    to complete the fast boot-time init, so provide that many bytes
    when invoking UEFI protocols to seed the entropy pool. Also, add
    a notice so we can tell from the boot log when the seeding actually
    took place.

    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170825155019.6740-3-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Ard Biesheuvel
     
  • If a machine is reset while secrets are present in RAM, it may be
    possible for code executed after the reboot to extract those secrets
    from untouched memory. The Trusted Computing Group specified a mechanism
    for requesting that the firmware clear all RAM on reset before booting
    another OS. This is done by setting the MemoryOverwriteRequestControl
    variable at startup. If userspace can ensure that all secrets are
    removed as part of a controlled shutdown, it can reset this variable to
    0 before triggering a hardware reboot.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170825155019.6740-2-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Matthew Garrett
     
  • Signed-off-by: Ingo Molnar

    Ingo Molnar
     

24 Aug, 2017

1 commit

  • The revision 0x300 generic error data entry is different
    from the old version, but currently iterating through the
    GHES estatus blocks does not take into account this difference.
    This will lead to failure to get the right data entry if GHES
    has revision 0x300 error data entry.

    Update the GHES estatus iteration macro to properly increment using
    acpi_hest_get_next(), and correct the iteration termination condition
    because the status block data length only includes error data
    length.

    Convert the CPER estatus checking and printing iteration logic
    to use same macro.

    Signed-off-by: Dongjiu Geng
    Tested-by: Tyler Baicar
    Reviewed-by: Borislav Petkov
    Signed-off-by: Rafael J. Wysocki

    gengdongjiu
     

21 Aug, 2017

7 commits

  • attribute_group are not supposed to change at runtime. All functions
    working with attribute_group provided by work with
    const attribute_group. So mark the non-const structs as const.

    Signed-off-by: Arvind Yadav
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170818194947.19347-15-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Arvind Yadav
     
  • attribute_group are not supposed to change at runtime. All functions
    working with attribute_group provided by work with
    const attribute_group. So mark the non-const structs as const.

    Signed-off-by: Arvind Yadav
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170818194947.19347-14-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Arvind Yadav
     
  • Commit:

    44be28e9dd98 ("x86/reboot: Add EFI reboot quirk for ACPI Hardware Reduced flag")

    sets pm_power_off to efi_power_off() when the acpi_gbl_reduced_hardware
    flag is set.

    According to its commit message this is necessary because: "BayTrail-T
    class of hardware requires EFI in order to powerdown and reboot and no
    other reliable method exists".

    But I have a Bay Trail CR tablet where the EFI_RESET_SHUTDOWN call does
    not work, it simply returns without doing anything (AFAICT).

    So it seems that some Bay Trail devices must use EFI for power-off, while
    for others only ACPI works.

    Note that efi_power_off() only gets used if the platform code defines
    efi_poweroff_required() and that returns true, this currently only ever
    happens on x86.

    Since on the devices which need ACPI for power-off the EFI_RESET_SHUTDOWN
    call simply returns, this patch makes the efi-reboot code remember the
    old pm_power_off handler and if EFI_RESET_SHUTDOWN returns it falls back
    to calling that.

    This seems preferable to dmi-quirking our way out of this, since there
    are likely quite a few devices suffering from this.

    Signed-off-by: Hans de Goede
    Signed-off-by: Matt Fleming
    Signed-off-by: Ard Biesheuvel
    Cc: Andy Shevchenko
    Cc: Len Brown
    Cc: Linus Torvalds
    Cc: Mark Salter
    Cc: Peter Jones
    Cc: Peter Zijlstra
    Cc: Rafael J. Wysocki
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170818194947.19347-7-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Hans de Goede
     
  • The ARM EFI init code never assigns the config_table member of the
    efi struct, which means the sysfs device node is missing, and other
    in-kernel users will not work correctly. So add the missing assignment.

    Note that, for now, the runtime and fw_vendor members are still
    omitted. This is deliberate: exposing physical addresses via sysfs nodes
    encourages behavior that we would like to avoid on ARM (given how it is
    more finicky about using correct memory attributes when mapping memory
    in userland that may be mapped by the kernel already as well).

    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170818194947.19347-6-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Ard Biesheuvel
     
  • Clang may emit absolute symbol references when building in non-PIC mode,
    even when using the default 'small' code model, which is already mostly
    position independent to begin with, due to its use of adrp/add pairs
    that have a relative range of +/- 4 GB. The remedy is to pass the -fpie
    flag, which can be done safely now that the code has been updated to avoid
    GOT indirections (which may be emitted due to the compiler assuming that
    the PIC/PIE code may end up in a shared library that is subject to ELF
    symbol preemption)

    Passing -fpie when building code that needs to execute at an a priori
    unknown offset is arguably an improvement in any case, and given that
    the recent visibility changes allow the PIC build to pass with GCC as
    well, let's add -fpie for all arm64 builds rather than only for Clang.

    Tested-by: Matthias Kaehlcke
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170818194947.19347-5-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Ard Biesheuvel
     
  • To prevent the compiler from emitting absolute references to the section
    markers when running in PIC mode, override the visibility to 'hidden' for
    all contents of asm/sections.h

    Tested-by: Matthias Kaehlcke
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170818194947.19347-4-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Ard Biesheuvel
     
  • On ARM, regions of memory that are described by UEFI as having special
    significance to the firmware itself are omitted from the linear mapping.
    This is necessary since we cannot guarantee that alternate mappings of
    the same physical region will use attributes that are compatible with
    the ones we use for the linear mapping, and aliases with mismatched
    attributes are prohibited by the architecture.

    The above does not apply to ACPI reclaim regions: such regions have no
    special significance to the firmware, and it is up to the OS to decide
    whether or not to preserve them after it has consumed their contents,
    and for how long, after which time the OS can use the memory in any way
    it likes. In the Linux case, such regions are preserved indefinitely,
    and are simply treated the same way as other 'reserved' memory types.

    Punching holes into the linear mapping causes page table fragmentation,
    which increases TLB pressure, and so we should avoid doing so if we can.
    So add a special case for regions of type EFI_ACPI_RECLAIM_MEMORY, and
    memblock_reserve() them instead of marking them MEMBLOCK_NOMAP.

    Signed-off-by: Ard Biesheuvel
    Acked-by: Mark Rutland
    Cc: Linus Torvalds
    Cc: Matt Fleming
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20170818194947.19347-2-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Ard Biesheuvel
     

17 Aug, 2017

1 commit

  • The existing map iteration helper for_each_efi_memory_desc_in_map can
    only be used after the kernel initializes the EFI subsystem to set up
    struct efi_memory_map.

    Before that we also need iterate map descriptors which are stored in several
    intermediate structures, like struct efi_boot_memmap for arch independent
    usage and struct efi_info for x86 arch only.

    Introduce efi_early_memdesc_ptr() to get pointer to a map descriptor, and
    replace several places where that primitive is open coded.

    Signed-off-by: Baoquan He
    [ Various improvements to the text. ]
    Acked-by: Matt Fleming
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: ard.biesheuvel@linaro.org
    Cc: fanc.fnst@cn.fujitsu.com
    Cc: izumi.taku@jp.fujitsu.com
    Cc: keescook@chromium.org
    Cc: linux-efi@vger.kernel.org
    Cc: n-horiguchi@ah.jp.nec.com
    Cc: thgarnie@google.com
    Link: http://lkml.kernel.org/r/20170816134651.GF21273@x1
    Signed-off-by: Ingo Molnar

    Baoquan He
     

16 Aug, 2017

1 commit

  • The EFI stub is intimately coupled with the kernel, and takes advantage
    of this by relocating the kernel at a weaker alignment than the
    documented boot protocol mandates.

    However, it does so by assuming it can align the kernel to the segment
    alignment, and assumes that this is 64K. In subsequent patches, we'll
    have to consider other details to determine this de-facto alignment
    constraint.

    This patch adds a new EFI_KIMG_ALIGN definition that will track the
    kernel's de-facto alignment requirements. Subsequent patches will modify
    this as required.

    Signed-off-by: Mark Rutland
    Reviewed-by: Will Deacon
    Tested-by: Laura Abbott
    Cc: Ard Biesheuvel
    Cc: Catalin Marinas
    Cc: James Morse
    Cc: Matt Fleming

    Mark Rutland
     

04 Aug, 2017

1 commit

  • We're about to amend ACPI bus scan with DMI checks whether we're running
    on a Mac to support Apple device properties in AML. The DMI checks are
    performed for every single device, adding overhead for everything x86
    that isn't Apple, which is the majority. Rafael and Andy therefore
    request to perform the DMI match only once and cache the result.

    Outside of ACPI various other Apple DMI checks exist and it seems
    reasonable to use the cached value there as well. Rafael, Andy and
    Darren suggest performing the DMI check in arch code and making it
    available with a header in include/linux/platform_data/x86/.

    To this end, add early_platform_quirks() to arch/x86/kernel/quirks.c
    to perform the DMI check and invoke it from setup_arch(). Switch over
    all existing Apple DMI checks, thereby fixing two deficiencies:

    * They are now #defined to false on non-x86 arches and can thus be
    optimized away if they're located in cross-arch code.

    * Some of them only match "Apple Inc." but not "Apple Computer, Inc.",
    which is used by BIOSes released between January 2006 (when the first
    x86 Macs started shipping) and January 2007 (when the company name
    changed upon introduction of the iPhone).

    Suggested-by: Andy Shevchenko
    Suggested-by: Rafael J. Wysocki
    Suggested-by: Darren Hart
    Signed-off-by: Lukas Wunner
    Acked-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Lukas Wunner
     

18 Jul, 2017

1 commit

  • Add a function that will determine if a supplied physical address matches
    the address of an EFI table.

    Signed-off-by: Tom Lendacky
    Reviewed-by: Thomas Gleixner
    Reviewed-by: Matt Fleming
    Reviewed-by: Borislav Petkov
    Cc: Alexander Potapenko
    Cc: Andrey Ryabinin
    Cc: Andy Lutomirski
    Cc: Arnd Bergmann
    Cc: Borislav Petkov
    Cc: Brijesh Singh
    Cc: Dave Young
    Cc: Dmitry Vyukov
    Cc: Jonathan Corbet
    Cc: Konrad Rzeszutek Wilk
    Cc: Larry Woodman
    Cc: Linus Torvalds
    Cc: Michael S. Tsirkin
    Cc: Paolo Bonzini
    Cc: Peter Zijlstra
    Cc: Radim Krčmář
    Cc: Rik van Riel
    Cc: Toshimitsu Kani
    Cc: kasan-dev@googlegroups.com
    Cc: kvm@vger.kernel.org
    Cc: linux-arch@vger.kernel.org
    Cc: linux-doc@vger.kernel.org
    Cc: linux-efi@vger.kernel.org
    Cc: linux-mm@kvack.org
    Link: http://lkml.kernel.org/r/e1e06441d80f44776df391e0e4cb485b345b7518.1500319216.git.thomas.lendacky@amd.com
    Signed-off-by: Ingo Molnar

    Tom Lendacky
     

13 Jul, 2017

1 commit

  • This avoids CONFIG_FORTIFY_SOURCE from being enabled during the EFI stub
    build, as adding a panic() implementation may not work well. This can
    be adjusted in the future.

    Link: http://lkml.kernel.org/r/1497903987-21002-2-git-send-email-keescook@chromium.org
    Signed-off-by: Kees Cook
    Suggested-by: Daniel Micay
    Reviewed-by: Ard Biesheuvel
    Acked-by: Mark Rutland
    Cc: Matt Fleming
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     

06 Jul, 2017

2 commits

  • Pull arm64 updates from Will Deacon:

    - RAS reporting via GHES/APEI (ACPI)

    - Indirect ftrace trampolines for modules

    - Improvements to kernel fault reporting

    - Page poisoning

    - Sigframe cleanups and preparation for SVE context

    - Core dump fixes

    - Sparse fixes (mainly relating to endianness)

    - xgene SoC PMU v3 driver

    - Misc cleanups and non-critical fixes

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (75 commits)
    arm64: fix endianness annotation for 'struct jit_ctx' and friends
    arm64: cpuinfo: constify attribute_group structures.
    arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set()
    arm64: ptrace: Remove redundant overrun check from compat_vfp_set()
    arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails
    arm64: fix endianness annotation for __apply_alternatives()/get_alt_insn()
    arm64: fix endianness annotation in get_kaslr_seed()
    arm64: add missing conversion to __wsum in ip_fast_csum()
    arm64: fix endianness annotation in acpi_parking_protocol.c
    arm64: use readq() instead of readl() to read 64bit entry_point
    arm64: fix endianness annotation for reloc_insn_movw() & reloc_insn_imm()
    arm64: fix endianness annotation for aarch64_insn_write()
    arm64: fix endianness annotation in aarch64_insn_read()
    arm64: fix endianness annotation in call_undef_hook()
    arm64: fix endianness annotation for debug-monitors.c
    ras: mark stub functions as 'inline'
    arm64: pass endianness info to sparse
    arm64: ftrace: fix !CONFIG_ARM64_MODULE_PLTS kernels
    arm64: signal: Allow expansion of the signal frame
    acpi: apei: check for pending errors when probing GHES entries
    ...

    Linus Torvalds
     
  • Pull pstore updates from Kees Cook:
    "Various fixes and tweaks for the pstore subsystem.

    Highlights:

    - use memdup_user() instead of open-coded copies (Geliang Tang)

    - fix record memory leak during initialization (Douglas Anderson)

    - avoid confused compressed record warning (Ankit Kumar)

    - prepopulate record timestamp and remove redundant logic from
    backends"

    * tag 'pstore-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    powerpc/nvram: use memdup_user
    pstore: use memdup_user
    pstore: Fix format string to use %u for record id
    pstore: Populate pstore record->time field
    pstore: Create common record initializer
    efi-pstore: Refactor erase routine
    pstore: Avoid potential infinite loop
    pstore: Fix leaked pstore_record in pstore_get_backend_records()
    pstore: Don't warn if data is uncompressed and type is not PSTORE_TYPE_DMESG

    Linus Torvalds
     

04 Jul, 2017

1 commit

  • Pull EFI updates from Ingo Molnar:
    "The main changes in this cycle were:

    - Rework the EFI capsule loader to allow for workarounds for
    non-compliant firmware (Ard Biesheuvel)

    - Implement a capsule loader quirk for Quark X102x (Jan Kiszka)

    - Enable SMBIOS/DMI support for the ARM architecture (Ard Biesheuvel)

    - Add CONFIG_EFI_PGT_DUMP=y support for x86-32 and kexec (Sai
    Praneeth)

    - Fixes for EFI support for Xen dom0 guests running under x86-64
    hosts (Daniel Kiper)"

    * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/xen/efi: Initialize only the EFI struct members used by Xen
    efi: Process the MEMATTR table only if EFI_MEMMAP is enabled
    efi/arm: Enable DMI/SMBIOS
    x86/efi: Extend CONFIG_EFI_PGT_DUMP support to x86_32 and kexec as well
    efi/efi_test: Use memdup_user() helper
    efi/capsule: Add support for Quark security header
    efi/capsule-loader: Use page addresses rather than struct page pointers
    efi/capsule-loader: Redirect calls to efi_capsule_setup_info() via weak alias
    efi/capsule: Remove NULL test on kmap()
    efi/capsule-loader: Use a cached copy of the capsule header
    efi/capsule: Adjust return type of efi_capsule_setup_info()
    efi/capsule: Clean up pr_err/_info() messages
    efi/capsule: Remove pr_debug() on ENOMEM or EFAULT
    efi/capsule: Fix return code on failing kmap/vmap

    Linus Torvalds
     

23 Jun, 2017

1 commit

  • Otherwise e.g. Xen dom0 on x86_64 EFI platforms crashes.

    In theory we can check EFI_PARAVIRT too, however,
    EFI_MEMMAP looks more targeted and covers more cases.

    Signed-off-by: Daniel Kiper
    Reviewed-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: andrew.cooper3@citrix.com
    Cc: boris.ostrovsky@oracle.com
    Cc: jgross@suse.com
    Cc: linux-efi@vger.kernel.org
    Cc: matt@codeblueprint.co.uk
    Cc: stable@vger.kernel.org
    Cc: xen-devel@lists.xenproject.org
    Link: http://lkml.kernel.org/r/1498128697-12943-2-git-send-email-daniel.kiper@oracle.com
    Signed-off-by: Ingo Molnar

    Daniel Kiper