Skip to content
  1. Jul 15, 2019
  2. Jul 14, 2019
    • 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
  3. Jul 13, 2019
    • 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.com
      
      
      Signed-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.net
      
      
      Signed-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.com
      
      
      Signed-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.com
      
      
      Signed-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.com
      
      
      Signed-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.com
      
      
      Signed-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: default avatar <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
    • 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
    • Linus Torvalds's avatar
      Merge tag 'nios2-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 · 7181feb9
      Linus Torvalds authored
      Pull arch/nios2 updates from Ley Foon Tan.
      
      * tag 'nios2-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
        nios2: configs: Remove useless UEVENT_HELPER_PATH
        nios2: remove pointless second entry for CONFIG_TRACE_IRQFLAGS_SUPPORT
      7181feb9
    • Jiangfeng Xiao's avatar
      net: hisilicon: Use devm_platform_ioremap_resource · 56170ba3
      Jiangfeng Xiao authored
      
      
      Use devm_platform_ioremap_resource instead of
      devm_ioremap_resource. Make the code simpler.
      
      Signed-off-by: default avatarJiangfeng Xiao <xiaojiangfeng@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56170ba3
    • Arnd Bergmann's avatar
      cxgb4: reduce kernel stack usage in cudbg_collect_mem_region() · 752c2ea2
      Arnd Bergmann authored
      The cudbg_collect_mem_region() and cudbg_read_fw_mem() both use several
      hundred kilobytes of kernel stack space. One gets inlined into the other,
      which causes the stack usage to be combined beyond the warning limit
      when building with clang:
      
      drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c:1057:12: error: stack frame size of 1244 bytes in function 'cudbg_collect_mem_region' [-Werror,-Wframe-larger-than=]
      
      Restructuring cudbg_collect_mem_region() lets clang do the same
      optimization that gcc does and reuse the stack slots as it can
      see that the large variables are never used together.
      
      A better fix might be to avoid using cudbg_meminfo on the stack
      altogether, but that requires a larger rewrite.
      
      Fixes: a1c69520
      
       ("cxgb4: collect MC memory dump")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      752c2ea2
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 39d7530d
      Linus Torvalds authored
      Pull KVM updates from Paolo Bonzini:
       "ARM:
         - support for chained PMU counters in guests
         - improved SError handling
         - handle Neoverse N1 erratum #1349291
         - allow side-channel mitigation status to be migrated
         - standardise most AArch64 system register accesses to msr_s/mrs_s
         - fix host MPIDR corruption on 32bit
         - selftests ckleanups
      
        x86:
         - PMU event {white,black}listing
         - ability for the guest to disable host-side interrupt polling
         - fixes for enlightened VMCS (Hyper-V pv nested virtualization),
         - new hypercall to yield to IPI target
         - support for passing cstate MSRs through to the guest
         - lots of cleanups and optimizations
      
        Generic:
         - Some txt->rST conversions for the documentation"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (128 commits)
        Documentation: virtual: Add toctree hooks
        Documentation: kvm: Convert cpuid.txt to .rst
        Documentation: virtual: Convert paravirt_ops.txt to .rst
        KVM: x86: Unconditionally enable irqs in guest context
        KVM: x86: PMU Event Filter
        kvm: x86: Fix -Wmissing-prototypes warnings
        KVM: Properly check if "page" is valid in kvm_vcpu_unmap
        KVM: arm/arm64: Initialise host's MPIDRs by reading the actual register
        KVM: LAPIC: Retry tune per-vCPU timer_advance_ns if adaptive tuning goes insane
        kvm: LAPIC: write down valid APIC registers
        KVM: arm64: Migrate _elx sysreg accessors to msr_s/mrs_s
        KVM: doc: Add API documentation on the KVM_REG_ARM_WORKAROUNDS register
        KVM: arm/arm64: Add save/restore support for firmware workaround state
        arm64: KVM: Propagate full Spectre v2 workaround state to KVM guests
        KVM: arm/arm64: Support chained PMU counters
        KVM: arm/arm64: Remove pmc->bitmask
        KVM: arm/arm64: Re-create event when setting counter value
        KVM: arm/arm64: Extract duplicated code to own function
        KVM: arm/arm64: Rename kvm_pmu_{enable/disable}_counter functions
        KVM: LAPIC: ARBPRI is a reserved register for x2APIC
        ...
      39d7530d
    • Chris Packham's avatar
      tipc: ensure head->lock is initialised · d12cffe9
      Chris Packham authored
      
      
      tipc_named_node_up() creates a skb list. It passes the list to
      tipc_node_xmit() which has some code paths that can call
      skb_queue_purge() which relies on the list->lock being initialised.
      
      The spin_lock is only needed if the messages end up on the receive path
      but when the list is created in tipc_named_node_up() we don't
      necessarily know if it is going to end up there.
      
      Once all the skb list users are updated in tipc it will then be possible
      to update them to use the unlocked variants of the skb list functions
      and initialise the lock when we know the message will follow the receive
      path.
      
      Signed-off-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
      Acked-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d12cffe9
    • Roman Mashak's avatar
      tc-tests: updated skbedit tests · 100c4043
      Roman Mashak authored
      
      
      - Added mask upper bound test case
      - Added mask validation test case
      - Added mask replacement case
      
      Signed-off-by: default avatarRoman Mashak <mrv@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      100c4043