1. 05 Mar, 2019 12 commits
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 63bdf428
      Linus Torvalds authored
      Pull crypto update from Herbert Xu:
       "API:
         - Add helper for simple skcipher modes.
         - Add helper to register multiple templates.
         - Set CRYPTO_TFM_NEED_KEY when setkey fails.
         - Require neither or both of export/import in shash.
         - AEAD decryption test vectors are now generated from encryption
           ones.
         - New option CONFIG_CRYPTO_MANAGER_EXTRA_TESTS that includes random
           fuzzing.
      
        Algorithms:
         - Conversions to skcipher and helper for many templates.
         - Add more test vectors for nhpoly1305 and adiantum.
      
        Drivers:
         - Add crypto4xx prng support.
         - Add xcbc/cmac/ecb support in caam.
         - Add AES support for Exynos5433 in s5p.
         - Remove sha384/sha512 from artpec7 as hardware cannot do partial
           hash"
      
      [ There is a merge of the Freescale SoC tree in order to pull in changes
        required by patches to the caam/qi2 driver. ]
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (174 commits)
        crypto: s5p - add AES support for Exynos5433
        dt-bindings: crypto: document Exynos5433 SlimSSS
        crypto: crypto4xx - add missing of_node_put after of_device_is_available
        crypto: cavium/zip - fix collision with generic cra_driver_name
        crypto: af_alg - use struct_size() in sock_kfree_s()
        crypto: caam - remove redundant likely/unlikely annotation
        crypto: s5p - update iv after AES-CBC op end
        crypto: x86/poly1305 - Clear key material from stack in SSE2 variant
        crypto: caam - generate hash keys in-place
        crypto: caam - fix DMA mapping xcbc key twice
        crypto: caam - fix hash context DMA unmap size
        hwrng: bcm2835 - fix probe as platform device
        crypto: s5p-sss - Use AES_BLOCK_SIZE define instead of number
        crypto: stm32 - drop pointless static qualifier in stm32_hash_remove()
        crypto: chelsio - Fixed Traffic Stall
        crypto: marvell - Remove set but not used variable 'ivsize'
        crypto: ccp - Update driver messages to remove some confusion
        crypto: adiantum - add 1536 and 4096-byte test vectors
        crypto: nhpoly1305 - add a test vector with len % 16 != 0
        crypto: arm/aes-ce - update IV after partial final CTR block
        ...
      63bdf428
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next · 64563003
      Linus Torvalds authored
      Pull networking updates from David Miller:
       "Here we go, another merge window full of networking and #ebpf changes:
      
         1) Snoop DHCPACKS in batman-adv to learn MAC/IP pairs in the DHCP
            range without dealing with floods of ARP traffic, from Linus
            Lüssing.
      
         2) Throttle buffered multicast packet transmission in mt76, from
            Felix Fietkau.
      
         3) Support adaptive interrupt moderation in ice, from Brett Creeley.
      
         4) A lot of struct_size conversions, from Gustavo A. R. Silva.
      
         5) Add peek/push/pop commands to bpftool, as well as bash completion,
            from Stanislav Fomichev.
      
         6) Optimize sk_msg_clone(), from Vakul Garg.
      
         7) Add SO_BINDTOIFINDEX, from David Herrmann.
      
         8) Be more conservative with local resends due to local congestion,
            from Yuchung Cheng.
      
         9) Allow vetoing of unsupported VXLAN FDBs, from Petr Machata.
      
        10) Add health buffer support to devlink, from Eran Ben Elisha.
      
        11) Add TXQ scheduling API to mac80211, from Toke Høiland-Jørgensen.
      
        12) Add statistics to basic packet scheduler filter, from Cong Wang.
      
        13) Add GRE tunnel support for mlxsw Spectrum-2, from Nir Dotan.
      
        14) Lots of new IP tunneling forwarding tests, also from Nir Dotan.
      
        15) Add 3ad stats to bonding, from Nikolay Aleksandrov.
      
        16) Lots of probing improvements for bpftool, from Quentin Monnet.
      
        17) Various nfp drive #ebpf JIT improvements from Jakub Kicinski.
      
        18) Allow #ebpf programs to access gso_segs from skb shared info, from
            Eric Dumazet.
      
        19) Add sock_diag support for AF_XDP sockets, from Björn Töpel.
      
        20) Support 22260 iwlwifi devices, from Luca Coelho.
      
        21) Use rbtree for ipv6 defragmentation, from Peter Oskolkov.
      
        22) Add JMP32 instruction class support to #ebpf, from Jiong Wang.
      
        23) Add spinlock support to #ebpf, from Alexei Starovoitov.
      
        24) Support 256-bit keys and TLS 1.3 in ktls, from Dave Watson.
      
        25) Add device infomation API to devlink, from Jakub Kicinski.
      
        26) Add new timestamping socket options which are y2038 safe, from
            Deepa Dinamani.
      
        27) Add RX checksum offloading for various sh_eth chips, from Sergei
            Shtylyov.
      
        28) Flow offload infrastructure, from Pablo Neira Ayuso.
      
        29) Numerous cleanups, improvements, and bug fixes to the PHY layer
            and many drivers from Heiner Kallweit.
      
        30) Lots of changes to try and make packet scheduler classifiers run
            lockless as much as possible, from Vlad Buslov.
      
        31) Support BCM957504 chip in bnxt_en driver, from Erik Burrows.
      
        32) Add concurrency tests to tc-tests infrastructure, from Vlad
            Buslov.
      
        33) Add hwmon support to aquantia, from Heiner Kallweit.
      
        34) Allow 64-bit values for SO_MAX_PACING_RATE, from Eric Dumazet.
      
        And I would be remiss if I didn't thank the various major networking
        subsystem maintainers for integrating much of this work before I even
        saw it. Alexei Starovoitov, Daniel Borkmann, Pablo Neira Ayuso,
        Johannes Berg, Kalle Valo, and many others. Thank you!"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2207 commits)
        net/sched: avoid unused-label warning
        net: ignore sysctl_devconf_inherit_init_net without SYSCTL
        phy: mdio-mux: fix Kconfig dependencies
        net: phy: use phy_modify_mmd_changed in genphy_c45_an_config_aneg
        net: dsa: mv88e6xxx: add call to mv88e6xxx_ports_cmode_init to probe for new DSA framework
        selftest/net: Remove duplicate header
        sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79
        net/mlx5e: Update tx reporter status in case channels were successfully opened
        devlink: Add support for direct reporter health state update
        devlink: Update reporter state to error even if recover aborted
        sctp: call iov_iter_revert() after sending ABORT
        team: Free BPF filter when unregistering netdev
        ip6mr: Do not call __IP6_INC_STATS() from preemptible context
        isdn: mISDN: Fix potential NULL pointer dereference of kzalloc
        net: dsa: mv88e6xxx: support in-band signalling on SGMII ports with external PHYs
        cxgb4/chtls: Prefix adapter flags with CXGB4
        net-sysfs: Switch to bitmap_zalloc()
        mellanox: Switch to bitmap_zalloc()
        bpf: add test cases for non-pointer sanitiation logic
        mlxsw: i2c: Extend initialization by querying resources data
        ...
      64563003
    • Linus Torvalds's avatar
      Merge tag 'leds-for-5.1-rc1' of... · cd2a3bf0
      Linus Torvalds authored
      Merge tag 'leds-for-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
      
      Pull LED updates from Jacek Anaszewski:
      
       - finalize previously announced support for initialization of pattern
         triggers from Device Tree
      
       - fix for null deref on firmware load failure in leds-lp55xx-common.c
      
      * tag 'leds-for-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
        leds: lp55xx: fix null deref on firmware load failure
        leds: trigger: timer: Add initialization from Device Tree
        leds: trigger: oneshot: Add initialization from Device Tree
        leds: trigger: pattern: Add pattern initialization from Device Tree
        leds: Add helper for getting default pattern from Device Tree
        dt-bindings: leds: Add pattern initialization from Device Tree
      cd2a3bf0
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 7629bac6
      Linus Torvalds authored
      Pull hwmon updates from Guenter Roeck:
      
       - Add support for LM96000, DPS-650AB to existing drivers
      
       - Use permission specific SENSOR[_DEVICE]_ATTR variants in several
         drivers
      
       - Replace S_<PERMS> with octal values in several drivers
      
       - Update some license headers
      
       - Various minor fixes and improvements in several drivers
      
      * tag 'hwmon-for-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (89 commits)
        dt-bindings: hwmon: Add missing documentation for lm75
        hwmon: (ad7418) Add device tree probing
        hwmon: (ad741x) Add DT bindings for Analog Devices AD741x
        hwmon: (ntc_thermistor) Convert to new hwmon API
        hwmon: (pwm-fan) Add optional regulator support
        dt-bindings: hwmon: Add optional regulator support to pwm-fan
        hwmon: (f71882fg) Mark expected switch fall-through
        hwmon: (ad7418) Catch I2C errors
        hwmon: (lm85) add support for LM96000 high frequencies
        hwmon: (lm85) support the LM96000
        dt-bindings: Add LM96000 as a trivial device
        hwmon: (lm85) remove freq_map size hardcodes
        hwmon: (occ) Fix license headers
        hwmon: (via-cputemp) Use permission specific SENSOR[_DEVICE]_ATTR variants
        hwmon: (vexpress-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants
        hwmon: (tmp421) Replace S_<PERMS> with octal values
        hwmon: (tmp103) Use permission specific SENSOR[_DEVICE]_ATTR variants
        hwmon: (tmp102) Replace S_<PERMS> with octal values
        hwmon: (tc74) Use permission specific SENSOR[_DEVICE]_ATTR variants
        hwmon: (tc654) Use permission specific SENSOR[_DEVICE]_ATTR variants
        ...
      7629bac6
    • Linus Torvalds's avatar
      Merge tag 'spi-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · dcc75dde
      Linus Torvalds authored
      Pull spi updates from Mark Brown:
       "A fairly quiet release for SPI, the biggest thing is the conversion to
        use GPIO descriptors which is now 90% done but still needs some
        stragglers converting.
      
        Summary:
      
         - Support for inter-word delays
      
         - Conversion of the core and most drivers to use GPIO descriptors for
           GPIO controlled chip selects
      
         - New drivers for NXP FlexSPI and QuadSPI, SiFive and Spreadtrum"
      
      * tag 'spi-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (104 commits)
        spi: sh-msiof: Restrict bits per word to 8/16/24/32 on R-Car Gen2/3
        spi: sifive: Remove redundant dev_err call in sifive_spi_probe()
        spi: sifive: Remove spi_master_put in sifive_spi_remove()
        spi: spi-gpio: fix SPI_CS_HIGH capability
        spi: pxa2xx: Setup maximum supported DMA transfer length
        spi: sifive: Add driver for the SiFive SPI controller
        spi: sifive: Add DT documentation for SiFive SPI controller
        spi: sprd: Add a prefix for SPI DMA channel macros
        spi: sprd: spi: sprd: Add DMA mode support
        dt-bindings: spi: Add the DMA properties for the SPI dma mode
        spi: sprd: Add the SPI irq function for the SPI DMA mode
        dt-bindings: spi: imx: Add an entry for the i.MX8QM compatible
        spi: use gpio[d]_set_value_cansleep for setting chipselect GPIO
        spi: gpio: Advertise support for SPI_CS_HIGH
        spi: sh-msiof: Replace spi_master by spi_controller
        spi: sh-hspi: Replace spi_master by spi_controller
        spi: rspi: Replace spi_master by spi_controller
        spi: atmel-quadspi: add support for sam9x60 qspi controller
        dt-bindings: spi: atmel-quadspi: QuadSPI driver for Microchip SAM9X60
        spi: atmel-quadspi: add support for named peripheral clock
        ...
      dcc75dde
    • Linus Torvalds's avatar
      Merge tag 'regulator-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 32c0ac3a
      Linus Torvalds authored
      Pull regulator updates from Mark Brown:
       "The bulk of the standout changes in this release are cleanups, with
        the core work being a combination of factoring out common code into
        helpers and the completion of the conversion of the core to use GPIO
        descriptors.
      
        Summary:
      
         - Addition of helper functions for current limits and conversion of
           drivers to use them by Axel Lin.
      
         - Lots and lots of cleanups from Axel Lin.
      
         - Conversion of the core to use GPIO descriptors rather than numbers
           by Linus Walleij.
      
         - New drivers for Maxim MAX77650 and ROHM BD70528"
      
      * tag 'regulator-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (131 commits)
        regulator: mc13xxx: Constify regulator_ops variables
        regulator: palmas: Constify palmas_smps_ramp_delay array
        regulator: wm831x-dcdc: Convert to use regulator_set/get_current_limit_regmap
        regulator: pv88090: Convert to use regulator_set/get_current_limit_regmap
        regulator: pv88080: Convert to use regulator_set/get_current_limit_regmap
        regulator: pv88060: Convert to use regulator_set/get_current_limit_regmap
        regulator: max77650: Convert to use regulator_set/get_current_limit_regmap
        regulator: lp873x: Convert to use regulator_set/get_current_limit_regmap
        regulator: lp872x: Convert to use regulator_set/get_current_limit_regmap
        regulator: da9210: Convert to use regulator_set/get_current_limit_regmap
        regulator: da9055: Convert to use regulator_set/get_current_limit_regmap
        regulator: core: Add set/get_current_limit helpers for regmap users
        regulator: Fix comment for csel_reg and csel_mask
        regulator: stm32-vrefbuf: add power management support
        regulator: 88pm8607: Remove unused fields from struct pm8607_regulator_info
        regulator: 88pm8607: Simplify pm8607_list_voltage implementation
        regulator: cpcap: Constify omap4_regulators and xoom_regulators
        regulator: cpcap: Remove unused vsel_shift from struct cpcap_regulator
        dt-bindings: regulator: tps65218: rectify units of LS3
        dt-bindings: regulator: add LS2 load switch documentation
        ...
      32c0ac3a
    • Linus Torvalds's avatar
      Merge tag 'regmap-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · e48b044e
      Linus Torvalds authored
      Pull regmap updates from Mark Brown:
       "There are only two changes here:
      
         - fix for conflicting attributes on the rbtree node structure
      
         - implementation of main status register support in the interrupt
           code which supports chips that have a register to cut down on the
           number of per-interrupt status registers that need to be checked
           when handling interrupts"
      
      * tag 'regmap-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: Remove attribute packed from struct 'regcache_rbtree_node'
        regmap: regmap-irq: Add main status register support
      e48b044e
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 42eaf185
      Linus Torvalds authored
      Pull MMC updates from Ulf Hansson:
       "MMC core:
         - Fixup max_discard/trim calculations
         - Announce SD specs greater than 4.0
         - Add discard support for SD cards
         - Don't do retries for CMD6 (SWITCH command)
         - Various cleanups and re-structuring
      
        MMC host:
         - cqhci:
            * Add maintainers for eMMC CQHCI driver
         - sdhci:
            * Consolidate WP GPIO code
            * Add ADMA3 DMA support for V4 enabled host
            * Fixup card detect support in pci-o2micro driver
            * Add support for CMDQ and SDMMC pads auto-calibration in tegra
              driver
            * Add DCMD support and CMDQ support, support for i.MX6ULL variant,
              fixup HS400 timing issue and add HS400_ES support for i.MX8QXP
              to esdhc-imx driver
            * Avoid CRC errors by adjusting settings to speed mode and fixup
              card initialization for high speed mode in renesas_sdhi
            * Fixup timeout settings for omap
            * Enable 8 bits bus-width support in atmel-mci
            * Convert some legacy code in jz4740 driver to use modern APIs
            * Send a CMD12 to clear DPSM at errors for STM32 sdmmc mmci
              driver"
      
      * tag 'mmc-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (69 commits)
        mmc:fix a bug when max_discard is 0
        mmc: core: Add a debug print when the card may have been replaced
        mmc: core: Add sd discard timeout
        mmc: core: Add discard support to sd
        mmc: sdhci-esdhc-imx: clear the HALT bit when enable CQE
        mmc: core: do not retry CMD6 in __mmc_switch()
        mmc: core: Convert mmc_align_data_size() into an SDIO specific function
        mmc: core: Move mmc_of_parse_voltage() to host.c
        mmc: core: Convert mmc_regulator_get_ocrmask() to static
        mmc: core: Move regulator helpers to separate file
        mmc: of_mmc_spi: Convert to mmc_of_parse_voltage()
        mmc: core: Drop retries as in-parameter to mmc_wait_for_app_cmd()
        mmc: core: Convert mmc_wait_for_app_cmd() to static
        mmc: renesas_sdhi: Change HW adjustment register according to speed mode
        mmc: mmci: Send a CMD12 to clear the DPSM at errors
        mmc: sdhci-xenon: Fixup already marked switch fall-through
        mmc: sdhci-tegra: drop ->get_ro() implementation
        mmc: sdhci-omap: drop ->get_ro() implementation
        mmc: sdhci: use WP GPIO in sdhci_check_ro()
        mmc: wmt-sdmmc: Drop unused include
        ...
      42eaf185
    • Linus Torvalds's avatar
      Merge tag 'i3c/for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux · c8d950ab
      Linus Torvalds authored
      Pull i3c updates from Boris Brezillon:
      
       - Add a /* fall-through */ comment in the dw-i3c-master driver
      
       - Update the I3C entries in MAINTAINERS to add an IRC chan
      
      * tag 'i3c/for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
        i3c: master: dw-i3c-master: mark expected switch fall-through
        MAINTAINERS: Add an IRC channel for the I3C subsystem
      c8d950ab
    • Linus Torvalds's avatar
      Merge tag 'mtd/for-5.1' of git://git.infradead.org/linux-mtd · 811c16a2
      Linus Torvalds authored
      Pull MTD updates from Boris Brezillon:
       "Core MTD changes:
         - Use struct_size() where appropriate
         - mtd_{read,write}() as wrappers around mtd_{read,write}_oob()
         - Fix misuse of PTR_ERR() in docg3
         - Coding style improvements in mtdcore.c
      
        SPI NOR changes:
          Core changes:
           - Add support of octal mode I/O transfer
           - Add a bunch of SPI NOR entries to the flash_info table
      
          SPI NOR controller driver changes:
           - cadence-quadspi:
              * Add support for Octal SPI controller
              * write upto 8-bytes data in STIG mode
           - mtk-quadspi:
              * rename config to a common one
              * add SNOR_HWCAPS_READ to spi_nor_hwcaps mask
           - Add Tudor as SPI-NOR co-maintainer
      
        NAND changes:
          NAND core changes:
           - Fourth batch of fixes/cleanup to the raw NAND core impacting
             various controller drivers (Sunxi, Marvell, MTK, TMIO, OMAP2).
           - Check the return code of nand_reset() and nand_readid_op().
           - Remove ->legacy.erase and single_erase().
           - Simplify the locking.
           - Several implicit fall through annotations.
      
          Raw NAND controllers drivers changes:
           - Fix various possible object reference leaks (MTK, JZ4780, Atmel)
           - ST:
              * Add support for STM32 FMC2 NAND flash controller
           - Meson:
              * Add support for Amlogic NAND flash controller
           - Denali:
              * Several cleanup patches
           - Sunxi:
              * Several cleanup patches
           - FSMC:
              * Disable NAND on remove()
              * Reset NAND timings on resume()
      
          SPI-NAND drivers changes:
           - Toshiba:
              * Add support for all Toshiba products.
           - Macronix:
              * Fix ECC status read.
           - Gigadevice:
              * Add support for GD5F1GQ4UExxG"
      
      * tag 'mtd/for-5.1' of git://git.infradead.org/linux-mtd: (64 commits)
        mtd: spi-nor: Fix wrong abbreviation HWCPAS
        mtd: spi-nor: cadence-quadspi: fix spelling mistake: "Couldnt't" -> "Couldn't"
        mtd: spi-nor: Add support for en25qh64
        mtd: spi-nor: Add support for MX25V8035F
        mtd: spi-nor: Add support for EN25Q80A
        mtd: spi-nor: cadence-quadspi: Add support for Octal SPI controller
        dt-bindings: cadence-quadspi: Add new compatible for AM654 SoC
        mtd: spi-nor: split s25fl128s into s25fl128s0 and s25fl128s1
        mtd: spi-nor: cadence-quadspi: write upto 8-bytes data in STIG mode
        mtd: spi-nor: Add support for mx25u3235f
        mtd: rawnand: denali_dt: remove single anonymous clock support
        mtd: rawnand: mtk: fix possible object reference leak
        mtd: rawnand: jz4780: fix possible object reference leak
        mtd: rawnand: atmel: fix possible object reference leak
        mtd: rawnand: fsmc: Disable NAND on remove()
        mtd: rawnand: fsmc: Reset NAND timings on resume()
        mtd: spinand: Add support for GigaDevice GD5F1GQ4UExxG
        mtd: rawnand: denali: remove unused dma_addr field from denali_nand_info
        mtd: rawnand: denali: remove unused function argument 'raw'
        mtd: rawnand: denali: remove unneeded denali_reset_irq() call
        ...
      811c16a2
    • Linus Torvalds's avatar
      Merge tag 'vfio-v5.1-rc1' of git://github.com/awilliam/linux-vfio · a83b0423
      Linus Torvalds authored
      Pull VFIO updates from Alex Williamson:
      
       - Switch mdev to generic UUID API (Andy Shevchenko)
      
       - Fixup platform reset include paths (Masahiro Yamada)
      
       - Fix usage of MINORMASK (Chengguang Xu)
      
       - Remove noise from duplicate spapr table unsets (Alexey Kardashevskiy)
      
       - Restore device state after PM reset (Alex Williamson)
      
       - Ensure memory translation enabled for PCI ROM access (Eric Auger)
      
      * tag 'vfio-v5.1-rc1' of git://github.com/awilliam/linux-vfio:
        vfio_pci: Enable memory accesses before calling pci_map_rom
        vfio/pci: Restore device state on PM transition
        vfio/spapr_tce: Skip unsetting already unset table
        samples/vfio-mdev/mtty: expand minor range when registering chrdev region
        samples/vfio-mdev/mdpy: expand minor range when registering chrdev region
        samples/vfio-mdev/mbochs: expand minor range when registering chrdev region
        vfio: expand minor range when registering chrdev region
        vfio: platform: reset: fix up include directives to remove ccflags-y
        vfio-mdev: Switch to use new generic UUID API
      a83b0423
    • Slavomir Kaslev's avatar
      fs: Make splice() and tee() take into account O_NONBLOCK flag on pipes · ee5e0011
      Slavomir Kaslev authored
      The current implementation of splice() and tee() ignores O_NONBLOCK set
      on pipe file descriptors and checks only the SPLICE_F_NONBLOCK flag for
      blocking on pipe arguments.  This is inconsistent since splice()-ing
      from/to non-pipe file descriptors does take O_NONBLOCK into
      consideration.
      
      Fix this by promoting O_NONBLOCK, when set on a pipe, to
      SPLICE_F_NONBLOCK.
      
      Some context for how the current implementation of splice() leads to
      inconsistent behavior.  In the ongoing work[1] to add VM tracing
      capability to trace-cmd we stream tracing data over named FIFOs or
      vsockets from guests back to the host.
      
      When we receive SIGINT from user to stop tracing, we set O_NONBLOCK on
      the input file descriptor and set SPLICE_F_NONBLOCK for the next call to
      splice().  If splice() was blocked waiting on data from the input FIFO,
      after SIGINT splice() restarts with the same arguments (no
      SPLICE_F_NONBLOCK) and blocks again instead of returning -EAGAIN when no
      data is available.
      
      This differs from the splice() behavior when reading from a vsocket or
      when we're doing a traditional read()/write() loop (trace-cmd's
      --nosplice argument).
      
      With this patch applied we get the same behavior in all situations after
      setting O_NONBLOCK which also matches the behavior of doing a
      read()/write() loop instead of splice().
      
      This change does have potential of breaking users who don't expect
      EAGAIN from splice() when SPLICE_F_NONBLOCK is not set.  OTOH programs
      that set O_NONBLOCK and don't anticipate EAGAIN are arguably buggy[2].
      
       [1] https://github.com/skaslev/trace-cmd/tree/vsock
       [2] https://github.com/torvalds/linux/blob/d47e3da1759230e394096fd742aad423c291ba48/fs/read_write.c#L1425Signed-off-by: default avatarSlavomir Kaslev <kaslevs@vmware.com>
      Reviewed-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ee5e0011
  2. 04 Mar, 2019 28 commits
    • David S. Miller's avatar
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 4f9020ff
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
       "Assorted fixes that sat in -next for a while, all over the place"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        aio: Fix locking in aio_poll()
        exec: Fix mem leak in kernel_read_file
        copy_mount_string: Limit string length to PATH_MAX
        cgroup: saner refcounting for cgroup_root
        fix cgroup_do_mount() handling of failure exits
      4f9020ff
    • Arnd Bergmann's avatar
      net/sched: avoid unused-label warning · 096461de
      Arnd Bergmann authored
      The label is only used from inside the #ifdef and should be
      hidden the same way, to avoid this warning:
      
      net/sched/act_tunnel_key.c: In function 'tunnel_key_init':
      net/sched/act_tunnel_key.c:389:1: error: label 'release_tun_meta' defined but not used [-Werror=unused-label]
       release_tun_meta:
      
      Fixes: 41411e2f ("net/sched: act_tunnel_key: Add dst_cache support")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      096461de
    • Arnd Bergmann's avatar
      net: ignore sysctl_devconf_inherit_init_net without SYSCTL · a154d5d8
      Arnd Bergmann authored
      When CONFIG_SYSCTL is turned off, we get a link failure for
      the newly introduced tuning knob.
      
      net/ipv6/addrconf.o: In function `addrconf_init_net':
      addrconf.c:(.text+0x31dc): undefined reference to `sysctl_devconf_inherit_init_net'
      
      Add an IS_ENABLED() check to fall back to the default behavior
      (sysctl_devconf_inherit_init_net=0) here.
      
      Fixes: 856c395c ("net: introduce a knob to control whether to inherit devconf config")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarChristian Brauner <christian@brauner.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a154d5d8
    • Arnd Bergmann's avatar
      phy: mdio-mux: fix Kconfig dependencies · 64af7dc3
      Arnd Bergmann authored
      MDIO_BUS_MUX can only be selected if OF_MDIO is already turned on:
      
      WARNING: unmet direct dependencies detected for MDIO_BUS_MUX
        Depends on [n]: NETDEVICES [=y] && MDIO_BUS [=m] && OF_MDIO [=n]
        Selected by [m]:
        - MDIO_BUS_MUX_MULTIPLEXER [=m] && NETDEVICES [=y] && MDIO_BUS [=m] && OF [=y]
      
      Fixes: 7865ad65 ("drivers: net: phy: mdio-mux: Add support for Generic Mux controls")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      64af7dc3
    • Heiner Kallweit's avatar
      net: phy: use phy_modify_mmd_changed in genphy_c45_an_config_aneg · 9731ea06
      Heiner Kallweit authored
      As can be seen from the usage of the return value, we should use
      phy_modify_mmd_changed() here.
      
      Fixes: 9a5dc8af ("net: phy: add genphy_c45_an_config_aneg")
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9731ea06
    • Heiner Kallweit's avatar
      net: dsa: mv88e6xxx: add call to mv88e6xxx_ports_cmode_init to probe for new DSA framework · 3acca1dd
      Heiner Kallweit authored
      In the original patch I missed to add mv88e6xxx_ports_cmode_init()
      to the second probe function, the one for the new DSA framework.
      
      Fixes: ed8fe202 ("net: dsa: mv88e6xxx: prevent interrupt storm caused by mv88e6390x_port_set_cmode")
      Reported-by: default avatarShaokun Zhang <zhangshaokun@hisilicon.com>
      Suggested-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3acca1dd
    • Souptick Joarder's avatar
      selftest/net: Remove duplicate header · 9e9322e5
      Souptick Joarder authored
      Remove duplicate header which is included twice.
      Signed-off-by: default avatarSabyasachi Gupta <sabyasachi.linux@gmail.com>
      Signed-off-by: default avatarSouptick Joarder <jrdr.linux@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9e9322e5
    • Kai-Heng Feng's avatar
      sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79 · b33b7cd6
      Kai-Heng Feng authored
      Some sky2 chips fire IRQ after S3, before the driver is fully resumed:
      [ 686.804877] do_IRQ: 1.37 No irq handler for vector
      
      This is likely a platform bug that device isn't fully quiesced during
      S3. Use MSI-X, maskable MSI or INTx can prevent this issue from
      happening.
      
      Since MSI-X and maskable MSI are not supported by this device, fallback
      to use INTx on affected platforms.
      
      BugLink: https://bugs.launchpad.net/bugs/1807259
      BugLink: https://bugs.launchpad.net/bugs/1809843Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b33b7cd6
    • David S. Miller's avatar
      Merge branch 'Devlink-health-updates' · d6089c74
      David S. Miller authored
      Eran Ben Elisha says:
      
      ====================
      Devlink health updates
      
      This patchset includes a fix [patch 01] to the devlink health state update, in
      case recover was aborted.
      
      In addition, it includes a small enhancement to the infrastructure in order to
      allow direct state update in run-time, and use it from mlx5e tx reporter.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d6089c74
    • Eran Ben Elisha's avatar
      net/mlx5e: Update tx reporter status in case channels were successfully opened · 86d7e714
      Eran Ben Elisha authored
      Once channels were successfully opened, update tx reporter health state to
      healthy. This is needed for the following scenario:
      - SQ has an un-recovered error reported to the devlink health, resulting tx
        reporter state to be error.
      - Current channels (including this SQ) are closed
      - New channels are opened
      After that flow, the original error was "solved", and tx reporter state
      should be healthy. However, as it was resolved as a side effect, and not
      via tx reporter recover method, driver needs to inform devlink health
      about it.
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Acked-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86d7e714
    • Eran Ben Elisha's avatar
      devlink: Add support for direct reporter health state update · 3167b27a
      Eran Ben Elisha authored
      It is possible that a reporter state will be updated due to a recover flow
      which is not triggered by a devlink health related operation, but as a side
      effect of some other operation in the system.
      
      Expose devlink health API for a direct update of a reporter status.
      
      Move devlink_health_reporter_state enum definition to devlink.h so it could
      be used from drivers as a parameter of devlink_health_reporter_state_update.
      
      In addition, add trace_devlink_health_reporter_state_update to provide user
      notification for reporter state change.
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3167b27a
    • Eran Ben Elisha's avatar
      devlink: Update reporter state to error even if recover aborted · a0a21adb
      Eran Ben Elisha authored
      If devlink_health_report() aborted the recover flow due to grace period checker,
      it left the reporter status as DEVLINK_HEALTH_REPORTER_STATE_HEALTHY, which is
      a bug. Fix that by always setting the reporter state to
      DEVLINK_HEALTH_REPORTER_STATE_ERROR prior to running the checker mentioned above.
      
      In addition, save the previous health_state in a temporary variable, then use
      it in the abort check comparison instead of using reporter->health_state which
      might be already changed.
      
      Fixes: c8e1da0b ("devlink: Add health report functionality")
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0a21adb
    • Xin Long's avatar
      sctp: call iov_iter_revert() after sending ABORT · 901efe12
      Xin Long authored
      The user msg is also copied to the abort packet when doing SCTP_ABORT in
      sctp_sendmsg_check_sflags(). When SCTP_SENDALL is set, iov_iter_revert()
      should have been called for sending abort on the next asoc with copying
      this msg. Otherwise, memcpy_from_msg() in sctp_make_abort_user() will
      fail and return error.
      
      Fixes: 49102805 ("sctp: add support for snd flag SCTP_SENDALL process in sendmsg")
      Reported-by: default avatarYing Xu <yinxu@redhat.com>
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      901efe12
    • Ido Schimmel's avatar
      team: Free BPF filter when unregistering netdev · 692c31bd
      Ido Schimmel authored
      When team is used in loadbalance mode a BPF filter can be used to
      provide a hash which will determine the Tx port.
      
      When the netdev is later unregistered the filter is not freed which
      results in memory leaks [1].
      
      Fix by freeing the program and the corresponding filter when
      unregistering the netdev.
      
      [1]
      unreferenced object 0xffff8881dbc47cc8 (size 16):
        comm "teamd", pid 3068, jiffies 4294997779 (age 438.247s)
        hex dump (first 16 bytes):
          a3 00 6b 6b 6b 6b 6b 6b 88 a5 82 e1 81 88 ff ff  ..kkkkkk........
        backtrace:
          [<000000008a3b47e3>] team_nl_cmd_options_set+0x88f/0x11b0
          [<00000000c4f4f27e>] genl_family_rcv_msg+0x78f/0x1080
          [<00000000610ef838>] genl_rcv_msg+0xca/0x170
          [<00000000a281df93>] netlink_rcv_skb+0x132/0x380
          [<000000004d9448a2>] genl_rcv+0x29/0x40
          [<000000000321b2f4>] netlink_unicast+0x4c0/0x690
          [<000000008c25dffb>] netlink_sendmsg+0x929/0xe10
          [<00000000068298c5>] sock_sendmsg+0xc8/0x110
          [<0000000082a61ff0>] ___sys_sendmsg+0x77a/0x8f0
          [<00000000663ae29d>] __sys_sendmsg+0xf7/0x250
          [<0000000027c5f11a>] do_syscall_64+0x14d/0x610
          [<000000006cfbc8d3>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
          [<00000000e23197e2>] 0xffffffffffffffff
      unreferenced object 0xffff8881e182a588 (size 2048):
        comm "teamd", pid 3068, jiffies 4294997780 (age 438.247s)
        hex dump (first 32 bytes):
          20 00 00 00 02 00 00 00 30 00 00 00 28 f0 ff ff   .......0...(...
          07 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00  ........(.......
        backtrace:
          [<000000002daf01fb>] lb_bpf_func_set+0x45c/0x6d0
          [<000000008a3b47e3>] team_nl_cmd_options_set+0x88f/0x11b0
          [<00000000c4f4f27e>] genl_family_rcv_msg+0x78f/0x1080
          [<00000000610ef838>] genl_rcv_msg+0xca/0x170
          [<00000000a281df93>] netlink_rcv_skb+0x132/0x380
          [<000000004d9448a2>] genl_rcv+0x29/0x40
          [<000000000321b2f4>] netlink_unicast+0x4c0/0x690
          [<000000008c25dffb>] netlink_sendmsg+0x929/0xe10
          [<00000000068298c5>] sock_sendmsg+0xc8/0x110
          [<0000000082a61ff0>] ___sys_sendmsg+0x77a/0x8f0
          [<00000000663ae29d>] __sys_sendmsg+0xf7/0x250
          [<0000000027c5f11a>] do_syscall_64+0x14d/0x610
          [<000000006cfbc8d3>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
          [<00000000e23197e2>] 0xffffffffffffffff
      
      Fixes: 01d7f30a ("team: add loadbalance mode")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Reported-by: default avatarAmit Cohen <amitc@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      692c31bd
    • Ido Schimmel's avatar
      ip6mr: Do not call __IP6_INC_STATS() from preemptible context · 87c11f1d
      Ido Schimmel authored
      Similar to commit 44f49dd8 ("ipmr: fix possible race resulting from
      improper usage of IP_INC_STATS_BH() in preemptible context."), we cannot
      assume preemption is disabled when incrementing the counter and
      accessing a per-CPU variable.
      
      Preemption can be enabled when we add a route in process context that
      corresponds to packets stored in the unresolved queue, which are then
      forwarded using this route [1].
      
      Fix this by using IP6_INC_STATS() which takes care of disabling
      preemption on architectures where it is needed.
      
      [1]
      [  157.451447] BUG: using __this_cpu_add() in preemptible [00000000] code: smcrouted/2314
      [  157.460409] caller is ip6mr_forward2+0x73e/0x10e0
      [  157.460434] CPU: 3 PID: 2314 Comm: smcrouted Not tainted 5.0.0-rc7-custom-03635-g22f2712113f1 #1336
      [  157.460449] Hardware name: Mellanox Technologies Ltd. MSN2100-CB2FO/SA001017, BIOS 5.6.5 06/07/2016
      [  157.460461] Call Trace:
      [  157.460486]  dump_stack+0xf9/0x1be
      [  157.460553]  check_preemption_disabled+0x1d6/0x200
      [  157.460576]  ip6mr_forward2+0x73e/0x10e0
      [  157.460705]  ip6_mr_forward+0x9a0/0x1510
      [  157.460771]  ip6mr_mfc_add+0x16b3/0x1e00
      [  157.461155]  ip6_mroute_setsockopt+0x3cb/0x13c0
      [  157.461384]  do_ipv6_setsockopt.isra.8+0x348/0x4060
      [  157.462013]  ipv6_setsockopt+0x90/0x110
      [  157.462036]  rawv6_setsockopt+0x4a/0x120
      [  157.462058]  __sys_setsockopt+0x16b/0x340
      [  157.462198]  __x64_sys_setsockopt+0xbf/0x160
      [  157.462220]  do_syscall_64+0x14d/0x610
      [  157.462349]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Fixes: 0912ea38 ("[IPV6] MROUTE: Add stats in multicast routing module method ip6_mr_forward().")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Reported-by: default avatarAmit Cohen <amitc@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87c11f1d
    • Aditya Pakki's avatar
      isdn: mISDN: Fix potential NULL pointer dereference of kzalloc · 38d22659
      Aditya Pakki authored
      Allocating memory via kzalloc for phi may fail and causes a
      NULL pointer dereference. This patch avoids such a scenario.
      Signed-off-by: default avatarAditya Pakki <pakki001@umn.edu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      38d22659
    • Heiner Kallweit's avatar
      net: dsa: mv88e6xxx: support in-band signalling on SGMII ports with external PHYs · 72d8b4fd
      Heiner Kallweit authored
      If an external PHY is connected via SGMII and uses in-band signalling
      then the auto-negotiated values aren't propagated to the port,
      resulting in a broken link. See discussion in [0]. This patch adds
      this propagation. We need to call mv88e6xxx_port_setup_mac(),
      therefore export it from chip.c.
      
      Successfully tested on a ZII DTU with 88E6390 switch and an
      Aquantia AQCS109 PHY connected via SGMII to port 9.
      
      [0] https://marc.info/?t=155130287200001&r=1&w=2Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72d8b4fd
    • Linus Torvalds's avatar
      get rid of legacy 'get_ds()' function · 736706be
      Linus Torvalds authored
      Every in-kernel use of this function defined it to KERNEL_DS (either as
      an actual define, or as an inline function).  It's an entirely
      historical artifact, and long long long ago used to actually read the
      segment selector valueof '%ds' on x86.
      
      Which in the kernel is always KERNEL_DS.
      
      Inspired by a patch from Jann Horn that just did this for a very small
      subset of users (the ones in fs/), along with Al who suggested a script.
      I then just took it to the logical extreme and removed all the remaining
      gunk.
      
      Roughly scripted with
      
         git grep -l '(get_ds())' -- :^tools/ | xargs sed -i 's/(get_ds())/(KERNEL_DS)/'
         git grep -lw 'get_ds' -- :^tools/ | xargs sed -i '/^#define get_ds()/d'
      
      plus manual fixups to remove a few unusual usage patterns, the couple of
      inline function cases and to fix up a comment that had become stale.
      
      The 'get_ds()' function remains in an x86 kvm selftest, since in user
      space it actually does something relevant.
      Inspired-by: default avatarJann Horn <jannh@google.com>
      Inspired-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      736706be
    • Linus Torvalds's avatar
      aio: simplify - and fix - fget/fput for io_submit() · 84c4e1f8
      Linus Torvalds authored
      Al Viro root-caused a race where the IOCB_CMD_POLL handling of
      fget/fput() could cause us to access the file pointer after it had
      already been freed:
      
       "In more details - normally IOCB_CMD_POLL handling looks so:
      
         1) io_submit(2) allocates aio_kiocb instance and passes it to
            aio_poll()
      
         2) aio_poll() resolves the descriptor to struct file by req->file =
            fget(iocb->aio_fildes)
      
         3) aio_poll() sets ->woken to false and raises ->ki_refcnt of that
            aio_kiocb to 2 (bumps by 1, that is).
      
         4) aio_poll() calls vfs_poll(). After sanity checks (basically,
            "poll_wait() had been called and only once") it locks the queue.
            That's what the extra reference to iocb had been for - we know we
            can safely access it.
      
         5) With queue locked, we check if ->woken has already been set to
            true (by aio_poll_wake()) and, if it had been, we unlock the
            queue, drop a reference to aio_kiocb and bugger off - at that
            point it's a responsibility to aio_poll_wake() and the stuff
            called/scheduled by it. That code will drop the reference to file
            in req->file, along with the other reference to our aio_kiocb.
      
         6) otherwise, we see whether we need to wait. If we do, we unlock the
            queue, drop one reference to aio_kiocb and go away - eventual
            wakeup (or cancel) will deal with the reference to file and with
            the other reference to aio_kiocb
      
         7) otherwise we remove ourselves from waitqueue (still under the
            queue lock), so that wakeup won't get us. No async activity will
            be happening, so we can safely drop req->file and iocb ourselves.
      
        If wakeup happens while we are in vfs_poll(), we are fine - aio_kiocb
        won't get freed under us, so we can do all the checks and locking
        safely. And we don't touch ->file if we detect that case.
      
        However, vfs_poll() most certainly *does* touch the file it had been
        given. So wakeup coming while we are still in ->poll() might end up
        doing fput() on that file. That case is not too rare, and usually we
        are saved by the still present reference from descriptor table - that
        fput() is not the final one.
      
        But if another thread closes that descriptor right after our fget()
        and wakeup does happen before ->poll() returns, we are in trouble -
        final fput() done while we are in the middle of a method:
      
      Al also wrote a patch to take an extra reference to the file descriptor
      to fix this, but I instead suggested we just streamline the whole file
      pointer handling by submit_io() so that the generic aio submission code
      simply keeps the file pointer around until the aio has completed.
      
      Fixes: bfe4037e ("aio: implement IOCB_CMD_POLL")
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Reported-by: syzbot+503d4cc169fcec1cb18c@syzkaller.appspotmail.com
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      84c4e1f8
    • Arjun Vynipadath's avatar
      cxgb4/chtls: Prefix adapter flags with CXGB4 · 80f61f19
      Arjun Vynipadath authored
      Some of these macros were conflicting with global namespace,
      hence prefixing them with CXGB4.
      Signed-off-by: default avatarArjun Vynipadath <arjun@chelsio.com>
      Signed-off-by: default avatarVishal Kulkarni <vishal@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      80f61f19
    • Andy Shevchenko's avatar
      net-sysfs: Switch to bitmap_zalloc() · 29ca1c5a
      Andy Shevchenko authored
      Switch to bitmap_zalloc() to show clearly what we are allocating.
      Besides that it returns pointer of bitmap type instead of opaque void *.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      29ca1c5a
    • Andy Shevchenko's avatar
      mellanox: Switch to bitmap_zalloc() · 214fa1c4
      Andy Shevchenko authored
      Switch to bitmap_zalloc() to show clearly what we are allocating.
      Besides that it returns pointer of bitmap type instead of opaque void *.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      214fa1c4
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · f7fb7c1a
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2019-03-04
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      The main changes are:
      
      1) Add AF_XDP support to libbpf. Rationale is to facilitate writing
         AF_XDP applications by offering higher-level APIs that hide many
         of the details of the AF_XDP uapi. Sample programs are converted
         over to this new interface as well, from Magnus.
      
      2) Introduce a new cant_sleep() macro for annotation of functions
         that cannot sleep and use it in BPF_PROG_RUN() to assert that
         BPF programs run under preemption disabled context, from Peter.
      
      3) Introduce per BPF prog stats in order to monitor the usage
         of BPF; this is controlled by kernel.bpf_stats_enabled sysctl
         knob where monitoring tools can make use of this to efficiently
         determine the average cost of programs, from Alexei.
      
      4) Split up BPF selftest's test_progs similarly as we already
         did with test_verifier. This allows to further reduce merge
         conflicts in future and to get more structure into our
         quickly growing BPF selftest suite, from Stanislav.
      
      5) Fix a bug in BTF's dedup algorithm which can cause an infinite
         loop in some circumstances; also various BPF doc fixes and
         improvements, from Andrii.
      
      6) Various BPF sample cleanups and migration to libbpf in order
         to further isolate the old sample loader code (so we can get
         rid of it at some point), from Jakub.
      
      7) Add a new BPF helper for BPF cgroup skb progs that allows
         to set ECN CE code point and a Host Bandwidth Manager (HBM)
         sample program for limiting the bandwidth used by v2 cgroups,
         from Lawrence.
      
      8) Enable write access to skb->queue_mapping from tc BPF egress
         programs in order to let BPF pick TX queue, from Jesper.
      
      9) Fix a bug in BPF spinlock handling for map-in-map which did
         not propagate spin_lock_off to the meta map, from Yonghong.
      
      10) Fix a bug in the new per-CPU BPF prog counters to properly
          initialize stats for each CPU, from Eric.
      
      11) Add various BPF helper prototypes to selftest's bpf_helpers.h,
          from Willem.
      
      12) Fix various BPF samples bugs in XDP and tracing progs,
          from Toke, Daniel and Yonghong.
      
      13) Silence preemption splat in test_bpf after BPF_PROG_RUN()
          enforces it now everywhere, from Anders.
      
      14) Fix a signedness bug in libbpf's btf_dedup_ref_type() to
          get error handling working, from Dan.
      
      15) Fix bpftool documentation and auto-completion with regards
          to stream_{verdict,parser} attach types, from Alban.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7fb7c1a
    • Linus Torvalds's avatar
      x86-64: add warning for non-canonical user access address dereferences · 00c42373
      Linus Torvalds authored
      This adds a warning (once) for any kernel dereference that has a user
      exception handler, but accesses a non-canonical address.  It basically
      is a simpler - and more limited - version of commit 9da3f2b7
      ("x86/fault: BUG() when uaccess helpers fault on kernel addresses") that
      got reverted.
      
      Note that unlike that original commit, this only causes a warning,
      because there are real situations where we currently can do this
      (notably speculative argument fetching for uprobes etc).  Also, unlike
      that original commit, this _only_ triggers for #GP accesses, so the
      cases of valid kernel pointers that cross into a non-mapped page aren't
      affected.
      
      The intent of this is two-fold:
      
       - the uprobe/tracing accesses really do need to be more careful. In
         particular, from a portability standpoint it's just wrong to think
         that "a pointer is a pointer", and use the same logic for any random
         pointer value you find on the stack. It may _work_ on x86-64, but it
         doesn't necessarily work on other architectures (where the same
         pointer value can be either a kernel pointer _or_ a user pointer, and
         you really need to be much more careful in how you try to access it)
      
         The warning can hopefully end up being a reminder that just any
         random pointer access won't do.
      
       - Kees in particular wanted a way to actually report invalid uses of
         wild pointers to user space accessors, instead of just silently
         failing them. Automated fuzzers want a way to get reports if the
         kernel ever uses invalid values that the fuzzer fed it.
      
         The non-canonical address range is a fair chunk of the address space,
         and with this you can teach syzkaller to feed in invalid pointer
         values and find cases where we do not properly validate user
         addresses (possibly due to bad uses of "set_fs()").
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Jann Horn <jannh@google.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      00c42373
    • Mark Brown's avatar
      Merge branch 'spi-5.1' into spi-next · 14dbfb41
      Mark Brown authored
      14dbfb41
    • Mark Brown's avatar
      Merge branch 'spi-5.0' into spi-linus · b50c6ac8
      Mark Brown authored
      b50c6ac8
    • Mark Brown's avatar
      88f268a5