26 Aug, 2018

2 commits

  • Pull ARM SoC late updates from Olof Johansson:
    "A couple of late-merged changes that would be useful to get in this
    merge window:

    - Driver support for reset of audio complex on Meson platforms. The
    audio driver went in this merge window, and these changes have been
    in -next for a while (just not in our tree).

    - Power management fixes for IOMMU on Rockchip platforms, getting
    closer to kexec working on them, including Chromebooks.

    - Another pass updating "arm,psci" -> "psci" for some properties that
    have snuck in since last time it was done"

    * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    iommu/rockchip: Move irq request past pm_runtime_enable
    iommu/rockchip: Handle errors returned from PM framework
    arm64: rockchip: Force CONFIG_PM on Rockchip systems
    ARM: rockchip: Force CONFIG_PM on Rockchip systems
    arm64: dts: Fix various entry-method properties to reflect documentation
    reset: imx7: Fix always writing bits as 0
    reset: meson: add meson audio arb driver
    reset: meson: add dt-bindings for meson-axg audio arb

    Linus Torvalds
     
  • Pull more Kbuild updates from Masahiro Yamada:

    - add build_{menu,n,g,x}config targets for compile-testing Kconfig

    - fix and improve recursive dependency detection in Kconfig

    - fix parallel building of menuconfig/nconfig

    - fix syntax error in clang-version.sh

    - suppress distracting log from syncconfig

    - remove obsolete "rpm" target

    - remove VMLINUX_SYMBOL(_STR) macro entirely

    - fix microblaze build with CONFIG_DYNAMIC_FTRACE

    - move compiler test for dead code/data elimination to Kconfig

    - rename well-known LDFLAGS variable to KBUILD_LDFLAGS

    - misc fixes and cleanups

    * tag 'kbuild-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: rename LDFLAGS to KBUILD_LDFLAGS
    kbuild: pass LDFLAGS to recordmcount.pl
    kbuild: test dead code/data elimination support in Kconfig
    initramfs: move gen_initramfs_list.sh from scripts/ to usr/
    vmlinux.lds.h: remove stale include
    export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR()
    Coccinelle: remove pci_alloc_consistent semantic to detect in zalloc-simple.cocci
    kbuild: make sorting initramfs contents independent of locale
    kbuild: remove "rpm" target, which is alias of "rpm-pkg"
    kbuild: Fix LOADLIBES rename in Documentation/kbuild/makefiles.txt
    kconfig: suppress "configuration written to .config" for syncconfig
    kconfig: fix "Can't open ..." in parallel build
    kbuild: Add a space after `!` to prevent parsing as file pattern
    scripts: modpost: check memory allocation results
    kconfig: improve the recursive dependency report
    kconfig: report recursive dependency involving 'imply'
    kconfig: error out when seeing recursive dependency
    kconfig: add build-only configurator targets
    scripts/dtc: consolidate include path options in Makefile

    Linus Torvalds
     

25 Aug, 2018

