1. 22 Dec, 2020 4 commits
    • Jakub Kicinski's avatar
      Merge branch 'ucc_geth-fixes' · d7e2c827
      Jakub Kicinski authored
      Rasmus Villemoes says:
      
      ====================
      ucc_geth fixes
      
      This is three bug fixes that fell out of a series of cleanups of the
      ucc_geth driver.
      ====================
      
      Link: https://lore.kernel.org/r/20201218105538.30563-1-rasmus.villemoes@prevas.dkSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d7e2c827
    • Rasmus Villemoes's avatar
      ethernet: ucc_geth: fix use-after-free in ucc_geth_remove() · e925e0cd
      Rasmus Villemoes authored
      ugeth is the netdiv_priv() part of the netdevice. Accessing the memory
      pointed to by ugeth (such as done by ucc_geth_memclean() and the two
      of_node_puts) after free_netdev() is thus use-after-free.
      
      Fixes: 80a9fad8 ("ucc_geth: fix module removal")
      Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e925e0cd
    • Rasmus Villemoes's avatar
      ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram · 887078de
      Rasmus Villemoes authored
      Table 8-53 in the QUICC Engine Reference manual shows definitions of
      fields up to a size of 192 bytes, not just 128. But in table 8-111,
      one does find the text
      
        Base Address of the Global Transmitter Parameter RAM Page. [...]
        The user needs to allocate 128 bytes for this page. The address must
        be aligned to the page size.
      
      I've checked both rev. 7 (11/2015) and rev. 9 (05/2018) of the manual;
      they both have this inconsistency (and the table numbers are the
      same).
      
      Adding a bit of debug printing, on my board the struct
      ucc_geth_tx_global_pram is allocated at offset 0x880, while
      the (opaque) ucc_geth_thread_data_tx gets allocated immediately
      afterwards, at 0x900. So whatever the engine writes into the thread
      data overlaps with the tail of the global tx pram (and devmem says
      that something does get written during a simple ping).
      
      I haven't observed any failure that could be attributed to this, but
      it seems to be the kind of thing that would be extremely hard to
      debug. So extend the struct definition so that we do allocate 192
      bytes.
      Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      887078de
    • Rasmus Villemoes's avatar
      ethernet: ucc_geth: set dev->max_mtu to 1518 · 1385ae5c
      Rasmus Villemoes authored
      All the buffers and registers are already set up appropriately for an
      MTU slightly above 1500, so we just need to expose this to the
      networking stack. AFAICT, there's no need to implement .ndo_change_mtu
      when the receive buffers are always set up to support the max_mtu.
      
      This fixes several warnings during boot on our mpc8309-board with an
      embedded mv88e6250 switch:
      
      mv88e6085 mdio@e0102120:10: nonfatal error -34 setting MTU 1500 on port 0
      ...
      mv88e6085 mdio@e0102120:10: nonfatal error -34 setting MTU 1500 on port 4
      ucc_geth e0102000.ethernet eth1: error -22 setting MTU to 1504 to include DSA overhead
      
      The last line explains what the DSA stack tries to do: achieving an MTU
      of 1500 on-the-wire requires that the master netdevice connected to
      the CPU port supports an MTU of 1500+the tagging overhead.
      
      Fixes: bfcb8132 ("net: dsa: configure the MTU for switch ports")
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1385ae5c
  2. 21 Dec, 2020 1 commit
  3. 19 Dec, 2020 6 commits
  4. 18 Dec, 2020 1 commit
  5. 17 Dec, 2020 28 commits
    • Jakub Kicinski's avatar
      iavf: fix double-release of rtnl_lock · f1340265
      Jakub Kicinski authored
      This code does not jump to exit on an error in iavf_lan_add_device(),
      so the rtnl_unlock() from the normal path will follow.
      
      Fixes: b66c7bc1 ("iavf: Refactor init state machine")
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Reviewed-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      f1340265
    • Linus Torvalds's avatar
      Merge tag 'net-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · d64c6f96
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Current release - always broken:
      
         - net/smc: fix access to parent of an ib device
      
         - devlink: use _BITUL() macro instead of BIT() in the UAPI header
      
         - handful of mptcp fixes
      
        Previous release - regressions:
      
         - intel: AF_XDP: clear the status bits for the next_to_use descriptor
      
         - dpaa2-eth: fix the size of the mapped SGT buffer
      
        Previous release - always broken:
      
         - mptcp: fix security context on server socket
      
         - ethtool: fix string set id check
      
         - ethtool: fix error paths in ethnl_set_channels()
      
         - lan743x: fix rx_napi_poll/interrupt ping-pong
      
         - qca: ar9331: fix sleeping function called from invalid context bug"
      
      * tag 'net-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (32 commits)
        net/sched: sch_taprio: reset child qdiscs before freeing them
        nfp: move indirect block cleanup to flower app stop callback
        octeontx2-af: Fix undetected unmap PF error check
        net: nixge: fix spelling mistake in Kconfig: "Instuments" -> "Instruments"
        qlcnic: Fix error code in probe
        mptcp: fix pending data accounting
        mptcp: push pending frames when subflow has free space
        mptcp: properly annotate nested lock
        mptcp: fix security context on server socket
        net/mlx5: Fix compilation warning for 32-bit platform
        mptcp: clear use_ack and use_map when dropping other suboptions
        devlink: use _BITUL() macro instead of BIT() in the UAPI header
        net: korina: fix return value
        net/smc: fix access to parent of an ib device
        ethtool: fix error paths in ethnl_set_channels()
        nfc: s3fwrn5: Remove unused NCI prop commands
        nfc: s3fwrn5: Remove the delay for NFC sleep
        phy: fix kdoc warning
        tipc: do sanity check payload of a netlink message
        use __netdev_notify_peers in hyperv
        ...
      d64c6f96
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://github.com/openrisc/linux · 0c6c8878
      Linus Torvalds authored
      Pull OpenRISC updates from Stafford Horne:
      
       - New drivers and OpenRISC support for the LiteX platform
      
       - A bug fix to support userspace gdb debugging
      
       - Fixes one compile issue with blk-iocost
      
      * tag 'for-linus' of git://github.com/openrisc/linux:
        openrisc: add local64.h to fix blk-iocost build
        openrisc: fix trap for debugger breakpoint signalling
        openrisc: add support for LiteX
        drivers/tty/serial: add LiteUART driver
        dt-bindings: serial: document LiteUART bindings
        drivers/soc/litex: add LiteX SoC Controller driver
        dt-bindings: soc: document LiteX SoC Controller bindings
        dt-bindings: vendor: add vendor prefix for LiteX
      0c6c8878
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 8a5be36b
      Linus Torvalds authored
      Pull powerpc updates from Michael Ellerman:
      
       - Switch to the generic C VDSO, as well as some cleanups of our VDSO
         setup/handling code.
      
       - Support for KUAP (Kernel User Access Prevention) on systems using the
         hashed page table MMU, using memory protection keys.
      
       - Better handling of PowerVM SMT8 systems where all threads of a core
         do not share an L2, allowing the scheduler to make better scheduling
         decisions.
      
       - Further improvements to our machine check handling.
      
       - Show registers when unwinding interrupt frames during stack traces.
      
       - Improvements to our pseries (PowerVM) partition migration code.
      
       - Several series from Christophe refactoring and cleaning up various
         parts of the 32-bit code.
      
       - Other smaller features, fixes & cleanups.
      
      Thanks to: Alan Modra, Alexey Kardashevskiy, Andrew Donnellan, Aneesh
      Kumar K.V, Ard Biesheuvel, Athira Rajeev, Balamuruhan S, Bill Wendling,
      Cédric Le Goater, Christophe Leroy, Christophe Lombard, Colin Ian King,
      Daniel Axtens, David Hildenbrand, Frederic Barrat, Ganesh Goudar,
      Gautham R. Shenoy, Geert Uytterhoeven, Giuseppe Sacco, Greg Kurz,
      Harish, Jan Kratochvil, Jordan Niethe, Kaixu Xia, Laurent Dufour,
      Leonardo Bras, Madhavan Srinivasan, Mahesh Salgaonkar, Mathieu
      Desnoyers, Nathan Lynch, Nicholas Piggin, Oleg Nesterov, Oliver
      O'Halloran, Oscar Salvador, Po-Hsu Lin, Qian Cai, Qinglang Miao, Randy
      Dunlap, Ravi Bangoria, Sachin Sant, Sandipan Das, Sebastian Andrzej
      Siewior , Segher Boessenkool, Srikar Dronamraju, Tyrel Datwyler, Uwe
      Kleine-König, Vincent Stehlé, Youling Tang, and Zhang Xiaoxu.
      
      * tag 'powerpc-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (304 commits)
        powerpc/32s: Fix cleanup_cpu_mmu_context() compile bug
        powerpc: Add config fragment for disabling -Werror
        powerpc/configs: Add ppc64le_allnoconfig target
        powerpc/powernv: Rate limit opal-elog read failure message
        powerpc/pseries/memhotplug: Quieten some DLPAR operations
        powerpc/ps3: use dma_mapping_error()
        powerpc: force inlining of csum_partial() to avoid multiple csum_partial() with GCC10
        powerpc/perf: Fix Threshold Event Counter Multiplier width for P10
        powerpc/mm: Fix hugetlb_free_pmd_range() and hugetlb_free_pud_range()
        KVM: PPC: Book3S HV: Fix mask size for emulated msgsndp
        KVM: PPC: fix comparison to bool warning
        KVM: PPC: Book3S: Assign boolean values to a bool variable
        powerpc: Inline setup_kup()
        powerpc/64s: Mark the kuap/kuep functions non __init
        KVM: PPC: Book3S HV: XIVE: Add a comment regarding VP numbering
        powerpc/xive: Improve error reporting of OPAL calls
        powerpc/xive: Simplify xive_do_source_eoi()
        powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_EOI_FW
        powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_MASK_FW
        powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_SHIFT_BUG
        ...
      8a5be36b
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 09c0796a
      Linus Torvalds authored
      Pull tracing updates from Steven Rostedt:
       "The major update to this release is that there's a new arch config
        option called CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS.
      
        Currently, only x86_64 enables it. All the ftrace callbacks now take a
        struct ftrace_regs instead of a struct pt_regs. If the architecture
        has HAVE_DYNAMIC_FTRACE_WITH_ARGS enabled, then the ftrace_regs will
        have enough information to read the arguments of the function being
        traced, as well as access to the stack pointer.
      
        This way, if a user (like live kernel patching) only cares about the
        arguments, then it can avoid using the heavier weight "regs" callback,
        that puts in enough information in the struct ftrace_regs to simulate
        a breakpoint exception (needed for kprobes).
      
        A new config option that audits the timestamps of the ftrace ring
        buffer at most every event recorded.
      
        Ftrace recursion protection has been cleaned up to move the protection
        to the callback itself (this saves on an extra function call for those
        callbacks).
      
        Perf now handles its own RCU protection and does not depend on ftrace
        to do it for it (saving on that extra function call).
      
        New debug option to add "recursed_functions" file to tracefs that
        lists all the places that triggered the recursion protection of the
        function tracer. This will show where things need to be fixed as
        recursion slows down the function tracer.
      
        The eval enum mapping updates done at boot up are now offloaded to a
        work queue, as it caused a noticeable pause on slow embedded boards.
      
        Various clean ups and last minute fixes"
      
      * tag 'trace-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (33 commits)
        tracing: Offload eval map updates to a work queue
        Revert: "ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS"
        ring-buffer: Add rb_check_bpage in __rb_allocate_pages
        ring-buffer: Fix two typos in comments
        tracing: Drop unneeded assignment in ring_buffer_resize()
        tracing: Disable ftrace selftests when any tracer is running
        seq_buf: Avoid type mismatch for seq_buf_init
        ring-buffer: Fix a typo in function description
        ring-buffer: Remove obsolete rb_event_is_commit()
        ring-buffer: Add test to validate the time stamp deltas
        ftrace/documentation: Fix RST C code blocks
        tracing: Clean up after filter logic rewriting
        tracing: Remove the useless value assignment in test_create_synth_event()
        livepatch: Use the default ftrace_ops instead of REGS when ARGS is available
        ftrace/x86: Allow for arguments to be passed in to ftrace_regs by default
        ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs
        MAINTAINERS: assign ./fs/tracefs to TRACING
        tracing: Fix some typos in comments
        ftrace: Remove unused varible 'ret'
        ring-buffer: Add recording of ring buffer recursion into recursed_functions
        ...
      09c0796a
    • Linus Torvalds's avatar
      Merge tag 'modules-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux · 312dcaf9
      Linus Torvalds authored
      Pull modules updates from Jessica Yu:
       "Summary of modules changes for the 5.11 merge window:
      
         - Fix a race condition between systemd/udev and the module loader.
      
           The module loader was sending a uevent before the module was fully
           initialized (i.e., before its init function has been called). This
           means udev can start processing the module uevent before the module
           has finished initializing, and some udev rules expect that the
           module has initialized already upon receiving the uevent.
      
           This resulted in some systemd mount units failing if udev processes
           the event faster than the module can finish init. This is fixed by
           delaying the uevent until after the module has called its init
           routine.
      
         - Make the linker array sections for kernel params and module version
           attributes more robust by switching to use the alignment of the
           type in question.
      
           Namely, linker section arrays will be constructed using the
           alignment required by the struct (using __alignof__()) as opposed
           to a specific value such as sizeof(void *) or sizeof(long). This is
           less likely to cause breakages should the size of the type ever
           change (Johan Hovold)
      
         - Fix module state inconsistency by setting it back to GOING when a
           module fails to load and is on its way out (Miroslav Benes)
      
         - Some comment and code cleanups (Sergey Shtylyov)"
      
      * tag 'modules-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
        module: delay kobject uevent until after module init call
        module: drop semicolon from version macro
        init: use type alignment for kernel parameters
        params: clean up module-param macros
        params: use type alignment for kernel parameters
        params: drop redundant "unused" attributes
        module: simplify version-attribute handling
        module: drop version-attribute alignment
        module: fix comment style
        module: add more 'kernel-doc' comments
        module: fix up 'kernel-doc' comments
        module: only handle errors with the *switch* statement in module_sig_check()
        module: avoid *goto*s in module_sig_check()
        module: merge repetitive strings in module_sig_check()
        module: set MODULE_STATE_GOING state when a module fails to load
      312dcaf9
    • Sylwester Dziedziuch's avatar
      i40e: Fix Error I40E_AQ_RC_EINVAL when removing VFs · 3ac874fa
      Sylwester Dziedziuch authored
      When removing VFs for PF added to bridge there was
      an error I40E_AQ_RC_EINVAL. It was caused by not properly
      resetting and reinitializing PF when adding/removing VFs.
      Changed how reset is performed when adding/removing VFs
      to properly reinitialize PFs VSI.
      
      Fixes: fc60861e ("i40e: start up in VEPA mode by default")
      Signed-off-by: default avatarSylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      3ac874fa
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine · 6daa9043
      Linus Torvalds authored
      Pull dmaengine updates from Vinod Koul:
       "The last dmaengine updates for this year :)
      
        This contains couple of new drivers, new device support and updates to
        bunch of drivers.
      
        New drivers/devices:
         - Qualcomm ADM driver
         - Qualcomm GPI driver
         - Allwinner A100 DMA support
         - Microchip Sama7g5 support
         - Mediatek MT8516 apdma
      
        Updates:
         - more updates to idxd driver and support for IAX config
         - runtime PM support for dw driver
         - TI drivers"
      
      * tag 'dmaengine-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (75 commits)
        soc: ti: k3-ringacc: Use correct error casting in k3_ringacc_dmarings_init
        dmaengine: ti: k3-udma-glue: Add support for K3 PKTDMA
        dmaengine: ti: k3-udma: Initial support for K3 PKTDMA
        dmaengine: ti: k3-udma: Add support for BCDMA channel TPL handling
        dmaengine: ti: k3-udma: Initial support for K3 BCDMA
        soc: ti: k3-ringacc: add AM64 DMA rings support.
        dmaengine: ti: Add support for k3 event routers
        dmaengine: ti: k3-psil: Add initial map for AM64
        dmaengine: ti: k3-psil: Extend psil_endpoint_config for K3 PKTDMA
        dt-bindings: dma: ti: Add document for K3 PKTDMA
        dt-bindings: dma: ti: Add document for K3 BCDMA
        dmaengine: dmatest: Use dmaengine_get_dma_device
        dmaengine: doc: client: Update for dmaengine_get_dma_device() usage
        dmaengine: Add support for per channel coherency handling
        dmaengine: of-dma: Add support for optional router configuration callback
        dmaengine: ti: k3-udma-glue: Configure the dma_dev for rings
        dmaengine: ti: k3-udma-glue: Get the ringacc from udma_dev
        dmaengine: ti: k3-udma-glue: Add function to get device pointer for DMA API
        dmaengine: ti: k3-udma: Add support for second resource range from sysfw
        dmaengine: ti: k3-udma: Wait for peer teardown completion if supported
        ...
      6daa9043
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v5.11' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 83005cd6
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
      
       - arm: added mhu-v2 controller driver
      
       - arm_mhu_db: fix kfree by using devm_ variant
      
       - stm32-ipcc: misc cleanup
      
      * tag 'mailbox-v5.11' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        mailbox: arm_mhuv2: Add driver
        dt-bindings: mailbox : arm,mhuv2: Add bindings
        mailbox: stm32-ipcc: cast void pointers to unsigned long
        mailbox: stm32-ipcc: remove duplicate error message
        mailbox: stm32-ipcc: add COMPILE_TEST dependency
        mailbox: arm_mhu_db: Fix mhu_db_shutdown by replacing kfree with devm_kfree
      83005cd6
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.11-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 74f602dc
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
       "Highlights include:
      
        Features:
      
         - NFSv3: Add emulation of lookupp() to improve open_by_filehandle()
           support
      
         - A series of patches to improve readdir performance, particularly
           with large directories
      
         - Basic support for using NFS/RDMA with the pNFS files and flexfiles
           drivers
      
         - Micro-optimisations for RDMA
      
         - RDMA tracing improvements
      
        Bugfixes:
      
         - Fix a long standing bug with xs_read_xdr_buf() when receiving
           partial pages (Dan Aloni)
      
         - Various fixes for getxattr and listxattr, when used over non-TCP
           transports
      
         - Fixes for containerised NFS from Sargun Dhillon
      
         - switch nfsiod to be an UNBOUND workqueue (Neil Brown)
      
         - READDIR should not ask for security label information if there is
           no LSM policy (Olga Kornievskaia)
      
         - Avoid using interval-based rebinding with TCP in lockd (Calum
           Mackay)
      
         - A series of RPC and NFS layer fixes to support the NFSv4.2
           READ_PLUS code
      
         - A couple of fixes for pnfs/flexfiles read failover
      
        Cleanups:
      
         - Various cleanups for the SUNRPC xdr code in conjunction with the
           READ_PLUS fixes"
      
      * tag 'nfs-for-5.11-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (90 commits)
        NFS/pNFS: Fix a typo in ff_layout_resend_pnfs_read()
        pNFS/flexfiles: Avoid spurious layout returns in ff_layout_choose_ds_for_read
        NFSv4/pnfs: Add tracing for the deviceid cache
        fs/lockd: convert comma to semicolon
        NFSv4.2: fix error return on memory allocation failure
        NFSv4.2/pnfs: Don't use READ_PLUS with pNFS yet
        NFSv4.2: Deal with potential READ_PLUS data extent buffer overflow
        NFSv4.2: Don't error when exiting early on a READ_PLUS buffer overflow
        NFSv4.2: Handle hole lengths that exceed the READ_PLUS read buffer
        NFSv4.2: decode_read_plus_hole() needs to check the extent offset
        NFSv4.2: decode_read_plus_data() must skip padding after data segment
        NFSv4.2: Ensure we always reset the result->count in decode_read_plus()
        SUNRPC: When expanding the buffer, we may need grow the sparse pages
        SUNRPC: Cleanup - constify a number of xdr_buf helpers
        SUNRPC: Clean up open coded setting of the xdr_stream 'nwords' field
        SUNRPC: _copy_to/from_pages() now check for zero length
        SUNRPC: Cleanup xdr_shrink_bufhead()
        SUNRPC: Fix xdr_expand_hole()
        SUNRPC: Fixes for xdr_align_data()
        SUNRPC: _shift_data_left/right_pages should check the shift length
        ...
      74f602dc
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.11-rc1' of git://github.com/ceph/ceph-client · be695ee2
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "The big ticket item here is support for msgr2 on-wire protocol, which
        adds the option of full in-transit encryption using AES-GCM algorithm
        (myself).
      
        On top of that we have a series to avoid intermittent errors during
        recovery with recover_session=clean and some MDS request encoding work
        from Jeff, a cap handling fix and assorted observability improvements
        from Luis and Xiubo and a good number of cleanups.
      
        Luis also ran into a corner case with quotas which sadly means that we
        are back to denying cross-quota-realm renames"
      
      * tag 'ceph-for-5.11-rc1' of git://github.com/ceph/ceph-client: (59 commits)
        libceph: drop ceph_auth_{create,update}_authorizer()
        libceph, ceph: make use of __ceph_auth_get_authorizer() in msgr1
        libceph, ceph: implement msgr2.1 protocol (crc and secure modes)
        libceph: introduce connection modes and ms_mode option
        libceph, rbd: ignore addr->type while comparing in some cases
        libceph, ceph: get and handle cluster maps with addrvecs
        libceph: factor out finish_auth()
        libceph: drop ac->ops->name field
        libceph: amend cephx init_protocol() and build_request()
        libceph, ceph: incorporate nautilus cephx changes
        libceph: safer en/decoding of cephx requests and replies
        libceph: more insight into ticket expiry and invalidation
        libceph: move msgr1 protocol specific fields to its own struct
        libceph: move msgr1 protocol implementation to its own file
        libceph: separate msgr1 protocol implementation
        libceph: export remaining protocol independent infrastructure
        libceph: export zero_page
        libceph: rename and export con->flags bits
        libceph: rename and export con->state states
        libceph: make con->state an int
        ...
      be695ee2
    • Linus Torvalds's avatar
      Merge tag 'ovl-update-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · 92dbc9de
      Linus Torvalds authored
      Pull overlayfs updates from Miklos Szeredi:
      
       - Allow unprivileged mounting in a user namespace.
      
         For quite some time the security model of overlayfs has been that
         operations on underlying layers shall be performed with the
         privileges of the mounting task.
      
         This way an unprvileged user cannot gain privileges by the act of
         mounting an overlayfs instance. A full audit of all function calls
         made by the overlayfs code has been performed to see whether they
         conform to this model, and this branch contains some fixes in this
         regard.
      
       - Support running on copied filesystem images by optionally disabling
         UUID verification.
      
       - Bug fixes as well as documentation updates.
      
      * tag 'ovl-update-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        ovl: unprivieged mounts
        ovl: do not get metacopy for userxattr
        ovl: do not fail because of O_NOATIME
        ovl: do not fail when setting origin xattr
        ovl: user xattr
        ovl: simplify file splice
        ovl: make ioctl() safe
        ovl: check privs before decoding file handle
        vfs: verify source area in vfs_dedupe_file_range_one()
        vfs: move cap_convert_nscap() call into vfs_setxattr()
        ovl: fix incorrect extent info in metacopy case
        ovl: expand warning in ovl_d_real()
        ovl: document lower modification caveats
        ovl: warn about orphan metacopy
        ovl: doc clarification
        ovl: introduce new "uuid=off" option for inodes index feature
        ovl: propagate ovl_fs to ovl_decode_real_fh and ovl_encode_real_fh
      92dbc9de
    • Linus Torvalds's avatar
      Merge tag 'fuse-update-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 65de0b89
      Linus Torvalds authored
      Pull fuse updates from Miklos Szeredi:
      
       - Improve performance of virtio-fs in mixed read/write workloads
      
       - Try to revalidate cache before returning EEXIST on exclusive create
      
       - Add a couple of miscellaneous bug fixes as well as some code cleanups
      
      * tag 'fuse-update-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: fix bad inode
        fuse: support SB_NOSEC flag to improve write performance
        fuse: add a flag FUSE_OPEN_KILL_SUIDGID for open() request
        fuse: don't send ATTR_MODE to kill suid/sgid for handle_killpriv_v2
        fuse: setattr should set FATTR_KILL_SUIDGID
        fuse: set FUSE_WRITE_KILL_SUIDGID in cached write path
        fuse: rename FUSE_WRITE_KILL_PRIV to FUSE_WRITE_KILL_SUIDGID
        fuse: introduce the notion of FUSE_HANDLE_KILLPRIV_V2
        fuse: always revalidate if exclusive create
        virtiofs: clean up error handling in virtio_fs_get_tree()
        fuse: add fuse_sb_destroy() helper
        fuse: simplify get_fuse_conn*()
        fuse: get rid of fuse_mount refcount
        virtiofs: simplify sb setup
        virtiofs fix leak in setup
        fuse: launder page should wait for page writeback
      65de0b89
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · ff49c86f
      Linus Torvalds authored
      Pull f2fs updates from Jaegeuk Kim:
       "In this round, we've made more work into per-file compression support.
      
        For example, F2FS_IOC_GET | SET_COMPRESS_OPTION provides a way to
        change the algorithm or cluster size per file. F2FS_IOC_COMPRESS |
        DECOMPRESS_FILE provides a way to compress and decompress the existing
        normal files manually.
      
        There is also a new mount option, compress_mode=fs|user, which can
        control who compresses the data.
      
        Chao also added a checksum feature with a mount option so that
        we are able to detect any corrupted cluster.
      
        In addition, Daniel contributed casefolding with encryption patch,
        which will be used for Android devices.
      
        Summary:
      
        Enhancements:
         - add ioctls and mount option to manage per-file compression feature
         - support casefolding with encryption
         - support checksum for compressed cluster
         - avoid IO starvation by replacing mutex with rwsem
         - add sysfs, max_io_bytes, to control max bio size
      
        Bug fixes:
         - fix use-after-free issue when compression and fsverity are enabled
         - fix consistency corruption during fault injection test
         - fix data offset for lseek
         - get rid of buffer_head which has 32bits limit in fiemap
         - fix some bugs in multi-partitions support
         - fix nat entry count calculation in shrinker
         - fix some stat information
      
        And, we've refactored some logics and fix minor bugs as well"
      
      * tag 'f2fs-for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (36 commits)
        f2fs: compress: fix compression chksum
        f2fs: fix shift-out-of-bounds in sanity_check_raw_super()
        f2fs: fix race of pending_pages in decompression
        f2fs: fix to account inline xattr correctly during recovery
        f2fs: inline: fix wrong inline inode stat
        f2fs: inline: correct comment in f2fs_recover_inline_data
        f2fs: don't check PAGE_SIZE again in sanity_check_raw_super()
        f2fs: convert to F2FS_*_INO macro
        f2fs: introduce max_io_bytes, a sysfs entry, to limit bio size
        f2fs: don't allow any writes on readonly mount
        f2fs: avoid race condition for shrinker count
        f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE
        f2fs: add compress_mode mount option
        f2fs: Remove unnecessary unlikely()
        f2fs: init dirty_secmap incorrectly
        f2fs: remove buffer_head which has 32bits limit
        f2fs: fix wrong block count instead of bytes
        f2fs: use new conversion functions between blks and bytes
        f2fs: rename logical_to_blk and blk_to_logical
        f2fs: fix kbytes written stat for multi-device case
        ...
      ff49c86f
    • Linus Torvalds's avatar
      Merge tag 'for_v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · b97d4c42
      Linus Torvalds authored
      Pull ext2, reiserfs, quota and writeback updates from Jan Kara:
      
       - a couple of quota fixes (mostly for problems found by syzbot)
      
       - several ext2 cleanups
      
       - one fix for reiserfs crash on corrupted image
      
       - a fix for spurious warning in writeback code
      
      * tag 'for_v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        writeback: don't warn on an unregistered BDI in __mark_inode_dirty
        fs: quota: fix array-index-out-of-bounds bug by passing correct argument to vfs_cleanup_quota_inode()
        reiserfs: add check for an invalid ih_entry_count
        ext2: Fix fall-through warnings for Clang
        fs/ext2: Use ext2_put_page
        docs: filesystems: Reduce ext2.rst to one top-level heading
        quota: Sanity-check quota file headers on load
        quota: Don't overflow quota file offsets
        ext2: Remove unnecessary blank
        fs/quota: update quota state flags scheme with project quota flags
      b97d4c42
    • Davide Caratti's avatar
      net/sched: sch_taprio: reset child qdiscs before freeing them · 44d4775c
      Davide Caratti authored
      syzkaller shows that packets can still be dequeued while taprio_destroy()
      is running. Let sch_taprio use the reset() function to cancel the advance
      timer and drop all skbs from the child qdiscs.
      
      Fixes: 5a781ccb ("tc: Add support for configuring the taprio scheduler")
      Link: https://syzkaller.appspot.com/bug?id=f362872379bf8f0017fb667c1ab158f2d1e764ae
      Reported-by: syzbot+8971da381fb5a31f542d@syzkaller.appspotmail.com
      Signed-off-by: default avatarDavide Caratti <dcaratti@redhat.com>
      Acked-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Link: https://lore.kernel.org/r/63b6d79b0e830ebb0283e020db4df3cdfdfb2b94.1608142843.git.dcaratti@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      44d4775c
    • Simon Horman's avatar
      nfp: move indirect block cleanup to flower app stop callback · 5b33afee
      Simon Horman authored
      The indirect block cleanup may cause control messages to be sent
      if offloaded flows are present. However, by the time the flower app
      cleanup callback is called txbufs are no longer available and attempts
      to send control messages result in a NULL-pointer dereference in
      nfp_ctrl_tx_one().
      
      This problem may be resolved by moving the indirect block cleanup
      to the stop callback, where txbufs are still available.
      
      As suggested by Jakub Kicinski and Louis Peens.
      
      Fixes: a1db2178 ("net: flow_offload: fix flow_indr_dev_unregister path")
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarLouis Peens <louis.peens@netronome.com>
      Link: https://lore.kernel.org/r/20201216145701.30005-1-simon.horman@netronome.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5b33afee
    • Colin Ian King's avatar
      octeontx2-af: Fix undetected unmap PF error check · d8a4ea35
      Colin Ian King authored
      Currently the check for an unmap PF error is always going to be false
      because intr_val is a 32 bit int and is being bit-mask checked against
      1ULL << 32.  Fix this by making intr_val a u64 to match the type at it
      is copied from, namely npa_event_context->npa_af_rvu_ge.
      
      Addresses-Coverity: ("Operands don't affect result")
      Fixes: f1168d1e ("octeontx2-af: Add devlink health reporters for NPA")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Acked-by: default avatarGeorge Cherian <george.cherian@marvell.com>
      Link: https://lore.kernel.org/r/20201216123604.15369-1-colin.king@canonical.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d8a4ea35
    • Linus Torvalds's avatar
      Merge tag 'fsnotify_for_v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 14bd41e4
      Linus Torvalds authored
      Pull fsnotify updates from Jan Kara:
       "A few fsnotify fixes from Amir fixing fallout from big fsnotify
        overhaul a few months back and an improvement of defaults limiting
        maximum number of inotify watches from Waiman"
      
      * tag 'fsnotify_for_v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fsnotify: fix events reported to watching parent and child
        inotify: convert to handle_inode_event() interface
        fsnotify: generalize handle_inode_event()
        inotify: Increase default inotify.max_user_watches limit to 1048576
      14bd41e4
    • Colin Ian King's avatar
    • Dan Carpenter's avatar
      qlcnic: Fix error code in probe · 0d528486
      Dan Carpenter authored
      Return -EINVAL if we can't find the correct device.  Currently it
      returns success.
      
      Fixes: 13159183 ("qlcnic: 83xx base driver")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Link: https://lore.kernel.org/r/X9nHbMqEyI/xPfGd@mwandaSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0d528486
    • Vasily Averin's avatar
      netfilter: ipset: fix shift-out-of-bounds in htable_bits() · 5c8193f5
      Vasily Averin authored
      htable_bits() can call jhash_size(32) and trigger shift-out-of-bounds
      
      UBSAN: shift-out-of-bounds in net/netfilter/ipset/ip_set_hash_gen.h:151:6
      shift exponent 32 is too large for 32-bit type 'unsigned int'
      CPU: 0 PID: 8498 Comm: syz-executor519
       Not tainted 5.10.0-rc7-next-20201208-syzkaller #0
      Call Trace:
       __dump_stack lib/dump_stack.c:79 [inline]
       dump_stack+0x107/0x163 lib/dump_stack.c:120
       ubsan_epilogue+0xb/0x5a lib/ubsan.c:148
       __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395
       htable_bits net/netfilter/ipset/ip_set_hash_gen.h:151 [inline]
       hash_mac_create.cold+0x58/0x9b net/netfilter/ipset/ip_set_hash_gen.h:1524
       ip_set_create+0x610/0x1380 net/netfilter/ipset/ip_set_core.c:1115
       nfnetlink_rcv_msg+0xecc/0x1180 net/netfilter/nfnetlink.c:252
       netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494
       nfnetlink_rcv+0x1ac/0x420 net/netfilter/nfnetlink.c:600
       netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline]
       netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330
       netlink_sendmsg+0x907/0xe40 net/netlink/af_netlink.c:1919
       sock_sendmsg_nosec net/socket.c:652 [inline]
       sock_sendmsg+0xcf/0x120 net/socket.c:672
       ____sys_sendmsg+0x6e8/0x810 net/socket.c:2345
       ___sys_sendmsg+0xf3/0x170 net/socket.c:2399
       __sys_sendmsg+0xe5/0x1b0 net/socket.c:2432
       do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      This patch replaces htable_bits() by simple fls(hashsize - 1) call:
      it alone returns valid nbits both for round and non-round hashsizes.
      It is normal to set any nbits here because it is validated inside
      following htable_size() call which returns 0 for nbits>31.
      
      Fixes: 1feab10d("netfilter: ipset: Unified hash type generation")
      Reported-by: syzbot+d66bfadebca46cf61a2b@syzkaller.appspotmail.com
      Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
      Acked-by: default avatarJozsef Kadlecsik <kadlec@netfilter.org>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      5c8193f5
    • Vasily Averin's avatar
      netfilter: ipset: fixes possible oops in mtype_resize · 2b33d6ff
      Vasily Averin authored
      currently mtype_resize() can cause oops
      
              t = ip_set_alloc(htable_size(htable_bits));
              if (!t) {
                      ret = -ENOMEM;
                      goto out;
              }
              t->hregion = ip_set_alloc(ahash_sizeof_regions(htable_bits));
      
      Increased htable_bits can force htable_size() to return 0.
      In own turn ip_set_alloc(0) returns not 0 but ZERO_SIZE_PTR,
      so follwoing access to t->hregion should trigger an OOPS.
      Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
      Acked-by: default avatarJozsef Kadlecsik <kadlec@netfilter.org>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      2b33d6ff
    • Subash Abhinov Kasiviswanathan's avatar
      netfilter: x_tables: Update remaining dereference to RCU · 443d6e86
      Subash Abhinov Kasiviswanathan authored
      This fixes the dereference to fetch the RCU pointer when holding
      the appropriate xtables lock.
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Fixes: cc00bcaa ("netfilter: x_tables: Switch synchronization to RCU")
      Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
      Reviewed-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      443d6e86
    • Jakub Kicinski's avatar
      Merge branch 'mptcp-a-bunch-of-assorted-fixes' · 86eb09b6
      Jakub Kicinski authored
      Paolo Abeni says:
      
      ====================
      mptcp: a bunch of assorted fixes
      
      This series pulls a few fixes for the MPTCP datapath.
      Most issues addressed here has been recently introduced
      with the recent reworks, with the notable exception of
      the first patch, which addresses an issue present since
      the early days
      ====================
      
      Link: https://lore.kernel.org/r/cover.1608114076.git.pabeni@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      86eb09b6
    • Paolo Abeni's avatar
      mptcp: fix pending data accounting · 13e16037
      Paolo Abeni authored
      When sendmsg() needs to wait for memory, the pending data
      is not updated. That causes a drift in forward memory allocation,
      leading to stall and/or warnings at socket close time.
      
      This change addresses the above issue moving the pending data
      counter update inside the sendmsg() main loop.
      
      Fixes: 6e628cd3 ("mptcp: use mptcp release_cb for delayed tasks")
      Reviewed-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      13e16037
    • Paolo Abeni's avatar
      mptcp: push pending frames when subflow has free space · 219d0499
      Paolo Abeni authored
      When multiple subflows are active, we can receive a
      window update on subflow with no write space available.
      MPTCP will try to push frames on such subflow and will
      fail. Pending frames will be pushed only after receiving
      a window update on a subflow with some wspace available.
      
      Overall the above could lead to suboptimal aggregate
      bandwidth usage.
      
      Instead, we should try to push pending frames as soon as
      the subflow reaches both conditions mentioned above.
      
      We can finally enable self-tests with asymmetric links,
      as the above makes them finally pass.
      
      Fixes: 6f8a612a ("mptcp: keep track of advertised windows right edge")
      Reviewed-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      219d0499
    • Paolo Abeni's avatar
      mptcp: properly annotate nested lock · 3f8b2667
      Paolo Abeni authored
      MPTCP closes the subflows while holding the msk-level lock.
      While acquiring the subflow socket lock we need to use the
      correct nested annotation, or we can hit a lockdep splat
      at runtime.
      Reported-and-tested-by: default avatarGeliang Tang <geliangtang@gmail.com>
      Fixes: e16163b6 ("mptcp: refactor shutdown and close")
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3f8b2667