1. 26 Sep, 2018 3 commits
  2. 20 Sep, 2018 1 commit
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.4.7-14-gc86da84d30e4 · f858927f
      Rob Herring authored
      Major changes are I2C and SPI bus checks, YAML output format (for
      future validation), some new libfdt functions, and more libfdt
      validation of dtbs.
      
      The YAML addition adds an optional dependency on libyaml. pkg-config is
      used to test for it and pkg-config became a kconfig dependency in 4.18.
      
      This adds the following commits from upstream:
      
      c86da84d30e4 Add support for YAML encoded output
      361b5e7d8067 Make type_marker_length helper public
      bfbfab047e45 pylibfdt: Add a means to add and delete notes
      9005f4108e7c pylibfdt: Allow delprop() to return errors
      b94c056b137e Make valgrind optional
      fd06c54d4711 tests: Better testing of dtc -I fs mode
      c3f50c9a86d9 tests: Allow dtbs_equal_unordered to ignore mem reserves
      0ac9fdee37c7 dtc: trivial '-I fs -O dts' test
      0fd1c8c783f3 pylibfdt: fdt_get_mem_rsv returns 2 uint64_t values
      04853cad18f4 pylibfdt: Don't incorrectly / unnecessarily override uint64_t typemap
      9619c8619c37 Kill bogus TYPE_BLOB marker type
      ac68ff92ae20 parser: add TYPE_STRING marker to path references
      90a190eb04d9 checks: add SPI bus checks
      53a1bd546905 checks: add I2C bus checks
      88f18909db73 dtc: Bump version to v1.4.7
      85bce8b2f06d tests: Correction to vg_prepare_blob()
      57f7f9e7bc7c tests: Don't call memcmp() with NULL arguments
      c12b2b0c20eb libfdt: fdt_address_cells() and fdt_size_cells()
      3fe0eeda0b7f livetree: Set phandle properties type to uint32
      853649acceba pylibfdt: Support the sequential-write interface
      9b0e4fe26093 tests: Improve fdt_resize() tests
      1087504bb3e8 libfdt: Add necessary header padding in fdt_create()
      c72fa777e613 libfdt: Copy the struct region in fdt_resize()
      32b9c6130762 Preserve datatype markers when emitting dts format
      6dcb8ba408ec libfdt: Add helpers for accessing unaligned words
      42607f21d43e tests: Fix incorrect check name 'prop_name_chars'
      9d78c33bf8a1 tests: fix grep for checks error messages
      b770f3d1c13f pylibfdt: Support setting the name of a node
      2f0d07e678e0 pylibfdt: Add functions to set and get properties as strings
      354d3dc55939 pylibfdt: Update the bytearray size with pack()
      3c374d46acce pylibfdt: Allow reading integer values from properties
      49d32ce40bb4 pylibfdt: Use an unsigned type for fdt32_t
      481246a0c13a pylibfdt: Avoid accessing the internal _fdt member in tests
      9aafa33d99ed pylibfdt: Add functions to update properties
      5a598671fdbf pylibfdt: Support device-tree creation/expansion
      483e170625e1 pylibfdt: Add support for reading the memory reserve map
      29bb05aa4200 pylibfdt: Add support for the rest of the header functions
      582a7159a5d0 pylibfdt: Add support for fdt_next_node()
      f0f8c9169819 pylibfdt: Reorder functions to match libfdt.h
      64a69d123935 pylibfdt: Return string instead of bytearray from getprop()
      4d09a83420df fdtput: Add documentation
      e617cbe1bd67 fdtget: Add documentation
      180a93924014 Use <inttypes.h> format specifiers in a bunch of places we should
      b9af3b396576 scripts/dtc: Fixed format mismatch in fprintf
      4b8fcc3d015c libfdt: Add fdt_check_full() function
      c14223fb2292 tests: Use valgrind client requests for better checking
      5b67d2b955a3 tests: Better handling of valgrind errors saving blobs
      e2556aaeb506 tests: Remove unused #define
      fb9c6abddaa8 Use size_t for blob lengths in utilfdt_read*
      0112fda03bf6 libfdt: Add fdt_header_size()
      6473a21d8bfe Consolidate utilfdt_read_len() variants
      d5db5382c5e5 libfdt: Safer access to memory reservations
      719d582e98ec libfdt: Propagate name errors in fdt_getprop_by_offset()
      70166d62a27f libfdt: Safer access to strings section
      eb890c0f77dc libfdt: Make fdt_check_header() more thorough
      899d6fad93f3 libfdt: Improve sequential write state checking
      04b5b4062ccd libfdt: Clean up header checking functions
      44d3efedc816 Preserve datatype information when parsing dts
      f0be81bd8de0 Make Property a subclass of bytearray
      24b1f3f064d4 pylibfdt: Add a method to access the device tree directly
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      f858927f
  3. 19 Sep, 2018 4 commits
    • Rob Herring's avatar
      scripts/dtc: Add yamltree.c to dtc sources · c36d5a6c
      Rob Herring authored
      dtc has a new source file, yamltree.c, that needs to be copied when
      syncing dtc sources.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      c36d5a6c
    • Rob Herring's avatar
      libfdt: Ensure INT_MAX is defined in libfdt_env.h · 53dd9dce
      Rob Herring authored
      The next update of libfdt has a new dependency on INT_MAX. Update the
      instances of libfdt_env.h in the kernel to either include the necessary
      header with the definition or define it locally.
      
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      53dd9dce
    • Rob Herring's avatar
      of/unittest: Fix I2C bus unit-address error · 62287dce
      Rob Herring authored
      dtc has new checks for I2C buses. Fix the warnings in unit-addresses in
      the unittests.
      
      drivers/of/unittest-data/testcases.dtb: Warning (i2c_bus_reg): /testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest14/i2c@0/test-mux-dev: I2C bus unit address format error, expected "20"
      drivers/of/unittest-data/overlay_15.dtb: Warning (i2c_bus_reg): /fragment@0/__overlay__/test-unittest15/i2c@0/test-mux-dev: I2C bus unit address format error, expected "20"
      
      Cc: Frank Rowand <frowand.list@gmail.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      62287dce
    • Rob Herring's avatar
      Merge branch 'dt/linus' into HEAD · 362ce2b8
      Rob Herring authored
      362ce2b8
  4. 11 Sep, 2018 1 commit
  5. 07 Sep, 2018 4 commits
  6. 04 Sep, 2018 2 commits
  7. 02 Sep, 2018 8 commits
    • Linus Torvalds's avatar
      Linux 4.19-rc2 · 57361846
      Linus Torvalds authored
      57361846
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · fd6868d8
      Linus Torvalds authored
      Pull devicetree updates from Rob Herring:
       "A couple of new helper functions in preparation for some tree wide
        clean-ups.
      
        I'm sending these new helpers now for rc2 in order to simplify the
        dependencies on subsequent cleanups across the tree in 4.20"
      
      * tag 'devicetree-fixes-for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        of: Add device_type access helper functions
        of: add node name compare helper functions
        of: add helper to lookup compatible child node
      fd6868d8
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · a3ea9911
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "First batch of fixes post-merge window:
      
         - A handful of devicetree changes for i.MX2{3,8} to change over to
           new panel bindings. The platforms were moved from legacy
           framebuffers to DRM and some development board panels hadn't yet
           been converted.
      
         - OMAP fixes related to ti-sysc driver conversion fallout, fixing
           some register offsets, no_console_suspend fixes, etc.
      
         - Droid4 changes to fix flaky eMMC probing and vibrator DTS mismerge.
      
         - Fixed 0755->0644 permissions on a newly added file.
      
         - Defconfig changes to make ARM Versatile more useful with QEMU
           (helps testing).
      
         - Enable defconfig options for new TI SoC platform that was merged
           this window (AM6)"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        arm64: defconfig: Enable TI's AM6 SoC platform
        ARM: defconfig: Update the ARM Versatile defconfig
        ARM: dts: omap4-droid4: Fix emmc errors seen on some devices
        ARM: dts: Fix file permission for am335x-osd3358-sm-red.dts
        ARM: imx_v6_v7_defconfig: Select CONFIG_DRM_PANEL_SEIKO_43WVF1G
        ARM: mxs_defconfig: Select CONFIG_DRM_PANEL_SEIKO_43WVF1G
        ARM: dts: imx23-evk: Convert to the new display bindings
        ARM: dts: imx23-evk: Move regulators outside simple-bus
        ARM: dts: imx28-evk: Convert to the new display bindings
        ARM: dts: imx28-evk: Move regulators outside simple-bus
        Revert "ARM: dts: imx7d: Invert legacy PCI irq mapping"
        arm: dts: am4372: setup rtc as system-power-controller
        ARM: dts: omap4-droid4: fix vibrations on Droid 4
        bus: ti-sysc: Fix no_console_suspend handling
        bus: ti-sysc: Fix module register ioremap for larger offsets
        ARM: OMAP2+: Fix module address for modules using mpu_rt_idx
        ARM: OMAP2+: Fix null hwmod for ti-sysc debug
      a3ea9911
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 899ba795
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Speculation:
      
         - Make the microcode check more robust
      
         - Make the L1TF memory limit depend on the internal cache physical
           address space and not on the CPUID advertised physical address
           space, which might be significantly smaller. This avoids disabling
           L1TF on machines which utilize the full physical address space.
      
         - Fix the GDT mapping for EFI calls on 32bit PTI
      
         - Fix the MCE nospec implementation to prevent #GP
      
        Fixes and robustness:
      
         - Use the proper operand order for LSL in the VDSO
      
         - Prevent NMI uaccess race against CR3 switching
      
         - Add a lockdep check to verify that text_mutex is held in
           text_poke() functions
      
         - Repair the fallout of giving native_restore_fl() a prototype
      
         - Prevent kernel memory dumps based on usermode RIP
      
         - Wipe KASAN shadow stack before rewinding the stack to prevent false
           positives
      
         - Move the AMS GOTO enforcement to the actual build stage to allow
           user API header extraction without a compiler
      
         - Fix a section mismatch introduced by the on demand VDSO mapping
           change
      
        Miscellaneous:
      
         - Trivial typo, GCC quirk removal and CC_SET/OUT() cleanups"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/pti: Fix section mismatch warning/error
        x86/vdso: Fix lsl operand order
        x86/mce: Fix set_mce_nospec() to avoid #GP fault
        x86/efi: Load fixmap GDT in efi_call_phys_epilog()
        x86/nmi: Fix NMI uaccess race against CR3 switching
        x86: Allow generating user-space headers without a compiler
        x86/dumpstack: Don't dump kernel memory based on usermode RIP
        x86/asm: Use CC_SET()/CC_OUT() in __gen_sigismember()
        x86/alternatives: Lockdep-enforce text_mutex in text_poke*()
        x86/entry/64: Wipe KASAN stack shadow before rewind_stack_do_exit()
        x86/irqflags: Mark native_restore_fl extern inline
        x86/build: Remove jump label quirk for GCC older than 4.5.2
        x86/Kconfig: Fix trivial typo
        x86/speculation/l1tf: Increase l1tf memory limit for Nehalem+
        x86/spectre: Add missing family 6 check to microcode check
      899ba795
    • Linus Torvalds's avatar
      Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1395d109
      Linus Torvalds authored
      Pull CPU hotplug fix from Thomas Gleixner:
       "Remove the stale skip_onerr member from the hotplug states"
      
      * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        cpu/hotplug: Remove skip_onerr field from cpuhp_step structure
      1395d109
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 501dacbc
      Linus Torvalds authored
      Pull core fixes from Thomas Gleixner:
       "A small set of updates for core code:
      
         - Prevent tracing in functions which are called from trace patching
           via stop_machine() to prevent executing half patched function trace
           entries.
      
         - Remove old GCC workarounds
      
         - Remove pointless includes of notifier.h"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Remove workaround for unreachable warnings from old GCC
        notifier: Remove notifier header file wherever not used
        watchdog: Mark watchdog touch functions as notrace
      501dacbc
    • Randy Dunlap's avatar
      x86/pti: Fix section mismatch warning/error · ff924c5a
      Randy Dunlap authored
      Fix the section mismatch warning in arch/x86/mm/pti.c:
      
      WARNING: vmlinux.o(.text+0x6972a): Section mismatch in reference from the function pti_clone_pgtable() to the function .init.text:pti_user_pagetable_walk_pte()
      The function pti_clone_pgtable() references
      the function __init pti_user_pagetable_walk_pte().
      This is often because pti_clone_pgtable lacks a __init
      annotation or the annotation of pti_user_pagetable_walk_pte is wrong.
      FATAL: modpost: Section mismatches detected.
      
      Fixes: 85900ea5 ("x86/pti: Map the vsyscall page if needed")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Andy Lutomirski <luto@kernel.org>
      Link: https://lkml.kernel.org/r/43a6d6a3-d69d-5eda-da09-0b1c88215a2a@infradead.org
      
      ff924c5a
    • Olof Johansson's avatar
      Merge tag 'omap-for-v4.19/fixes-v2-signed' of... · a72b44a8
      Olof Johansson authored
      Merge tag 'omap-for-v4.19/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Fixes for omap variants against v4.19-rc1
      
      These are mostly fixes related to using ti-sysc interconnect target module
      driver for accessing right register offsets for sgx and cpsw and for
      no_console_suspend regression.
      
      There is also a droid4 emmc fix where emmc may not get detected for some
      models, and vibrator dts mismerge fix.
      
      And we have a file permission fix for am335x-osd3358-sm-red.dts that
      just got added. And we must tag RTC as system-power-controller for
      am437x for PMIC to shut down during poweroff.
      
      * tag 'omap-for-v4.19/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: omap4-droid4: Fix emmc errors seen on some devices
        ARM: dts: Fix file permission for am335x-osd3358-sm-red.dts
        arm: dts: am4372: setup rtc as system-power-controller
        ARM: dts: omap4-droid4: fix vibrations on Droid 4
        bus: ti-sysc: Fix no_console_suspend handling
        bus: ti-sysc: Fix module register ioremap for larger offsets
        ARM: OMAP2+: Fix module address for modules using mpu_rt_idx
        ARM: OMAP2+: Fix null hwmod for ti-sysc debug
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      a72b44a8
  8. 01 Sep, 2018 4 commits
  9. 31 Aug, 2018 13 commits
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 420f51f4
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "A few arm64 fixes came in this week, specifically fixing some nasty
        truncation of return values from firmware calls and resolving a
        VM_BUG_ON due to accessing uninitialised struct pages corresponding to
        NOMAP pages.
      
        Summary:
      
         - Fix typos in SVE documentation
      
         - Fix type-checking and implicit truncation for SMCCC calls
      
         - Force CONFIG_HOLES_IN_ZONE=y so that SLAB doesn't fall over NOMAP
           regions"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: mm: always enable CONFIG_HOLES_IN_ZONE
        arm/arm64: smccc-1.1: Handle function result as parameters
        arm/arm64: smccc-1.1: Make return values unsigned long
        Documentation/arm64/sve: Couple of improvements and typos
      420f51f4
    • Joerg Roedel's avatar
      x86/efi: Load fixmap GDT in efi_call_phys_epilog() · eeb89e2b
      Joerg Roedel authored
      When PTI is enabled on x86-32 the kernel uses the GDT mapped in the fixmap
      for the simple reason that this address is also mapped for user-space.
      
      The efi_call_phys_prolog()/efi_call_phys_epilog() wrappers change the GDT
      to call EFI runtime services and switch back to the kernel GDT when they
      return. But the switch-back uses the writable GDT, not the fixmap GDT.
      
      When that happened and and the CPU returns to user-space it switches to the
      user %cr3 and tries to restore user segment registers. This fails because
      the writable GDT is not mapped in the user page-table, and without a GDT
      the fault handlers also can't be launched. The result is a triple fault and
      reboot of the machine.
      
      Fix that by restoring the GDT back to the fixmap GDT which is also mapped
      in the user page-table.
      
      Fixes: 7757d607 x86/pti: ('Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32')
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: hpa@zytor.com
      Cc: linux-efi@vger.kernel.org
      Link: https://lkml.kernel.org/r/1535702738-10971-1-git-send-email-joro@8bytes.org
      eeb89e2b
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.19b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 4290d5b9
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - minor cleanup avoiding a warning when building with new gcc
      
       - a patch to add a new sysfs node for Xen frontend/backend drivers to
         make it easier to obtain the state of a pv device
      
       - two fixes for 32-bit pv-guests to avoid intermediate L1TF vulnerable
         PTEs
      
      * tag 'for-linus-4.19b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        x86/xen: remove redundant variable save_pud
        xen: export device state to sysfs
        x86/pae: use 64 bit atomic xchg function in native_ptep_get_and_clear
        x86/xen: don't write ptes directly in 32-bit PV guests
      4290d5b9
    • Linus Torvalds's avatar
      Merge tag 'm68k-for-v4.19-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · 01f6543a
      Linus Torvalds authored
      Pull m68k fix from Geert Uytterhoeven:
       "Just a single fix for a bug introduced during the merge window: fix
        wrong date and time on PMU-based Macs"
      
      * tag 'm68k-for-v4.19-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k/mac: Use correct PMU response format
      01f6543a
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 754cf4b2
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
      
       - regression fixes for i801 and designware
      
       - better API and leak fix for releasing DMA safe buffers
      
       - better greppable strings for the bitbang algorithm
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: sh_mobile: fix leak when using DMA bounce buffer
        i2c: sh_mobile: define start_ch() void as it only returns 0 anyhow
        i2c: refactor function to release a DMA safe buffer
        i2c: algos: bit: make the error messages grepable
        i2c: designware: Re-init controllers with pm_disabled set on resume
        i2c: i801: Allow ACPI AML access I/O ports not reserved for SMBus
      754cf4b2
    • Andy Lutomirski's avatar
      x86/nmi: Fix NMI uaccess race against CR3 switching · 4012e77a
      Andy Lutomirski authored
      
      A NMI can hit in the middle of context switching or in the middle of
      switch_mm_irqs_off().  In either case, CR3 might not match current->mm,
      which could cause copy_from_user_nmi() and friends to read the wrong
      memory.
      
      Fix it by adding a new nmi_uaccess_okay() helper and checking it in
      copy_from_user_nmi() and in __copy_from_user_nmi()'s callers.
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarRik van Riel <riel@surriel.com>
      Cc: Nadav Amit <nadav.amit@gmail.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Jann Horn <jannh@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/dd956eba16646fd0b15c3c0741269dfd84452dac.1535557289.git.luto@kernel.org
      
      4012e77a
    • Ben Hutchings's avatar
      x86: Allow generating user-space headers without a compiler · 829fe4aa
      Ben Hutchings authored
      
      When bootstrapping an architecture, it's usual to generate the kernel's
      user-space headers (make headers_install) before building a compiler.  Move
      the compiler check (for asm goto support) to the archprepare target so that
      it is only done when building code for the target.
      
      Fixes: e501ce95 ("x86: Force asm-goto")
      Reported-by: default avatarHelmut Grohne <helmutg@debian.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/20180829194317.GA4765@decadent.org.uk
      
      829fe4aa
    • Jann Horn's avatar
      x86/dumpstack: Don't dump kernel memory based on usermode RIP · 342db04a
      Jann Horn authored
      
      show_opcodes() is used both for dumping kernel instructions and for dumping
      user instructions. If userspace causes #PF by jumping to a kernel address,
      show_opcodes() can be reached with regs->ip controlled by the user,
      pointing to kernel code. Make sure that userspace can't trick us into
      dumping kernel memory into dmesg.
      
      Fixes: 7cccf072 ("x86/dumpstack: Add a show_ip() function")
      Signed-off-by: default avatarJann Horn <jannh@google.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: security@kernel.org
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/20180828154901.112726-1-jannh@google.com
      
      342db04a
    • Rob Herring's avatar
      of: Add device_type access helper functions · 0413beda
      Rob Herring authored
      In preparation to remove direct access to device_node.type, add
      of_node_is_type() and of_node_get_device_type() helpers to check and
      retrieve the device type.
      
      Cc: Frank Rowand <frowand.list@gmail.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      0413beda
    • Mukesh Ojha's avatar
      cpu/hotplug: Remove skip_onerr field from cpuhp_step structure · 6fb86d97
      Mukesh Ojha authored
      When notifiers were there, `skip_onerr` was used to avoid calling
      particular step startup/teardown callbacks in the CPU up/down rollback
      path, which made the hotplug asymmetric.
      
      As notifiers are gone now after the full state machine conversion, the
      `skip_onerr` field is no longer required.
      
      Remove it from the structure and its usage.
      Signed-off-by: default avatarMukesh Ojha <mojha@codeaurora.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: https://lkml.kernel.org/r/1535439294-31426-1-git-send-email-mojha@codeaurora.org
      6fb86d97
    • James Morse's avatar
      arm64: mm: always enable CONFIG_HOLES_IN_ZONE · f52bb98f
      James Morse authored
      Commit 6d526ee2 ("arm64: mm: enable CONFIG_HOLES_IN_ZONE for NUMA")
      only enabled HOLES_IN_ZONE for NUMA systems because the NUMA code was
      choking on the missing zone for nomap pages. This problem doesn't just
      apply to NUMA systems.
      
      If the architecture doesn't set HAVE_ARCH_PFN_VALID, pfn_valid() will
      return true if the pfn is part of a valid sparsemem section.
      
      When working with multiple pages, the mm code uses pfn_valid_within()
      to test each page it uses within the sparsemem section is valid. On
      most systems memory comes in MAX_ORDER_NR_PAGES chunks which all
      have valid/initialised struct pages. In this case pfn_valid_within()
      is optimised out.
      
      Systems where this isn't true (e.g. due to nomap) should set
      HOLES_IN_ZONE and provide HAVE_ARCH_PFN_VALID so that mm tests each
      page as it works with it.
      
      Currently non-NUMA arm64 systems can't enable HOLES_IN_ZONE, leading to
      a VM_BUG_ON():
      
      | page:fffffdff802e1780 is uninitialized and poisoned
      | raw: ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff
      | raw: ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff
      | page dumped because: VM_BUG_ON_PAGE(PagePoisoned(p))
      | ------------[ cut here ]------------
      | kernel BUG at include/linux/mm.h:978!
      | Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
      [...]
      | CPU: 1 PID: 25236 Comm: dd Not tainted 4.18.0 #7
      | Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
      | pstate: 40000085 (nZcv daIf -PAN -UAO)
      | pc : move_freepages_block+0x144/0x248
      | lr : move_freepages_block+0x144/0x248
      | sp : fffffe0071177680
      [...]
      | Process dd (pid: 25236, stack limit = 0x0000000094cc07fb)
      | Call trace:
      |  move_freepages_block+0x144/0x248
      |  steal_suitable_fallback+0x100/0x16c
      |  get_page_from_freelist+0x440/0xb20
      |  __alloc_pages_nodemask+0xe8/0x838
      |  new_slab+0xd4/0x418
      |  ___slab_alloc.constprop.27+0x380/0x4a8
      |  __slab_alloc.isra.21.constprop.26+0x24/0x34
      |  kmem_cache_alloc+0xa8/0x180
      |  alloc_buffer_head+0x1c/0x90
      |  alloc_page_buffers+0x68/0xb0
      |  create_empty_buffers+0x20/0x1ec
      |  create_page_buffers+0xb0/0xf0
      |  __block_write_begin_int+0xc4/0x564
      |  __block_write_begin+0x10/0x18
      |  block_write_begin+0x48/0xd0
      |  blkdev_write_begin+0x28/0x30
      |  generic_perform_write+0x98/0x16c
      |  __generic_file_write_iter+0x138/0x168
      |  blkdev_write_iter+0x80/0xf0
      |  __vfs_write+0xe4/0x10c
      |  vfs_write+0xb4/0x168
      |  ksys_write+0x44/0x88
      |  sys_write+0xc/0x14
      |  el0_svc_naked+0x30/0x34
      | Code: aa1303e0 90001a01 91296421 94008902 (d4210000)
      | ---[ end trace 1601ba47f6e883fe ]---
      
      Remove the NUMA dependency.
      
      Link: https://www.spinics.net/lists/arm-kernel/msg671851.html
      Cc: <stable@vger.kernel.org>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Reported-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Reviewed-by: default avatarPavel Tatashin <pavel.tatashin@microsoft.com>
      Tested-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      f52bb98f
    • Finn Thain's avatar
      m68k/mac: Use correct PMU response format · 0986b16a
      Finn Thain authored
      Now that the 68k Mac port has adopted the via-pmu driver, it must decode
      the PMU response accordingly otherwise the date and time will be wrong.
      
      Fixes: ebd72227 ("macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver")
      Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      0986b16a
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2018-08-31' of git://anongit.freedesktop.org/drm/drm · 4658aff6
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regular fixes pull:
      
         - Mediatek has a bunch of fixes to their RDMA and Overlay engines.
      
         - i915 has some Cannonlake/Geminilake watermark workarounds, LSPCON
           fix, HDCP free fix, audio fix and a ppgtt reference counting fix.
      
         - amdgpu has some SRIOV, Kasan, memory leaks and other misc fixes"
      
      * tag 'drm-fixes-2018-08-31' of git://anongit.freedesktop.org/drm/drm: (35 commits)
        drm/i915/audio: Hook up component bindings even if displays are disabled
        drm/i915: Increase LSPCON timeout
        drm/i915: Stop holding a ref to the ppgtt from each vma
        drm/i915: Free write_buf that we allocated with kzalloc.
        drm/i915: Fix glk/cnl display w/a #1175
        drm/amdgpu: Need to set moved to true when evict bo
        drm/amdgpu: Remove duplicated power source update
        drm/amd/display: Fix memory leak caused by missed dc_sink_release
        drm/amdgpu: fix holding mn_lock while allocating memory
        drm/amdgpu: Power on uvd block when hw_fini
        drm/amdgpu: Update power state at the end of smu hw_init.
        drm/amdgpu: Fix vce initialize failed on Kaveri/Mullins
        drm/amdgpu: Enable/disable gfx PG feature in rlc safe mode
        drm/amdgpu: Adjust the VM size based on system memory size v2
        drm/mediatek: fix connection from RDMA2 to DSI1
        drm/mediatek: update some variable name from ovl to comp
        drm/mediatek: use layer_nr function to get layer number to init plane
        drm/mediatek: add function to return RDMA layer number
        drm/mediatek: add function to return OVL layer number
        drm/mediatek: add function to get layer number for component
        ...
      4658aff6