4 commits

  • Pull IOMMU updates from Joerg Roedel:

    - PASID table handling updates for the Intel VT-d driver. It implements
    a global PASID space now so that applications usings multiple devices
    will just have one PASID.

    - A new config option to make iommu passthroug mode the default.

    - New sysfs attribute for iommu groups to export the type of the
    default domain.

    - A debugfs interface (for debug only) usable by IOMMU drivers to
    export internals to user-space.

    - R-Car Gen3 SoCs support for the ipmmu-vmsa driver

    - The ARM-SMMU now aborts transactions from unknown devices and devices
    not attached to any domain.

    - Various cleanups and smaller fixes all over the place.

    * tag 'iommu-updates-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (42 commits)
    iommu/omap: Fix cache flushes on L2 table entries
    iommu: Remove the ->map_sg indirection
    iommu/arm-smmu-v3: Abort all transactions if SMMU is enabled in kdump kernel
    iommu/arm-smmu-v3: Prevent any devices access to memory without registration
    iommu/ipmmu-vmsa: Don't register as BUS IOMMU if machine doesn't have IPMMU-VMSA
    iommu/ipmmu-vmsa: Clarify supported platforms
    iommu/ipmmu-vmsa: Fix allocation in atomic context
    iommu: Add config option to set passthrough as default
    iommu: Add sysfs attribyte for domain type
    iommu/arm-smmu-v3: sync the OVACKFLG to PRIQ consumer register
    iommu/arm-smmu: Error out only if not enough context interrupts
    iommu/io-pgtable-arm-v7s: Abort allocation when table address overflows the PTE
    iommu/io-pgtable-arm: Fix pgtable allocation in selftest
    iommu/vt-d: Remove the obsolete per iommu pasid tables
    iommu/vt-d: Apply per pci device pasid table in SVA
    iommu/vt-d: Allocate and free pasid table
    iommu/vt-d: Per PCI device pasid table interfaces
    iommu/vt-d: Add for_each_device_domain() helper
    iommu/vt-d: Move device_domain_info to header
    iommu/vt-d: Apply global PASID in SVA
    ...

    Linus Torvalds
     
  • Pull powerpc fixes from Michael Ellerman:

    - An implementation for the newly added hv_ops->flush() for the OPAL
    hvc console driver backends, I forgot to apply this after merging the
    hvc driver changes before the merge window.

    - Enable all PCI bridges at boot on powernv, to avoid races when
    multiple children of a bridge try to enable it simultaneously. This
    is a workaround until the PCI core can be enhanced to fix the races.

    - A fix to query PowerVM for the correct system topology at boot before
    initialising sched domains, seen in some configurations to cause
    broken scheduling etc.

    - A fix for pte_access_permitted() on "nohash" platforms.

    - Two commits to fix SIGBUS when using remap_pfn_range() seen on Power9
    due to a workaround when using the nest MMU (GPUs, accelerators).

    - Another fix to the VFIO code used by KVM, the previous fix had some
    bugs which caused guests to not start in some configurations.

    - A handful of other minor fixes.

    Thanks to: Aneesh Kumar K.V, Benjamin Herrenschmidt, Christophe Leroy,
    Hari Bathini, Luke Dashjr, Mahesh Salgaonkar, Nicholas Piggin, Paul
    Mackerras, Srikar Dronamraju.

    * tag 'powerpc-4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    powerpc/mce: Fix SLB rebolting during MCE recovery path.
    KVM: PPC: Book3S: Fix guest DMA when guest partially backed by THP pages
    powerpc/mm/radix: Only need the Nest MMU workaround for R -> RW transition
    powerpc/mm/books3s: Add new pte bit to mark pte temporarily invalid.
    powerpc/nohash: fix pte_access_permitted()
    powerpc/topology: Get topology for shared processors at boot
    powerpc64/ftrace: Include ftrace.h needed for enable/disable calls
    powerpc/powernv/pci: Work around races in PCI bridge enabling
    powerpc/fadump: cleanup crash memory ranges support
    powerpc/powernv: provide a console flush operation for opal hvc driver
    powerpc/traps: Avoid rate limit messages from show unhandled signals
    powerpc/64s: Fix PACA_IRQ_HARD_DIS accounting in idle_power4()

    Linus Torvalds
     
  • Pull s390 updates from Martin Schwidefsky:

    - A couple of patches for the zcrypt driver:
    + Add two masks to determine which AP cards and queues are host
    devices, this will be useful for KVM AP device passthrough
    + Add-on patch to improve the parsing of the new apmask and aqmask
    + Some code beautification

    - Second try to reenable the GCC plugins, the first patch set had a
    patch to do this but the merge somehow missed this

    - Remove the s390 specific GCC version check and use the generic one

    - Three patches for kdump, two bug fixes and one cleanup

    - Three patches for the PCI layer, one bug fix and two cleanups

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390: remove gcc version check (4.3 or newer)
    s390/zcrypt: hex string mask improvements for apmask and aqmask.
    s390/zcrypt: AP bus support for alternate driver(s)
    s390/zcrypt: code beautify
    s390/zcrypt: switch return type to bool for ap_instructions_available()
    s390/kdump: Remove kzalloc_panic
    s390/kdump: Fix memleak in nt_vmcoreinfo
    s390/kdump: Make elfcorehdr size calculation ABI compliant
    s390/pci: remove fmb address from debug output
    s390/pci: remove stale rc
    s390/pci: fix out of bounds access during irq setup
    s390/zcrypt: fix ap_instructions_available() returncodes
    s390: reenable gcc plugins for real

    Linus Torvalds
     
  • Pull namespace fixes from Eric Biederman:
    "This is a set of four fairly obvious bug fixes:

    - a switch from d_find_alias to d_find_any_alias because the xattr
    code perversely takes a dentry

    - two mutex vs copy_to_user fixes from Jann Horn

    - a fix to use a sanitized size not the size userspace passed in from
    Christian Brauner"

    * 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
    getxattr: use correct xattr length
    sys: don't hold uts_sem while accessing userspace memory
    userns: move user access out of the mutex
    cap_inode_getsecurity: use d_find_any_alias() instead of d_find_alias()

    Linus Torvalds
     

24 Aug, 2018

