1. 15 Jul, 2019 2 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · f2772a0e
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
      
       - A new timer mode, time travel, for testing with UML
      
       - Many bugixes/improvements for the serial line driver
      
       - Various bugfixes
      
      * tag 'for-linus-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: fix build without CONFIG_UML_TIME_TRAVEL_SUPPORT
        um: Fix kcov crash during startup
        um: configs: Remove useless UEVENT_HELPER_PATH
        um: Support time travel mode
        um: Pass nsecs to os timer functions
        um: Remove drivers/ssl.h
        um: Don't garbage collect in deactivate_all_fds()
        um: Silence lockdep complaint about mmap_sem
        um: Remove locking in deactivate_all_fds()
        um: Timer code cleanup
        um: fix os_timer_one_shot()
        um: Fix IRQ controller regression on console read
      f2772a0e
    • Linus Torvalds's avatar
      Merge tag 'stream_open-5.3' of https://lab.nexedi.com/kirr/linux · fcd98147
      Linus Torvalds authored
      Pull stream_open() updates from Kirill Smelkov:
       "This time on stream_open front it is only two small changes:
      
         - the first one converts stream_open.cocci to treat all functions
           that start with wait_.* as blocking. Previously it was only
           wait_event_.* functions that were considered as blocking, but this
           was falsely reporting several deadlock cases as only warning.
      
           This was picked by linux-kbuild and entered mainline as commit
           0c4ab18f ("coccinelle: api/stream_open: treat all wait_.*()
           calls as blocking"), and already merged earlier.
      
         - the second one teaches stream_open.cocci to consider files as being
           stream-like even if they use noop_llseek. It results in two more
           drivers being converted to stream_open() (mousedev.c and
           hid-sensor-custom.c)"
      
      * tag 'stream_open-5.3' of https://lab.nexedi.com/kirr/linux:
        *: convert stream-like files -> stream_open, even if they use noop_llseek
      fcd98147
  2. 14 Jul, 2019 8 commits
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v5.3-1' of git://git.infradead.org/linux-platform-drivers-x86 · 55167453
      Linus Torvalds authored
      Pull x86 platform driver updates from Andy Shevchenko:
       "Gathered a bunch of x86 platform driver changes. It's rather big,
        since includes two big refactors and completely new driver:
      
         - ASUS WMI driver got a big refactoring in order to support the TUF
           Gaming laptops. Besides that, the regression with backlight being
           permanently off on various EeePC laptops has been fixed.
      
         - Accelerometer on HP ProBook 450 G0 shows wrong measurements due to
           X axis being inverted. This has been fixed.
      
         - Intel PMC core driver has been extended to be ACPI enumerated if
           the DSDT provides device with _HID "INT33A1". This allows to
           convert the driver to be pure platform and support new hardware
           purely based on ACPI DSDT.
      
         - From now on the Intel Speed Select Technology is supported thru a
           corresponding driver. This driver provides an access to the
           features of the ISST, such as Performance Profile, Core Power, Base
           frequency and Turbo Frequency.
      
         - Mellanox platform drivers has been refactored and now extended to
           support more systems, including new coming ones.
      
         - The OLPC XO-1.75 platform is now supported.
      
         - CB4063 Beckhoff Automation board is using PMC clocks, provided via
           pmc_atom driver, for ethernet controllers in a way that they can't
           be managed by the clock driver. The quirk has been extended to
           cover this case.
      
         - Touchscreen on Chuwi Hi10 Plus tablet has been enabled. Meanwhile
           the information of Chuwi Hi10 Air has been fixed to cover more
           models based on the same platform.
      
         - Xiaomi notebooks have WMI interface enabled. Thus, the driver to
           support it has been provided. It required some extension of the
           generic WMI library, which allows to propagate opaque context to
           the ->probe() of the individual drivers.
      
        This release includes debugfs clean up from Greg KH for several
        drivers that drop return code check and make debugfs absence or
        failure non-fatal.
      
        Also miscellaneous fixes here and there, mostly for Acer WMI and
        various Intel drivers"
      
      * tag 'platform-drivers-x86-v5.3-1' of git://git.infradead.org/linux-platform-drivers-x86: (74 commits)
        platform/x86: Fix PCENGINES_APU2 Kconfig warning
        tools/power/x86/intel-speed-select: Add .gitignore file
        platform/x86: mlx-platform: Fix error handling in mlxplat_init()
        platform/x86: intel_pmc_core: Attach using APCI HID "INT33A1"
        platform/x86: intel_pmc_core: transform Pkg C-state residency from TSC ticks into microseconds
        platform/x86: asus-wmi: Use dev_get_drvdata()
        Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces
        platform/x86: mlx-platform: Add more reset cause attributes
        platform/x86: mlx-platform: Modify DMI matching order
        platform/x86: mlx-platform: Add regmap structure for the next generation systems
        platform/x86: mlx-platform: Change API for i2c-mlxcpld driver activation
        platform/x86: mlx-platform: Move regmap initialization before all drivers activation
        MAINTAINERS: Update for Intel Speed Select Technology
        tools/power/x86: A tool to validate Intel Speed Select commands
        platform/x86: ISST: Restore state on resume
        platform/x86: ISST: Add Intel Speed Select PUNIT MSR interface
        platform/x86: ISST: Add Intel Speed Select mailbox interface via MSRs
        platform/x86: ISST: Add Intel Speed Select mailbox interface via PCI
        platform/x86: ISST: Add Intel Speed Select mmio interface
        platform/x86: ISST: Add IOCTL to Translate Linux logical CPU to PUNIT CPU number
        ...
      55167453
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v5.3' of git://git.linaro.org/landing-teams/working/fujitsu/integration · fde7dc63
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
      
       - stm32: race fix by adding a spinlock
      
       - mhu: trim included headers
      
       - omap: add support for K3 SoCs
      
       - imx: Irq disable fix
      
       - bcm: tidy up extracting driver data
      
       - tegra: make resume 'noirq'
      
       - api: fix error handling
      
      * tag 'mailbox-v5.3' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        mailbox: handle failed named mailbox channel request
        mailbox: tegra: avoid resume NULL mailboxes
        mailbox: tegra: hsp: add noirq resume
        mailbox: bcm-flexrm-mailbox: using dev_get_drvdata directly
        mailbox: imx: Clear GIEn bit at shutdown
        mailbox: omap: Add support for TI K3 SoCs
        dt-bindings: mailbox: omap: Update bindings for TI K3 SoCs
        mailbox: arm_mhu: reorder header inclusion and drop unneeded ones
        mailbox: stm32_ipcc: add spinlock to fix channels concurrent access
      fde7dc63
    • Linus Torvalds's avatar
      Merge branch 'for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu · a1240cf7
      Linus Torvalds authored
      Pull percpu updates from Dennis Zhou:
       "This includes changes to let percpu_ref release the backing percpu
        memory earlier after it has been switched to atomic in cases where the
        percpu ref is not revived.
      
        This will help recycle percpu memory earlier in cases where the
        refcounts are pinned for prolonged periods of time"
      
      * 'for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu:
        percpu_ref: release percpu memory early without PERCPU_REF_ALLOW_REINIT
        md: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT
        io_uring: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT
        percpu_ref: introduce PERCPU_REF_ALLOW_REINIT flag
      a1240cf7
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1d039859
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "A number of PMU driver corner case fixes, a race fix, an event
        grouping fix, plus a bunch of tooling fixes/updates"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits)
        perf/x86/intel: Fix spurious NMI on fixed counter
        perf/core: Fix exclusive events' grouping
        perf/x86/amd/uncore: Set the thread mask for F17h L3 PMCs
        perf/x86/amd/uncore: Do not set 'ThreadMask' and 'SliceMask' for non-L3 PMCs
        perf/core: Fix race between close() and fork()
        perf intel-pt: Fix potential NULL pointer dereference found by the smatch tool
        perf intel-bts: Fix potential NULL pointer dereference found by the smatch tool
        perf script: Assume native_arch for pipe mode
        perf scripts python: export-to-sqlite.py: Fix DROP VIEW power_events_view
        perf scripts python: export-to-postgresql.py: Fix DROP VIEW power_events_view
        perf hists browser: Fix potential NULL pointer dereference found by the smatch tool
        perf cs-etm: Fix potential NULL pointer dereference found by the smatch tool
        perf parse-events: Remove unused variable: error
        perf parse-events: Remove unused variable 'i'
        perf metricgroup: Add missing list_del_init() when flushing egroups list
        perf tools: Use list_del_init() more thorougly
        perf tools: Use zfree() where applicable
        tools lib: Adopt zalloc()/zfree() from tools/perf
        perf tools: Move get_current_dir_name() cond prototype out of util.h
        perf namespaces: Move the conditional setns() prototype to namespaces.h
        ...
      1d039859
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0c85ce13
      Linus Torvalds authored
      Pull locking fix from Ingo Molnar:
       "A single fix for a locking statistics bug"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/lockdep: Fix lock used or unused stats error
      0c85ce13
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 577d9460
      Linus Torvalds authored
      Pull x86 fix from Ingo Molnar:
       "A single build system bugfix"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/vdso: Fix flip/flop vdso build bug
      577d9460
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 50ec1881
      Linus Torvalds authored
      Pull scheduler fix from Ingo Molnar:
       "Fix a sched statistics related bug that would trigger a kernel warning
        on certain configs"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/core: Fix preempt warning in ttwu
      50ec1881
    • Kirill Smelkov's avatar
      *: convert stream-like files -> stream_open, even if they use noop_llseek · 3975b097
      Kirill Smelkov authored
      This patch continues 10dce8af (fs: stream_open - opener for
      stream-like files so that read and write can run simultaneously without
      deadlock) and c5bf68fe (*: convert stream-like files from
      nonseekable_open -> stream_open) and teaches steam_open.cocci to
      consider files as being stream-like not only if they have
      .llseek=no_llseek, but also if they have .llseek=noop_llseek.
      
      This is safe to do: the comment about noop_llseek says
      
      	This is an implementation of ->llseek useable for the rare special case when
      	userspace expects the seek to succeed but the (device) file is actually not
      	able to perform the seek. In this case you use noop_llseek() instead of
      	falling back to the default implementation of ->llseek.
      
      and in general noop_llseek was massively added to drivers in 6038f373
      (llseek: automatically add .llseek fop) when changing default for NULL .llseek
      from NOP to no_llseek with the idea to avoid breaking compatibility, if
      maybe some user-space program was using lseek on a device without caring
      about the result, but caring if it was an error or not.
      
      Amended semantic patch produces two changes when applied tree-wide:
      
              drivers/hid/hid-sensor-custom.c:690:8-24: WARNING: hid_sensor_custom_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
              drivers/input/mousedev.c:564:1-17: ERROR: mousedev_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
      
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Jan Blunck <jblunck@suse.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Jonathan Cameron <jic23@kernel.org>
      Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: Kirill Smelkov's avatarKirill Smelkov <kirr@nexedi.com>
      3975b097
  3. 13 Jul, 2019 23 commits
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 192f0f8e
      Linus Torvalds authored
      Pull powerpc updates from Michael Ellerman:
       "Notable changes:
      
         - Removal of the NPU DMA code, used by the out-of-tree Nvidia driver,
           as well as some other functions only used by drivers that haven't
           (yet?) made it upstream.
      
         - A fix for a bug in our handling of hardware watchpoints (eg. perf
           record -e mem: ...) which could lead to register corruption and
           kernel crashes.
      
         - Enable HAVE_ARCH_HUGE_VMAP, which allows us to use large pages for
           vmalloc when using the Radix MMU.
      
         - A large but incremental rewrite of our exception handling code to
           use gas macros rather than multiple levels of nested CPP macros.
      
        And the usual small fixes, cleanups and improvements.
      
        Thanks to: Alastair D'Silva, Alexey Kardashevskiy, Andreas Schwab,
        Aneesh Kumar K.V, Anju T Sudhakar, Anton Blanchard, Arnd Bergmann,
        Athira Rajeev, Cédric Le Goater, Christian Lamparter, Christophe
        Leroy, Christophe Lombard, Christoph Hellwig, Daniel Axtens, Denis
        Efremov, Enrico Weigelt, Frederic Barrat, Gautham R. Shenoy, Geert
        Uytterhoeven, Geliang Tang, Gen Zhang, Greg Kroah-Hartman, Greg Kurz,
        Gustavo Romero, Krzysztof Kozlowski, Madhavan Srinivasan, Masahiro
        Yamada, Mathieu Malaterre, Michael Neuling, Nathan Lynch, Naveen N.
        Rao, Nicholas Piggin, Nishad Kamdar, Oliver O'Halloran, Qian Cai, Ravi
        Bangoria, Sachin Sant, Sam Bobroff, Satheesh Rajendran, Segher
        Boessenkool, Shaokun Zhang, Shawn Anastasio, Stewart Smith, Suraj
        Jitindar Singh, Thiago Jung Bauermann, YueHaibing"
      
      * tag 'powerpc-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (163 commits)
        powerpc/powernv/idle: Fix restore of SPRN_LDBAR for POWER9 stop state.
        powerpc/eeh: Handle hugepages in ioremap space
        ocxl: Update for AFU descriptor template version 1.1
        powerpc/boot: pass CONFIG options in a simpler and more robust way
        powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h
        powerpc/irq: Don't WARN continuously in arch_local_irq_restore()
        powerpc/module64: Use symbolic instructions names.
        powerpc/module32: Use symbolic instructions names.
        powerpc: Move PPC_HA() PPC_HI() and PPC_LO() to ppc-opcode.h
        powerpc/module64: Fix comment in R_PPC64_ENTRY handling
        powerpc/boot: Add lzo support for uImage
        powerpc/boot: Add lzma support for uImage
        powerpc/boot: don't force gzipped uImage
        powerpc/8xx: Add microcode patch to move SMC parameter RAM.
        powerpc/8xx: Use IO accessors in microcode programming.
        powerpc/8xx: replace #ifdefs by IS_ENABLED() in microcode.c
        powerpc/8xx: refactor programming of microcode CPM params.
        powerpc/8xx: refactor printing of microcode patch name.
        powerpc/8xx: Refactor microcode write
        powerpc/8xx: refactor writing of CPM microcode arrays
        ...
      192f0f8e
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · ec924975
      Linus Torvalds authored
      Pull sparc updates from David Miller:
       "Just a few small changes:
      
         - Fix console naming inconsistency with hypervisor consoles, from
           John Paul Adrian Glaubitz
      
         - Fix userland compilation due to use of u_int, from Masahiro Yamada"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Add missing newline at end of file
        sparc: fix unknown type name u_int in uapi header
        sparc: configs: Remove useless UEVENT_HELPER_PATH
        sparc: Remove redundant copy of the LGPL-2.0
        sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg
      ec924975
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · d1210929
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix excessive stack usage in cxgb4, from Arnd Bergmann.
      
       2) Missing skb queue lock init in tipc, from Chris Packham.
      
       3) Fix some regressions in ipv6 flow label handling, from Eric Dumazet.
      
       4) Elide flow dissection of local packets in FIB rules, from Petar
          Penkov.
      
       5) Fix TLS support build failure in mlx5, from Tariq Toukab.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (36 commits)
        ppp: mppe: Revert "ppp: mppe: Add softdep to arc4"
        net: dsa: qca8k: replace legacy gpio include
        net: hisilicon: Use devm_platform_ioremap_resource
        cxgb4: reduce kernel stack usage in cudbg_collect_mem_region()
        tipc: ensure head->lock is initialised
        tc-tests: updated skbedit tests
        nfp: flower: ensure ip protocol is specified for L4 matches
        nfp: flower: fix ethernet check on match fields
        net/mlx5e: Provide cb_list pointer when setting up tc block on rep
        net: phy: make exported variables non-static
        net: sched: Fix NULL-pointer dereference in tc_indr_block_ing_cmd()
        davinci_cpdma: don't cast dma_addr_t to pointer
        net: openvswitch: do not update max_headroom if new headroom is equal to old headroom
        net/mlx5e: Convert single case statement switch statements into if statements
        net/mlx5: E-Switch, Reduce ingress acl modify metadata stack usage
        net/mlx5e: Fix unused variable warning when CONFIG_MLX5_ESWITCH is off
        net/mlx5e: Fix compilation error in TLS code
        ipv6: fix static key imbalance in fl_create()
        ipv6: fix potential crash in ip6_datagram_dst_update()
        ipv6: tcp: fix flowlabels reflection for RST packets
        ...
      d1210929
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide · 1fa91854
      Linus Torvalds authored
      Pull IDE update from David Miller:
       "Small cleanup"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
        ide: use BIT() macro for defining bit-flags
      1fa91854
    • Linus Torvalds's avatar
      Merge tag 'mtd/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 3f069622
      Linus Torvalds authored
      Pull MTD updates from Miquel Raynal:
       "This contains the following changes for MTD:
      
        MTD core changes:
         - New Hyperbus framework
         - New _is_locked (concat) implementation
         - Various cleanups
      
        NAND core changes:
         - use longest matching pattern in ->exec_op() default parser
         - export NAND operation tracer
         - add flag to indicate panic_write in MTD
         - use kzalloc() instead of kmalloc() and memset()
      
        Raw NAND controller drivers changes:
         - brcmnand:
             - fix BCH ECC layout for large page NAND parts
             - fallback to detected ecc-strength, ecc-step-size
             - when oops in progress use pio and interrupt polling
             - code refactor code to introduce helper functions
             - add support for v7.3 controller
         - FSMC:
             - use nand_op_trace for operation tracing
         - GPMI:
             - move all driver code into single file
             - various cleanups (including dmaengine changes)
             - use runtime PM to manage clocks
             - implement exec_op
         - MTK:
             - correct low level time calculation of r/w cycle
             - improve data sampling timing for read cycle
             - add validity check for CE# pin setting
             - fix wrongly assigned OOB buffer pointer issue
             - re-license MTK NAND driver as Dual MIT/GPL
         - STM32:
             - manage the get_irq error case
             - increase DMA completion timeouts
      
        Raw NAND chips drivers changes:
         - Macronix: add read-retry support
      
        Onenand driver changes:
         - add support for 8Gb datasize chips
         - avoid fall-through warnings
      
        SPI-NAND changes:
         - define macros for page-read ops with three-byte addresses
         - add support for two-byte device IDs and then for GigaDevice
           GD5F1GQ4UFxxG
         - add initial support for Paragon PN26G0xA
         - handle the case where the last page read has bitflips
      
        SPI-NOR core changes:
         - add support for the mt25ql02g and w25q16jv flashes
         - print error in case of jedec read id fails
         - is25lp256: add post BFPT fix to correct the addr_width
      
        SPI NOR controller drivers changes:
         - intel-spi: Add support for Intel Elkhart Lake SPI serial flash
         - smt32: remove the driver as the driver was replaced by spi-stm32-qspi.c
         - cadence-quadspi: add reset control"
      
      * tag 'mtd/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (60 commits)
        mtd: concat: implement _is_locked mtd operation
        mtd: concat: refactor concat_lock/concat_unlock
        mtd: abi: do not use C++ style comments in uapi header
        mtd: afs: remove unneeded NULL check
        mtd: rawnand: stm32_fmc2: increase DMA completion timeouts
        mtd: rawnand: Use kzalloc() instead of kmalloc() and memset()
        mtd: hyperbus: Add driver for TI's HyperBus memory controller
        mtd: spinand: read returns badly if the last page has bitflips
        mtd: spinand: Add initial support for Paragon PN26G0xA
        mtd: rawnand: mtk: Re-license MTK NAND driver as Dual MIT/GPL
        mtd: rawnand: gpmi: remove double assignment to block_size
        dt-bindings: mtd: brcmnand: Add brcmnand, brcmnand-v7.3 support
        mtd: rawnand: brcmnand: Add support for v7.3 controller
        mtd: rawnand: brcmnand: Refactored code to introduce helper functions
        mtd: rawnand: brcmnand: When oops in progress use pio and interrupt polling
        mtd: Add flag to indicate panic_write
        mtd: rawnand: Add Macronix NAND read retry support
        mtd: onenand: Avoid fall-through warnings
        mtd: spinand: Add support for GigaDevice GD5F1GQ4UFxxG
        mtd: spinand: Add support for two-byte device IDs
        ...
      3f069622
    • Linus Torvalds's avatar
      Merge tag 'for-5.3/dm-changes' of... · 22608405
      Linus Torvalds authored
      Merge tag 'for-5.3/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper updates from Mike Snitzer:
      
       - Add encrypted byte-offset initialization vector (eboiv) to DM crypt.
      
       - Add optional discard features to DM snapshot which allow freeing
         space from a DM device whose free space was exhausted.
      
       - Various small improvements to use struct_size() and kzalloc().
      
       - Fix to check if DM thin metadata is in fail_io mode before attempting
         to update the superblock to set the needs_check flag. Otherwise the
         DM thin-pool can hang.
      
       - Fix DM bufio shrinker's potential for ABBA recursion deadlock with DM
         thin provisioning on loop usecase.
      
      * tag 'for-5.3/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm bufio: fix deadlock with loop device
        dm snapshot: add optional discard support features
        dm crypt: implement eboiv - encrypted byte-offset initialization vector
        dm crypt: remove obsolete comment about plumb IV
        dm crypt: wipe private IV struct after key invalid flag is set
        dm integrity: use kzalloc() instead of kmalloc() + memset()
        dm: update stale comment in end_clone_bio()
        dm log writes: fix incorrect comment about the logged sequence example
        dm log writes: use struct_size() to calculate size of pending_block
        dm crypt: use struct_size() when allocating encryption context
        dm integrity: always set version on superblock update
        dm thin metadata: check if in fail_io mode when setting needs_check
      22608405
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.3' of git://github.com/cminyard/linux-ipmi · 92adeb61
      Linus Torvalds authored
      Pull IPMI updates from Corey Minyard:
       "Some small fixes for various things, nothing huge, mostly found by
        automated tools.
      
        Plus add a driver that allows Linux to act as an IPMB slave device, so
        it can be a satellite MC in an IPMI network"
      
      * tag 'for-linus-5.3' of git://github.com/cminyard/linux-ipmi:
        docs: ipmb: place it at driver-api and convert to ReST
        fix platform_no_drv_owner.cocci warnings
        ipmi: ipmb: don't allocate i2c_client on stack
        ipmi: ipmb: Fix build error while CONFIG_I2C is set to m
        Add support for IPMB driver
        drivers: ipmi: Drop device reference
        ipmi_ssif: fix unexpected driver unregister warning
        ipmi_si: use bool type for initialized variable
        ipmi_si: fix unexpected driver unregister warning
      92adeb61
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 43c95d36
      Linus Torvalds authored
      Pull pin control updates from Linus Walleij:
       "This is the bulk of pin control changes for the v5.3 kernel cycle:
      
        Core changes:
      
         - Device links can optionally be added between a pin control producer
           and its consumers. This will affect how the system power management
           is handled: a pin controller will not suspend before all of its
           consumers have been suspended.
      
           This was necessary for the ST Microelectronics STMFX expander and
           need to be tested on other systems as well: it makes sense to make
           this default in the long run.
      
           Right now it is opt-in per driver.
      
         - Drive strength can be specified in microamps. With decreases in
           silicon technology, milliamps isn't granular enough, let's make it
           possible to select drive strengths in microamps.
      
           Right now the Meson (AMlogic) driver needs this.
      
        New drivers:
      
         - New subdriver for the Tegra 194 SoC.
      
         - New subdriver for the Qualcomm SDM845.
      
         - New subdriver for the Qualcomm SM8150.
      
         - New subdriver for the Freescale i.MX8MN (Freescale is now a product
           line of NXP).
      
         - New subdriver for Marvell MV98DX1135.
      
        Driver improvements:
      
         - The Bitmain BM1880 driver now supports pin config in addition to
           muxing.
      
         - The Qualcomm drivers can now reserve some GPIOs as taken aside and
           not usable for users. This is used in ACPI systems to take out some
           GPIO lines used by the BIOS so that noone else (neither kernel nor
           userspace) will play with them by mistake and crash the machine.
      
         - A slew of refurbishing around the Aspeed drivers (board management
           controllers for servers) in preparation for the new Aspeed AST2600
           SoC.
      
         - A slew of improvements over the SH PFC drivers as usual.
      
         - Misc cleanups and fixes"
      
      * tag 'pinctrl-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (106 commits)
        pinctrl: aspeed: Strip moved macros and structs from private header
        pinctrl: aspeed: Fix missed include
        pinctrl: baytrail: Use GENMASK() consistently
        pinctrl: baytrail: Re-use data structures from pinctrl-intel.h
        pinctrl: baytrail: Use defined macro instead of magic in byt_get_gpio_mux()
        pinctrl: qcom: Add SM8150 pinctrl driver
        dt-bindings: pinctrl: qcom: Add SM8150 pinctrl binding
        dt-bindings: pinctrl: qcom: Document missing gpio nodes
        pinctrl: aspeed: Add implementation-related documentation
        pinctrl: aspeed: Split out pinmux from general pinctrl
        pinctrl: aspeed: Clarify comment about strapping W1C
        pinctrl: aspeed: Correct comment that is no longer true
        MAINTAINERS: Add entry for ASPEED pinctrl drivers
        dt-bindings: pinctrl: aspeed: Convert AST2500 bindings to json-schema
        dt-bindings: pinctrl: aspeed: Convert AST2400 bindings to json-schema
        dt-bindings: pinctrl: aspeed: Split bindings document in two
        pinctrl: qcom: Add irq_enable callback for msm gpio
        pinctrl: madera: Fixup SPDX headers
        pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard
        pinctrl: tegra: Add bitmask support for parked bits
        ...
      43c95d36
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 073c916b
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
      
       - an update to Elan touchpad SMBus driver to fetch device parameters
         (size, resolution) while it is still in PS/2 mode, before switching
         over to SMBus, as in that mode some devices return garbage dimensions
      
       - update to iforce joystick driver
      
       - miscellaneous driver fixes
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (48 commits)
        Input: gpio_keys_polled - allow specifying name of input device
        Input: edt-ft5x06 - simplify event reporting code
        Input: max77650-onkey - add MODULE_ALIAS()
        Input: atmel_mxt_ts - fix leak in mxt_update_cfg()
        Input: synaptics - enable SMBUS on T480 thinkpad trackpad
        Input: atmel_mxt_ts - fix -Wunused-const-variable
        Input: joydev - extend absolute mouse detection
        HID: quirks: Refactor ELAN 400 and 401 handling
        Input: elan_i2c - export the device id whitelist
        Input: edt-ft5x06 - use get_unaligned_be16()
        Input: iforce - add the Saitek R440 Force Wheel
        Input: iforce - use unaligned accessors, where appropriate
        Input: iforce - drop couple of temps from transport code
        Input: iforce - drop bus type from iforce structure
        Input: iforce - use DMA-safe buffores for USB transfers
        Input: iforce - allow callers supply data buffer when fetching device IDs
        Input: iforce - only call iforce_process_packet() if initialized
        Input: iforce - signal command completion from transport code
        Input: iforce - do not combine arguments for iforce_process_packet()
        Input: iforce - factor out hat handling when parsing packets
        ...
      073c916b
    • Linus Torvalds's avatar
      Merge tag 'for-5.3/io_uring-20190711' of git://git.kernel.dk/linux-block · a2d79c71
      Linus Torvalds authored
      Pull io_uring updates from Jens Axboe:
       "This contains:
      
         - Support for recvmsg/sendmsg as first class opcodes.
      
           I don't envision going much further down this path, as there are
           plans in progress to support potentially any system call in an
           async fashion through io_uring. But I think it does make sense to
           have certain core ops available directly, especially those that can
           support a "try this non-blocking" flag/mode. (me)
      
         - Handle generic short reads automatically.
      
           This can happen fairly easily if parts of the buffered read is
           cached. Since the application needs to issue another request for
           the remainder, just do this internally and save kernel/user
           roundtrip while providing a nicer more robust API. (me)
      
         - Support for linked SQEs.
      
           This allows SQEs to depend on each other, enabling an application
           to eg queue a read-from-this-file,write-to-that-file pair. (me)
      
         - Fix race in stopping SQ thread (Jackie)"
      
      * tag 'for-5.3/io_uring-20190711' of git://git.kernel.dk/linux-block:
        io_uring: fix io_sq_thread_stop running in front of io_sq_thread
        io_uring: add support for recvmsg()
        io_uring: add support for sendmsg()
        io_uring: add support for sqe links
        io_uring: punt short reads to async context
        uio: make import_iovec()/compat_import_iovec() return bytes on success
      a2d79c71
    • Yuyang Du's avatar
      locking/lockdep: Fix lock used or unused stats error · 68d41d8c
      Yuyang Du authored
      The stats variable nr_unused_locks is incremented every time a new lock
      class is register and decremented when the lock is first used in
      __lock_acquire(). And after all, it is shown and checked in lockdep_stats.
      
      However, under configurations that either CONFIG_TRACE_IRQFLAGS or
      CONFIG_PROVE_LOCKING is not defined:
      
      The commit:
      
        09180651 ("locking/lockdep: Consolidate lock usage bit initialization")
      
      missed marking the LOCK_USED flag at IRQ usage initialization because
      as mark_usage() is not called. And the commit:
      
        886532ae ("locking/lockdep: Move mark_lock() inside CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING")
      
      further made mark_lock() not defined such that the LOCK_USED cannot be
      marked at all when the lock is first acquired.
      
      As a result, we fix this by not showing and checking the stats under such
      configurations for lockdep_stats.
      Reported-by: default avatarQian Cai <cai@lca.pw>
      Signed-off-by: default avatarYuyang Du <duyuyang@gmail.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: arnd@arndb.de
      Cc: frederic@kernel.org
      Link: https://lkml.kernel.org/r/20190709101522.9117-1-duyuyang@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      68d41d8c
    • Peter Zijlstra's avatar
      sched/core: Fix preempt warning in ttwu · e3d85487
      Peter Zijlstra authored
      John reported a DEBUG_PREEMPT warning caused by commit:
      
        aacedf26 ("sched/core: Optimize try_to_wake_up() for local wakeups")
      
      I overlooked that ttwu_stat() requires preemption disabled.
      Reported-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Tested-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Fixes: aacedf26 ("sched/core: Optimize try_to_wake_up() for local wakeups")
      Link: https://lkml.kernel.org/r/20190710105736.GK3402@hirez.programming.kicks-ass.netSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e3d85487
    • Kan Liang's avatar
      perf/x86/intel: Fix spurious NMI on fixed counter · e4557c1a
      Kan Liang authored
      If a user first sample a PEBS event on a fixed counter, then sample a
      non-PEBS event on the same fixed counter on Icelake, it will trigger
      spurious NMI. For example:
      
        perf record -e 'cycles:p' -a
        perf record -e 'cycles' -a
      
      The error message for spurious NMI:
      
        [June 21 15:38] Uhhuh. NMI received for unknown reason 30 on CPU 2.
        [    +0.000000] Do you have a strange power saving mode enabled?
        [    +0.000000] Dazed and confused, but trying to continue
      
      The bug was introduced by the following commit:
      
        commit 6f55967a ("perf/x86/intel: Fix race in intel_pmu_disable_event()")
      
      The commit moves the intel_pmu_pebs_disable() after intel_pmu_disable_fixed(),
      which returns immediately.  The related bit of PEBS_ENABLE MSR will never be
      cleared for the fixed counter. Then a non-PEBS event runs on the fixed counter,
      but the bit on PEBS_ENABLE is still set, which triggers spurious NMIs.
      
      Check and disable PEBS for fixed counters after intel_pmu_disable_fixed().
      Reported-by: default avatarYi, Ammy <ammy.yi@intel.com>
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: <stable@vger.kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Fixes: 6f55967a ("perf/x86/intel: Fix race in intel_pmu_disable_event()")
      Link: https://lkml.kernel.org/r/20190625142135.22112-1-kan.liang@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e4557c1a
    • Alexander Shishkin's avatar
      perf/core: Fix exclusive events' grouping · 8a58ddae
      Alexander Shishkin authored
      So far, we tried to disallow grouping exclusive events for the fear of
      complications they would cause with moving between contexts. Specifically,
      moving a software group to a hardware context would violate the exclusivity
      rules if both groups contain matching exclusive events.
      
      This attempt was, however, unsuccessful: the check that we have in the
      perf_event_open() syscall is both wrong (looks at wrong PMU) and
      insufficient (group leader may still be exclusive), as can be illustrated
      by running:
      
        $ perf record -e '{intel_pt//,cycles}' uname
        $ perf record -e '{cycles,intel_pt//}' uname
      
      ultimately successfully.
      
      Furthermore, we are completely free to trigger the exclusivity violation
      by:
      
         perf -e '{cycles,intel_pt//}' -e '{intel_pt//,instructions}'
      
      even though the helpful perf record will not allow that, the ABI will.
      
      The warning later in the perf_event_open() path will also not trigger, because
      it's also wrong.
      
      Fix all this by validating the original group before moving, getting rid
      of broken safeguards and placing a useful one to perf_install_in_context().
      Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: <stable@vger.kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: mathieu.poirier@linaro.org
      Cc: will.deacon@arm.com
      Fixes: bed5b25a ("perf: Add a pmu capability for "exclusive" events")
      Link: https://lkml.kernel.org/r/20190701110755.24646-1-alexander.shishkin@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      8a58ddae
    • Kim Phillips's avatar
      perf/x86/amd/uncore: Set the thread mask for F17h L3 PMCs · 2f217d58
      Kim Phillips authored
      Fill in the L3 performance event select register ThreadMask
      bitfield, to enable per hardware thread accounting.
      Signed-off-by: default avatarKim Phillips <kim.phillips@amd.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: <stable@vger.kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Gary Hook <Gary.Hook@amd.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Martin Liska <mliska@suse.cz>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Pu Wen <puwen@hygon.cn>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Link: https://lkml.kernel.org/r/20190628215906.4276-2-kim.phillips@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      2f217d58
    • Kim Phillips's avatar
      perf/x86/amd/uncore: Do not set 'ThreadMask' and 'SliceMask' for non-L3 PMCs · 16f46411
      Kim Phillips authored
      The following commit:
      
        d7cbbe49 ("perf/x86/amd/uncore: Set ThreadMask and SliceMask for L3 Cache perf events")
      
      enables L3 PMC events for all threads and slices by writing 1's in
      'ChL3PmcCfg' (L3 PMC PERF_CTL) register fields.
      
      Those bitfields overlap with high order event select bits in the Data
      Fabric PMC control register, however.
      
      So when a user requests raw Data Fabric events (-e amd_df/event=0xYYY/),
      the two highest order bits get inadvertently set, changing the counter
      select to events that don't exist, and for which no counts are read.
      
      This patch changes the logic to write the L3 masks only when dealing
      with L3 PMC counters.
      
      AMD Family 16h and below Northbridge (NB) counters were not affected.
      Signed-off-by: default avatarKim Phillips <kim.phillips@amd.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: <stable@vger.kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Gary Hook <Gary.Hook@amd.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Martin Liska <mliska@suse.cz>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Pu Wen <puwen@hygon.cn>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Fixes: d7cbbe49 ("perf/x86/amd/uncore: Set ThreadMask and SliceMask for L3 Cache perf events")
      Link: https://lkml.kernel.org/r/20190628215906.4276-1-kim.phillips@amd.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      16f46411
    • Peter Zijlstra's avatar
      perf/core: Fix race between close() and fork() · 1cf8dfe8
      Peter Zijlstra authored
      Syzcaller reported the following Use-after-Free bug:
      
      	close()						clone()
      
      							  copy_process()
      							    perf_event_init_task()
      							      perf_event_init_context()
      							        mutex_lock(parent_ctx->mutex)
      								inherit_task_group()
      								  inherit_group()
      								    inherit_event()
      								      mutex_lock(event->child_mutex)
      								      // expose event on child list
      								      list_add_tail()
      								      mutex_unlock(event->child_mutex)
      							        mutex_unlock(parent_ctx->mutex)
      
      							    ...
      							    goto bad_fork_*
      
      							  bad_fork_cleanup_perf:
      							    perf_event_free_task()
      
      	  perf_release()
      	    perf_event_release_kernel()
      	      list_for_each_entry()
      		mutex_lock(ctx->mutex)
      		mutex_lock(event->child_mutex)
      		// event is from the failing inherit
      		// on the other CPU
      		perf_remove_from_context()
      		list_move()
      		mutex_unlock(event->child_mutex)
      		mutex_unlock(ctx->mutex)
      
      							      mutex_lock(ctx->mutex)
      							      list_for_each_entry_safe()
      							        // event already stolen
      							      mutex_unlock(ctx->mutex)
      
      							    delayed_free_task()
      							      free_task()
      
      	     list_for_each_entry_safe()
      	       list_del()
      	       free_event()
      	         _free_event()
      		   // and so event->hw.target
      		   // is the already freed failed clone()
      		   if (event->hw.target)
      		     put_task_struct(event->hw.target)
      		       // WHOOPSIE, already quite dead
      
      Which puts the lie to the the comment on perf_event_free_task():
      'unexposed, unused context' not so much.
      
      Which is a 'fun' confluence of fail; copy_process() doing an
      unconditional free_task() and not respecting refcounts, and perf having
      creative locking. In particular:
      
        82d94856 ("perf/core: Fix lock inversion between perf,trace,cpuhp")
      
      seems to have overlooked this 'fun' parade.
      
      Solve it by using the fact that detached events still have a reference
      count on their (previous) context. With this perf_event_free_task()
      can detect when events have escaped and wait for their destruction.
      Debugged-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Reported-by: syzbot+a24c397a29ad22d86c98@syzkaller.appspotmail.com
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: <stable@vger.kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Fixes: 82d94856 ("perf/core: Fix lock inversion between perf,trace,cpuhp")
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1cf8dfe8
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-5.3-20190709' of... · e5eb08ac
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-5.3-20190709' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/core improvements and fixes:
      
      Intel PT:
      
        Adrian Hunter:
      
        - Fix DROP VIEW power_events_view in the postgresql and sqlite export-db
          python scripts.
      
      perf script:
      
        Song Liu:
      
        - Assume native_arch for pipe mode, fixing a segfault.
      
      perf inject:
      
        Arnaldo Carvalho de Melo:
      
        - The tool->read() call may pass a NULL evsel, handle it.
      
      core:
      
        Arnaldo Carvalho de Melo:
      
        - Move zalloc/zfree.c to tools/lib, further eroding tools/perf/util.[ch]
      
        - Use zfree() where applicable instead of open coded equivalent.
      
        - Add stdlib.h and some other headers to places where its needed and were
          getting via util.h, that doesn't need that anymore.
      
        - Use list_del_init() more thoroughly.
      
      Miscellaneous:
      
        Leo Yan:
      
        - Fix use after free and potential NULL pointer derefs detected by the
          smatch tool in various places.
      
        Luke Mujica:
      
        - Remove a couple unused variables in the parse-events code.
      
        Numfor Mbiziwo-Tiapo:
      
        - Initialize variable to suppress memory sanitizer warning in the
          mmap-thread-lookup 'perf test' entry.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e5eb08ac
    • Eric Biggers's avatar
      ppp: mppe: Revert "ppp: mppe: Add softdep to arc4" · 25a09ce7
      Eric Biggers authored
      Commit 0e5a610b ("ppp: mppe: switch to RC4 library interface"),
      which was merged through the crypto tree for v5.3, changed ppp_mppe.c to
      use the new arc4_crypt() library function rather than access RC4 through
      the dynamic crypto_skcipher API.
      
      Meanwhile commit aad1dcc4 ("ppp: mppe: Add softdep to arc4") was
      merged through the net tree and added a module soft-dependency on "arc4".
      
      The latter commit no longer makes sense because the code now uses the
      "libarc4" module rather than "arc4", and also due to the direct use of
      arc4_crypt(), no module soft-dependency is required.
      
      So revert the latter commit.
      
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25a09ce7
    • Linus Torvalds's avatar
      Merge tag 'dlm-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm · 964a4eac
      Linus Torvalds authored
      Pull dlm updates from David Teigland:
       "This set removes some unnecessary debugfs error handling, and checks
        that lowcomms workqueues are not NULL before destroying"
      
      * tag 'dlm-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
        dlm: no need to check return value of debugfs_create functions
        dlm: check if workqueues are NULL before flushing/destroying
      964a4eac
    • Linus Torvalds's avatar
      Merge tag '9p-for-5.3' of git://github.com/martinetd/linux · 23bbbf5c
      Linus Torvalds authored
      Pull 9p updates from Dominique Martinet:
       "Two small fixes to properly cleanup the 9p transports list if
        virtio/xen module initialization fail.
      
        9p might otherwise try to access memory from a module that failed to
        register got freed"
      
      * tag '9p-for-5.3' of git://github.com/martinetd/linux:
        9p/xen: Add cleanup path in p9_trans_xen_init
        9p/virtio: Add cleanup path in p9_virtio_init
      23bbbf5c
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · a641a88e
      Linus Torvalds authored
      Pull f2fs updates from Jaegeuk Kim:
       "In this round, we've introduced native swap file support which can
        exploit DIO, enhanced existing checkpoint=disable feature with
        additional mount option to tune the triggering condition, and allowed
        user to preallocate physical blocks in a pinned file which will be
        useful to avoid f2fs fragmentation in append-only workloads. In
        addition, we've fixed subtle quota corruption issue.
      
        Enhancements:
         - add swap file support which uses DIO
         - allocate blocks for pinned file
         - allow SSR and mount option to enhance checkpoint=disable
         - enhance IPU IOs
         - add more sanity checks such as memory boundary access
      
        Bug fixes:
         - quota corruption in very corner case of error-injected SPO case
         - fix root_reserved on remount and some wrong counts
         - add missing fsck flag
      
        Some patches were also introduced to clean up ambiguous i_flags and
        debugging messages codes"
      
      * tag 'f2fs-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (33 commits)
        f2fs: improve print log in f2fs_sanity_check_ckpt()
        f2fs: avoid out-of-range memory access
        f2fs: fix to avoid long latency during umount
        f2fs: allow all the users to pin a file
        f2fs: support swap file w/ DIO
        f2fs: allocate blocks for pinned file
        f2fs: fix is_idle() check for discard type
        f2fs: add a rw_sem to cover quota flag changes
        f2fs: set SBI_NEED_FSCK for xattr corruption case
        f2fs: use generic EFSBADCRC/EFSCORRUPTED
        f2fs: Use DIV_ROUND_UP() instead of open-coding
        f2fs: print kernel message if filesystem is inconsistent
        f2fs: introduce f2fs_<level> macros to wrap f2fs_printk()
        f2fs: avoid get_valid_blocks() for cleanup
        f2fs: ioctl for removing a range from F2FS
        f2fs: only set project inherit bit for directory
        f2fs: separate f2fs i_flags from fs_flags and ext4 i_flags
        f2fs: replace ktype default_attrs with default_groups
        f2fs: Add option to limit required GC for checkpoint=disable
        f2fs: Fix accounting for unusable blocks
        ...
      a641a88e
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.3-merge-12' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 4ce9d181
      Linus Torvalds authored
      Pull xfs updates from Darrick Wong:
       "In this release there are a significant amounts of consolidations and
        cleanups in the log code; restructuring of the log to issue struct
        bios directly; new bulkstat ioctls to return v5 fs inode information
        (and fix all the padding problems of the old ioctl); the beginnings of
        multithreaded inode walks (e.g. quotacheck); and a reduction in memory
        usage in the online scrub code leading to reduced runtimes.
      
         - Refactor inode geometry calculation into a single structure instead
           of open-coding pieces everywhere.
      
         - Add online repair to build options.
      
         - Remove unnecessary function call flags and functions.
      
         - Claim maintainership of various loose xfs documentation and header
           files.
      
         - Use struct bio directly for log buffer IOs instead of struct
           xfs_buf.
      
         - Reduce log item boilerplate code requirements.
      
         - Merge log item code spread across too many files.
      
         - Further distinguish between log item commits and cancellations.
      
         - Various small cleanups to the ag small allocator.
      
         - Support cgroup-aware writeback
      
         - libxfs refactoring for mkfs cleanup
      
         - Remove unneeded #includes
      
         - Fix a memory allocation miscalculation in the new log bio code
      
         - Fix bisection problems
      
         - Fix a crash in ioend processing caused by tripping over freeing of
           preallocated transactions
      
         - Split out a generic inode walk mechanism from the bulkstat code,
           hook up all the internal users to use the walking code, then clean
           up bulkstat to serve only the bulkstat ioctls.
      
         - Add a multithreaded iwalk implementation to speed up quotacheck on
           fast storage with many CPUs.
      
         - Remove unnecessary return values in logging teardown functions.
      
         - Supplement the bstat and inogrp structures with new bulkstat and
           inumbers structures that have all the fields we need for v5
           filesystem features and none of the padding problems of their
           predecessors.
      
         - Wire up new ioctls that use the new structures with a much simpler
           bulk_ireq structure at the head instead of the pointerhappy mess we
           had before.
      
         - Enable userspace to constrain bulkstat returns to a single AG or a
           single special inode so that we can phase out a lot of geometry
           guesswork in userspace.
      
         - Reduce memory consumption and zeroing overhead in extended
           attribute scrub code.
      
         - Fix some behavioral regressions in the new bulkstat backend code.
      
         - Fix some behavioral regressions in the new log bio code"
      
      * tag 'xfs-5.3-merge-12' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (100 commits)
        xfs: chain bios the right way around in xfs_rw_bdev
        xfs: bump INUMBERS cursor correctly in xfs_inumbers_walk
        xfs: don't update lastino for FSBULKSTAT_SINGLE
        xfs: online scrub needn't bother zeroing its temporary buffer
        xfs: only allocate memory for scrubbing attributes when we need it
        xfs: refactor attr scrub memory allocation function
        xfs: refactor extended attribute buffer pointer functions
        xfs: attribute scrub should use seen_enough to pass error values
        xfs: allow single bulkstat of special inodes
        xfs: specify AG in bulk req
        xfs: wire up the v5 inumbers ioctl
        xfs: wire up new v5 bulkstat ioctls
        xfs: introduce v5 inode group structure
        xfs: introduce new v5 bulkstat structure
        xfs: rename bulkstat functions
        xfs: remove various bulk request typedef usage
        fs: xfs: xfs_log: Change return type from int to void
        xfs: poll waiting for quotacheck
        xfs: multithreaded iwalk implementation
        xfs: refactor INUMBERS to use iwalk functions
        ...
      4ce9d181
  4. 12 Jul, 2019 7 commits
    • Linus Torvalds's avatar
      Merge tag 'vfs-fix-ioctl-checking-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 5010fe9f
      Linus Torvalds authored
      Pull common SETFLAGS/FSSETXATTR parameter checking from Darrick Wong:
       "Here's a patch series that sets up common parameter checking functions
        for the FS_IOC_SETFLAGS and FS_IOC_FSSETXATTR ioctl implementations.
      
        The goal here is to reduce the amount of behaviorial variance between
        the filesystems where those ioctls originated (ext2 and XFS,
        respectively) and everybody else.
      
         - Standardize parameter checking for the SETFLAGS and FSSETXATTR
           ioctls (which were the file attribute setters for ext4 and xfs and
           have now been hoisted to the vfs)
      
         - Only allow the DAX flag to be set on files and directories"
      
      * tag 'vfs-fix-ioctl-checking-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        vfs: only allow FSSETXATTR to set DAX flag on files and dirs
        vfs: teach vfs_ioc_fssetxattr_check to check extent size hints
        vfs: teach vfs_ioc_fssetxattr_check to check project id info
        vfs: create a generic checking function for FS_IOC_FSSETXATTR
        vfs: create a generic checking and prep function for FS_IOC_SETFLAGS
      5010fe9f
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-5.3-rc1' of... · 8487d822
      Linus Torvalds authored
      Merge tag 'linux-kselftest-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest updates from Shuah Khan:
       "This Kselftest update for Linux 5.3-rc1 consists of build failure
        fixes and minor code cleaning patch to remove duplicate headers"
      
      * tag 'linux-kselftest-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        rseq/selftests: Fix Thumb mode build failure on arm32
        kselftests: cgroup: remove duplicated include from test_freezer.c
        selftests: timestamping: Fix SIOCGSTAMP undeclared build failure
        selftests: dma-buf: Adding kernel config fragment CONFIG_UDMABUF=y
      8487d822
    • Linus Torvalds's avatar
      Merge tag 'kconfig-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 106f1466
      Linus Torvalds authored
      Pull Kconfig updates from Masahiro Yamada:
      
       - always require argument for --defconfig and remove the hard-coded
         arch/$(ARCH)/defconfig path
      
       - make arch/$(SRCARCH)/configs/defconfig the new default of defconfig
      
       - some code cleanups
      
      * tag 'kconfig-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kconfig: remove meaningless if-conditional in conf_read()
        kconfig: Fix spelling of sym_is_changable
        unicore32: rename unicore32_defconfig to defconfig
        kconfig: make arch/*/configs/defconfig the default of KBUILD_DEFCONFIG
        kconfig: add static qualifier to expand_string()
        kconfig: require the argument of --defconfig
        kconfig: remove always false ifeq ($(KBUILD_DEFCONFIG,) conditional
      106f1466
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 39ceda5c
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - remove headers_{install,check}_all targets
      
       - remove unreasonable 'depends on !UML' from CONFIG_SAMPLES
      
       - re-implement 'make headers_install' more cleanly
      
       - add new header-test-y syntax to compile-test headers
      
       - compile-test exported headers to ensure they are compilable in
         user-space
      
       - compile-test headers under include/ to ensure they are self-contained
      
       - remove -Waggregate-return, -Wno-uninitialized, -Wno-unused-value
         flags
      
       - add -Werror=unknown-warning-option for Clang
      
       - add 128-bit built-in types support to genksyms
      
       - fix missed rebuild of modules.builtin
      
       - propagate 'No space left on device' error in fixdep to Make
      
       - allow Clang to use its integrated assembler
      
       - improve some coccinelle scripts
      
       - add a new flag KBUILD_ABS_SRCTREE to request Kbuild to use absolute
         path for $(srctree).
      
       - do not ignore errors when compression utility is missing
      
       - misc cleanups
      
      * tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (49 commits)
        kbuild: use -- separater intead of $(filter-out ...) for cc-cross-prefix
        kbuild: Inform user to pass ARCH= for make mrproper
        kbuild: fix compression errors getting ignored
        kbuild: add a flag to force absolute path for srctree
        kbuild: replace KBUILD_SRCTREE with boolean building_out_of_srctree
        kbuild: remove src and obj from the top Makefile
        scripts/tags.sh: remove unused environment variables from comments
        scripts/tags.sh: drop SUBARCH support for ARM
        kbuild: compile-test kernel headers to ensure they are self-contained
        kheaders: include only headers into kheaders_data.tar.xz
        kheaders: remove meaningless -R option of 'ls'
        kbuild: support header-test-pattern-y
        kbuild: do not create wrappers for header-test-y
        kbuild: compile-test exported headers to ensure they are self-contained
        init/Kconfig: add CONFIG_CC_CAN_LINK
        kallsyms: exclude kasan local symbols on s390
        kbuild: add more hints about SUBDIRS replacement
        coccinelle: api/stream_open: treat all wait_.*() calls as blocking
        coccinelle: put_device: Add a cast to an expression for an assignment
        coccinelle: put_device: Adjust a message construction
        ...
      39ceda5c
    • Linus Torvalds's avatar
      Merge tag 'asm-generic-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic · 5f26f114
      Linus Torvalds authored
      Pull asm-generic updates from Arnd Bergmann:
       "The asm-generic changes for 5.3 consist of a cleanup series to remove
        ptrace.h from Christoph Hellwig, who explains:
      
          'asm-generic/ptrace.h is a little weird in that it doesn't actually
           implement any functionality, but it provided multiple layers of
           macros that just implement trivial inline functions. We implement
           those directly in the few architectures and be off with a much
           simpler design.'
      
        at https://lore.kernel.org/lkml/20190624054728.30966-1-hch@lst.de/"
      
      * tag 'asm-generic-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
        asm-generic: remove ptrace.h
        x86: don't use asm-generic/ptrace.h
        sh: don't use asm-generic/ptrace.h
        powerpc: don't use asm-generic/ptrace.h
        arm64: don't use asm-generic/ptrace.h
      5f26f114
    • Linus Torvalds's avatar
      Merge tag 's390-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · aabfea8d
      Linus Torvalds authored
      Pull more s390 updates from Vasily Gorbik:
      
       - Fix integer overflow during stack frame unwind with invalid
         backchain.
      
       - Cleanup unused symbol export in zcrypt code.
      
       - Fix MIO addressing control activation in PCI code and expose its
         usage via sysfs.
      
       - Fix kernel image signature verification report presence detection.
      
       - Fix irq registration in vfio-ap code.
      
       - Add CPU measurement counters for newer machines.
      
       - Add base DASD thin provisioning support and code cleanups.
      
      * tag 's390-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (21 commits)
        s390/unwind: avoid int overflow in outside_of_stack
        s390/zcrypt: remove the exporting of ap_query_configuration
        s390/pci: add mio_enabled attribute
        s390: fix setting of mio addressing control
        s390/ipl: Fix detection of has_secure attribute
        s390: vfio-ap: fix irq registration
        s390/cpumf: Add extended counter set definitions for model 8561 and 8562
        s390/dasd: Handle out-of-space constraint
        s390/dasd: Add discard support for ESE volumes
        s390/dasd: Use ALIGN_DOWN macro
        s390/dasd: Make dasd_setup_queue() a discipline function
        s390/dasd: Add new ioctl to release space
        s390/dasd: Add dasd_sleep_on_queue_interruptible()
        s390/dasd: Add missing intensity definition
        s390/dasd: Fix whitespace
        s390/dasd: Add dynamic formatting support for ESE volumes
        s390/dasd: Recognise data for ESE volumes
        s390/dasd: Put sub-order definitions in a separate section
        s390/dasd: Make layout analysis ESE compatible
        s390/dasd: Remove old defines and function
        ...
      aabfea8d
    • Christian Lamparter's avatar
      net: dsa: qca8k: replace legacy gpio include · f32ae8a5
      Christian Lamparter authored
      This patch replaces the legacy bulk gpio.h include
      with the proper gpio/consumer.h variant. This was
      caught by the kbuild test robot that was running
      into an error because of this.
      
      For more information why linux/gpio.h is bad can be found in:
      commit 56a46b61 ("gpio: Clarify that <linux/gpio.h> is legacy")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Link: https://www.spinics.net/lists/netdev/msg584447.html
      Fixes: a653f2f5 ("net: dsa: qca8k: introduce reset via gpio feature")
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      Reviewed-by: default avatarVivien Didelot <vivien.didelot@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f32ae8a5