1. 25 Mar, 2024 5 commits
    • Przemek Kitszel's avatar
      ixgbe: avoid sleeping allocation in ixgbe_ipsec_vf_add_sa() · aec806fb
      Przemek Kitszel authored
      Change kzalloc() flags used in ixgbe_ipsec_vf_add_sa() to GFP_ATOMIC, to
      avoid sleeping in IRQ context.
      
      Dan Carpenter, with the help of Smatch, has found following issue:
      The patch eda0333a: "ixgbe: add VF IPsec management" from Aug 13,
      2018 (linux-next), leads to the following Smatch static checker
      warning: drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c:917 ixgbe_ipsec_vf_add_sa()
      	warn: sleeping in IRQ context
      
      The call tree that Smatch is worried about is:
      ixgbe_msix_other() <- IRQ handler
      -> ixgbe_msg_task()
         -> ixgbe_rcv_msg_from_vf()
            -> ixgbe_ipsec_vf_add_sa()
      
      Fixes: eda0333a ("ixgbe: add VF IPsec management")
      Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Link: https://lore.kernel.org/intel-wired-lan/db31a0b0-4d9f-4e6b-aed8-88266eb5665c@moroto.mountainReviewed-by: default avatarMichal Kubiak <michal.kubiak@intel.com>
      Signed-off-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
      Reviewed-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      aec806fb
    • Jesse Brandeburg's avatar
      ice: fix memory corruption bug with suspend and rebuild · 1cb7fdb1
      Jesse Brandeburg authored
      The ice driver would previously panic after suspend. This is caused
      from the driver *only* calling the ice_vsi_free_q_vectors() function by
      itself, when it is suspending. Since commit b3e7b3a6 ("ice: prevent
      NULL pointer deref during reload") the driver has zeroed out
      num_q_vectors, and only restored it in ice_vsi_cfg_def().
      
      This further causes the ice_rebuild() function to allocate a zero length
      buffer, after which num_q_vectors is updated, and then the new value of
      num_q_vectors is used to index into the zero length buffer, which
      corrupts memory.
      
      The fix entails making sure all the code referencing num_q_vectors only
      does so after it has been reset via ice_vsi_cfg_def().
      
      I didn't perform a full bisect, but I was able to test against 6.1.77
      kernel and that ice driver works fine for suspend/resume with no panic,
      so sometime since then, this problem was introduced.
      
      Also clean up an un-needed init of a local variable in the function
      being modified.
      
      PANIC from 6.8.0-rc1:
      
      [1026674.915596] PM: suspend exit
      [1026675.664697] ice 0000:17:00.1: PTP reset successful
      [1026675.664707] ice 0000:17:00.1: 2755 msecs passed between update to cached PHC time
      [1026675.667660] ice 0000:b1:00.0: PTP reset successful
      [1026675.675944] ice 0000:b1:00.0: 2832 msecs passed between update to cached PHC time
      [1026677.137733] ixgbe 0000:31:00.0 ens787: NIC Link is Up 1 Gbps, Flow Control: None
      [1026677.190201] BUG: kernel NULL pointer dereference, address: 0000000000000010
      [1026677.192753] ice 0000:17:00.0: PTP reset successful
      [1026677.192764] ice 0000:17:00.0: 4548 msecs passed between update to cached PHC time
      [1026677.197928] #PF: supervisor read access in kernel mode
      [1026677.197933] #PF: error_code(0x0000) - not-present page
      [1026677.197937] PGD 1557a7067 P4D 0
      [1026677.212133] ice 0000:b1:00.1: PTP reset successful
      [1026677.212143] ice 0000:b1:00.1: 4344 msecs passed between update to cached PHC time
      [1026677.212575]
      [1026677.243142] Oops: 0000 [#1] PREEMPT SMP NOPTI
      [1026677.247918] CPU: 23 PID: 42790 Comm: kworker/23:0 Kdump: loaded Tainted: G        W          6.8.0-rc1+ #1
      [1026677.257989] Hardware name: Intel Corporation M50CYP2SBSTD/M50CYP2SBSTD, BIOS SE5C620.86B.01.01.0005.2202160810 02/16/2022
      [1026677.269367] Workqueue: ice ice_service_task [ice]
      [1026677.274592] RIP: 0010:ice_vsi_rebuild_set_coalesce+0x130/0x1e0 [ice]
      [1026677.281421] Code: 0f 84 3a ff ff ff 41 0f b7 74 ec 02 66 89 b0 22 02 00 00 81 e6 ff 1f 00 00 e8 ec fd ff ff e9 35 ff ff ff 48 8b 43 30 49 63 ed <41> 0f b7 34 24 41 83 c5 01 48 8b 3c e8 66 89 b7 aa 02 00 00 81 e6
      [1026677.300877] RSP: 0018:ff3be62a6399bcc0 EFLAGS: 00010202
      [1026677.306556] RAX: ff28691e28980828 RBX: ff28691e41099828 RCX: 0000000000188000
      [1026677.314148] RDX: 0000000000000000 RSI: 0000000000000010 RDI: ff28691e41099828
      [1026677.321730] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
      [1026677.329311] R10: 0000000000000007 R11: ffffffffffffffc0 R12: 0000000000000010
      [1026677.336896] R13: 0000000000000000 R14: 0000000000000000 R15: ff28691e0eaa81a0
      [1026677.344472] FS:  0000000000000000(0000) GS:ff28693cbffc0000(0000) knlGS:0000000000000000
      [1026677.353000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [1026677.359195] CR2: 0000000000000010 CR3: 0000000128df4001 CR4: 0000000000771ef0
      [1026677.366779] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [1026677.374369] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [1026677.381952] PKRU: 55555554
      [1026677.385116] Call Trace:
      [1026677.388023]  <TASK>
      [1026677.390589]  ? __die+0x20/0x70
      [1026677.394105]  ? page_fault_oops+0x82/0x160
      [1026677.398576]  ? do_user_addr_fault+0x65/0x6a0
      [1026677.403307]  ? exc_page_fault+0x6a/0x150
      [1026677.407694]  ? asm_exc_page_fault+0x22/0x30
      [1026677.412349]  ? ice_vsi_rebuild_set_coalesce+0x130/0x1e0 [ice]
      [1026677.418614]  ice_vsi_rebuild+0x34b/0x3c0 [ice]
      [1026677.423583]  ice_vsi_rebuild_by_type+0x76/0x180 [ice]
      [1026677.429147]  ice_rebuild+0x18b/0x520 [ice]
      [1026677.433746]  ? delay_tsc+0x8f/0xc0
      [1026677.437630]  ice_do_reset+0xa3/0x190 [ice]
      [1026677.442231]  ice_service_task+0x26/0x440 [ice]
      [1026677.447180]  process_one_work+0x174/0x340
      [1026677.451669]  worker_thread+0x27e/0x390
      [1026677.455890]  ? __pfx_worker_thread+0x10/0x10
      [1026677.460627]  kthread+0xee/0x120
      [1026677.464235]  ? __pfx_kthread+0x10/0x10
      [1026677.468445]  ret_from_fork+0x2d/0x50
      [1026677.472476]  ? __pfx_kthread+0x10/0x10
      [1026677.476671]  ret_from_fork_asm+0x1b/0x30
      [1026677.481050]  </TASK>
      
      Fixes: b3e7b3a6 ("ice: prevent NULL pointer deref during reload")
      Reported-by: default avatarRobert Elliott <elliott@hpe.com>
      Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Reviewed-by: default avatarAleksandr Loktionov <aleksandr.loktionov@intel.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      1cb7fdb1
    • Steven Zou's avatar
      ice: Refactor FW data type and fix bitmap casting issue · 817b1896
      Steven Zou authored
      According to the datasheet, the recipe association data is an 8-byte
      little-endian value. It is described as 'Bitmap of the recipe indexes
      associated with this profile', it is from 24 to 31 byte area in FW.
      Therefore, it is defined to '__le64 recipe_assoc' in struct
      ice_aqc_recipe_to_profile. And then fix the bitmap casting issue, as we
      must never ever use castings for bitmap type.
      
      Fixes: 1e0f9881 ("ice: Flesh out implementation of support for SRIOV on bonded interface")
      Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
      Reviewed-by: default avatarAndrii Staikov <andrii.staikov@intel.com>
      Reviewed-by: default avatarJan Sokolowski <jan.sokolowski@intel.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarSteven Zou <steven.zou@intel.com>
      Tested-by: default avatarSujai Buvaneswaran <sujai.buvaneswaran@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      817b1896
    • linke li's avatar
      net: mark racy access on sk->sk_rcvbuf · c2deb2e9
      linke li authored
      sk->sk_rcvbuf in __sock_queue_rcv_skb() and __sk_receive_skb() can be
      changed by other threads. Mark this as benign using READ_ONCE().
      
      This patch is aimed at reducing the number of benign races reported by
      KCSAN in order to focus future debugging effort on harmful races.
      Signed-off-by: default avatarlinke li <lilinke99@qq.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c2deb2e9
    • David Thompson's avatar
      mlxbf_gige: stop PHY during open() error paths · d6c30c5a
      David Thompson authored
      The mlxbf_gige_open() routine starts the PHY as part of normal
      initialization.  The mlxbf_gige_open() routine must stop the
      PHY during its error paths.
      
      Fixes: f92e1869 ("Add Mellanox BlueField Gigabit Ethernet driver")
      Signed-off-by: default avatarDavid Thompson <davthompson@nvidia.com>
      Reviewed-by: default avatarAsmaa Mnebhi <asmaa@nvidia.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d6c30c5a
  2. 23 Mar, 2024 3 commits
  3. 22 Mar, 2024 1 commit
  4. 21 Mar, 2024 31 commits
    • Linus Torvalds's avatar
      Merge tag 'net-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · cba9ffdb
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from CAN, netfilter, wireguard and IPsec.
      
        I'd like to highlight [ lowlight? - Linus ] Florian W stepping down as
        a netfilter maintainer due to constant stream of bug reports. Not sure
        what we can do but IIUC this is not the first such case.
      
        Current release - regressions:
      
         - rxrpc: fix use of page_frag_alloc_align(), it changed semantics and
           we added a new caller in a different subtree
      
         - xfrm: allow UDP encapsulation only in offload modes
      
        Current release - new code bugs:
      
         - tcp: fix refcnt handling in __inet_hash_connect()
      
         - Revert "net: Re-use and set mono_delivery_time bit for userspace
           tstamp packets", conflicted with some expectations in BPF uAPI
      
        Previous releases - regressions:
      
         - ipv4: raw: fix sending packets from raw sockets via IPsec tunnels
      
         - devlink: fix devlink's parallel command processing
      
         - veth: do not manipulate GRO when using XDP
      
         - esp: fix bad handling of pages from page_pool
      
        Previous releases - always broken:
      
         - report RCU QS for busy network kthreads (with Paul McK's blessing)
      
         - tcp/rds: fix use-after-free on netns with kernel TCP reqsk
      
         - virt: vmxnet3: fix missing reserved tailroom with XDP
      
        Misc:
      
         - couple of build fixes for Documentation"
      
      * tag 'net-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (59 commits)
        selftests: forwarding: Fix ping failure due to short timeout
        MAINTAINERS: step down as netfilter maintainer
        netfilter: nf_tables: Fix a memory leak in nf_tables_updchain
        net: dsa: mt7530: fix handling of all link-local frames
        net: dsa: mt7530: fix link-local frames that ingress vlan filtering ports
        bpf: report RCU QS in cpumap kthread
        net: report RCU QS on threaded NAPI repolling
        rcu: add a helper to report consolidated flavor QS
        ionic: update documentation for XDP support
        lib/bitmap: Fix bitmap_scatter() and bitmap_gather() kernel doc
        netfilter: nf_tables: do not compare internal table flags on updates
        netfilter: nft_set_pipapo: release elements in clone only from destroy path
        octeontx2-af: Use separate handlers for interrupts
        octeontx2-pf: Send UP messages to VF only when VF is up.
        octeontx2-pf: Use default max_active works instead of one
        octeontx2-pf: Wait till detach_resources msg is complete
        octeontx2: Detect the mbox up or down message via register
        devlink: fix port new reply cmd type
        tcp: Clear req->syncookie in reqsk_alloc().
        net/bnx2x: Prevent access to a freed page in page_pool
        ...
      cba9ffdb
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 1d35aae7
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Generate a list of built DTB files (arch/*/boot/dts/dtbs-list)
      
       - Use more threads when building Debian packages in parallel
      
       - Fix warnings shown during the RPM kernel package uninstallation
      
       - Change OBJECT_FILES_NON_STANDARD_*.o etc. to take a relative path to
         Makefile
      
       - Support GCC's -fmin-function-alignment flag
      
       - Fix a null pointer dereference bug in modpost
      
       - Add the DTB support to the RPM package
      
       - Various fixes and cleanups in Kconfig
      
      * tag 'kbuild-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (67 commits)
        kconfig: tests: test dependency after shuffling choices
        kconfig: tests: add a test for randconfig with dependent choices
        kconfig: tests: support KCONFIG_SEED for the randconfig runner
        kbuild: rpm-pkg: add dtb files in kernel rpm
        kconfig: remove unneeded menu_is_visible() call in conf_write_defconfig()
        kconfig: check prompt for choice while parsing
        kconfig: lxdialog: remove unused dialog colors
        kconfig: lxdialog: fix button color for blackbg theme
        modpost: fix null pointer dereference
        kbuild: remove GCC's default -Wpacked-bitfield-compat flag
        kbuild: unexport abs_srctree and abs_objtree
        kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1
        kconfig: remove named choice support
        kconfig: use linked list in get_symbol_str() to iterate over menus
        kconfig: link menus to a symbol
        kbuild: fix inconsistent indentation in top Makefile
        kbuild: Use -fmin-function-alignment when available
        alpha: merge two entries for CONFIG_ALPHA_GAMMA
        alpha: merge two entries for CONFIG_ALPHA_EV4
        kbuild: change DTC_FLAGS_<basetarget>.o to take the path relative to $(obj)
        ...
      1d35aae7
    • Linus Torvalds's avatar
      Merge tag 'firewire-fixes-6.9-rc1' of... · 88d92fb1
      Linus Torvalds authored
      Merge tag 'firewire-fixes-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
      
      Pull firewire fixes Takashi Sakamoto:
       "The previous pull includes some regressions in some device attributes
        exposed to sysfs. They are fixed now"
      
      * tag 'firewire-fixes-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
        firewire: core: add memo about the caller of show functions for device attributes
        Revert "firewire: Kill unnecessary buf check in device_attribute.show"
      88d92fb1
    • Linus Torvalds's avatar
      Merge tag 'driver-core-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · 241590e5
      Linus Torvalds authored
      Pull driver core updates from Greg KH:
       "Here is the "big" set of driver core and kernfs changes for 6.9-rc1.
      
        Nothing all that crazy here, just some good updates that include:
      
         - automatic attribute group hiding from Dan Williams (he fixed up my
           horrible attempt at doing this.)
      
         - kobject lock contention fixes from Eric Dumazet
      
         - driver core cleanups from Andy
      
         - kernfs rcu work from Tejun
      
         - fw_devlink changes to resolve some reported issues
      
         - other minor changes, all details in the shortlog
      
        All of these have been in linux-next for a long time with no reported
        issues"
      
      * tag 'driver-core-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (28 commits)
        device: core: Log warning for devices pending deferred probe on timeout
        driver: core: Use dev_* instead of pr_* so device metadata is added
        driver: core: Log probe failure as error and with device metadata
        of: property: fw_devlink: Add support for "post-init-providers" property
        driver core: Add FWLINK_FLAG_IGNORE to completely ignore a fwnode link
        driver core: Adds flags param to fwnode_link_add()
        debugfs: fix wait/cancellation handling during remove
        device property: Don't use "proxy" headers
        device property: Move enum dev_dma_attr to fwnode.h
        driver core: Move fw_devlink stuff to where it belongs
        driver core: Drop unneeded 'extern' keyword in fwnode.h
        firmware_loader: Suppress warning on FW_OPT_NO_WARN flag
        sysfs:Addresses documentation in sysfs_merge_group and sysfs_unmerge_group.
        firmware_loader: introduce __free() cleanup hanler
        platform-msi: Remove usage of the deprecated ida_simple_xx() API
        sysfs: Introduce DEFINE_SIMPLE_SYSFS_GROUP_VISIBLE()
        sysfs: Document new "group visible" helpers
        sysfs: Fix crash on empty group attributes array
        sysfs: Introduce a mechanism to hide static attribute_groups
        sysfs: Introduce a mechanism to hide static attribute_groups
        ...
      241590e5
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · bb41fe35
      Linus Torvalds authored
      Pull char/misc and other driver subsystem updates from Greg KH:
       "Here is the big set of char/misc and a number of other driver
        subsystem updates for 6.9-rc1. Included in here are:
      
         - IIO driver updates, loads of new ones and evolution of existing ones
      
         - coresight driver updates
      
         - const cleanups for many driver subsystems
      
         - speakup driver additions
      
         - platform remove callback void cleanups
      
         - mei driver updates
      
         - mhi driver updates
      
         - cdx driver updates for MSI interrupt handling
      
         - nvmem driver updates
      
         - other smaller driver updates and cleanups, full details in the
          shortlog
      
        All of these have been in linux-next for a long time with no reported
        issue, other than a build warning for the speakup driver"
      
      The build warning hits clang and is a gcc (and C23) extension, and is
      fixed up in the merge.
      
      Link: https://lore.kernel.org/all/20240321134831.GA2762840@dev-arch.thelio-3990X/
      
      * tag 'char-misc-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (279 commits)
        binder: remove redundant variable page_addr
        uio_dmem_genirq: UIO_MEM_DMA_COHERENT conversion
        uio_pruss: UIO_MEM_DMA_COHERENT conversion
        cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT
        uio: introduce UIO_MEM_DMA_COHERENT type
        cdx: add MSI support for CDX bus
        pps: use cflags-y instead of EXTRA_CFLAGS
        speakup: Add /dev/synthu device
        speakup: Fix 8bit characters from direct synth
        parport: sunbpp: Convert to platform remove callback returning void
        parport: amiga: Convert to platform remove callback returning void
        char: xillybus: Convert to platform remove callback returning void
        vmw_balloon: change maintainership
        MAINTAINERS: change the maintainer for hpilo driver
        char: xilinx_hwicap: Fix NULL vs IS_ERR() bug
        hpet: remove hpets::hp_clocksource
        platform: goldfish: move the separate 'default' propery for CONFIG_GOLDFISH
        char: xilinx_hwicap: drop casting to void in dev_set_drvdata
        greybus: move is_gb_* functions out of greybus.h
        greybus: Remove usage of the deprecated ida_simple_xx() API
        ...
      bb41fe35
    • Linus Torvalds's avatar
      Merge tag 'staging-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 0a59b3f4
      Linus Torvalds authored
      Pull staging driver updates from Greg KH:
       "Here is the big set of Staging driver cleanups for 6.9-rc1. Nothing
        major in here, lots of small coding style cleanups for most drivers,
        and the removal of some obsolete hardare (the emxx_udc and some
        drivers/staging/board/ files).
      
        All of these have been in linux-next for a long time with no reported
        issues"
      
      * tag 'staging-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (122 commits)
        staging: greybus: Replaces directive __attribute__((packed)) by __packed as suggested by checkpatch
        staging: greybus: Replace __attribute__((packed)) by __packed in various instances
        Staging: rtl8192e: Rename function GetHalfNmodeSupportByAPsHandler()
        Staging: rtl8192e: Rename function rtllib_FlushRxTsPendingPkts()
        Staging: rtl8192e: Rename goto OnADDBARsp_Reject
        Staging: rtl8192e: Rename goto OnADDBAReq_Fail
        Staging: rtl8192e: Rename function rtllib_send_ADDBARsp()
        Staging: rtl8192e: Rename function rtllib_send_ADDBAReq()
        Staging: rtl8192e: Rename variable TxRxSelect
        Staging: rtl8192e: Fix 5 chckpatch alignment warnings in rtl819x_BAProc.c
        Staging: rtl8192e: Rename function MgntQuery_MgntFrameTxRate
        Staging: rtl8192e: Rename boolean variable bHalfWirelessN24GMode
        Staging: rtl8192e: Rename reference AllowAllDestAddrHandler
        Staging: rtl8192e: Rename varoable asSta
        Staging: rtl8192e: Rename varoable osCcxVerNum
        Staging: rtl8192e: Rename variable CcxAironetBuf
        Staging: rtl8192e: Rename variable osCcxAironetIE
        Staging: rtl8192e: Rename variable AironetIeOui
        Staging: rtl8192e: Rename variable asRsn
        Staging: rtl8192e: Rename variable CcxVerNumBuf
        ...
      0a59b3f4
    • Linus Torvalds's avatar
      Merge tag 'tty-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 3bcb0bf6
      Linus Torvalds authored
      Pull tty / serial driver updates from Greg KH:
       "Here is the big set of TTY/Serial driver updates and cleanups for
        6.9-rc1. Included in here are:
      
         - more tty cleanups from Jiri
      
         - loads of 8250 driver cleanups from Andy
      
         - max310x driver updates
      
         - samsung serial driver updates
      
         - uart_prepare_sysrq_char() updates for many drivers
      
         - platform driver remove callback void cleanups
      
         - stm32 driver updates
      
         - other small tty/serial driver updates
      
        All of these have been in linux-next for a long time with no reported
        issues"
      
      * tag 'tty-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (199 commits)
        dt-bindings: serial: stm32: add power-domains property
        serial: 8250_dw: Replace ACPI device check by a quirk
        serial: Lock console when calling into driver before registration
        serial: 8250_uniphier: Switch to use uart_read_port_properties()
        serial: 8250_tegra: Switch to use uart_read_port_properties()
        serial: 8250_pxa: Switch to use uart_read_port_properties()
        serial: 8250_omap: Switch to use uart_read_port_properties()
        serial: 8250_of: Switch to use uart_read_port_properties()
        serial: 8250_lpc18xx: Switch to use uart_read_port_properties()
        serial: 8250_ingenic: Switch to use uart_read_port_properties()
        serial: 8250_dw: Switch to use uart_read_port_properties()
        serial: 8250_bcm7271: Switch to use uart_read_port_properties()
        serial: 8250_bcm2835aux: Switch to use uart_read_port_properties()
        serial: 8250_aspeed_vuart: Switch to use uart_read_port_properties()
        serial: port: Introduce a common helper to read properties
        serial: core: Add UPIO_UNKNOWN constant for unknown port type
        serial: core: Move struct uart_port::quirks closer to possible values
        serial: sh-sci: Call sci_serial_{in,out}() directly
        serial: core: only stop transmit when HW fifo is empty
        serial: pch: Use uart_prepare_sysrq_char().
        ...
      3bcb0bf6
    • Linus Torvalds's avatar
      Merge tag 'usb-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · e09bf86f
      Linus Torvalds authored
      Pull USB / Thunderbolt updates from Greg KH:
       "Here is the big set of USB and Thunderbolt changes for 6.9-rc1. Lots
        of tiny changes and forward progress to support new hardware and
        better support for existing devices. Included in here are:
      
         - Thunderbolt (i.e. USB4) updates for newer hardware and uses as more
           people start to use the hardware
      
         - default USB authentication mode Kconfig and documentation update to
           make it more obvious what is going on
      
         - USB typec updates and enhancements
      
         - usual dwc3 driver updates
      
         - usual xhci driver updates
      
         - function USB (i.e. gadget) driver updates and additions
      
         - new device ids for lots of drivers
      
         - loads of other small updates, full details in the shortlog
      
        All of these, including a "last minute regression fix" have been in
        linux-next with no reported issues"
      
      * tag 'usb-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (185 commits)
        usb: usb-acpi: Fix oops due to freeing uninitialized pld pointer
        usb: gadget: net2272: Use irqflags in the call to net2272_probe_fin
        usb: gadget: tegra-xudc: Fix USB3 PHY retrieval logic
        phy: tegra: xusb: Add API to retrieve the port number of phy
        USB: gadget: pxa27x_udc: Remove unused of_gpio.h
        usb: gadget/snps_udc_plat: Remove unused of_gpio.h
        usb: ohci-pxa27x: Remove unused of_gpio.h
        usb: sl811-hcd: only defined function checkdone if QUIRK2 is defined
        usb: Clarify expected behavior of dev_bin_attrs_are_visible()
        xhci: Allow RPM on the USB controller (1022:43f7) by default
        usb: isp1760: remove SLAB_MEM_SPREAD flag usage
        usb: misc: onboard_hub: use pointer consistently in the probe function
        usb: gadget: fsl: Increase size of name buffer for endpoints
        usb: gadget: fsl: Add of device table to enable module autoloading
        usb: typec: tcpm: add support to set tcpc connector orientatition
        usb: typec: tcpci: add generic tcpci fallback compatible
        dt-bindings: usb: typec-tcpci: add tcpci fallback binding
        usb: gadget: fsl-udc: Replace custom log wrappers by dev_{err,warn,dbg,vdbg}
        usb: core: Set connect_type of ports based on DT node
        dt-bindings: usb: Add downstream facing ports to realtek binding
        ...
      e09bf86f
    • Linus Torvalds's avatar
      Merge tag 'hwlock-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 2ac2b166
      Linus Torvalds authored
      Pull hwspinlock updates from Bjorn Andersson:
       "Some code cleanup for the OMAP hwspinlock driver"
      
      * tag 'hwlock-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        hwspinlock: omap: Use index to get hwspinlock pointer
        hwspinlock: omap: Use devm_hwspin_lock_register() helper
        hwspinlock: omap: Use devm_pm_runtime_enable() helper
        hwspinlock: omap: Remove unneeded check for OF node
      2ac2b166
    • Linus Torvalds's avatar
      Merge tag 'rpmsg-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 91f263dd
      Linus Torvalds authored
      Pull rpmsg updates from Bjorn Andersson:
       "This transitions rpmsg_ctrl and rpmsg_char drivers away from the
        deprecated ida_simple_*() API. It also makes the rpmsg_bus const"
      
      * tag 'rpmsg-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        rpmsg: core: Make rpmsg_bus const
        rpmsg: Remove usage of the deprecated ida_simple_xx() API
      91f263dd
    • Linus Torvalds's avatar
      Merge tag 'rproc-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 0e875ee5
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
       "Qualcomm SM8650 audio, compute and modem remoteproc are added.
        Qualcomm X1 Elite audio and compute remoteprocs are added, after
        support for shutting down the bootloader-loaded firmware loaded into
        the audio DSP..
      
        A dozen drivers in the subsystem are transitioned to use devres
        helpers for remoteproc and memory allocations - this makes it possible
        to acquire in-kernel handle to individual remoteproc instances in a
        cluster.
      
        The release of DMA memory for remoteproc virtio is corrected to ensure
        that restarting due to a watchdog bite doesn't attempt to allocate the
        memory again without first freeing it.
      
        Last, but not least, a couple of DeviceTree binding cleanups"
      
      * tag 'rproc-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (30 commits)
        remoteproc: qcom_q6v5_pas: Unload lite firmware on ADSP
        remoteproc: qcom_q6v5_pas: Add support for X1E80100 ADSP/CDSP
        dt-bindings: remoteproc: qcom,sm8550-pas: document the X1E80100 aDSP & cDSP
        remoteproc: qcom_wcnss: Use devm_rproc_alloc() helper
        remoteproc: qcom_q6v5_wcss: Use devm_rproc_alloc() helper
        remoteproc: qcom_q6v5_pas: Use devm_rproc_alloc() helper
        remoteproc: qcom_q6v5_mss: Use devm_rproc_alloc() helper
        remoteproc: qcom_q6v5_adsp: Use devm_rproc_alloc() helper
        dt-bindings: remoteproc: do not override firmware-name $ref
        dt-bindings: remoteproc: qcom,glink-rpm-edge: drop redundant type from label
        remoteproc: qcom: pas: correct data indentation
        remoteproc: Make rproc_get_by_phandle() work for clusters
        remoteproc: qcom: pas: Add SM8650 remoteproc support
        remoteproc: qcom: pas: make region assign more generic
        dt-bindings: remoteproc: qcom,sm8550-pas: document the SM8650 PAS
        remoteproc: k3-dsp: Use devm_rproc_add() helper
        remoteproc: k3-dsp: Use devm_ioremap_wc() helper
        remoteproc: k3-dsp: Add devm action to release tsp
        remoteproc: k3-dsp: Use devm_kzalloc() helper
        remoteproc: k3-dsp: Use devm_ti_sci_get_by_phandle() helper
        ...
      0e875ee5
    • Linus Torvalds's avatar
      Merge tag 'cocci-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux · ebc9bee8
      Linus Torvalds authored
      Pull coccinelle update from Julia Lawall:
       "Simplify the device_attr_show semantic patch
      
        Also removes an unused variable warning"
      
      * tag 'cocci-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
        coccinelle: device_attr_show: Remove useless expression STR
      ebc9bee8
    • Linus Torvalds's avatar
      Merge tag 'sh-for-v6.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux · 26bbcd63
      Linus Torvalds authored
      Pull sh updates from John Paul Adrian Glaubitz:
       "Two patches by Ricardo B. Marliere make two instances of struct
        bus_type in the interrupt controller driver and the DMA sysfs
        interface const since the driver core in the kernel is now able to
        handle that.
      
        A third patch by Artur Rojek enforces internal linkage for the
        function setup_hd64461() in order to fix the build of hp6xx_defconfig
        with -Werror=missing-prototypes"
      
      * tag 'sh-for-v6.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux:
        sh: hd64461: Make setup_hd64461() static
        sh: intc: Make intc_subsys const
        sh: dma-sysfs: Make dma_subsys const
      26bbcd63
    • Linus Torvalds's avatar
      Merge tag 'hyperv-next-signed-20240320' of... · cfce216e
      Linus Torvalds authored
      Merge tag 'hyperv-next-signed-20240320' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
      
      Pull hyperv updates from Wei Liu:
      
       - Use Hyper-V entropy to seed guest random number generator (Michael
         Kelley)
      
       - Convert to platform remove callback returning void for vmbus (Uwe
         Kleine-König)
      
       - Introduce hv_get_hypervisor_version function (Nuno Das Neves)
      
       - Rename some HV_REGISTER_* defines for consistency (Nuno Das Neves)
      
       - Change prefix of generic HV_REGISTER_* MSRs to HV_MSR_* (Nuno Das
         Neves)
      
       - Cosmetic changes for hv_spinlock.c (Purna Pavan Chandra Aekkaladevi)
      
       - Use per cpu initial stack for vtl context (Saurabh Sengar)
      
      * tag 'hyperv-next-signed-20240320' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        x86/hyperv: Use Hyper-V entropy to seed guest random number generator
        x86/hyperv: Cosmetic changes for hv_spinlock.c
        hyperv-tlfs: Rename some HV_REGISTER_* defines for consistency
        hv: vmbus: Convert to platform remove callback returning void
        mshyperv: Introduce hv_get_hypervisor_version function
        x86/hyperv: Use per cpu initial stack for vtl context
        hyperv-tlfs: Change prefix of generic HV_REGISTER_* MSRs to HV_MSR_*
      cfce216e
    • Linus Torvalds's avatar
      Merge tag 'for-6.9-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 7b65c810
      Linus Torvalds authored
      Pull btrfs fix from David Sterba:
       "Fix a problem found in 6.7 after adding the temp-fsid feature which
        changed device tracking in memory and broke grub-probe. This is used
        on initrd-less systems. There were several iterations of the fix and
        it took longer than expected"
      
      * tag 'for-6.9-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: do not skip re-registration for the mounted device
      7b65c810
    • Linus Torvalds's avatar
      Merge tag 'exfat-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat · 1b3e2513
      Linus Torvalds authored
      Pull exfat updates from Namjae Jeon:
      
       - Improve dirsync performance by syncing on a dentry-set rather than on
         a per-directory entry
      
      * tag 'exfat-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat:
        exfat: remove duplicate update parent dir
        exfat: do not sync parent dir if just update timestamp
        exfat: remove unused functions
        exfat: convert exfat_find_empty_entry() to use dentry cache
        exfat: convert exfat_init_ext_entry() to use dentry cache
        exfat: move free cluster out of exfat_init_ext_entry()
        exfat: convert exfat_remove_entries() to use dentry cache
        exfat: convert exfat_add_entry() to use dentry cache
        exfat: add exfat_get_empty_dentry_set() helper
        exfat: add __exfat_get_dentry_set() helper
      1b3e2513
    • Linus Torvalds's avatar
      Merge tag 'bitmap-for-6.9' of https://github.com/norov/linux · 879e2886
      Linus Torvalds authored
      Pull bitmap updates from Yury Norov:
       "A couple of random cleanups plus a step-down patch from Andy"
      
      * tag 'bitmap-for-6.9' of https://github.com/norov/linux:
        bitmap: Step down as a reviewer
        lib/find: optimize find_*_bit_wrap
        lib/find_bit: Fix the code comments about find_next_bit_wrap
      879e2886
    • Paolo Abeni's avatar
      Merge tag 'nf-24-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · f99c5f56
      Paolo Abeni authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net. There is a
      larger batch of fixes still pending that will follow up asap, this is
      what I deemed to be more urgent at this time:
      
      1) Use clone view in pipapo set backend to release elements from destroy
         path, otherwise it is possible to destroy elements twice.
      
      2) Incorrect check for internal table flags lead to bogus transaction
         objects.
      
      3) Fix counters memleak in netdev basechain update error path,
         from Quan Tian.
      
      netfilter pull request 24-03-21
      
      * tag 'nf-24-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
        netfilter: nf_tables: Fix a memory leak in nf_tables_updchain
        netfilter: nf_tables: do not compare internal table flags on updates
        netfilter: nft_set_pipapo: release elements in clone only from destroy path
      ====================
      
      Link: https://lore.kernel.org/r/20240321112117.36737-1-pablo@netfilter.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      f99c5f56
    • Takashi Sakamoto's avatar
      firewire: core: add memo about the caller of show functions for device attributes · bfb1ad3c
      Takashi Sakamoto authored
      In the case of firewire core function, the caller of show functions for
      device attributes is not only sysfs user, but also device initialization.
      
      This commit adds memo about it against the typical assumption that the
      functions are just dedicated to sysfs user.
      
      Link: https://lore.kernel.org/lkml/20240318091759.678326-1-o-takashi@sakamocchi.jp/Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      bfb1ad3c
    • Paolo Abeni's avatar
      Merge tag 'linux-can-fixes-for-6.9-20240319' of... · f411e250
      Paolo Abeni authored
      Merge tag 'linux-can-fixes-for-6.9-20240319' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2024-03-20
      
      this is a pull request of 1 patch for net/master.
      
      Martin Jocić contributes a fix for the kvaser_pciefd driver, so that
      up to 8 channels on the Xilinx-based adapters can be used. This issue
      has been introduced in net-next for v6.9.
      
      linux-can-fixes-for-6.9-20240319
      
      * tag 'linux-can-fixes-for-6.9-20240319' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can:
        can: kvaser_pciefd: Add additional Xilinx interrupts
      ====================
      
      Link: https://lore.kernel.org/r/20240320112144.582741-1-mkl@pengutronix.deSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      f411e250
    • Ido Schimmel's avatar
      selftests: forwarding: Fix ping failure due to short timeout · e4137851
      Ido Schimmel authored
      The tests send 100 pings in 0.1 second intervals and force a timeout of
      11 seconds, which is borderline (especially on debug kernels), resulting
      in random failures in netdev CI [1].
      
      Fix by increasing the timeout to 20 seconds. It should not prolong the
      test unless something is wrong, in which case the test will rightfully
      fail.
      
      [1]
       # selftests: net/forwarding: vxlan_bridge_1d_port_8472_ipv6.sh
       # INFO: Running tests with UDP port 8472
       # TEST: ping: local->local                                            [ OK ]
       # TEST: ping: local->remote 1                                         [FAIL]
       # Ping failed
       [...]
      
      Fixes: b07e9957 ("selftests: forwarding: Add VxLAN tests with a VLAN-unaware bridge for IPv6")
      Fixes: 728b3525 ("selftests: forwarding: Add VxLAN tests with a VLAN-aware bridge for IPv6")
      Reported-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Closes: https://lore.kernel.org/netdev/24a7051fdcd1f156c3704bca39e4b3c41dfc7c4b.camel@redhat.com/Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Link: https://lore.kernel.org/r/20240320065717.4145325-1-idosch@nvidia.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      e4137851
    • Florian Westphal's avatar
      MAINTAINERS: step down as netfilter maintainer · b5048d27
      Florian Westphal authored
      I do not feel that I'm up to the task anymore.
      
      I hope this to be a temporary emergeny measure, but for now I'm sure this
      is the best course of action for me.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Link: https://lore.kernel.org/r/20240319121223.24474-1-fw@strlen.deSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      b5048d27
    • Artur Rojek's avatar
      sh: hd64461: Make setup_hd64461() static · 1e21acb7
      Artur Rojek authored
      Enforce internal linkage for setup_hd64461().
      
      This fixes the following error:
      arch/sh/cchips/hd6446x/hd64461.c:75:12: error: no previous prototype for 'setup_hd64461' [-Werror=missing-prototypes]
      Signed-off-by: default avatarArtur Rojek <contact@artur-rojek.eu>
      Reviewed-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      Link: https://lore.kernel.org/r/20240211193451.106795-1-contact@artur-rojek.euSigned-off-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
      1e21acb7
    • Quan Tian's avatar
      netfilter: nf_tables: Fix a memory leak in nf_tables_updchain · 7eaf837a
      Quan Tian authored
      If nft_netdev_register_hooks() fails, the memory associated with
      nft_stats is not freed, causing a memory leak.
      
      This patch fixes it by moving nft_stats_alloc() down after
      nft_netdev_register_hooks() succeeds.
      
      Fixes: b9703ed4 ("netfilter: nf_tables: support for adding new devices to an existing netdev chain")
      Signed-off-by: default avatarQuan Tian <tianquan23@gmail.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      7eaf837a
    • Paolo Abeni's avatar
      Merge branch 'mt7530-dsa-subdriver-fix-vlan-egress-and-handling-of-all-link-local-frames' · 61fbfac1
      Paolo Abeni authored
       says:
      
      ====================
      MT7530 DSA subdriver fix VLAN egress and handling of all link-local frames
      
      This patch series fixes the VLAN tag egress procedure for link-local
      frames, and fixes handling of all link-local frames.
      Signed-off-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
      ====================
      
      Link: https://lore.kernel.org/r/20240314-b4-for-net-mt7530-fix-link-local-vlan-v2-0-7dbcf6429ba0@arinc9.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      61fbfac1
    • Arınç ÜNAL's avatar
      net: dsa: mt7530: fix handling of all link-local frames · 69ddba9d
      Arınç ÜNAL authored
      Currently, the MT753X switches treat frames with :01-0D and :0F MAC DAs as
      regular multicast frames, therefore flooding them to user ports.
      
      On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE
      Std 802.1Q-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC
      DA must only be propagated to C-VLAN and MAC Bridge components. That means
      VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports,
      these frames are supposed to be processed by the CPU (software). So we make
      the switch only forward them to the CPU port. And if received from a CPU
      port, forward to a single port. The software is responsible of making the
      switch conform to the latter by setting a single port as destination port
      on the special tag.
      
      This switch intellectual property cannot conform to this part of the
      standard fully. Whilst the REV_UN frame tag covers the remaining :04-0D and
      :0F MAC DAs, it also includes :22-FF which the scope of propagation is not
      supposed to be restricted for these MAC DAs.
      
      Set frames with :01-03 MAC DAs to be trapped to the CPU port(s). Add a
      comment for the remaining MAC DAs.
      
      Note that the ingress port must have a PVID assigned to it for the switch
      to forward untagged frames. A PVID is set by default on VLAN-aware and
      VLAN-unaware ports. However, when the network interface that pertains to
      the ingress port is attached to a vlan_filtering enabled bridge, the user
      can remove the PVID assignment from it which would prevent the link-local
      frames from being trapped to the CPU port. I am yet to see a way to forward
      link-local frames while preventing other untagged frames from being
      forwarded too.
      
      Fixes: b8f126a8 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
      Signed-off-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      69ddba9d
    • Arınç ÜNAL's avatar
      net: dsa: mt7530: fix link-local frames that ingress vlan filtering ports · e8bf3535
      Arınç ÜNAL authored
      Whether VLAN-aware or not, on every VID VLAN table entry that has the CPU
      port as a member of it, frames are set to egress the CPU port with the VLAN
      tag stacked. This is so that VLAN tags can be appended after hardware
      special tag (called DSA tag in the context of Linux drivers).
      
      For user ports on a VLAN-unaware bridge, frame ingressing the user port
      egresses CPU port with only the special tag.
      
      For user ports on a VLAN-aware bridge, frame ingressing the user port
      egresses CPU port with the special tag and the VLAN tag.
      
      This causes issues with link-local frames, specifically BPDUs, because the
      software expects to receive them VLAN-untagged.
      
      There are two options to make link-local frames egress untagged. Setting
      CONSISTENT or UNTAGGED on the EG_TAG bits on the relevant register.
      CONSISTENT means frames egress exactly as they ingress. That means
      egressing with the VLAN tag they had at ingress or egressing untagged if
      they ingressed untagged. Although link-local frames are not supposed to be
      transmitted VLAN-tagged, if they are done so, when egressing through a CPU
      port, the special tag field will be broken.
      
      BPDU egresses CPU port with VLAN tag egressing stacked, received on
      software:
      
      00:01:25.104821 AF Unknown (382365846), length 106:
                                           | STAG  | | VLAN  |
              0x0000:  0000 6c27 614d 4143 0001 0000 8100 0001  ..l'aMAC........
              0x0010:  0026 4242 0300 0000 0000 0000 6c27 614d  .&BB........l'aM
              0x0020:  4143 0000 0000 0000 6c27 614d 4143 0000  AC......l'aMAC..
              0x0030:  0000 1400 0200 0f00 0000 0000 0000 0000  ................
      
      BPDU egresses CPU port with VLAN tag egressing untagged, received on
      software:
      
      00:23:56.628708 AF Unknown (25215488), length 64:
                                           | STAG  |
              0x0000:  0000 6c27 614d 4143 0001 0000 0026 4242  ..l'aMAC.....&BB
              0x0010:  0300 0000 0000 0000 6c27 614d 4143 0000  ........l'aMAC..
              0x0020:  0000 0000 6c27 614d 4143 0000 0000 1400  ....l'aMAC......
              0x0030:  0200 0f00 0000 0000 0000 0000            ............
      
      BPDU egresses CPU port with VLAN tag egressing tagged, received on
      software:
      
      00:01:34.311963 AF Unknown (25215488), length 64:
                                           | Mess  |
              0x0000:  0000 6c27 614d 4143 0001 0001 0026 4242  ..l'aMAC.....&BB
              0x0010:  0300 0000 0000 0000 6c27 614d 4143 0000  ........l'aMAC..
              0x0020:  0000 0000 6c27 614d 4143 0000 0000 1400  ....l'aMAC......
              0x0030:  0200 0f00 0000 0000 0000 0000            ............
      
      To prevent confusing the software, force the frame to egress UNTAGGED
      instead of CONSISTENT. This way, frames can't possibly be received TAGGED
      by software which would have the special tag field broken.
      
      VLAN Tag Egress Procedure
      
         For all frames, one of these options set the earliest in this order will
         apply to the frame:
      
         - EG_TAG in certain registers for certain frames.
           This will apply to frame with matching MAC DA or EtherType.
      
         - EG_TAG in the address table.
           This will apply to frame at its incoming port.
      
         - EG_TAG in the PVC register.
           This will apply to frame at its incoming port.
      
         - EG_CON and [EG_TAG per port] in the VLAN table.
           This will apply to frame at its outgoing port.
      
         - EG_TAG in the PCR register.
           This will apply to frame at its outgoing port.
      
         EG_TAG in certain registers for certain frames:
      
         PPPoE Discovery_ARP/RARP: PPP_EG_TAG and ARP_EG_TAG in the APC register.
         IGMP_MLD: IGMP_EG_TAG and MLD_EG_TAG in the IMC register.
         BPDU and PAE: BPDU_EG_TAG and PAE_EG_TAG in the BPC register.
         REV_01 and REV_02: R01_EG_TAG and R02_EG_TAG in the RGAC1 register.
         REV_03 and REV_0E: R03_EG_TAG and R0E_EG_TAG in the RGAC2 register.
         REV_10 and REV_20: R10_EG_TAG and R20_EG_TAG in the RGAC3 register.
         REV_21 and REV_UN: R21_EG_TAG and RUN_EG_TAG in the RGAC4 register.
      
      With this change, it can be observed that a bridge interface with stp_state
      and vlan_filtering enabled will properly block ports now.
      
      Fixes: b8f126a8 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
      Signed-off-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      e8bf3535
    • Jakub Kicinski's avatar
      Merge branch 'report-rcu-qs-for-busy-network-kthreads' · 3201de46
      Jakub Kicinski authored
      Yan Zhai says:
      
      ====================
      Report RCU QS for busy network kthreads
      
      This changeset fixes a common problem for busy networking kthreads.
      These threads, e.g. NAPI threads, typically will do:
      
      * polling a batch of packets
      * if there are more work, call cond_resched() to allow scheduling
      * continue to poll more packets when rx queue is not empty
      
      We observed this being a problem in production, since it can block RCU
      tasks from making progress under heavy load. Investigation indicates
      that just calling cond_resched() is insufficient for RCU tasks to reach
      quiescent states. This also has the side effect of frequently clearing
      the TIF_NEED_RESCHED flag on voluntary preempt kernels. As a result,
      schedule() will not be called in these circumstances, despite schedule()
      in fact provides required quiescent states. This at least affects NAPI
      threads, napi_busy_loop, and also cpumap kthread.
      
      By reporting RCU QSes in these kthreads periodically before cond_resched, the
      blocked RCU waiters can correctly progress. Instead of just reporting QS for
      RCU tasks, these code share the same concern as noted in the commit
      d28139c4 ("rcu: Apply RCU-bh QSes to RCU-sched and RCU-preempt when safe").
      So report a consolidated QS for safety.
      
      It is worth noting that, although this problem is reproducible in
      napi_busy_loop, it only shows up when setting the polling interval to as high
      as 2ms, which is far larger than recommended 50us-100us in the documentation.
      So napi_busy_loop is left untouched.
      
      Lastly, this does not affect RT kernels, which does not enter the scheduler
      through cond_resched(). Without the mentioned side effect, schedule() will
      be called time by time, and clear the RCU task holdouts.
      
      V4: https://lore.kernel.org/bpf/cover.1710525524.git.yan@cloudflare.com/
      V3: https://lore.kernel.org/lkml/20240314145459.7b3aedf1@kernel.org/t/
      V2: https://lore.kernel.org/bpf/ZeFPz4D121TgvCje@debian.debian/
      V1: https://lore.kernel.org/lkml/Zd4DXTyCf17lcTfq@debian.debian/#t
      ====================
      
      Link: https://lore.kernel.org/r/cover.1710877680.git.yan@cloudflare.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3201de46
    • Yan Zhai's avatar
      bpf: report RCU QS in cpumap kthread · 00bf6312
      Yan Zhai authored
      When there are heavy load, cpumap kernel threads can be busy polling
      packets from redirect queues and block out RCU tasks from reaching
      quiescent states. It is insufficient to just call cond_resched() in such
      context. Periodically raise a consolidated RCU QS before cond_resched
      fixes the problem.
      
      Fixes: 6710e112 ("bpf: introduce new bpf cpu map type BPF_MAP_TYPE_CPUMAP")
      Reviewed-by: default avatarJesper Dangaard Brouer <hawk@kernel.org>
      Signed-off-by: default avatarYan Zhai <yan@cloudflare.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Acked-by: default avatarJesper Dangaard Brouer <hawk@kernel.org>
      Link: https://lore.kernel.org/r/c17b9f1517e19d813da3ede5ed33ee18496bb5d8.1710877680.git.yan@cloudflare.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      00bf6312
    • Yan Zhai's avatar
      net: report RCU QS on threaded NAPI repolling · d6dbbb11
      Yan Zhai authored
      NAPI threads can keep polling packets under load. Currently it is only
      calling cond_resched() before repolling, but it is not sufficient to
      clear out the holdout of RCU tasks, which prevent BPF tracing programs
      from detaching for long period. This can be reproduced easily with
      following set up:
      
      ip netns add test1
      ip netns add test2
      
      ip -n test1 link add veth1 type veth peer name veth2 netns test2
      
      ip -n test1 link set veth1 up
      ip -n test1 link set lo up
      ip -n test2 link set veth2 up
      ip -n test2 link set lo up
      
      ip -n test1 addr add 192.168.1.2/31 dev veth1
      ip -n test1 addr add 1.1.1.1/32 dev lo
      ip -n test2 addr add 192.168.1.3/31 dev veth2
      ip -n test2 addr add 2.2.2.2/31 dev lo
      
      ip -n test1 route add default via 192.168.1.3
      ip -n test2 route add default via 192.168.1.2
      
      for i in `seq 10 210`; do
       for j in `seq 10 210`; do
          ip netns exec test2 iptables -I INPUT -s 3.3.$i.$j -p udp --dport 5201
       done
      done
      
      ip netns exec test2 ethtool -K veth2 gro on
      ip netns exec test2 bash -c 'echo 1 > /sys/class/net/veth2/threaded'
      ip netns exec test1 ethtool -K veth1 tso off
      
      Then run an iperf3 client/server and a bpftrace script can trigger it:
      
      ip netns exec test2 iperf3 -s -B 2.2.2.2 >/dev/null&
      ip netns exec test1 iperf3 -c 2.2.2.2 -B 1.1.1.1 -u -l 1500 -b 3g -t 100 >/dev/null&
      bpftrace -e 'kfunc:__napi_poll{@=count();} interval:s:1{exit();}'
      
      Report RCU quiescent states periodically will resolve the issue.
      
      Fixes: 29863d41 ("net: implement threaded-able napi poll loop support")
      Reviewed-by: default avatarJesper Dangaard Brouer <hawk@kernel.org>
      Signed-off-by: default avatarYan Zhai <yan@cloudflare.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Acked-by: default avatarJesper Dangaard Brouer <hawk@kernel.org>
      Link: https://lore.kernel.org/r/4c3b0d3f32d3b18949d75b18e5e1d9f13a24f025.1710877680.git.yan@cloudflare.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d6dbbb11
    • Yan Zhai's avatar
      rcu: add a helper to report consolidated flavor QS · 1a77557d
      Yan Zhai authored
      When under heavy load, network processing can run CPU-bound for many
      tens of seconds. Even in preemptible kernels (non-RT kernel), this can
      block RCU Tasks grace periods, which can cause trace-event removal to
      take more than a minute, which is unacceptably long.
      
      This commit therefore creates a new helper function that passes through
      both RCU and RCU-Tasks quiescent states every 100 milliseconds. This
      hard-coded value suffices for current workloads.
      Suggested-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Reviewed-by: default avatarJesper Dangaard Brouer <hawk@kernel.org>
      Signed-off-by: default avatarYan Zhai <yan@cloudflare.com>
      Reviewed-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Acked-by: default avatarJesper Dangaard Brouer <hawk@kernel.org>
      Link: https://lore.kernel.org/r/90431d46ee112d2b0af04dbfe936faaca11810a5.1710877680.git.yan@cloudflare.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1a77557d