28 Mar, 2019

1 commit

  • Pull networking fixes from David Miller:
    "Fixes here and there, a couple new device IDs, as usual:

    1) Fix BQL race in dpaa2-eth driver, from Ioana Ciornei.

    2) Fix 64-bit division in iwlwifi, from Arnd Bergmann.

    3) Fix documentation for some eBPF helpers, from Quentin Monnet.

    4) Some UAPI bpf header sync with tools, also from Quentin Monnet.

    5) Set descriptor ownership bit at the right time for jumbo frames in
    stmmac driver, from Aaro Koskinen.

    6) Set IFF_UP properly in tun driver, from Eric Dumazet.

    7) Fix load/store doubleword instruction generation in powerpc eBPF
    JIT, from Naveen N. Rao.

    8) nla_nest_start() return value checks all over, from Kangjie Lu.

    9) Fix asoc_id handling in SCTP after the SCTP_*_ASSOC changes this
    merge window. From Marcelo Ricardo Leitner and Xin Long.

    10) Fix memory corruption with large MTUs in stmmac, from Aaro
    Koskinen.

    11) Do not use ipv4 header for ipv6 flows in TCP and DCCP, from Eric
    Dumazet.

    12) Fix topology subscription cancellation in tipc, from Erik Hugne.

    13) Memory leak in genetlink error path, from Yue Haibing.

    14) Valid control actions properly in packet scheduler, from Davide
    Caratti.

    15) Even if we get EEXIST, we still need to rehash if a shrink was
    delayed. From Herbert Xu.

    16) Fix interrupt mask handling in interrupt handler of r8169, from
    Heiner Kallweit.

    17) Fix leak in ehea driver, from Wen Yang"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (168 commits)
    dpaa2-eth: fix race condition with bql frame accounting
    chelsio: use BUG() instead of BUG_ON(1)
    net: devlink: skip info_get op call if it is not defined in dumpit
    net: phy: bcm54xx: Encode link speed and activity into LEDs
    tipc: change to check tipc_own_id to return in tipc_net_stop
    net: usb: aqc111: Extend HWID table by QNAP device
    net: sched: Kconfig: update reference link for PIE
    net: dsa: qca8k: extend slave-bus implementations
    net: dsa: qca8k: remove leftover phy accessors
    dt-bindings: net: dsa: qca8k: support internal mdio-bus
    dt-bindings: net: dsa: qca8k: fix example
    net: phy: don't clear BMCR in genphy_soft_reset
    bpf, libbpf: clarify bump in libbpf version info
    bpf, libbpf: fix version info and add it to shared object
    rxrpc: avoid clang -Wuninitialized warning
    tipc: tipc clang warning
    net: sched: fix cleanup NULL pointer exception in act_mirr
    r8169: fix cable re-plugging issue
    net: ethernet: ti: fix possible object reference leak
    net: ibm: fix possible object reference leak
    ...

    Linus Torvalds
     

22 Mar, 2019

1 commit

  • As it stands if a shrink is delayed because of an outstanding
    rehash, we will go into a rescheduling loop without ever doing
    the rehash.

    This patch fixes this by still carrying out the rehash and then
    rescheduling so that we can shrink after the completion of the
    rehash should it still be necessary.

    The return value of EEXIST captures this case and other cases
    (e.g., another thread expanded/rehashed the table at the same
    time) where we should still proceed with the rehash.

    Fixes: da20420f83ea ("rhashtable: Add nested tables")
    Reported-by: Josh Elsasser
    Signed-off-by: Herbert Xu
    Tested-by: Josh Elsasser
    Signed-off-by: David S. Miller

    Herbert Xu
     

18 Mar, 2019

1 commit

  • Pull more Kbuild updates from Masahiro Yamada:

    - add more Build-Depends to Debian source package

    - prefix header search paths with $(srctree)/

    - make modpost show verbose section mismatch warnings

    - avoid hard-coded CROSS_COMPILE for h8300

    - fix regression for Debian make-kpkg command

    - add semantic patch to detect missing put_device()

    - fix some warnings of 'make deb-pkg'

    - optimize NOSTDINC_FLAGS evaluation

    - add warnings about redundant generic-y

    - clean up Makefiles and scripts

    * tag 'kbuild-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: remove stale lxdialog/.gitignore
    kbuild: force all architectures except um to include mandatory-y
    kbuild: warn redundant generic-y
    Revert "modsign: Abort modules_install when signing fails"
    kbuild: Make NOSTDINC_FLAGS a simply expanded variable
    kbuild: deb-pkg: avoid implicit effects
    coccinelle: semantic code search for missing put_device()
    kbuild: pkg: grep include/config/auto.conf instead of $KCONFIG_CONFIG
    kbuild: deb-pkg: introduce is_enabled and if_enabled_echo to builddeb
    kbuild: deb-pkg: add CONFIG_ prefix to kernel config options
    kbuild: add workaround for Debian make-kpkg
    kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG}
    unicore32: simplify linker script generation for decompressor
    h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
    kbuild: move archive command to scripts/Makefile.lib
    modpost: always show verbose warning for section mismatch
    ia64: prefix header search path with $(srctree)/
    libfdt: prefix header search paths with $(srctree)/
    deb-pkg: generate correct build dependencies

    Linus Torvalds
     

16 Mar, 2019

1 commit

  • Pull ARM updates from Russell King:

    - An improvement from Ard Biesheuvel, who noted that the identity map
    setup was taking a long time due to flush_cache_louis().

    - Update a comment about dma_ops from Wolfram Sang.

    - Remove use of "-p" with ld, where this flag has been a no-op since
    2004.

    - Remove the printing of the virtual memory layout, which is no longer
    useful since we hide pointers.

    - Correct SCU help text.

    - Remove legacy TWD registration method.

    - Add pgprot_device() implementation for mapping PCI sysfs resource
    files.

    - Initialise PFN limits earlier for kmemleak.

    - Fix argument count to match macro definition (affects clang builds)

    - Use unified assembler language almost everywhere for clang, and other
    clang improvements (from Stefan Agner, Nathan Chancellor).

    - Support security extension for noMMU and other noMMU cleanups (from
    Vladimir Murzin).

    - Remove unnecessary SMP bringup code (which was incorrectly copy'n'
    pasted from the ARM platform implementations) and remove it from the
    arch code to discourge further copys of it appearing.

    - Add Cortex A9 erratum preventing kexec working on some SoCs.

    - AMBA bus identification updates from Mike Leach.

    - More use of raw spinlocks to avoid -RT kernel issues (from Yang Shi
    and Sebastian Andrzej Siewior).

    - MCPM hyp/svc mode mismatch fixes from Marek Szyprowski.

    * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (32 commits)
    ARM: 8849/1: NOMMU: Fix encodings for PMSAv8's PRBAR4/PRLAR4
    ARM: 8848/1: virt: Align GIC version check with arm64 counterpart
    ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used
    ARM: 8845/1: use unified assembler in c files
    ARM: 8844/1: use unified assembler in assembly files
    ARM: 8843/1: use unified assembler in headers
    ARM: 8841/1: use unified assembler in macros
    ARM: 8840/1: use a raw_spinlock_t in unwind
    ARM: 8839/1: kprobe: make patch_lock a raw_spinlock_t
    ARM: 8837/1: coresight: etmv4: Update ID register table to add UCI support
    ARM: 8836/1: drivers: amba: Update component matching to use the CoreSight UCI values.
    ARM: 8838/1: drivers: amba: Updates to component identification for driver matching.
    ARM: 8833/1: Ensure that NEON code always compiles with Clang
    ARM: avoid Cortex-A9 livelock on tight dmb loops
    ARM: smp: remove arch-provided "pen_release"
    ARM: actions: remove boot_lock and pen_release
    ARM: oxnas: remove CPU hotplug implementation
    ARM: qcom: remove unnecessary boot_lock
    ARM: 8832/1: NOMMU: Limit visibility for CONFIG_FLASH_{MEM_BASE,SIZE}
    ARM: 8831/1: NOMMU: pmsa-v8: remove unneeded semicolon
    ...

    Linus Torvalds
     

