Skip to content
  1. Dec 25, 2023
  2. Dec 22, 2023
    • Linus Torvalds's avatar
      Merge tag 'net-6.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 7c5e046b
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from WiFi and bpf.
      
        Current release - regressions:
      
         - bpf: syzkaller found null ptr deref in unix_bpf proto add
      
         - eth: i40e: fix ST code value for clause 45
      
        Previous releases - regressions:
      
         - core: return error from sk_stream_wait_connect() if sk_wait_event()
           fails
      
         - ipv6: revert remove expired routes with a separated list of routes
      
         - wifi rfkill:
             - set GPIO direction
             - fix crash with WED rx support enabled
      
         - bluetooth:
             - fix deadlock in vhci_send_frame
             - fix use-after-free in bt_sock_recvmsg
      
         - eth: mlx5e: fix a race in command alloc flow
      
         - eth: ice: fix PF with enabled XDP going no-carrier after reset
      
         - eth: bnxt_en: do not map packet buffers twice
      
        Previous releases - always broken:
      
         - core:
             - check vlan filter feature in vlan_vids_add_by_dev() and
               vlan_vids_del_by_dev()
             - check dev->gso_max_size in gso_features_check()
      
         - mptcp: fix inconsistent state on fastopen race
      
         - phy: skip LED triggers on PHYs on SFP modules
      
         - eth: mlx5e:
             - fix double free of encap_header
             - fix slab-out-of-bounds in mlx5_query_nic_vport_mac_list()"
      
      * tag 'net-6.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (69 commits)
        net: check dev->gso_max_size in gso_features_check()
        kselftest: rtnetlink.sh: use grep_fail when expecting the cmd fail
        net/ipv6: Revert remove expired routes with a separated list of routes
        net: avoid build bug in skb extension length calculation
        net: ethernet: mtk_wed: fix possible NULL pointer dereference in mtk_wed_wo_queue_tx_clean()
        net: stmmac: fix incorrect flag check in timestamp interrupt
        selftests: add vlan hw filter tests
        net: check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev()
        net: hns3: add new maintainer for the HNS3 ethernet driver
        net: mana: select PAGE_POOL
        net: ks8851: Fix TX stall caused by TX buffer overrun
        ice: Fix PF with enabled XDP going no-carrier after reset
        ice: alter feature support check for SRIOV and LAG
        ice: stop trashing VF VSI aggregator node ID information
        mailmap: add entries for Geliang Tang
        mptcp: fill in missing MODULE_DESCRIPTION()
        mptcp: fix inconsistent state on fastopen race
        selftests: mptcp: join: fix subflow_send_ack lookup
        net: phy: skip LED triggers on PHYs on SFP modules
        bpf: Add missing BPF_LINK_TYPE invocations
        ...
      7c5e046b
  3. Dec 21, 2023
    • Paolo Abeni's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 74769d81
      Paolo Abeni authored
      
      
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2023-12-21
      
      Hi David, hi Jakub, hi Paolo, hi Eric,
      
      The following pull-request contains BPF updates for your *net* tree.
      
      We've added 3 non-merge commits during the last 5 day(s) which contain
      a total of 4 files changed, 45 insertions(+).
      
      The main changes are:
      
      1) Fix a syzkaller splat which triggered an oob issue in bpf_link_show_fdinfo(),
         from Jiri Olsa.
      
      2) Fix another syzkaller-found issue which triggered a NULL pointer dereference
         in BPF sockmap for unconnected unix sockets, from John Fastabend.
      
      bpf-for-netdev
      
      * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
        bpf: Add missing BPF_LINK_TYPE invocations
        bpf: sockmap, test for unconnected af_unix sock
        bpf: syzkaller found null ptr deref in unix_bpf proto add
      ====================
      
      Link: https://lore.kernel.org/r/20231221104844.1374-1-daniel@iogearbox.net
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      74769d81
    • Eric Dumazet's avatar
      net: check dev->gso_max_size in gso_features_check() · 24ab059d
      Eric Dumazet authored
      Some drivers might misbehave if TSO packets get too big.
      
      GVE for instance uses a 16bit field in its TX descriptor,
      and will do bad things if a packet is bigger than 2^16 bytes.
      
      Linux TCP stack honors dev->gso_max_size, but there are
      other ways for too big packets to reach an ndo_start_xmit()
      handler : virtio_net, af_packet, GRO...
      
      Add a generic check in gso_features_check() and fallback
      to GSO when needed.
      
      gso_max_size was added in the blamed commit.
      
      Fixes: 82cc1a7a
      
       ("[NET]: Add per-connection option to set max TSO frame size")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Link: https://lore.kernel.org/r/20231219125331.4127498-1-edumazet@google.com
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      24ab059d
    • Hangbin Liu's avatar
      kselftest: rtnetlink.sh: use grep_fail when expecting the cmd fail · b8056f2c
      Hangbin Liu authored
      run_cmd_grep_fail should be used when expecting the cmd fail, or the ret
      will be set to 1, and the total test return 1 when exiting. This would cause
      the result report to fail if run via run_kselftest.sh.
      
      Before fix:
       # ./rtnetlink.sh -t kci_test_addrlft
       PASS: preferred_lft addresses have expired
       # echo $?
       1
      
      After fix:
       # ./rtnetlink.sh -t kci_test_addrlft
       PASS: preferred_lft addresses have expired
       # echo $?
       0
      
      Fixes: 9c2a19f7
      
       ("kselftest: rtnetlink.sh: add verbose flag")
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/20231219065737.1725120-1-liuhangbin@gmail.com
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      b8056f2c
    • David Ahern's avatar
      net/ipv6: Revert remove expired routes with a separated list of routes · dade3f6a
      David Ahern authored
      This reverts commit 3dec89b1.
      
      The commit has some race conditions given how expires is managed on a
      fib6_info in relation to gc start, adding the entry to the gc list and
      setting the timer value leading to UAF. Revert the commit and try again
      in a later release.
      
      Fixes: 3dec89b1
      
       ("net/ipv6: Remove expired routes with a separated list of routes")
      Cc: Kui-Feng Lee <thinker.li@gmail.com>
      Signed-off-by: default avatarDavid Ahern <dsahern@kernel.org>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Link: https://lore.kernel.org/r/20231219030243.25687-1-dsahern@kernel.org
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      dade3f6a
    • Paolo Abeni's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · b414020f
      Paolo Abeni authored
      
      
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2023-12-18 (ice)
      
      This series contains updates to ice driver only.
      
      Jakes stops clearing of needed aggregator information.
      
      Dave adds a check for LAG device support before initializing the
      associated event handler.
      
      Larysa restores accounting of XDP queues in TC configurations.
      
      * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        ice: Fix PF with enabled XDP going no-carrier after reset
        ice: alter feature support check for SRIOV and LAG
        ice: stop trashing VF VSI aggregator node ID information
      ====================
      
      Link: https://lore.kernel.org/r/20231218192708.3397702-1-anthony.l.nguyen@intel.com
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      b414020f
    • Thomas Weißschuh's avatar
      net: avoid build bug in skb extension length calculation · d6e5794b
      Thomas Weißschuh authored
      
      
      GCC seems to incorrectly fail to evaluate skb_ext_total_length() at
      compile time under certain conditions.
      
      The issue even occurs if all values in skb_ext_type_len[] are "0",
      ruling out the possibility of an actual overflow.
      
      As the patch has been in mainline since v6.6 without triggering the
      problem it seems to be a very uncommon occurrence.
      
      As the issue only occurs when -fno-tree-loop-im is specified as part of
      CFLAGS_GCOV, disable the BUILD_BUG_ON() only when building with coverage
      reporting enabled.
      
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Closes: https://lore.kernel.org/oe-kbuild-all/202312171924.4FozI5FG-lkp@intel.com/
      Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/lkml/487cfd35-fe68-416f-9bfd-6bb417f98304@app.fastmail.com/
      Fixes: 5d21d0a6
      
       ("net: generalize calculation of skb extensions length")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20231218-net-skbuff-build-bug-v1-1-eefc2fb0a7d3@weissschuh.net
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      d6e5794b
    • Lorenzo Bianconi's avatar
      net: ethernet: mtk_wed: fix possible NULL pointer dereference in mtk_wed_wo_queue_tx_clean() · 7cb8cd4d
      Lorenzo Bianconi authored
      In order to avoid a NULL pointer dereference, check entry->buf pointer before running
      skb_free_frag in mtk_wed_wo_queue_tx_clean routine.
      
      Fixes: 79968444
      
       ("net: ethernet: mtk_wed: introduce wed wo support")
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/3c1262464d215faa8acebfc08869798c81c96f4a.1702827359.git.lorenzo@kernel.org
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      7cb8cd4d
    • Linus Torvalds's avatar
      posix-timers: Get rid of [COMPAT_]SYS_NI() uses · a4aebe93
      Linus Torvalds authored
      
      
      Only the posix timer system calls use this (when the posix timer support
      is disabled, which does not actually happen in any normal case), because
      they had debug code to print out a warning about missing system calls.
      
      Get rid of that special case, and just use the standard COND_SYSCALL
      interface that creates weak system call stubs that return -ENOSYS for
      when the system call does not exist.
      
      This fixes a kCFI issue with the SYS_NI() hackery:
      
        CFI failure at int80_emulation+0x67/0xb0 (target: sys_ni_posix_timers+0x0/0x70; expected type: 0xb02b34d9)
        WARNING: CPU: 0 PID: 48 at int80_emulation+0x67/0xb0
      
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Reviewed-by: default avatarSami Tolvanen <samitolvanen@google.com>
      Tested-by: default avatarSami Tolvanen <samitolvanen@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a4aebe93
    • Linus Torvalds's avatar
      Merge tag '6.7-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · eee7f5b4
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
      
       - two multichannel reconnect fixes, one fixing an important refcounting
         problem that can lead to umount problems
      
       - atime fix
      
       - five fixes for various potential OOB accesses, including a CVE fix,
         and two additional fixes for problems pointed out by Robert Morris's
         fuzzing investigation
      
      * tag '6.7-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: do not let cifs_chan_update_iface deallocate channels
        cifs: fix a pending undercount of srv_count
        fs: cifs: Fix atime update check
        smb: client: fix potential OOB in smb2_dump_detail()
        smb: client: fix potential OOB in cifs_dump_detail()
        smb: client: fix OOB in smbCalcSize()
        smb: client: fix OOB in SMB2_query_info_init()
        smb: client: fix OOB in cifsd when receiving compounded resps
      eee7f5b4
    • Linus Torvalds's avatar
      Merge tag 's390-6.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 1bf5c892
      Linus Torvalds authored
      Pull s390 fixes from Alexander Gordeev:
      
       - Fix virtual vs physical address confusion in Storage Class Memory
         (SCM) block device driver.
      
       - Fix saving and restoring of FPU kernel context, which could lead to
         corruption of vector registers 8-15
      
       - Update defconfigs
      
      * tag 's390-6.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: update defconfigs
        s390/vx: fix save/restore of fpu kernel context
        s390/scm: fix virtual vs physical address confusion
      1bf5c892
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 87c71dd6
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "There are only a handful of bugfixes this time, which feels almost too
        small, so I hope we are not missing something important.
      
         - One more mediatek dts warning fix after the previous larger set,
           this should finally result in a clean defconfig build.
      
         - TI OMAP dts fixes for a spurious hang on am335x and invalid data on
           DTA7
      
         - One DTS fix for ethernet on Oriange Pi Zero (Allwinner H616)
      
         - A regression fix for ti-sysc interconnect target module driver to
           not access registers after reset if srst_udelay quirk is needed
      
         - Reset controller driver fixes for a crash during error handling and
           a build warning"
      
      * tag 'soc-fixes-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        arm64: dts: mediatek: mt8395-genio-1200-evk: add interrupt-parent for mt6360
        ARM: dts: Fix occasional boot hang for am3 usb
        reset: Fix crash when freeing non-existent optional resets
        ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
        ARM: dts: dra7: Fix DRA7 L3 NoC node register size
        bus: ti-sysc: Flush posted write only after srst_udelay
        reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning
        arm64: dts: allwinner: h616: update emac for Orange Pi Zero 3
      87c71dd6
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.7-5' of... · 1bddd45b
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.7-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform drivers fixes from Ilpo Järvinen:
      
       - Fan reporting on some ThinkPads
      
       - Laptop 13 spurious keypresses while suspended
      
       - Intel PMC correction to avoid crash
      
      * tag 'platform-drivers-x86-v6.7-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13
        platform/x86/amd/pmc: Move keyboard wakeup disablement detection to pmc-quirks
        platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne
        platform/x86/amd/pmc: Move platform defines to header
        platform/x86/intel/pmc: Fix hang in pmc_core_send_ltr_ignore()
        platform/x86: thinkpad_acpi: fix for incorrect fan reporting on some ThinkPad systems
      1bddd45b
    • Linus Torvalds's avatar
      Merge tag 'ovl-fixes-6.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs · 1a44b007
      Linus Torvalds authored
      Pull overlayfs fix from Amir Goldstein:
       "Fix a regression from this merge window"
      
      * tag 'ovl-fixes-6.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
        ovl: fix dentry reference leak after changes to underlying layers
      1a44b007
    • Linus Torvalds's avatar
      Merge tag 'bcachefs-2023-12-19' of https://evilpiepirate.org/git/bcachefs · 74d8fc2b
      Linus Torvalds authored
      Pull more bcachefs fixes from Kent Overstreet:
      
       - Fix a deadlock in the data move path with nocow locks (vs. update in
         place writes); when trylock failed we were incorrectly waiting for in
         flight ios to flush.
      
       - Fix reporting of NFS file handle length
      
       - Fix early error path in bch2_fs_alloc() - list head wasn't being
         initialized early enough
      
       - Make sure correct (hardware accelerated) crc modules get loaded
      
       - Fix a rare overflow in the btree split path, when the packed bkey
         format grows and all the keys have no value (LRU btree).
      
       - Fix error handling in the sector allocator
      
         This was causing writes to spuriously fail in multidevice setups, and
         another bug meant that the errors weren't being logged, only reported
         via fsync.
      
      * tag 'bcachefs-2023-12-19' of https://evilpiepirate.org/git/bcachefs:
        bcachefs: Fix bch2_alloc_sectors_start_trans() error handling
        bcachefs; guard against overflow in btree node split
        bcachefs: btree_node_u64s_with_format() takes nr keys
        bcachefs: print explicit recovery pass message only once
        bcachefs: improve modprobe support by providing softdeps
        bcachefs: fix invalid memory access in bch2_fs_alloc() error path
        bcachefs: Fix determining required file handle length
        bcachefs: Fix nocow locks deadlock
      74d8fc2b
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · ac1c13e2
      Linus Torvalds authored
      Pull nfsd fixes from Chuck Lever:
      
       - Address a few recently-introduced issues
      
      * tag 'nfsd-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        SUNRPC: Revert 5f7fc5d6
        NFSD: Revert 738401a9
        NFSD: Revert 6c41d9a9
        nfsd: hold nfsd_mutex across entire netlink operation
        nfsd: call nfsd_last_thread() before final nfsd_put()
      ac1c13e2
    • Linus Torvalds's avatar
      Merge tag 'dm-6.7/dm-fixes-3' of... · 0a7a93d9
      Linus Torvalds authored
      Merge tag 'dm-6.7/dm-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - DM raid target (and MD raid) fix for reconfig_mutex MD deadlock that
         should have been merged along with recent v6.7-rc6 MD fixes (see MD
         related commits: f2d87a75^..b3911334)
      
       - DM integrity target fix to avoid modifying immutable biovec in the
         integrity_metadata() edge case where kmalloc fails.
      
       - Fix drivers/md/Kconfig so DM_AUDIT depends on BLK_DEV_DM.
      
       - Update DM entry in MAINTAINERS to remove stale info.
      
      * tag 'dm-6.7/dm-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        MAINTAINERS: remove stale info for DEVICE-MAPPER
        dm audit: fix Kconfig so DM_AUDIT depends on BLK_DEV_DM
        dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata()
        dm-raid: delay flushing event_work() after reconfig_mutex is released
      0a7a93d9
  4. Dec 20, 2023
    • Macpaul Lin's avatar
      arm64: dts: mediatek: mt8395-genio-1200-evk: add interrupt-parent for mt6360 · fa3d6c71
      Macpaul Lin authored
      This patch fix the warning introduced by mt6360 node in
      mt8395-genio-1200-evk.dts.
      
      arch/arm64/boot/dts/mediatek/mt8195.dtsi:464.4-27: Warning (interrupts_property): /soc/i2c@11d01000/pmic@34:#interrupt-cells: size is (8), expected multiple of 16
      
      Add a missing 'interrupt-parent' to fix this warning.
      
      Fixes: f2b543a1
      
       ("arm64: dts: mediatek: add device-tree for Genio 1200 EVK board")
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/linux-devicetree/20231212214737.230115-1-arnd@kernel.org/
      Signed-off-by: default avatarMacpaul Lin <macpaul.lin@mediatek.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      fa3d6c71
    • Arnd Bergmann's avatar
      Merge tag 'am3-usb-hang-fix-signed' of... · 02350805
      Arnd Bergmann authored
      
      Merge tag 'am3-usb-hang-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes
      
      Fix for occasional boot hang for am335x USB
      
      A fix for occasional boot hang for am335x USB that I've only recently
      started noticing.
      
      This can be merged naturally whenever suitable. This issue has been seen
      with other similar SoCs earlier and has clearly existed for a long time.
      
      * tag 'am3-usb-hang-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: Fix occasional boot hang for am3 usb
      
      Link: https://lore.kernel.org/r/pull-1703071616-395333@atomide.com
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      02350805
    • Arnd Bergmann's avatar
      Merge tag 'omap-for-v6.7/fixes-signed' of... · 2096d3ec
      Arnd Bergmann authored
      
      Merge tag 'omap-for-v6.7/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes
      
      Fixes for omaps
      
      A few fixes for omaps:
      
      - A regression fix for ti-sysc interconnect target module driver to not access
        registers after reset if srst_udelay quirk is needed
      
      - DRA7 L3 NoC node register size fix
      
      * tag 'omap-for-v6.7/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
        ARM: dts: dra7: Fix DRA7 L3 NoC node register size
        bus: ti-sysc: Flush posted write only after srst_udelay
      
      Link: https://lore.kernel.org/r/pull-1702037799-781982@atomide.com
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      2096d3ec
    • Lai Peter Jun Ann's avatar
      net: stmmac: fix incorrect flag check in timestamp interrupt · bd7f77da
      Lai Peter Jun Ann authored
      The driver should continue get the timestamp if STMMAC_FLAG_EXT_SNAPSHOT_EN
      flag is set.
      
      Fixes: aa5513f5
      
       ("net: stmmac: replace the ext_snapshot_en field with a flag")
      Cc: <stable@vger.kernel.org> # 6.6
      Signed-off-by: default avatarSong Yoong Siang <yoong.siang.song@intel.com>
      Signed-off-by: default avatarLai Peter Jun Ann <jun.ann.lai@intel.com>
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bd7f77da
    • David S. Miller's avatar
      Merge tag 'for-net-2023-12-15' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth · 498444e3
      David S. Miller authored
      
      
      Luiz Augusto von Dentz says:
      
      ====================
      bluetooth pull request for net:
      
       - Add encryption key size check when acting as peripheral
       - Shut up false-positive build warning
       - Send reject if L2CAP command request is corrupted
       - Fix Use-After-Free in bt_sock_recvmsg
       - Fix not notifying when connection encryption changes
       - Fix not checking if HCI_OP_INQUIRY has been sent
       - Fix address type send over to the MGMT interface
       - Fix deadlock in vhci_send_frame
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      498444e3
    • Kent Overstreet's avatar
      bcachefs: Fix bch2_alloc_sectors_start_trans() error handling · 247ce5f1
      Kent Overstreet authored
      
      
      When we fail to allocate because of insufficient open buckets, we don't
      want to retry from the full set of devices - we just want to retry in
      blocking mode.
      
      But if the retry in blocking mode fails with a different error code, we
      end up squashing the -BCH_ERR_open_buckets_empty error with an error
      that makes us thing we won't be able to allocate (insufficient_devices)
      - which is incorrect when we didn't try to allocate from the full set of
      devices, and causes the write to fail.
      
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      247ce5f1
    • Kent Overstreet's avatar
    • Kent Overstreet's avatar
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 55cb5f43
      Linus Torvalds authored
      Pull tracing fix from Steven Rostedt:
       "While working on the ring buffer, I found one more bug with the
        timestamp code, and the fix for this removed the need for the final
        64-bit cmpxchg!
      
        The ring buffer events hold a "delta" from the previous event. If it
        is determined that the delta can not be calculated, it falls back to
        adding an absolute timestamp value. The way to know if the delta can
        be used is via two stored timestamps in the per-cpu buffer meta data:
      
         before_stamp and write_stamp
      
        The before_stamp is written by every event before it tries to allocate
        its space on the ring buffer. The write_stamp is written after it
        allocates its space and knows that nothing came in after it read the
        previous before_stamp and write_stamp and the two matched.
      
        A previous fix dd939425 ("ring-buffer: Do not try to put back
        write_stamp") removed putting back the write_stamp to match the
        before_stamp so that the next event could use the delta, but races
        were found where the two would match, but not be for of the previous
        event.
      
        It was determined to allow the event reservation to not have a valid
        write_stamp when it is finished, and this fixed a lot of races.
      
        The last use of the 64-bit timestamp cmpxchg depended on the
        write_stamp being valid after an interruption. But this is no longer
        the case, as if an event is interrupted by a softirq that writes an
        event, and that event gets interrupted by a hardirq or NMI and that
        writes an event, then the softirq could finish its reservation without
        a valid write_stamp.
      
        In the slow path of the event reservation, a delta can still be used
        if the write_stamp is valid. Instead of using a cmpxchg against the
        write stamp, the before_stamp needs to be read again to validate the
        write_stamp. The cmpxchg is not needed.
      
        This updates the slowpath to validate the write_stamp by comparing it
        to the before_stamp and removes all rb_time_cmpxchg() as there are no
        more users of that function.
      
        The removal of the 32-bit updates of rb_time_t will be done in the
        next merge window"
      
      * tag 'trace-v6.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        ring-buffer: Fix slowpath of interrupted event
      55cb5f43
    • Linus Torvalds's avatar
      Merge tag 'arc-6.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · 9c749e61
      Linus Torvalds authored
      Pull ARC fixes from Vineet Gupta:
      
       - build error for hugetlb, sparse and smatch fixes
      
       - removal of VIPT aliasing cache code
      
      * tag 'arc-6.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: add hugetlb definitions
        ARC: fix smatch warning
        ARC: fix spare error
        ARC: mm: retire support for aliasing VIPT D$
        ARC: entry: move ARCompact specific bits out of entry.h
        ARC: entry: SAVE_ABI_CALLEE_REG: ISA/ABI specific helper
      9c749e61
    • Shyam Prasad N's avatar
      cifs: do not let cifs_chan_update_iface deallocate channels · 12d1e301
      Shyam Prasad N authored
      
      
      cifs_chan_update_iface is meant to check and update the server
      interface used for a channel when the existing server interface
      is no longer available.
      
      So far, this handler had the code to remove an interface entry
      even if a new candidate interface is not available. Allowing
      this leads to several corner cases to handle.
      
      This change makes the logic much simpler by not deallocating
      the current channel interface entry if a new interface is not
      found to replace it with.
      
      Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      12d1e301
    • Shyam Prasad N's avatar
      cifs: fix a pending undercount of srv_count · f30bbc38
      Shyam Prasad N authored
      The following commit reverted the changes to ref count
      the server struct while scheduling a reconnect work:
      82334252
      
       Revert "cifs: reconnect work should have reference on server struct"
      
      However, a following change also introduced scheduling
      of reconnect work, and assumed ref counting. This change
      fixes that as well.
      
      Fixes umount problems like:
      
      [73496.157838] CPU: 5 PID: 1321389 Comm: umount Tainted: G        W  OE      6.7.0-060700rc6-generic #202312172332
      [73496.157841] Hardware name: LENOVO 20MAS08500/20MAS08500, BIOS N2CET67W (1.50 ) 12/15/2022
      [73496.157843] RIP: 0010:cifs_put_tcp_session+0x17d/0x190 [cifs]
      [73496.157906] Code: 5d 31 c0 31 d2 31 f6 31 ff c3 cc cc cc cc e8 4a 6e 14 e6 e9 f6 fe ff ff be 03 00 00 00 48 89 d7 e8 78 26 b3 e5 e9 e4 fe ff ff <0f> 0b e9 b1 fe ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90
      [73496.157908] RSP: 0018:ffffc90003bcbcb8 EFLAGS: 00010286
      [73496.157911] RAX: 00000000ffffffff RBX: ffff8885830fa800 RCX: 0000000000000000
      [73496.157913] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
      [73496.157915] RBP: ffffc90003bcbcc8 R08: 0000000000000000 R09: 0000000000000000
      [73496.157917] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
      [73496.157918] R13: ffff8887d56ba800 R14: 00000000ffffffff R15: ffff8885830fa800
      [73496.157920] FS:  00007f1ff0e33800(0000) GS:ffff88887ba80000(0000) knlGS:0000000000000000
      [73496.157922] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [73496.157924] CR2: 0000115f002e2010 CR3: 00000003d1e24005 CR4: 00000000003706f0
      [73496.157926] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [73496.157928] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [73496.157929] Call Trace:
      [73496.157931]  <TASK>
      [73496.157933]  ? show_regs+0x6d/0x80
      [73496.157936]  ? __warn+0x89/0x160
      [73496.157939]  ? cifs_put_tcp_session+0x17d/0x190 [cifs]
      [73496.157976]  ? report_bug+0x17e/0x1b0
      [73496.157980]  ? handle_bug+0x51/0xa0
      [73496.157983]  ? exc_invalid_op+0x18/0x80
      [73496.157985]  ? asm_exc_invalid_op+0x1b/0x20
      [73496.157989]  ? cifs_put_tcp_session+0x17d/0x190 [cifs]
      [73496.158023]  ? cifs_put_tcp_session+0x1e/0x190 [cifs]
      [73496.158057]  __cifs_put_smb_ses+0x2b5/0x540 [cifs]
      [73496.158090]  ? tconInfoFree+0xc2/0x120 [cifs]
      [73496.158130]  cifs_put_tcon.part.0+0x108/0x2b0 [cifs]
      [73496.158173]  cifs_put_tlink+0x49/0x90 [cifs]
      [73496.158220]  cifs_umount+0x56/0xb0 [cifs]
      [73496.158258]  cifs_kill_sb+0x52/0x60 [cifs]
      [73496.158306]  deactivate_locked_super+0x32/0xc0
      [73496.158309]  deactivate_super+0x46/0x60
      [73496.158311]  cleanup_mnt+0xc3/0x170
      [73496.158314]  __cleanup_mnt+0x12/0x20
      [73496.158330]  task_work_run+0x5e/0xa0
      [73496.158333]  exit_to_user_mode_loop+0x105/0x130
      [73496.158336]  exit_to_user_mode_prepare+0xa5/0xb0
      [73496.158338]  syscall_exit_to_user_mode+0x29/0x60
      [73496.158341]  do_syscall_64+0x6c/0xf0
      [73496.158344]  ? syscall_exit_to_user_mode+0x37/0x60
      [73496.158346]  ? do_syscall_64+0x6c/0xf0
      [73496.158349]  ? exit_to_user_mode_prepare+0x30/0xb0
      [73496.158353]  ? syscall_exit_to_user_mode+0x37/0x60
      [73496.158355]  ? do_syscall_64+0x6c/0xf0
      
      Reported-by: default avatarRobert Morris <rtm@csail.mit.edu>
      Fixes: 705fc522
      
       ("cifs: handle when server starts supporting multichannel")
      Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      f30bbc38
    • Heiko Carstens's avatar
      s390: update defconfigs · 3d940bb1
      Heiko Carstens authored
      
      
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      3d940bb1
    • Zizhi Wo's avatar
      fs: cifs: Fix atime update check · 01fe654f
      Zizhi Wo authored
      Commit 9b9c5bea ("cifs: do not return atime less than mtime") indicates
      that in cifs, if atime is less than mtime, some apps will break.
      Therefore, it introduce a function to compare this two variables in two
      places where atime is updated. If atime is less than mtime, update it to
      mtime.
      
      However, the patch was handled incorrectly, resulting in atime and mtime
      being exactly equal. A previous commit 69738cfd ("fs: cifs: Fix atime
      update check vs mtime") fixed one place and forgot to fix another. Fix it.
      
      Fixes: 9b9c5bea
      
       ("cifs: do not return atime less than mtime")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarZizhi Wo <wozizhi@huawei.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      01fe654f
    • Paulo Alcantara's avatar
      smb: client: fix potential OOB in smb2_dump_detail() · 567320c4
      Paulo Alcantara authored
      
      
      Validate SMB message with ->check_message() before calling
      ->calc_smb_size().
      
      This fixes CVE-2023-6610.
      
      Reported-by: default avatar <j51569436@gmail.com>
      Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218219
      Cc; stable@vger.kernel.org
      Signed-off-by: default avatarPaulo Alcantara <pc@manguebit.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      567320c4
  5. Dec 19, 2023
    • Paolo Abeni's avatar
      Merge branch 'check-vlan-filter-feature-in-vlan_vids_add_by_dev-and-vlan_vids_del_by_dev' · 8353c2ab
      Paolo Abeni authored
      
      
      Liu Jian says:
      
      ====================
      check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev()
      
      v2->v3:
      	Filter using vlan_hw_filter_capable().
      	Add one basic test.
      ====================
      
      Link: https://lore.kernel.org/r/20231216075219.2379123-1-liujian56@huawei.com
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      8353c2ab
    • Liu Jian's avatar
      selftests: add vlan hw filter tests · 2258b666
      Liu Jian authored
      
      
      Add one basic vlan hw filter test.
      
      Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
      Reviewed-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      2258b666
    • Liu Jian's avatar
      net: check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev() · 01a564ba
      Liu Jian authored
      I got the below warning trace:
      
      WARNING: CPU: 4 PID: 4056 at net/core/dev.c:11066 unregister_netdevice_many_notify
      CPU: 4 PID: 4056 Comm: ip Not tainted 6.7.0-rc4+ #15
      Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014
      RIP: 0010:unregister_netdevice_many_notify+0x9a4/0x9b0
      Call Trace:
       rtnl_dellink
       rtnetlink_rcv_msg
       netlink_rcv_skb
       netlink_unicast
       netlink_sendmsg
       __sock_sendmsg
       ____sys_sendmsg
       ___sys_sendmsg
       __sys_sendmsg
       do_syscall_64
       entry_SYSCALL_64_after_hwframe
      
      It can be repoduced via:
      
          ip netns add ns1
          ip netns exec ns1 ip link add bond0 type bond mode 0
          ip netns exec ns1 ip link add bond_slave_1 type veth peer veth2
          ip netns exec ns1 ip link set bond_slave_1 master bond0
      [1] ip netns exec ns1 ethtool -K bond0 rx-vlan-filter off
      [2] ip netns exec ns1 ip link add link bond_slave_1 name bond_slave_1.0 type vlan id 0
      [3] ip netns exec ns1 ip link add link bond0 name bond0.0 type vlan id 0
      [4] ip netns exec ns1 ip link set bond_slave_1 nomaster
      [5] ip netns exec ns1 ip link del veth2
          ip netns del ns1
      
      This is all caused by command [1] turning off the rx-vlan-filter function
      of bond0. The reason is the same as commit 01f4fd27 ("bonding: Fix
      incorrect deletion of ETH_P_8021AD protocol vid from slaves"). Commands
      [2] [3] add the same vid to slave and master respectively, causing
      command [4] to empty slave->vlan_info. The following command [5] triggers
      this problem.
      
      To fix this problem, we should add VLAN_FILTER feature checks in
      vlan_vids_add_by_dev() and vlan_vids_del_by_dev() to prevent incorrect
      addition or deletion of vlan_vid information.
      
      Fixes: 348a1443
      
       ("vlan: introduce functions to do mass addition/deletion of vids by another device")
      Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      01a564ba
    • Jijie Shao's avatar
      net: hns3: add new maintainer for the HNS3 ethernet driver · fa94a0c8
      Jijie Shao authored
      
      
      Jijie Shao will be responsible for
      maintaining the hns3 driver's code in the future,
      so add Jijie to the hns3 driver's matainer list.
      
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Link: https://lore.kernel.org/r/20231216070413.233668-1-shaojijie@huawei.com
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      fa94a0c8
    • Yury Norov's avatar
      net: mana: select PAGE_POOL · 340943fb
      Yury Norov authored
      
      
      Mana uses PAGE_POOL API. x86_64 defconfig doesn't select it:
      
      ld: vmlinux.o: in function `mana_create_page_pool.isra.0':
      mana_en.c:(.text+0x9ae36f): undefined reference to `page_pool_create'
      ld: vmlinux.o: in function `mana_get_rxfrag':
      mana_en.c:(.text+0x9afed1): undefined reference to `page_pool_alloc_pages'
      make[3]: *** [/home/yury/work/linux/scripts/Makefile.vmlinux:37: vmlinux] Error 1
      make[2]: *** [/home/yury/work/linux/Makefile:1154: vmlinux] Error 2
      make[1]: *** [/home/yury/work/linux/Makefile:234: __sub-make] Error 2
      make[1]: Leaving directory '/home/yury/work/build-linux-x86_64'
      make: *** [Makefile:234: __sub-make] Error 2
      
      So we need to select it explicitly.
      
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Tested-by: Simon Horman <horms@kernel.org> # build-tested
      Fixes: ca9c54d2
      
       ("net: mana: Add a driver for Microsoft Azure Network Adapter")
      Link: https://lore.kernel.org/r/20231215203353.635379-1-yury.norov@gmail.com
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      340943fb
    • Ronald Wahl's avatar
      net: ks8851: Fix TX stall caused by TX buffer overrun · 3dc5d445
      Ronald Wahl authored
      There is a bug in the ks8851 Ethernet driver that more data is written
      to the hardware TX buffer than actually available. This is caused by
      wrong accounting of the free TX buffer space.
      
      The driver maintains a tx_space variable that represents the TX buffer
      space that is deemed to be free. The ks8851_start_xmit_spi() function
      adds an SKB to a queue if tx_space is large enough and reduces tx_space
      by the amount of buffer space it will later need in the TX buffer and
      then schedules a work item. If there is not enough space then the TX
      queue is stopped.
      
      The worker function ks8851_tx_work() dequeues all the SKBs and writes
      the data into the hardware TX buffer. The last packet will trigger an
      interrupt after it was send. Here it is assumed that all data fits into
      the TX buffer.
      
      In the interrupt routine (which runs asynchronously because it is a
      threaded interrupt) tx_space is updated with the current value from the
      hardware. Also the TX queue is woken up again.
      
      Now it could happen that after data was sent to the hardware and before
      handling the TX interrupt new data is queued in ks8851_start_xmit_spi()
      when the TX buffer space had still some space left. When the interrupt
      is actually handled tx_space is updated from the hardware but now we
      already have new SKBs queued that have not been written to the hardware
      TX buffer yet. Since tx_space has been overwritten by the value from the
      hardware the space is not accounted for.
      
      Now we have more data queued then buffer space available in the hardware
      and ks8851_tx_work() will potentially overrun the hardware TX buffer. In
      many cases it will still work because often the buffer is written out
      fast enough so that no overrun occurs but for example if the peer
      throttles us via flow control then an overrun may happen.
      
      This can be fixed in different ways. The most simple way would be to set
      tx_space to 0 before writing data to the hardware TX buffer preventing
      the queuing of more SKBs until the TX interrupt has been handled. I have
      chosen a slightly more efficient (and still rather simple) way and
      track the amount of data that is already queued and not yet written to
      the hardware. When new SKBs are to be queued the already queued amount
      of data is honoured when checking free TX buffer space.
      
      I tested this with a setup of two linked KS8851 running iperf3 between
      the two in bidirectional mode. Before the fix I got a stall after some
      minutes. With the fix I saw now issues anymore after hours.
      
      Fixes: 3ba81f3e
      
       ("net: Micrel KS8851 SPI network driver")
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: Ben Dooks <ben.dooks@codethink.co.uk>
      Cc: Tristram Ha <Tristram.Ha@microchip.com>
      Cc: netdev@vger.kernel.org
      Cc: stable@vger.kernel.org # 5.10+
      Signed-off-by: default avatarRonald Wahl <ronald.wahl@raritan.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/20231214181112.76052-1-rwahl@gmx.de
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      3dc5d445