19 commits

  • A number of the Rockchip-specific drivers (IOMMU, display controllers)
    are now assuming that CONFIG_PM is set, and may completely misbehave
    if that's not the case.

    Since there is hardly any reason for this configuration option not
    to be selected anyway, let's require it (in the same way Tegra already
    does).

    Signed-off-by: Marc Zyngier
    Signed-off-by: Olof Johansson

    Marc Zyngier
     
  • A number of the Rockchip-specific drivers (IOMMU, display controllers)
    are now assuming that CONFIG_PM is set, and may completely misbehave
    if that's not the case.

    Since there is hardly any reason for this configuration option not
    to be selected anyway, let's require it (in the same way Tegra already
    does).

    Signed-off-by: Marc Zyngier
    Signed-off-by: Olof Johansson

    Marc Zyngier
     
  • The idle-states binding documentation[1] mentions that the
    'entry-method' property is required on 64-bit platforms and must be
    set to "psci".

    commit a13f18f59d26 ("Documentation: arm: Fix typo in the idle-states
    bindings examples") attempted to fix this earlier but clearly more is
    needed.

    Fix the cpu-capacity.txt documentation that uses the incorrect value so
    we don't get copy-paste errors like these. Clarify the language in
    idle-states.txt by removing the reference to the psci bindings that
    might be causing this confusion.

    Finally, fix devicetrees of various boards to reflect current
    documentation.

    [1] Documentation/devicetree/bindings/arm/idle-states.txt (see
    idle-states node)

    Signed-off-by: Amit Kucheria
    Acked-by: Sudeep Holla
    Acked-by: Li Yang
    Signed-off-by: Olof Johansson

    Amit Kucheria
     
  • Merge yet more updates from Andrew Morton:

    - the rest of MM

    - various misc fixes and tweaks

    * emailed patches from Andrew Morton : (22 commits)
    mm: Change return type int to vm_fault_t for fault handlers
    lib/fonts: convert comments to utf-8
    s390: ebcdic: convert comments to UTF-8
    treewide: convert ISO_8859-1 text comments to utf-8
    drivers/gpu/drm/gma500/: change return type to vm_fault_t
    docs/core-api: mm-api: add section about GFP flags
    docs/mm: make GFP flags descriptions usable as kernel-doc
    docs/core-api: split memory management API to a separate file
    docs/core-api: move *{str,mem}dup* to "String Manipulation"
    docs/core-api: kill trailing whitespace in kernel-api.rst
    mm/util: add kernel-doc for kvfree
    mm/util: make strndup_user description a kernel-doc comment
    fs/proc/vmcore.c: hide vmcoredd_mmap_dumps() for nommu builds
    treewide: correct "differenciate" and "instanciate" typos
    fs/afs: use new return type vm_fault_t
    drivers/hwtracing/intel_th/msu.c: change return type to vm_fault_t
    mm: soft-offline: close the race against page allocation
    mm: fix race on soft-offlining free huge pages
    namei: allow restricted O_CREAT of FIFOs and regular files
    hfs: prevent crash on exit from failed search
    ...

    Linus Torvalds
     
  • The ebcdic.c file contains tables for converting between ebcdic and PC
    codepage 437. I could however not identify which encoding was used for
    the comments. This seems to be some variation of ISO_8859-1 with
    non-UTF-8 escape characters.

    I have converted this to UTF-8 by manually removing the escape
    characters and then running it through recode, to get the same encoding
    that we use for the rest of the kernel.

    Link: http://lkml.kernel.org/r/20180724111600.4158975-2-arnd@arndb.de
    Signed-off-by: Arnd Bergmann
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Almost all files in the kernel are either plain text or UTF-8 encoded. A
    couple however are ISO_8859-1, usually just a few characters in a C
    comments, for historic reasons.

    This converts them all to UTF-8 for consistency.

    Link: http://lkml.kernel.org/r/20180724111600.4158975-1-arnd@arndb.de
    Signed-off-by: Arnd Bergmann
    Acked-by: Simon Horman [IPVS portion]
    Acked-by: Jonathan Cameron [IIO]
    Acked-by: Michael Ellerman [powerpc]
    Acked-by: Rob Herring
    Cc: Joe Perches
    Cc: Arnd Bergmann
    Cc: Samuel Ortiz
    Cc: "David S. Miller"
    Cc: Rob Herring
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Also add these typos to spelling.txt so checkpatch.pl will look for them.

    Link: http://lkml.kernel.org/r/88af06b9de34d870cb0afc46cfd24e0458be2575.1529471371.git.fthain@telegraphics.com.au
    Signed-off-by: Finn Thain
    Cc: Masahiro Yamada
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Finn Thain
     
  • As of commit fd1102f0aade ("mm: mmu_notifier fix for tlb_end_vma"),
    asm-generic/tlb.h now calls tlb_flush() from a static inline function,
    so we need to make sure that it's declared before #including the
    asm-generic header in the arch header.

    Signed-off-by: Will Deacon
    Acked-by: Nicholas Piggin
    Signed-off-by: Linus Torvalds

    Will Deacon
     
  • Commit a0f97e06a43c ("kbuild: enable 'make CFLAGS=...' to add
    additional options to CC") renamed CFLAGS to KBUILD_CFLAGS.

    Commit 222d394d30e7 ("kbuild: enable 'make AFLAGS=...' to add
    additional options to AS") renamed AFLAGS to KBUILD_AFLAGS.

    Commit 06c5040cdb13 ("kbuild: enable 'make CPPFLAGS=...' to add
    additional options to CPP") renamed CPPFLAGS to KBUILD_CPPFLAGS.

    For some reason, LDFLAGS was not renamed.

    Using a well-known variable like LDFLAGS may result in accidental
    override of the variable.

    Kbuild generally uses KBUILD_ prefixed variables for the internally
    appended options, so here is one more conversion to sanitize the
    naming convention.

    I did not touch Makefiles under tools/ since the tools build system
    is a different world.

    Signed-off-by: Masahiro Yamada
    Acked-by: Kirill A. Shutemov
    Reviewed-by: Palmer Dabbelt

    Masahiro Yamada
     
  • Merge fixes for missing TLB shootdowns.

    This fixes a couple of cases that involved us possibly freeing page
    table structures before the required TLB shootdown had been done.

    There are a few cleanup patches to make the code easier to follow, and
    to avoid some of the more problematic cases entirely when not necessary.

    To make this easier for backports, it undoes the recent lazy TLB
    patches, because the cleanups and fixes are more important, and Rik is
    ok with re-doing them later when things have calmed down.

    The missing TLB flush was only delayed, and the wrong ordering only
    happened under memory pressure (and in theory under a couple of other
    fairly theoretical situations), so this may have been all very unlikely
    to have hit people in practice.

    But getting the TLB shootdown wrong is _so_ hard to debug and see that I
    consider this a crticial fix.

    Many thanks to Jann Horn for having debugged this.

    * tlb-fixes:
    x86/mm: Only use tlb_remove_table() for paravirt
    mm: mmu_notifier fix for tlb_end_vma
    mm/tlb, x86/mm: Support invalidating TLB caches for RCU_TABLE_FREE
    mm/tlb: Remove tlb_remove_table() non-concurrent condition
    mm: move tlb_table_flush to tlb_flush_mmu_free
    x86/mm/tlb: Revert the recent lazy TLB patches

    Linus Torvalds
     
  • Pull xen fixes and cleanups from Juergen Gross:
    "Some cleanups, some minor fixes and a fix for a bug introduced in this
    merge window hitting 32-bit PV guests"

    * tag 'for-linus-4.19b-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    x86/xen: enable early use of set_fixmap in 32-bit Xen PV guest
    xen: remove unused hypercall functions
    x86/xen: remove unused function xen_auto_xlated_memory_setup()
    xen/ACPI: don't upload Px/Cx data for disabled processors
    x86/Xen: further refine add_preferred_console() invocations
    xen/mcelog: eliminate redundant setting of interface version
    x86/Xen: mark xen_setup_gdt() __init

    Linus Torvalds
     
  • Pull MIPS fixes from Paul Burton:

    - Fix microMIPS build failures by adding a .insn directive to the
    barrier_before_unreachable() asm statement in order to convince the
    toolchain that the asm statement is a valid branch target rather
    than a bogus attempt to switch ISA.

    - Clean up our declarations of TLB functions that we overwrite with
    generated code in order to prevent the compiler making assumptions
    about alignment that cause microMIPS kernels built with GCC 7 &
    above to die early during boot.

    - Fix up a regression for MIPS32 kernels which slipped into the main
    MIPS pull for 4.19, causing CONFIG_32BIT=y kernels to contain
    inappropriate MIPS64 instructions.

    - Extend our existing workaround for MIPSr6 builds that end up using
    the __multi3 intrinsic to GCC 7 & below, rather than just GCC 7.

    * tag 'mips_4.19_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
    MIPS: lib: Provide MIPS64r6 __multi3() for GCC < 7
    MIPS: Workaround GCC __builtin_unreachable reordering bug
    compiler.h: Allow arch-specific asm/compiler.h
    MIPS: Avoid move psuedo-instruction whilst using MIPS_ISA_LEVEL
    MIPS: Consistently declare TLB functions
    MIPS: Export tlbmiss_handler_setup_pgd near its definition

    Linus Torvalds
     
  • Pull OpenRISC update from Stafford Horne:
    "Just one change for 4.19: refactoring from Christoph Hellwig to use
    generic DMA facilities"

    * tag 'for-linus' of git://github.com/openrisc/linux:
    openrisc: use generic dma_noncoherent_ops
    openrisc: fix cache maintainance the the sync_single_for_device DMA operation
    openrisc: remove the no-op unmap_page and unmap_sg DMA operations
    openrisc: remove the sync_single_for_cpu DMA operation

    Linus Torvalds
     
  • Pull ARM device-tree updates from Olof Johansson:
    "Business as usual -- the bulk of our changes are to devicetree files
    with new hardware support, new SoCs and platforms, and new board
    types.

    New SoCs/platforms:
    - Raspberry Pi Compute Module (CM1) and IO board
    - i.MX6SSL from NXP
    - Renesas RZ/N1D SoC (R9A06G032), Dual Cortex-A7 with Ethernet, CAN
    and PLC interfaces
    - TI AM654 SoC, Quad Cortex-A53, safety subsystem with Cortex-R5
    controllers, communication and PRU subsystem and lots of other
    interfaces (PCIe, USB3, etc).

    New boards and systems:
    - Several Atmel at91-based boards from Laird
    - Marvell Armada388-based Helios4 board from SolidRun
    - Samsung Aires-based phones (s5pv210)
    - Allwinner A64-based Pinebook laptop

    In addition to the above, there's the usual amount of new devices
    described on existing platforms, fixes and tweaks and new minor
    variants of boards/platforms"

    * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (478 commits)
    arm64: dts: sdm845: Add tsens nodes
    arm64: dts: msm8996: thermal: Initialise via DT and add second controller
    arm64: dts: sprd: Add one suspend timer
    arm64: dts: sprd: Add SC27XX ADC device
    arm64: dts: sprd: Add SC27XX eFuse device
    arm64: dts: sprd: Add SC27XX vibrator device
    arm64: dts: sprd: Add SC27XX breathing light controller device
    arm64: dts: meson-axg: add spdif-dit codec
    arm64: dts: meson-axg: add lineout codec
    arm64: dts: meson-axg: add linein codec
    arm64: dts: meson-axg: add tdm interfaces
    arm64: dts: meson-axg: add tdmout formatters
    arm64: dts: meson-axg: add tdmin formatters
    arm64: dts: meson-axg: add spdifout
    arm64: dts: rockchip: add led support for Firefly-RK3399
    arm64: dts: rockchip: remove deprecated Type-C PHY properties on rk3399
    arm64: dts: rockchip: add power button support for Firefly-RK3399
    ARM: dts: aspeed: Add coprocessor interrupt controller
    arm64: dts: meson-axg: add audio arb reset controller
    arm64: dts: meson-axg: add usb power regulator
    ...

    Linus Torvalds
     
  • Pull ARM SoC defconfig updates from Olof Johansson:
    "We keep these separate since some files are shared and conflict-prone,
    but there isn't really much to write about here.

    Some of the churnier pieces is for the Aspeed platforms, which did an
    overdue refresh of the defconfig, and enabled USB gadget and some
    drivers from there. Most of the rest are minor additions here and
    there to turn on drivers that are needed or useful on the various
    platforms"

    * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (39 commits)
    ARM: multi_v7_defconfig: add CONFIG_UNIPHIER_THERMAL and CONFIG_SNI_AVE
    ARM: config: aspeed: Enable new FSI drivers
    ARM: config: multi_v5: Enable ASPEED drivers
    ARM: config: multi_v5: Refresh configuration
    ARM: config: aspeed: Update defconfig
    ARM: multi_v7_defconfig: Enable support for RZN1D-DB
    ARM: shmobile: defconfig: Disable /sbin/hotplug fork-bomb
    ARM: shmobile: defconfig: Enable support for RZN1D-DB
    ARM: shmobile: defconfig: Enable reset controller support
    ARM: shmobile: defconfig: Drop NET_VENDOR_=n
    arm64: defconfig: Enable more peripherals for Samsung Chromebook Plus.
    arm64: defconfig: Enable CONFIG_MTD_NAND_QCOM for IPQ8074
    ARM: qcom_defconfig: Enable QCOM NAND related configs
    ARM: imx_v6_v7_defconfig: add DMATEST support
    ARM: mvebu_v7_defconfig: enable SFP support
    ARM: mvebu_v7_defconfig: sync defconfig
    ARM: multi_v7_defconfig: Add Marvell NAND controller support
    arm: configs: Add USB gadget to Aspeed G5 defconfig
    arm: configs: Add USB gadget to Aspeed G4 defconfig
    arm64: defconfig: enable HiSilicon PMU driver
    ...

    Linus Torvalds
     
  • Pull ARM 32-bit SoC platform updates from Olof Johansson:
    "Most of the SoC updates in this cycle are cleanups and moves to more
    modern infrastructure:

    - Davinci was moved to common clock framework

    - OMAP1-based Amstrad E3 "Superphone" saw a bunch of cleanups to the
    keyboard interface (bitbanged AT keyboard via GPIO).

    - Removal of some stale code for Renesas platforms

    - Power management improvements for i.MX6LL"

    * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (112 commits)
    ARM: uniphier: select RESET_CONTROLLER
    arm64: uniphier: select RESET_CONTROLLER
    ARM: uniphier: remove empty Makefile
    ARM: exynos: Clear global variable on init error path
    ARM: exynos: Remove outdated maintainer information
    ARM: shmobile: Always enable ARCH_TIMER on SoCs with A7 and/or A15
    ARM: shmobile: r8a7779: hide unused r8a7779_platform_cpu_kill
    soc: r9a06g032: don't build SMP files for non-SMP config
    ARM: shmobile: Add the R9A06G032 SMP enabler driver
    ARM: at91: pm: configure wakeup sources for ULP1 mode
    ARM: at91: pm: add PMC fast startup registers defines
    ARM: at91: pm: Add ULP1 mode support
    ARM: at91: pm: Use ULP0 naming instead of slow clock
    ARM: hisi: handle of_iomap and fix missing of_node_put
    ARM: hisi: check of_iomap and fix missing of_node_put
    ARM: hisi: fix error handling and missing of_node_put
    ARM: mx5: Set the DBGEN bit in ARM_GPC register
    ARM: imx51: Configure M4IF to avoid visual artifacts
    ARM: imx: call imx6sx_cpuidle_init() conditionally for 6sll
    ARM: imx: fix i.MX6SLL build
    ...

    Linus Torvalds
     
  • …l/git/palmer/riscv-linux

    Pull RISC-V fixes from Palmer Dabbelt:
    "This contains a pair of fixes to the RISC-V port:

    - The removal of our compat.h, which didn't do anything.

    - Fixes to sys_riscv_flush_icache to ensure it actually shows up.

    We're going to just call this a bug in the ABI, as it was always
    supposed to be there.

    I've given these a simple build+boot test, both individually and as
    the actual tag"

    * tag 'riscv-for-linus-4.19-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
    riscv: Delete asm/compat.h
    RISC-V: Don't use a global include guard for uapi/asm/syscalls.h
    RISC-V: Define sys_riscv_flush_icache when SMP=n

    Linus Torvalds
     
  • If we don't use paravirt; don't play unnecessary and complicated games
    to free page-tables.

    Suggested-by: Linus Torvalds
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Rik van Riel
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Jann reported that x86 was missing required TLB invalidates when he
    hit the !*batch slow path in tlb_remove_table().

    This is indeed the case; RCU_TABLE_FREE does not provide TLB (cache)
    invalidates, the PowerPC-hash where this code originated and the
    Sparc-hash where this was subsequently used did not need that. ARM
    which later used this put an explicit TLB invalidate in their
    __p*_free_tlb() functions, and PowerPC-radix followed that example.

    But when we hooked up x86 we failed to consider this. Fix this by
    (optionally) hooking tlb_remove_table() into the TLB invalidate code.

    NOTE: s390 was also needing something like this and might now
    be able to use the generic code again.

    [ Modified to be on top of Nick's cleanups, which simplified this patch
    now that tlb_flush_mmu_tlbonly() really only flushes the TLB - Linus ]

    Fixes: 9e52fc2b50de ("x86/mm: Enable RCU based page table freeing (CONFIG_HAVE_RCU_TABLE_FREE=y)")
    Reported-by: Jann Horn
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Rik van Riel
    Cc: Nicholas Piggin
    Cc: David Miller
    Cc: Will Deacon
    Cc: Martin Schwidefsky
    Cc: Michael Ellerman
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

23 Aug, 2018

15 commits

  • The commit e7e81847478 ("powerpc/64s: move machine check SLB flushing
    to mm/slb.c") introduced a bug in reloading bolted SLB entries. Unused
    bolted entries are stored with .esid=0 in the slb_shadow area, and
    that value is now used directly as the RB input to slbmte, which means
    the RB[52:63] index field is set to 0, which causes SLB entry 0 to be
    cleared.

    Fix this by storing the index bits in the unused bolted entries, which
    directs the slbmte to the right place.

    The SLB shadow area is also used by the hypervisor, but PAPR is okay
    with that, from LoPAPR v1.1, 14.11.1.3 SLB Shadow Buffer:

    Note: SLB is filled sequentially starting at index 0
    from the shadow buffer ignoring the contents of
    RB field bits 52-63

    Fixes: e7e81847478b ("powerpc/64s: move machine check SLB flushing to mm/slb.c")
    Signed-off-by: Mahesh Salgaonkar
    Signed-off-by: Nicholas Piggin
    Reviewed-by: Nicholas Piggin
    Signed-off-by: Michael Ellerman

    Mahesh Salgaonkar
     
  • Commit 76fa4975f3ed ("KVM: PPC: Check if IOMMU page is contained in
    the pinned physical page", 2018-07-17) added some checks to ensure
    that guest DMA mappings don't attempt to map more than the guest is
    entitled to access. However, errors in the logic mean that legitimate
    guest requests to map pages for DMA are being denied in some
    situations. Specifically, if the first page of the range passed to
    mm_iommu_get() is mapped with a normal page, and subsequent pages are
    mapped with transparent huge pages, we end up with mem->pageshift ==
    0. That means that the page size checks in mm_iommu_ua_to_hpa() and
    mm_iommu_up_to_hpa_rm() will always fail for every page in that
    region, and thus the guest can never map any memory in that region for
    DMA, typically leading to a flood of error messages like this:

    qemu-system-ppc64: VFIO_MAP_DMA: -22
    qemu-system-ppc64: vfio_dma_map(0x10005f47780, 0x800000000000000, 0x10000, 0x7fff63ff0000) = -22 (Invalid argument)

    The logic errors in mm_iommu_get() are:

    (a) use of 'ua' not 'ua + (i << PAGE_SHIFT)' in the find_linux_pte()
    call (meaning that find_linux_pte() returns the pte for the
    first address in the range, not the address we are currently up
    to);
    (b) use of 'pageshift' as the variable to receive the hugepage shift
    returned by find_linux_pte() - for a normal page this gets set
    to 0, leading to us setting mem->pageshift to 0 when we conclude
    that the pte returned by find_linux_pte() didn't match the page
    we were looking at;
    (c) comparing 'compshift', which is a page order, i.e. log base 2 of
    the number of pages, with 'pageshift', which is a log base 2 of
    the number of bytes.

    To fix these problems, this patch introduces 'cur_ua' to hold the
    current user address and uses that in the find_linux_pte() call;
    introduces 'pteshift' to hold the hugepage shift found by
    find_linux_pte(); and compares 'pteshift' with 'compshift +
    PAGE_SHIFT' rather than 'compshift'.

    The patch also moves the local_irq_restore to the point after the PTE
    pointer returned by find_linux_pte() has been dereferenced because
    otherwise the PTE could change underneath us, and adds a check to
    avoid doing the find_linux_pte() call once mem->pageshift has been
    reduced to PAGE_SHIFT, as an optimization.

    Fixes: 76fa4975f3ed ("KVM: PPC: Check if IOMMU page is contained in the pinned physical page")
    Cc: stable@vger.kernel.org # v4.12+
    Signed-off-by: Paul Mackerras
    Signed-off-by: Michael Ellerman

    Paul Mackerras
     
  • The Nest MMU workaround is only needed for RW upgrades. Avoid doing
    that for other PTE updates.

    We also avoid clearing the PTE while marking it invalid. This is
    because other page table walkers will find this PTE none and can
    result in unexpected behaviour due to that. Instead we clear
    _PAGE_PRESENT and set the software PTE bit _PAGE_INVALID.
    pte_present() is already updated to check for both bits. This makes
    sure page table walkers will find the PTE present and things like
    pte_pfn(pte) returns the right value.

    Based on an original patch from Benjamin Herrenschmidt

    Signed-off-by: Aneesh Kumar K.V
    Reviewed-by: Nicholas Piggin
    Signed-off-by: Michael Ellerman

    Aneesh Kumar K.V
     
  • When splitting a huge pmd pte, we need to mark the pmd entry invalid. We
    can do that by clearing _PAGE_PRESENT bit. But then that will be taken as a
    swap pte. In order to differentiate between the two use a software pte bit
    when invalidating.

    For regular pte, due to bd5050e38aec ("powerpc/mm/radix: Change pte relax
    sequence to handle nest MMU hang") we need to mark the pte entry invalid when
    relaxing access permission. Instead of marking pte_none which can result in
    different page table walk routines possibly skipping this pte entry, invalidate
    it but still keep it marked present.

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Michael Ellerman

    Aneesh Kumar K.V
     
  • Commit 5769beaf180a8 ("powerpc/mm: Add proper pte access check helper
    for other platforms") replaced generic pte_access_permitted() by an
    arch specific one.

    The generic one is defined as
    (pte_present(pte) && (!(write) || pte_write(pte)))

    The arch specific one is open coded checking that _PAGE_USER and
    _PAGE_WRITE (_PAGE_RW) flags are set, but lacking to check that
    _PAGE_RO and _PAGE_PRIVILEGED are unset, leading to a useless test
    on targets like the 8xx which defines _PAGE_RW and _PAGE_USER as 0.

    Commit 5fa5b16be5b31 ("powerpc/mm/hugetlb: Use pte_access_permitted
    for hugetlb access check") replaced some tests performed with
    pte helpers by a call to pte_access_permitted(), leading to the same
    issue.

    This patch rewrites powerpc/nohash pte_access_permitted()
    using pte helpers.

    Fixes: 5769beaf180a8 ("powerpc/mm: Add proper pte access check helper for other platforms")
    Fixes: 5fa5b16be5b31 ("powerpc/mm/hugetlb: Use pte_access_permitted for hugetlb access check")
    Cc: stable@vger.kernel.org # v4.15+
    Signed-off-by: Christophe Leroy
    Reviewed-by: Aneesh Kumar K.V
    Signed-off-by: Michael Ellerman

    Christophe Leroy
     
  • Revert commits:

    95b0e6357d3e x86/mm/tlb: Always use lazy TLB mode
    64482aafe55f x86/mm/tlb: Only send page table free TLB flush to lazy TLB CPUs
    ac0315896970 x86/mm/tlb: Make lazy TLB mode lazier
    61d0beb5796a x86/mm/tlb: Restructure switch_mm_irqs_off()
    2ff6ddf19c0e x86/mm/tlb: Leave lazy TLB mode at page table free time

    In order to simplify the TLB invalidate fixes for x86 and unify the
    parts that need backporting. We'll try again later.

    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Rik van Riel
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
    recently exposed a brittle part of the build for supporting non-gcc
    compilers.

    Both Clang and ICC define __GNUC__, __GNUC_MINOR__, and
    __GNUC_PATCHLEVEL__ for quick compatibility with code bases that haven't
    added compiler specific checks for __clang__ or __INTEL_COMPILER.

    This is brittle, as they happened to get compatibility by posing as a
    certain version of GCC. This broke when upgrading the minimal version
    of GCC required to build the kernel, to a version above what ICC and
    Clang claim to be.

    Rather than always including compiler-gcc.h then undefining or
    redefining macros in compiler-intel.h or compiler-clang.h, let's
    separate out the compiler specific macro definitions into mutually
    exclusive headers, do more proper compiler detection, and keep shared
    definitions in compiler_types.h.

    Fixes: cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
    Reported-by: Masahiro Yamada
    Suggested-by: Eli Friedman
    Suggested-by: Joe Perches
    Signed-off-by: Nick Desaulniers
    Signed-off-by: Linus Torvalds

    Nick Desaulniers
     
  • This has been broken for an embarassingly long time (since v4.4).

    Just needs a couple of __init tags on functions to make the sections
    match up.

    Signed-off-by: Tony Luck
    Signed-off-by: Linus Torvalds

    Tony Luck
     
  • Pull more parisc updates from Helge Deller:

    - fix boot failure of 64-bit kernel. It got broken by the unwind
    optimization commit in merge window.

    - fix 64-bit userspace support (static 64-bit applications only, e.g.
    we don't yet have 64-bit userspace support in glibc).

    - consolidate unwind initialization code.

    - add machine model description to stack trace.

    * 'parisc-4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Add hardware description to stack traces
    parisc: Fix boot failure of 64-bit kernel
    parisc: Consolidate unwind initialization calls
    parisc: Update comments in syscall.S regarding wide userland
    parisc: Fix ptraced 64-bit applications to call 64-bit syscalls
    parisc: Restore possibility to execute 64-bit applications

    Linus Torvalds
     
  • Pull Xtensa updates from Max Filippov:

    - switch xtensa arch to the generic noncoherent direct mapping
    operations

    - add support for DMA_ATTR_NO_KERNEL_MAPPING attribute

    - clean up users of platform/hardware.h in generic Xtensa code

    - fix assembly cache maintenance code for long cache lines

    - rework noMMU cache attributes initialization

    - add big-endian HiFi2 test_kc705_be CPU variant

    * tag 'xtensa-20180820' of git://github.com/jcmvbkbc/linux-xtensa:
    xtensa: add test_kc705_be variant
    xtensa: clean up boot-elf/bootstrap.S
    xtensa: make bootparam parsing optional
    xtensa: drop variant IRQ support
    xtensa: drop unneeded platform/hardware.h headers
    xtensa: move PLATFORM_NR_IRQS to Kconfig
    xtensa: rework {CONFIG,PLATFORM}_DEFAULT_MEM_START
    xtensa: drop unused {CONFIG,PLATFORM}_DEFAULT_MEM_SIZE
    xtensa: rework noMMU cache attributes initialization
    xtensa: increase ranges in ___invalidate_{i,d}cache_all
    xtensa: limit offsets in __loop_cache_{all,page}
    xtensa: platform-specific handling of coherent memory
    xtensa: support DMA_ATTR_NO_KERNEL_MAPPING attribute
    xtensa: use generic dma_noncoherent_ops

    Linus Torvalds
     
  • Pull second set of KVM updates from Paolo Bonzini:
    "ARM:
    - Support for Group0 interrupts in guests
    - Cache management optimizations for ARMv8.4 systems
    - Userspace interface for RAS
    - Fault path optimization
    - Emulated physical timer fixes
    - Random cleanups

    x86:
    - fixes for L1TF
    - a new test case
    - non-support for SGX (inject the right exception in the guest)
    - fix lockdep false positive"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (49 commits)
    KVM: VMX: fixes for vmentry_l1d_flush module parameter
    kvm: selftest: add dirty logging test
    kvm: selftest: pass in extra memory when create vm
    kvm: selftest: include the tools headers
    kvm: selftest: unify the guest port macros
    tools: introduce test_and_clear_bit
    KVM: x86: SVM: Call x86_spec_ctrl_set_guest/host() with interrupts disabled
    KVM: vmx: Inject #UD for SGX ENCLS instruction in guest
    KVM: vmx: Add defines for SGX ENCLS exiting
    x86/kvm/vmx: Fix coding style in vmx_setup_l1d_flush()
    x86: kvm: avoid unused variable warning
    KVM: Documentation: rename the capability of KVM_CAP_ARM_SET_SERROR_ESR
    KVM: arm/arm64: Skip updating PTE entry if no change
    KVM: arm/arm64: Skip updating PMD entry if no change
    KVM: arm: Use true and false for boolean values
    KVM: arm/arm64: vgic: Do not use spin_lock_irqsave/restore with irq disabled
    KVM: arm/arm64: vgic: Move DEBUG_SPINLOCK_BUG_ON to vgic.h
    KVM: arm: vgic-v3: Add support for ICC_SGI0R and ICC_ASGI1R accesses
    KVM: arm64: vgic-v3: Add support for ICC_SGI0R_EL1 and ICC_ASGI1R_EL1 accesses
    KVM: arm/arm64: vgic-v3: Add core support for Group0 SGIs
    ...

    Linus Torvalds
     
  • Merge more updates from Andrew Morton:

    - the rest of MM

    - procfs updates

    - various misc things

    - more y2038 fixes

    - get_maintainer updates

    - lib/ updates

    - checkpatch updates

    - various epoll updates

    - autofs updates

    - hfsplus

    - some reiserfs work

    - fatfs updates

    - signal.c cleanups

    - ipc/ updates

    * emailed patches from Andrew Morton : (166 commits)
    ipc/util.c: update return value of ipc_getref from int to bool
    ipc/util.c: further variable name cleanups
    ipc: simplify ipc initialization
    ipc: get rid of ids->tables_initialized hack
    lib/rhashtable: guarantee initial hashtable allocation
    lib/rhashtable: simplify bucket_table_alloc()
    ipc: drop ipc_lock()
    ipc/util.c: correct comment in ipc_obtain_object_check
    ipc: rename ipcctl_pre_down_nolock()
    ipc/util.c: use ipc_rcu_putref() for failues in ipc_addid()
    ipc: reorganize initialization of kern_ipc_perm.seq
    ipc: compute kern_ipc_perm.id under the ipc lock
    init/Kconfig: remove EXPERT from CHECKPOINT_RESTORE
    fs/sysv/inode.c: use ktime_get_real_seconds() for superblock stamp
    adfs: use timespec64 for time conversion
    kernel/sysctl.c: fix typos in comments
    drivers/rapidio/devices/rio_mport_cdev.c: remove redundant pointer md
    fork: don't copy inconsistent signal handler state to child
    signal: make get_signal() return bool
    signal: make sigkill_pending() return bool
    ...

    Linus Torvalds
     
  • An ordinary arm64 defconfig build has ~64 KB worth of __ksymtab entries,
    each consisting of two 64-bit fields containing absolute references, to
    the symbol itself and to a char array containing its name, respectively.

    When we build the same configuration with KASLR enabled, we end up with an
    additional ~192 KB of relocations in the .init section, i.e., one 24 byte
    entry for each absolute reference, which all need to be processed at boot
    time.

    Given how the struct kernel_symbol that describes each entry is completely
    local to module.c (except for the references emitted by EXPORT_SYMBOL()
    itself), we can easily modify it to contain two 32-bit relative references
    instead. This reduces the size of the __ksymtab section by 50% for all
    64-bit architectures, and gets rid of the runtime relocations entirely for
    architectures implementing KASLR, either via standard PIE linking (arm64)
    or using custom host tools (x86).

    Note that the binary search involving __ksymtab contents relies on each
    section being sorted by symbol name. This is implemented based on the
    input section names, not the names in the ksymtab entries, so this patch
    does not interfere with that.

    Given that the use of place-relative relocations requires support both in
    the toolchain and in the module loader, we cannot enable this feature for
    all architectures. So make it dependent on whether
    CONFIG_HAVE_ARCH_PREL32_RELOCATIONS is defined.

    Link: http://lkml.kernel.org/r/20180704083651.24360-4-ard.biesheuvel@linaro.org
    Signed-off-by: Ard Biesheuvel
    Acked-by: Jessica Yu
    Acked-by: Michael Ellerman
    Reviewed-by: Will Deacon
    Acked-by: Ingo Molnar
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Bjorn Helgaas
    Cc: Catalin Marinas
    Cc: James Morris
    Cc: James Morris
    Cc: Josh Poimboeuf
    Cc: Kees Cook
    Cc: Nicolas Pitre
    Cc: Paul Mackerras
    Cc: Petr Mladek
    Cc: Russell King
    Cc: "Serge E. Hallyn"
    Cc: Sergey Senozhatsky
    Cc: Steven Rostedt
    Cc: Thomas Garnier
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ard Biesheuvel
     
  • To allow existing C code to be incorporated into the decompressor or the
    UEFI stub, introduce a CPP macro that turns all EXPORT_SYMBOL_xxx
    declarations into nops, and #define it in places where such exports are
    undesirable. Note that this gets rid of a rather dodgy redefine of
    linux/export.h's header guard.

    Link: http://lkml.kernel.org/r/20180704083651.24360-3-ard.biesheuvel@linaro.org
    Signed-off-by: Ard Biesheuvel
    Acked-by: Nicolas Pitre
    Acked-by: Michael Ellerman
    Reviewed-by: Will Deacon
    Acked-by: Ingo Molnar
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Bjorn Helgaas
    Cc: Catalin Marinas
    Cc: James Morris
    Cc: James Morris
    Cc: Jessica Yu
    Cc: Josh Poimboeuf
    Cc: Kees Cook
    Cc: Paul Mackerras
    Cc: Petr Mladek
    Cc: Russell King
    Cc: "Serge E. Hallyn"
    Cc: Sergey Senozhatsky
    Cc: Steven Rostedt
    Cc: Thomas Garnier
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ard Biesheuvel
     
  • Patch series "add support for relative references in special sections", v10.

    This adds support for emitting special sections such as initcall arrays,
    PCI fixups and tracepoints as relative references rather than absolute
    references. This reduces the size by 50% on 64-bit architectures, but
    more importantly, it removes the need for carrying relocation metadata for
    these sections in relocatable kernels (e.g., for KASLR) that needs to be
    fixed up at boot time. On arm64, this reduces the vmlinux footprint of
    such a reference by 8x (8 byte absolute reference + 24 byte RELA entry vs
    4 byte relative reference)

    Patch #3 was sent out before as a single patch. This series supersedes
    the previous submission. This version makes relative ksymtab entries
    dependent on the new Kconfig symbol HAVE_ARCH_PREL32_RELOCATIONS rather
    than trying to infer from kbuild test robot replies for which
    architectures it should be blacklisted.

    Patch #1 introduces the new Kconfig symbol HAVE_ARCH_PREL32_RELOCATIONS,
    and sets it for the main architectures that are expected to benefit the
    most from this feature, i.e., 64-bit architectures or ones that use
    runtime relocations.

    Patch #2 add support for #define'ing __DISABLE_EXPORTS to get rid of
    ksymtab/kcrctab sections in decompressor and EFI stub objects when
    rebuilding existing C files to run in a different context.

    Patches #4 - #6 implement relative references for initcalls, PCI fixups
    and tracepoints, respectively, all of which produce sections with order
    ~1000 entries on an arm64 defconfig kernel with tracing enabled. This
    means we save about 28 KB of vmlinux space for each of these patches.

    [From the v7 series blurb, which included the jump_label patches as well]:

    For the arm64 kernel, all patches combined reduce the memory footprint
    of vmlinux by about 1.3 MB (using a config copied from Ubuntu that has
    KASLR enabled), of which ~1 MB is the size reduction of the RELA section
    in .init, and the remaining 300 KB is reduction of .text/.data.

    This patch (of 6):

    Before updating certain subsystems to use place relative 32-bit
    relocations in special sections, to save space and reduce the number of
    absolute relocations that need to be processed at runtime by relocatable
    kernels, introduce the Kconfig symbol and define it for some architectures
    that should be able to support and benefit from it.

    Link: http://lkml.kernel.org/r/20180704083651.24360-2-ard.biesheuvel@linaro.org
    Signed-off-by: Ard Biesheuvel
    Acked-by: Michael Ellerman
    Reviewed-by: Will Deacon
    Acked-by: Ingo Molnar
    Cc: Arnd Bergmann
    Cc: Kees Cook
    Cc: Thomas Garnier
    Cc: Thomas Gleixner
    Cc: "Serge E. Hallyn"
    Cc: Bjorn Helgaas
    Cc: Benjamin Herrenschmidt
    Cc: Russell King
    Cc: Paul Mackerras
    Cc: Catalin Marinas
    Cc: Petr Mladek
    Cc: James Morris
    Cc: Nicolas Pitre
    Cc: Josh Poimboeuf
    Cc: Steven Rostedt
    Cc: Sergey Senozhatsky ,
    Cc: James Morris
    Cc: Jessica Yu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ard Biesheuvel