14 Mar, 2019

1 commit

  • Currently, the Kbuild core manipulates header search paths in a crazy
    way [1].

    To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
    the search paths in the srctree. Some Makefiles are already written in
    that way, but not all. The goal of this work is to make the notation
    consistent, and finally get rid of the gross hacks.

    Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
    ("kbuild: do not drop -I without parameter").

    [1]: https://patchwork.kernel.org/patch/9632347/

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

13 Mar, 2019

5 commits

  • Pull iov_iter updates from Al Viro:
    "A couple of iov_iter patches - Christoph's crapectomy (the last
    remaining user of iov_for_each() went away with lustre, IIRC) and
    Eric'c optimization of sanity checks"

    * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    iov_iter: optimize page_copy_sane()
    uio: remove the unused iov_for_each macro

    Linus Torvalds
     
  • Merge misc updates from Andrew Morton:

    - a few misc things

    - the rest of MM

    - remove flex_arrays, replace with new simple radix-tree implementation

    * emailed patches from Andrew Morton : (38 commits)
    Drop flex_arrays
    sctp: convert to genradix
    proc: commit to genradix
    generic radix trees
    selinux: convert to kvmalloc
    md: convert to kvmalloc
    openvswitch: convert to kvmalloc
    of: fix kmemleak crash caused by imbalance in early memory reservation
    mm: memblock: update comments and kernel-doc
    memblock: split checks whether a region should be skipped to a helper function
    memblock: remove memblock_{set,clear}_region_flags
    memblock: drop memblock_alloc_*_nopanic() variants
    memblock: memblock_alloc_try_nid: don't panic
    treewide: add checks for the return value of memblock_alloc*()
    swiotlb: add checks for the return value of memblock_alloc*()
    init/main: add checks for the return value of memblock_alloc*()
    mm/percpu: add checks for the return value of memblock_alloc*()
    sparc: add checks for the return value of memblock_alloc*()
    ia64: add checks for the return value of memblock_alloc*()
    arch: don't memset(0) memory returned by memblock_alloc()
    ...

    Linus Torvalds
     
  • All existing users have been converted to generic radix trees

    Link: http://lkml.kernel.org/r/20181217131929.11727-8-kent.overstreet@gmail.com
    Signed-off-by: Kent Overstreet
    Acked-by: Dave Hansen
    Cc: Alexey Dobriyan
    Cc: Al Viro
    Cc: Eric Paris
    Cc: Marcelo Ricardo Leitner
    Cc: Matthew Wilcox
    Cc: Neil Horman
    Cc: Paul Moore
    Cc: Pravin B Shelar
    Cc: Shaohua Li
    Cc: Stephen Smalley
    Cc: Vlad Yasevich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kent Overstreet
     
  • Very simple radix tree implementation that supports storing arbitrary
    size entries, up to PAGE_SIZE - upcoming patches will convert existing
    flex_array users to genradixes. The new genradix code has a much
    simpler API and implementation, and doesn't have a hard limit on the
    number of elements like flex_array does.

    Link: http://lkml.kernel.org/r/20181217131929.11727-5-kent.overstreet@gmail.com
    Signed-off-by: Kent Overstreet
    Cc: Alexey Dobriyan
    Cc: Al Viro
    Cc: Dave Hansen
    Cc: Eric Paris
    Cc: Marcelo Ricardo Leitner
    Cc: Matthew Wilcox
    Cc: Neil Horman
    Cc: Paul Moore
    Cc: Pravin B Shelar
    Cc: Shaohua Li
    Cc: Stephen Smalley
    Cc: Vlad Yasevich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kent Overstreet
     
  • Add check for the return value of memblock_alloc*() functions and call
    panic() in case of error. The panic message repeats the one used by
    panicing memblock allocators with adjustment of parameters to include
    only relevant ones.

    The replacement was mostly automated with semantic patches like the one
    below with manual massaging of format strings.

    @@
    expression ptr, size, align;
    @@
    ptr = memblock_alloc(size, align);
    + if (!ptr)
    + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, size, align);

    [anders.roxell@linaro.org: use '%pa' with 'phys_addr_t' type]
    Link: http://lkml.kernel.org/r/20190131161046.21886-1-anders.roxell@linaro.org
    [rppt@linux.ibm.com: fix format strings for panics after memblock_alloc]
    Link: http://lkml.kernel.org/r/1548950940-15145-1-git-send-email-rppt@linux.ibm.com
    [rppt@linux.ibm.com: don't panic if the allocation in sparse_buffer_init fails]
    Link: http://lkml.kernel.org/r/20190131074018.GD28876@rapoport-lnx
    [akpm@linux-foundation.org: fix xtensa printk warning]
    Link: http://lkml.kernel.org/r/1548057848-15136-20-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Mike Rapoport
    Signed-off-by: Anders Roxell
    Reviewed-by: Guo Ren [c-sky]
    Acked-by: Paul Burton [MIPS]
    Acked-by: Heiko Carstens [s390]
    Reviewed-by: Juergen Gross [Xen]
    Reviewed-by: Geert Uytterhoeven [m68k]
    Acked-by: Max Filippov [xtensa]
    Cc: Catalin Marinas
    Cc: Christophe Leroy
    Cc: Christoph Hellwig
    Cc: "David S. Miller"
    Cc: Dennis Zhou
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Guo Ren
    Cc: Mark Salter
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Petr Mladek
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Rob Herring
    Cc: Rob Herring
    Cc: Russell King
    Cc: Stafford Horne
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

12 Mar, 2019

1 commit

  • Pull XArray updates from Matthew Wilcox:
    "This pull request changes the xa_alloc() API. I'm only aware of one
    subsystem that has started trying to use it, and we agree on the fixup
    as part of the merge.

    The xa_insert() error code also changed to match xa_alloc() (EEXIST to
    EBUSY), and I added xa_alloc_cyclic(). Beyond that, the usual
    bugfixes, optimisations and tweaking.

    I now have a git tree with all users of the radix tree and IDR
    converted over to the XArray that I'll be feeding to maintainers over
    the next few weeks"

    * tag 'xarray-5.1-rc1' of git://git.infradead.org/users/willy/linux-dax:
    XArray: Fix xa_reserve for 2-byte aligned entries
    XArray: Fix xa_erase of 2-byte aligned entries
    XArray: Use xa_cmpxchg to implement xa_reserve
    XArray: Fix xa_release in allocating arrays
    XArray: Mark xa_insert and xa_reserve as must_check
    XArray: Add cyclic allocation
    XArray: Redesign xa_alloc API
    XArray: Add support for 1s-based allocation
    XArray: Change xa_insert to return -EBUSY
    XArray: Update xa_erase family descriptions
    XArray tests: RCU lock prohibits GFP_KERNEL

    Linus Torvalds
     

11 Mar, 2019

3 commits

  • Pull Kbuild updates from Masahiro Yamada:

    - do not generate unneeded top-level built-in.a

    - let git ignore O= directory entirely

    - optimize scripts/kallsyms slightly

    - exclude DWARF info from *.s regardless of config options

    - fix GCC toolchain search path for Clang to prepare ld.lld support

    - do not generate modules.order when CONFIG_MODULES is disabled

    - simplify single target rules and remove VPATH for external module
    build

    - allow to add optional flags to dpkg-buildpackage when building
    deb-pkg

    - move some compiler option tests from Makefile to Kconfig

    - various Makefile cleanups

    * tag 'kbuild-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (40 commits)
    kbuild: remove scripts/basic/% build target
    kbuild: use -Werror=implicit-... instead of -Werror-implicit-...
    kbuild: clean up scripts/gcc-version.sh
    kbuild: remove cc-version macro
    kbuild: update comment block of scripts/clang-version.sh
    kbuild: remove commented-out INITRD_COMPRESS
    kbuild: move -gsplit-dwarf, -gdwarf-4 option tests to Kconfig
    kbuild: [bin]deb-pkg: add DPKG_FLAGS variable
    kbuild: move ".config not found!" message from Kconfig to Makefile
    kbuild: invoke syncconfig if include/config/auto.conf.cmd is missing
    kbuild: simplify single target rules
    kbuild: remove empty rules for makefiles
    kbuild: make -r/-R effective in top Makefile for old Make versions
    kbuild: move tools_silent to a more relevant place
    kbuild: compute false-positive -Wmaybe-uninitialized cases in Kconfig
    kbuild: refactor cc-cross-prefix implementation
    kbuild: hardcode genksyms path and remove GENKSYMS variable
    scripts/gdb: refactor rules for symlink creation
    kbuild: create symlink to vmlinux-gdb.py in scripts_gdb target
    scripts/gdb: do not descend into scripts/gdb from scripts
    ...

    Linus Torvalds
     
  • Pull DMA mapping updates from Christoph Hellwig:

    - add debugfs support for dumping dma-debug information (Corentin
    Labbe)

    - Kconfig cleanups (Andy Shevchenko and me)

    - debugfs cleanups (Greg Kroah-Hartman)

    - improve dma_map_resource and use it in the media code

    - arch_setup_dma_ops / arch_teardown_dma_ops cleanups

    - various small cleanups and improvements for the per-device coherent
    allocator

    - make the DMA mask an upper bound and don't fail "too large" dma mask
    in the remaning two architectures - this will allow big driver
    cleanups in the following merge windows

    * tag 'dma-mapping-5.1' of git://git.infradead.org/users/hch/dma-mapping: (21 commits)
    Documentation/DMA-API-HOWTO: update dma_mask sections
    sparc64/pci_sun4v: allow large DMA masks
    sparc64/iommu: allow large DMA masks
    sparc64: refactor the ali DMA quirk
    ccio: allow large DMA masks
    dma-mapping: remove the DMA_MEMORY_EXCLUSIVE flag
    dma-mapping: remove dma_mark_declared_memory_occupied
    dma-mapping: move CONFIG_DMA_CMA to kernel/dma/Kconfig
    dma-mapping: improve selection of dma_declare_coherent availability
    dma-mapping: remove an incorrect __iommem annotation
    of: select OF_RESERVED_MEM automatically
    device.h: dma_mem is only needed for HAVE_GENERIC_DMA_COHERENT
    mfd/sm501: depend on HAS_DMA
    dma-mapping: add a kconfig symbol for arch_teardown_dma_ops availability
    dma-mapping: add a kconfig symbol for arch_setup_dma_ops availability
    dma-mapping: move debug configuration options to kernel/dma
    dma-debug: add dumping facility via debugfs
    dma: debug: no need to check return value of debugfs_create functions
    videobuf2: replace a layering violation with dma_map_resource
    dma-mapping: don't BUG when calling dma_map_resource on RAM
    ...

    Linus Torvalds
     
  • Pull arm64 updates from Catalin Marinas:

    - Pseudo NMI support for arm64 using GICv3 interrupt priorities

    - uaccess macros clean-up (unsafe user accessors also merged but
    reverted, waiting for objtool support on arm64)

    - ptrace regsets for Pointer Authentication (ARMv8.3) key management

    - inX() ordering w.r.t. delay() on arm64 and riscv (acks in place by
    the riscv maintainers)

    - arm64/perf updates: PMU bindings converted to json-schema, unused
    variable and misleading comment removed

    - arm64/debug fixes to ensure checking of the triggering exception
    level and to avoid the propagation of the UNKNOWN FAR value into the
    si_code for debug signals

    - Workaround for Fujitsu A64FX erratum 010001

    - lib/raid6 ARM NEON optimisations

    - NR_CPUS now defaults to 256 on arm64

    - Minor clean-ups (documentation/comments, Kconfig warning, unused
    asm-offsets, clang warnings)

    - MAINTAINERS update for list information to the ARM64 ACPI entry

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (54 commits)
    arm64: mmu: drop paging_init comments
    arm64: debug: Ensure debug handlers check triggering exception level
    arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug signals
    Revert "arm64: uaccess: Implement unsafe accessors"
    arm64: avoid clang warning about self-assignment
    arm64: Kconfig.platforms: fix warning unmet direct dependencies
    lib/raid6: arm: optimize away a mask operation in NEON recovery routine
    lib/raid6: use vdupq_n_u8 to avoid endianness warnings
    arm64: io: Hook up __io_par() for inX() ordering
    riscv: io: Update __io_[p]ar() macros to take an argument
    asm-generic/io: Pass result of I/O accessor to __io_[p]ar()
    arm64: Add workaround for Fujitsu A64FX erratum 010001
    arm64: Rename get_thread_info()
    arm64: Remove documentation about TIF_USEDFPU
    arm64: irqflags: Fix clang build warnings
    arm64: Enable the support of pseudo-NMIs
    arm64: Skip irqflags tracing for NMI in IRQs disabled context
    arm64: Skip preemption when exiting an NMI
    arm64: Handle serror in NMI context
    irqchip/gic-v3: Allow interrupts to be set as pseudo-NMI
    ...

    Linus Torvalds
     

10 Mar, 2019

3 commits

  • Pull rdma updates from Jason Gunthorpe:
    "This has been a slightly more active cycle than normal with ongoing
    core changes and quite a lot of collected driver updates.

    - Various driver fixes for bnxt_re, cxgb4, hns, mlx5, pvrdma, rxe

    - A new data transfer mode for HFI1 giving higher performance

    - Significant functional and bug fix update to the mlx5
    On-Demand-Paging MR feature

    - A chip hang reset recovery system for hns

    - Change mm->pinned_vm to an atomic64

    - Update bnxt_re to support a new 57500 chip

    - A sane netlink 'rdma link add' method for creating rxe devices and
    fixing the various unregistration race conditions in rxe's
    unregister flow

    - Allow lookup up objects by an ID over netlink

    - Various reworking of the core to driver interface:
    - drivers should not assume umem SGLs are in PAGE_SIZE chunks
    - ucontext is accessed via udata not other means
    - start to make the core code responsible for object memory
    allocation
    - drivers should convert struct device to struct ib_device via a
    helper
    - drivers have more tools to avoid use after unregister problems"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (280 commits)
    net/mlx5: ODP support for XRC transport is not enabled by default in FW
    IB/hfi1: Close race condition on user context disable and close
    RDMA/umem: Revert broken 'off by one' fix
    RDMA/umem: minor bug fix in error handling path
    RDMA/hns: Use GFP_ATOMIC in hns_roce_v2_modify_qp
    cxgb4: kfree mhp after the debug print
    IB/rdmavt: Fix concurrency panics in QP post_send and modify to error
    IB/rdmavt: Fix loopback send with invalidate ordering
    IB/iser: Fix dma_nents type definition
    IB/mlx5: Set correct write permissions for implicit ODP MR
    bnxt_re: Clean cq for kernel consumers only
    RDMA/uverbs: Don't do double free of allocated PD
    RDMA: Handle ucontext allocations by IB/core
    RDMA/core: Fix a WARN() message
    bnxt_re: fix the regression due to changes in alloc_pbl
    IB/mlx4: Increase the timeout for CM cache
    IB/core: Abort page fault handler silently during owning process exit
    IB/mlx5: Validate correct PD before prefetch MR
    IB/mlx5: Protect against prefetch of invalid MR
    RDMA/uverbs: Store PR pointer before it is overwritten
    ...

    Linus Torvalds
     
  • Pull printk updates from Petr Mladek:

    - Allow to sort mixed lines by an extra information about the caller

    - Remove no longer used LOG_PREFIX.

    - Some clean up and documentation update.

    * tag 'printk-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk:
    printk/docs: Add extra integer types to printk-formats
    printk: Remove no longer used LOG_PREFIX.
    lib/vsprintf: Remove %pCr remnant in comment
    printk: Pass caller information to log_store().
    printk: Add caller information to printk() output.

    Linus Torvalds
     
  • Pull gcc-plugins updates from Kees Cook:
    "This adds additional type coverage to the existing structleak plugin
    and adds a large set of selftests to help evaluate stack variable
    zero-initialization coverage.

    That can be used to test whatever instrumentation might be performing
    zero-initialization: either with the structleak plugin or with Clang's
    coming "-ftrivial-auto-var-init=zero" option.

    Summary:

    - Add scalar and array initialization coverage

    - Refactor Kconfig to make options more clear

    - Add self-test module for testing automatic initialization"

    * tag 'gcc-plugins-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    lib: Introduce test_stackinit module
    gcc-plugins: structleak: Generalize to all variable types

    Linus Torvalds
     

09 Mar, 2019

1 commit

  • Pull livepatching updates from Jiri Kosina:

    - support for something we call 'atomic replace', and allows for much
    better handling of cumulative patches (which is something very useful
    for distros), from Jason Baron with help of Petr Mladek and Joe
    Lawrence

    - improvement of handling of tasks blocking finalization, from Miroslav
    Benes

    - update of MAINTAINERS file to reflect move towards group
    maintainership

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: (22 commits)
    livepatch/selftests: use "$@" to preserve argument list
    livepatch: Module coming and going callbacks can proceed with all listed patches
    livepatch: Proper error handling in the shadow variables selftest
    livepatch: return -ENOMEM on ptr_id() allocation failure
    livepatch: Introduce klp_for_each_patch macro
    livepatch: core: Return EOPNOTSUPP instead of ENOSYS
    selftests/livepatch: add DYNAMIC_DEBUG config dependency
    livepatch: samples: non static warnings fix
    livepatch: update MAINTAINERS
    livepatch: Remove signal sysfs attribute
    livepatch: Send a fake signal periodically
    selftests/livepatch: introduce tests
    livepatch: Remove ordering (stacking) of the livepatches
    livepatch: Atomic replace and cumulative patches documentation
    livepatch: Remove Nop structures when unused
    livepatch: Add atomic replace
    livepatch: Use lists to manage patches, objects and functions
    livepatch: Simplify API by removing registration step
    livepatch: Don't block the removal of patches loaded after a forced transition
    livepatch: Consolidate klp_free functions
    ...

    Linus Torvalds
     

08 Mar, 2019

15 commits

  • To prevent any issues with persistent data, separate lzo-rle from lzo so
    that it is treated as a separate algorithm, and lzo is still available.

    Link: http://lkml.kernel.org/r/20190205155944.16007-3-dave.rodgman@arm.com
    Signed-off-by: Dave Rodgman
    Cc: David S. Miller
    Cc: Greg Kroah-Hartman
    Cc: Herbert Xu
    Cc: Markus F.X.J. Oberhumer
    Cc: Matt Sealey
    Cc: Minchan Kim
    Cc: Nitin Gupta
    Cc: Richard Purdie
    Cc: Sergey Senozhatsky
    Cc: Sonny Rao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Rodgman
     
  • Patch series "lib/lzo: run-length encoding support", v5.

    Following on from the previous lzo-rle patchset:

    https://lkml.org/lkml/2018/11/30/972

    This patchset contains only the RLE patches, and should be applied on
    top of the non-RLE patches ( https://lkml.org/lkml/2019/2/5/366 ).

    Previously, some questions were raised around the RLE patches. I've
    done some additional benchmarking to answer these questions. In short:

    - RLE offers significant additional performance (data-dependent)

    - I didn't measure any regressions that were clearly outside the noise

    One concern with this patchset was around performance - specifically,
    measuring RLE impact separately from Matt Sealey's patches (CTZ & fast
    copy). I have done some additional benchmarking which I hope clarifies
    the benefits of each part of the patchset.

    Firstly, I've captured some memory via /dev/fmem from a Chromebook with
    many tabs open which is starting to swap, and then split this into 4178
    4k pages. I've excluded the all-zero pages (as zram does), and also the
    no-zero pages (which won't tell us anything about RLE performance).
    This should give a realistic test dataset for zram. What I found was
    that the data is VERY bimodal: 44% of pages in this dataset contain 5%
    or fewer zeros, and 44% contain over 90% zeros (30% if you include the
    no-zero pages). This supports the idea of special-casing zeros in zram.

    Next, I've benchmarked four variants of lzo on these pages (on 64-bit
    Arm at max frequency): baseline LZO; baseline + Matt Sealey's patches
    (aka MS); baseline + RLE only; baseline + MS + RLE. Numbers are for
    weighted roundtrip throughput (the weighting reflects that zram does
    more compression than decompression).

    https://drive.google.com/file/d/1VLtLjRVxgUNuWFOxaGPwJYhl_hMQXpHe/view?usp=sharing

    Matt's patches help in all cases for Arm (and no effect on Intel), as
    expected.

    RLE also behaves as expected: with few zeros present, it makes no
    difference; above ~75%, it gives a good improvement (50 - 300 MB/s on
    top of the benefit from Matt's patches).

    Best performance is seen with both MS and RLE patches.

    Finally, I have benchmarked the same dataset on an x86-64 device. Here,
    the MS patches make no difference (as expected); RLE helps, similarly as
    on Arm. There were no definite regressions; allowing for observational
    error, 0.1% (3/4178) of cases had a regression > 1 standard deviation,
    of which the largest was 4.6% (1.2 standard deviations). I think this
    is probably within the noise.

    https://drive.google.com/file/d/1xCUVwmiGD0heEMx5gcVEmLBI4eLaageV/view?usp=sharing

    One point to note is that the graphs show RLE appears to help very
    slightly with no zeros present! This is because the extra code causes
    the clang optimiser to change code layout in a way that happens to have
    a significant benefit. Taking baseline LZO and adding a do-nothing line
    like "__builtin_prefetch(out_len);" immediately before the "goto next"
    has the same effect. So this is a real, but basically spurious effect -
    it's small enough not to upset the overall findings.

    This patch (of 3):

    When using zram, we frequently encounter long runs of zero bytes. This
    adds a special case which identifies runs of zeros and encodes them
    using run-length encoding.

    This is faster for both compression and decompresion. For high-entropy
    data which doesn't hit this case, impact is minimal.

    Compression ratio is within a few percent in all cases.

    This modifies the bitstream in a way which is backwards compatible
    (i.e., we can decompress old bitstreams, but old versions of lzo cannot
    decompress new bitstreams).

    Link: http://lkml.kernel.org/r/20190205155944.16007-2-dave.rodgman@arm.com
    Signed-off-by: Dave Rodgman
    Cc: David S. Miller
    Cc: Greg Kroah-Hartman
    Cc: Herbert Xu
    Cc: Markus F.X.J. Oberhumer
    Cc: Matt Sealey
    Cc: Minchan Kim
    Cc: Nitin Gupta
    Cc: Richard Purdie
    Cc: Sergey Senozhatsky
    Cc: Sonny Rao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Rodgman
     
  • Enable faster 8-byte copies on arm64.

    Link: http://lkml.kernel.org/r/20181127161913.23863-6-dave.rodgman@arm.com
    Link: http://lkml.kernel.org/r/20190205141950.9058-4-dave.rodgman@arm.com
    Signed-off-by: Matt Sealey
    Signed-off-by: Dave Rodgman
    Cc: David S. Miller
    Cc: Greg Kroah-Hartman
    Cc: Herbert Xu
    Cc: Markus F.X.J. Oberhumer
    Cc: Minchan Kim
    Cc: Nitin Gupta
    Cc: Richard Purdie
    Cc: Sergey Senozhatsky
    Cc: Sonny Rao
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Sealey
     
  • LZO leaves some performance on the table by not realising that arm64 can
    optimize count-trailing-zeros bit operations.

    Add CONFIG_ARM64 to the checked definitions alongside CONFIG_X86_64 to
    enable the use of rbit/clz instructions on full 64-bit quantities.

    Link: http://lkml.kernel.org/r/20181127161913.23863-5-dave.rodgman@arm.com
    Link: http://lkml.kernel.org/r/20190205141950.9058-3-dave.rodgman@arm.com
    Signed-off-by: Matt Sealey
    Signed-off-by: Dave Rodgman
    Cc: David S. Miller
    Cc: Greg Kroah-Hartman
    Cc: Herbert Xu
    Cc: Markus F.X.J. Oberhumer
    Cc: Minchan Kim
    Cc: Nitin Gupta
    Cc: Richard Purdie
    Cc: Sergey Senozhatsky
    Cc: Sonny Rao
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Sealey
     
  • Patch series "lib/lzo: performance improvements", v5.

    This patch (of 3):

    Modify the ifdefs in lzodefs.h to be more consistent with normal kernel
    macros (e.g., change __aarch64__ to CONFIG_ARM64).

    Link: http://lkml.kernel.org/r/20190205141950.9058-2-dave.rodgman@arm.com
    Signed-off-by: Dave Rodgman
    Cc: Herbert Xu
    Cc: David S. Miller
    Cc: Nitin Gupta
    Cc: Richard Purdie
    Cc: Markus F.X.J. Oberhumer
    Cc: Minchan Kim
    Cc: Sergey Senozhatsky
    Cc: Sonny Rao
    Cc: Greg Kroah-Hartman
    Cc: Matt Sealey
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Rodgman
     
  • When booting an allmodconfig kernel, there are a lot of false-positives.
    With a message like this 'UBSAN: Undefined behaviour in...' with a call
    trace that follows.

    UBSAN warnings are a result of enabling noisy CONFIG_UBSAN_ALIGNMENT
    which is disabled by default if HAVE_EFFICIENT_UNALIGNED_ACCESS=y.

    It's noisy even if don't have efficient unaligned access, e.g. people
    often add __cacheline_aligned_in_smp in structs, but forget to align
    allocations of such struct (kmalloc() give 8-byte alignment in worst
    case).

    Rework so that when building a allmodconfig kernel that turns everything
    into '=m' or '=y' will turn off UBSAN_ALIGNMENT.

    [aryabinin@virtuozzo.com: changelog addition]
    Link: http://lkml.kernel.org/r/20181217150326.30933-1-anders.roxell@linaro.org
    Signed-off-by: Anders Roxell
    Suggested-by: Arnd Bergmann
    Acked-by: Andrey Ryabinin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anders Roxell
     
  • The test_fw_config->reqs allocation succeeded so these addresses can't
    be NULL.

    Also on the second error path, we forgot to set "rc = -ENOMEM;".

    Link: http://lkml.kernel.org/r/20190221183700.GA1737@kadam
    Signed-off-by: Dan Carpenter
    Reviewed-by: Andrew Morton
    Cc: "Luis R. Rodriguez"
    Cc: Randy Dunlap
    Cc: Greg Kroah-Hartman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • In preparation to enabling -Wimplicit-fallthrough, mark switch cases
    where we are expecting to fall through.

    This patch fixes the following warning:

    lib/assoc_array.c: In function `assoc_array_delete':
    lib/assoc_array.c:1110:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
    for (slot = 0; slot < ASSOC_ARRAY_FAN_OUT; slot++) {
    ^~~
    lib/assoc_array.c:1118:2: note: here
    case assoc_array_walk_tree_empty:
    ^~~~

    Warning level 3 was used: -Wimplicit-fallthrough=3

    This patch is part of the ongoing efforts to enable
    -Wimplicit-fallthrough.

    Link: http://lkml.kernel.org/r/20190212212206.GA16378@embeddedor
    Signed-off-by: Gustavo A. R. Silva
    Cc: Kees Cook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gustavo A. R. Silva
     
  • Since we now build with -Wvla, any use of VLA throws a warning.
    Including this test, so... maybe we should just remove the test?

    lib/test_ubsan.c: In function 'test_ubsan_vla_bound_not_positive':
    lib/test_ubsan.c:48:2: warning: ISO C90 forbids variable length array 'buf' [-Wvla]

    For the out-of-bounds test, switch to non-VLA setup.

    lib/test_ubsan.c: In function 'test_ubsan_out_of_bounds':
    lib/test_ubsan.c:64:2: warning: ISO C90 forbids variable length array 'arr' [-Wvla]

    Link: http://lkml.kernel.org/r/20190113183210.56154-1-olof@lixom.net
    Signed-off-by: Olof Johansson
    Acked-by: Dmitry Vyukov
    Cc: Colin Ian King
    Cc: Jinbum Park
    Cc: Andrey Ryabinin
    Cc: Kees Cook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olof Johansson
     
  • fls counts bits starting from 1 to 32 (returns 0 for zero argument). If
    we add 1 we shift right one bit more and loose precision from divisor,
    what cause function incorect results with some numbers.

    Corrected code was tested in user-space, see bugzilla:
    https://bugzilla.kernel.org/show_bug.cgi?id=202391

    Link: http://lkml.kernel.org/r/1548686944-11891-1-git-send-email-sgruszka@redhat.com
    Fixes: 658716d19f8f ("div64_u64(): improve precision on 32bit platforms")
    Signed-off-by: Stanislaw Gruszka
    Reported-by: Siarhei Volkau
    Tested-by: Siarhei Volkau
    Acked-by: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stanislaw Gruszka
     
  • This serves two purposes: First, we get a diagnostic if (though
    extremely unlikely), any of the calls of ddebug_add_module for built-in
    code fails, effectively disabling dynamic_debug. Second, I want to make
    struct _ddebug opaque, and avoid accessing any of its members outside
    dynamic_debug.[ch].

    Link: http://lkml.kernel.org/r/20190212214150.4807-9-linux@rasmusvillemoes.dk
    Signed-off-by: Rasmus Villemoes
    Acked-by: Jason Baron
    Cc: David Sterba
    Cc: Greg Kroah-Hartman
    Cc: Ingo Molnar
    Cc: Petr Mladek
    Cc: "Rafael J . Wysocki"
    Cc: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rasmus Villemoes
     
  • The only caller of ddebug_{add,remove}_module outside dynamic_debug.c is
    kernel/module.c, which is obviously not itself modular (though it would
    be an interesting exercise to make that happen...). I also fail to see
    how these interfaces can be used by modules, in-tree or not.

    Link: http://lkml.kernel.org/r/20190212214150.4807-8-linux@rasmusvillemoes.dk
    Signed-off-by: Rasmus Villemoes
    Acked-by: Jason Baron
    Cc: David Sterba
    Cc: Greg Kroah-Hartman
    Cc: Ingo Molnar
    Cc: Petr Mladek
    Cc: "Rafael J . Wysocki"
    Cc: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rasmus Villemoes
     
  • Now that we store the passed-in string directly in ddebug_add_module, we
    can use pointer equality instead of strcmp. This is a little more
    efficient, but more importantly, this also makes the code somewhat more
    correct:

    Currently, if one loads and then unloads a module whose name happens to
    match the KBUILD_MODNAME of some built-in functionality (which need not
    even be modular at all), all of their dynamic debug entries vanish along
    with those of the actual module. For example, loading and unloading a
    core.ko hides all pr_debugs from drivers/base/core.c and other built-in
    files called core.c (incidentally, there is an in-tree module whose name
    is core, but I just tested this with an out-of-tree trivial one).

    Link: http://lkml.kernel.org/r/20190212214150.4807-7-linux@rasmusvillemoes.dk
    Signed-off-by: Rasmus Villemoes
    Acked-by: Jason Baron
    Cc: David Sterba
    Cc: Greg Kroah-Hartman
    Cc: Ingo Molnar
    Cc: Petr Mladek
    Cc: "Rafael J . Wysocki"
    Cc: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rasmus Villemoes
     
  • For built-in modules, we're already reusing the passed-in string via
    kstrdup_const(). But for actual modules (i.e. when we're called from
    dynamic_debug_setup in module.c), the passed-in string (which points at
    the name[] array inside struct module) is also guaranteed to live at
    least as long as the struct ddebug_table, since free_module() calls
    ddebug_remove_module().

    Link: http://lkml.kernel.org/r/20190212214150.4807-6-linux@rasmusvillemoes.dk
    Signed-off-by: Rasmus Villemoes
    Acked-by: Jason Baron
    Cc: David Sterba
    Cc: Greg Kroah-Hartman
    Cc: Ingo Molnar
    Cc: Petr Mladek
    Cc: "Rafael J . Wysocki"
    Cc: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rasmus Villemoes
     
  • At the time of commit d048419311ff ("lib/vsprintf.c: expand field_width
    to 24 bits"), there was no compiletime_assert/BUILD_BUG/.... variant
    that could be used outside function scope. Now we have static_assert(),
    so move the assertion next to the definition instead of hiding it in
    some arbitrary function.

    Also add the appropriate #include to avoid relying on build_bug.h being
    pulled in via some arbitrary chain of includes.

    Link: http://lkml.kernel.org/r/20190208203015.29702-2-linux@rasmusvillemoes.dk
    Signed-off-by: Rasmus Villemoes
    Cc: Alexander Viro
    Cc: Kees Cook
    Cc: Luc Van Oostenryck
    Cc: Masahiro Yamada
    Cc: Nick Desaulniers
    Cc: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rasmus Villemoes
     

07 Mar, 2019

3 commits

  • Pull driver core updates from Greg KH:
    "Here is the big driver core patchset for 5.1-rc1

    More patches than "normal" here this merge window, due to some work in
    the driver core by Alexander Duyck to rework the async probe
    functionality to work better for a number of devices, and independant
    work from Rafael for the device link functionality to make it work
    "correctly".

    Also in here is:

    - lots of BUS_ATTR() removals, the macro is about to go away

    - firmware test fixups

    - ihex fixups and simplification

    - component additions (also includes i915 patches)

    - lots of minor coding style fixups and cleanups.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'driver-core-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (65 commits)
    driver core: platform: remove misleading err_alloc label
    platform: set of_node in platform_device_register_full()
    firmware: hardcode the debug message for -ENOENT
    driver core: Add missing description of new struct device_link field
    driver core: Fix PM-runtime for links added during consumer probe
    drivers/component: kerneldoc polish
    async: Add cmdline option to specify drivers to be async probed
    driver core: Fix possible supplier PM-usage counter imbalance
    PM-runtime: Fix __pm_runtime_set_status() race with runtime resume
    driver: platform: Support parsing GpioInt 0 in platform_get_irq()
    selftests: firmware: fix verify_reqs() return value
    Revert "selftests: firmware: remove use of non-standard diff -Z option"
    Revert "selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config"
    device: Fix comment for driver_data in struct device
    kernfs: Allocating memory for kernfs_iattrs with kmem_cache.
    sysfs: remove unused include of kernfs-internal.h
    driver core: Postpone DMA tear-down until after devres release
    driver core: Document limitation related to DL_FLAG_RPM_ACTIVE
    PM-runtime: Take suppliers into account in __pm_runtime_set_status()
    device.h: Add __cold to dev_ logging functions
    ...

    Linus Torvalds
     
  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver patch pull request for 5.1-rc1.

    The largest thing by far is the new habanalabs driver for their AI
    accelerator chip. For now it is in the drivers/misc directory but will
    probably move to a new directory soon along with other drivers of this
    type.

    Other than that, just the usual set of individual driver updates and
    fixes. There's an "odd" merge in here from the DRM tree that they
    asked me to do as the MEI driver is starting to interact with the i915
    driver, and it needed some coordination. All of those patches have
    been properly acked by the relevant subsystem maintainers.

    All of these have been in linux-next with no reported issues, most for
    quite some time"

    * tag 'char-misc-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (219 commits)
    habanalabs: adjust Kconfig to fix build errors
    habanalabs: use %px instead of %p in error print
    habanalabs: use do_div for 64-bit divisions
    intel_th: gth: Fix an off-by-one in output unassigning
    habanalabs: fix little-endiancpu conversion warnings
    habanalabs: use NULL to initialize array of pointers
    habanalabs: fix little-endiancpu conversion warnings
    habanalabs: soft-reset device if context-switch fails
    habanalabs: print pointer using %p
    habanalabs: fix memory leak with CBs with unaligned size
    habanalabs: return correct error code on MMU mapping failure
    habanalabs: add comments in uapi/misc/habanalabs.h
    habanalabs: extend QMAN0 job timeout
    habanalabs: set DMA0 completion to SOB 1007
    habanalabs: fix validation of WREG32 to DMA completion
    habanalabs: fix mmu cache registers init
    habanalabs: disable CPU access on timeouts
    habanalabs: add MMU DRAM default page mapping
    habanalabs: Dissociate RAZWI info from event types
    misc/habanalabs: adjust Kconfig to fix build errors
    ...

    Linus Torvalds
     
  • Merge misc updates from Andrew Morton:

    - a few misc things

    - ocfs2 updates

    - most of MM

    * emailed patches from Andrew Morton : (159 commits)
    tools/testing/selftests/proc/proc-self-syscall.c: remove duplicate include
    proc: more robust bulk read test
    proc: test /proc/*/maps, smaps, smaps_rollup, statm
    proc: use seq_puts() everywhere
    proc: read kernel cpu stat pointer once
    proc: remove unused argument in proc_pid_lookup()
    fs/proc/thread_self.c: code cleanup for proc_setup_thread_self()
    fs/proc/self.c: code cleanup for proc_setup_self()
    proc: return exit code 4 for skipped tests
    mm,mremap: bail out earlier in mremap_to under map pressure
    mm/sparse: fix a bad comparison
    mm/memory.c: do_fault: avoid usage of stale vm_area_struct
    writeback: fix inode cgroup switching comment
    mm/huge_memory.c: fix "orig_pud" set but not used
    mm/hotplug: fix an imbalance with DEBUG_PAGEALLOC
    mm/memcontrol.c: fix bad line in comment
    mm/cma.c: cma_declare_contiguous: correct err handling
    mm/page_ext.c: fix an imbalance with kmemleak
    mm/compaction: pass pgdat to too_many_isolated() instead of zone
    mm: remove zone_lru_lock() function, access ->lru_lock directly
    ...

    Linus Torvalds
     

06 Mar, 2019

4 commits

  • Pull perf updates from Ingo Molnar:
    "Lots of tooling updates - too many to list, here's a few highlights:

    - Various subcommand updates to 'perf trace', 'perf report', 'perf
    record', 'perf annotate', 'perf script', 'perf test', etc.

    - CPU and NUMA topology and affinity handling improvements,

    - HW tracing and HW support updates:
    - Intel PT updates
    - ARM CoreSight updates
    - vendor HW event updates

    - BPF updates

    - Tons of infrastructure updates, both on the build system and the
    library support side

    - Documentation updates.

    - ... and lots of other changes, see the changelog for details.

    Kernel side updates:

    - Tighten up kprobes blacklist handling, reduce the number of places
    where developers can install a kprobe and hang/crash the system.

    - Fix/enhance vma address filter handling.

    - Various PMU driver updates, small fixes and additions.

    - refcount_t conversions

    - BPF updates

    - error code propagation enhancements

    - misc other changes"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (238 commits)
    perf script python: Add Python3 support to syscall-counts-by-pid.py
    perf script python: Add Python3 support to syscall-counts.py
    perf script python: Add Python3 support to stat-cpi.py
    perf script python: Add Python3 support to stackcollapse.py
    perf script python: Add Python3 support to sctop.py
    perf script python: Add Python3 support to powerpc-hcalls.py
    perf script python: Add Python3 support to net_dropmonitor.py
    perf script python: Add Python3 support to mem-phys-addr.py
    perf script python: Add Python3 support to failed-syscalls-by-pid.py
    perf script python: Add Python3 support to netdev-times.py
    perf tools: Add perf_exe() helper to find perf binary
    perf script: Handle missing fields with -F +..
    perf data: Add perf_data__open_dir_data function
    perf data: Add perf_data__(create_dir|close_dir) functions
    perf data: Fail check_backup in case of error
    perf data: Make check_backup work over directories
    perf tools: Add rm_rf_perf_data function
    perf tools: Add pattern name checking to rm_rf
    perf tools: Add depth checking to rm_rf
    perf data: Add global path holder
    ...

    Linus Torvalds
     
  • Pull locking updates from Ingo Molnar:
    "The biggest part of this tree is the new auto-generated atomics API
    wrappers by Mark Rutland.

    The primary motivation was to allow instrumentation without uglifying
    the primary source code.

    The linecount increase comes from adding the auto-generated files to
    the Git space as well:

    include/asm-generic/atomic-instrumented.h | 1689 ++++++++++++++++--
    include/asm-generic/atomic-long.h | 1174 ++++++++++---
    include/linux/atomic-fallback.h | 2295 +++++++++++++++++++++++++
    include/linux/atomic.h | 1241 +------------

    I preferred this approach, so that the full call stack of the (already
    complex) locking APIs is still fully visible in 'git grep'.

    But if this is excessive we could certainly hide them.

    There's a separate build-time mechanism to determine whether the
    headers are out of date (they should never be stale if we do our job
    right).

    Anyway, nothing from this should be visible to regular kernel
    developers.

    Other changes:

    - Add support for dynamic keys, which removes a source of false
    positives in the workqueue code, among other things (Bart Van
    Assche)

    - Updates to tools/memory-model (Andrea Parri, Paul E. McKenney)

    - qspinlock, wake_q and lockdep micro-optimizations (Waiman Long)

    - misc other updates and enhancements"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (48 commits)
    locking/lockdep: Shrink struct lock_class_key
    locking/lockdep: Add module_param to enable consistency checks
    lockdep/lib/tests: Test dynamic key registration
    lockdep/lib/tests: Fix run_tests.sh
    kernel/workqueue: Use dynamic lockdep keys for workqueues
    locking/lockdep: Add support for dynamic keys
    locking/lockdep: Verify whether lock objects are small enough to be used as class keys
    locking/lockdep: Check data structure consistency
    locking/lockdep: Reuse lock chains that have been freed
    locking/lockdep: Fix a comment in add_chain_cache()
    locking/lockdep: Introduce lockdep_next_lockchain() and lock_chain_count()
    locking/lockdep: Reuse list entries that are no longer in use
    locking/lockdep: Free lock classes that are no longer in use
    locking/lockdep: Update two outdated comments
    locking/lockdep: Make it easy to detect whether or not inside a selftest
    locking/lockdep: Split lockdep_free_key_range() and lockdep_reset_lock()
    locking/lockdep: Initialize the locks_before and locks_after lists earlier
    locking/lockdep: Make zap_class() remove all matching lock order entries
    locking/lockdep: Reorder struct lock_class members
    locking/lockdep: Avoid that add_chain_cache() adds an invalid chain to the cache
    ...

    Linus Torvalds
     
  • Move the PAGE_OWNER option from submenu "Compile-time checks and
    compiler options" to dedicated submenu "Memory Debugging".

    Link: http://lkml.kernel.org/r/20190120024254.6270-1-changbin.du@gmail.com
    Signed-off-by: Changbin Du
    Acked-by: Vlastimil Babka
    Cc: Masahiro Yamada
    Cc: Ingo Molnar
    Cc: Arnd Bergmann
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Changbin Du
     
  • This adds a new kernel module for analysis of vmalloc allocator. It is
    only enabled as a module. There are two main reasons this module should
    be used for: performance evaluation and stressing of vmalloc subsystem.

    It consists of several test cases. As of now there are 8. The module
    has five parameters we can specify to change its the behaviour.

    1) run_test_mask - set of tests to be run

    id: 1, name: fix_size_alloc_test
    id: 2, name: full_fit_alloc_test
    id: 4, name: long_busy_list_alloc_test
    id: 8, name: random_size_alloc_test
    id: 16, name: fix_align_alloc_test
    id: 32, name: random_size_align_alloc_test
    id: 64, name: align_shift_alloc_test
    id: 128, name: pcpu_alloc_test

    By default all tests are in run test mask. If you want to select some
    specific tests it is possible to pass the mask. For example for first,
    second and fourth tests we go 11 value.

    2) test_repeat_count - how many times each test should be repeated
    By default it is one time per test. It is possible to pass any number.
    As high the value is the test duration gets increased.

    3) test_loop_count - internal test loop counter. By default it is set
    to 1000000.

    4) single_cpu_test - use one CPU to run the tests
    By default this parameter is set to false. It means that all online
    CPUs execute tests. By setting it to 1, the tests are executed by
    first online CPU only.

    5) sequential_test_order - run tests in sequential order
    By default this parameter is set to false. It means that before running
    tests the order is shuffled. It is possible to make it sequential, just
    set it to 1.

    Performance analysis:
    In order to evaluate performance of vmalloc allocations, usually it
    makes sense to use only one CPU that runs tests, use sequential order,
    number of repeat tests can be different as well as set of test mask.

    For example if we want to run all tests, to use one CPU and repeat each
    test 3 times. Insert the module passing following parameters:

    single_cpu_test=1 sequential_test_order=1 test_repeat_count=3

    with following output:

    Summary: fix_size_alloc_test passed: 3 failed: 0 repeat: 3 loops: 1000000 avg: 901177 usec
    Summary: full_fit_alloc_test passed: 3 failed: 0 repeat: 3 loops: 1000000 avg: 1039341 usec
    Summary: long_busy_list_alloc_test passed: 3 failed: 0 repeat: 3 loops: 1000000 avg: 11775763 usec
    Summary: random_size_alloc_test passed 3: failed: 0 repeat: 3 loops: 1000000 avg: 6081992 usec
    Summary: fix_align_alloc_test passed: 3 failed: 0 repeat: 3, loops: 1000000 avg: 2003712 usec
    Summary: random_size_align_alloc_test passed: 3 failed: 0 repeat: 3 loops: 1000000 avg: 2895689 usec
    Summary: align_shift_alloc_test passed: 0 failed: 3 repeat: 3 loops: 1000000 avg: 573 usec
    Summary: pcpu_alloc_test passed: 3 failed: 0 repeat: 3 loops: 1000000 avg: 95802 usec
    All test took CPU0=192945605995 cycles

    The align_shift_alloc_test is expected to be failed.

    Stressing:
    In order to stress the vmalloc subsystem we run all available test cases
    on all available CPUs simultaneously. In order to prevent constant behaviour
    pattern, the test cases array is shuffled by default to randomize the order
    of test execution.

    For example if we want to run all tests(default), use all online CPUs(default)
    with shuffled order(default) and to repeat each test 30 times. The command
    would be like:

    modprobe vmalloc_test test_repeat_count=30

    Expected results are the system is alive, there are no any BUG_ONs or Kernel
    Panics the tests are completed, no memory leaks.

    [urezki@gmail.com: fix 32-bit builds]
    Link: http://lkml.kernel.org/r/20190106214839.ffvjvmrn52uqog7k@pc636
    [urezki@gmail.com: make CONFIG_TEST_VMALLOC depend on CONFIG_MMU]
    Link: http://lkml.kernel.org/r/20190219085441.s6bg2gpy4esny5vw@pc636
    Link: http://lkml.kernel.org/r/20190103142108.20744-3-urezki@gmail.com
    Signed-off-by: Uladzislau Rezki (Sony)
    Cc: Kees Cook
    Cc: Matthew Wilcox
    Cc: Michal Hocko
    Cc: Oleksiy Avramchenko
    Cc: Shuah Khan
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uladzislau Rezki (Sony)