Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Pull bpf/for-next #216

Merged
merged 10,000 commits into from
Jun 3, 2024
Merged

Pull bpf/for-next #216

merged 10,000 commits into from
Jun 3, 2024
This pull request is big! We’re only showing the most recent 250 commits.

Commits on May 19, 2024

  1. mm/page-owner: use gfp_nested_mask() instead of open coded masking

    The page-owner tracking code records stack traces during page allocation. 
    To do this, it must do a memory allocation for the stack information from
    inside an existing memory allocation context.  This internal allocation
    must obey the high level caller allocation constraints to avoid generating
    false positive warnings that have nothing to do with the code they are
    instrumenting/tracking (e.g.  through lockdep reclaim state tracking)
    
    We also don't want recording stack traces to deplete emergency memory
    reserves - debug code is useless if it creates new issues that can't be
    replicated when the debug code is disabled.
    
    Switch the stack tracking allocation masking to use gfp_nested_mask() to
    address these issues.  gfp_nested_mask() naturally strips GFP_ZONEMASK,
    too, which greatly simplifies this code.
    
    Link: https://lkml.kernel.org/r/20240430054604.4169568-4-david@fromorbit.com
    Signed-off-by: Dave Chinner <dchinner@redhat.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
    Reviewed-by: Oscar Salvador <osalvador@suse.de>
    Cc: Andrey Konovalov <andreyknvl@gmail.com>
    Cc: Marco Elver <elver@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    dchinner authored and akpm00 committed May 19, 2024
    Configuration menu
    Copy the full SHA
    99b80ac View commit details
    Browse the repository at this point in the history
  2. MAINTAINERS: add BITOPS API record

    Bitops API is the very basic, and it's widely used by the kernel. But
    corresponding files are not maintained.
    
    Bitmaps actively use bit operations, and big share of bitops material
    already moves through the bitmap branch.
    
    I would like to take a closer look to bitops.
    
    This patch creates a BITOPS API record in the MAINTAINERS, and adds
    Rasmus as a reviewer, and myself as a maintainer of those files.
    
    CC: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: Yury Norov <yury.norov@gmail.com>
    YuryNorov committed May 19, 2024
    Configuration menu
    Copy the full SHA
    fe708f9 View commit details
    Browse the repository at this point in the history
  3. bitops: Move aligned_byte_mask() to wordpart.h

    The bitops.h is for bit related operations. The aligned_byte_mask()
    is about byte (or part of the machine word) operations, for which
    we have a separate header, move the mentioned macro to wordpart.h
    to consolidate similar operations.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Yury Norov <yury.norov@gmail.com>
    andy-shev authored and YuryNorov committed May 19, 2024
    Configuration menu
    Copy the full SHA
    9f2c2d6 View commit details
    Browse the repository at this point in the history
  4. usercopy: Don't use "proxy" headers

    Update header inclusions to follow IWYU (Include What You Use)
    principle.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Yury Norov <yury.norov@gmail.com>
    andy-shev authored and YuryNorov committed May 19, 2024
    Configuration menu
    Copy the full SHA
    5671dca View commit details
    Browse the repository at this point in the history

Commits on May 20, 2024

  1. mailbox: omap: Remove unused omap_mbox_{enable,disable}_irq() functions

    These function are not used, remove these here.
    
    While here, remove the leading _ from the driver internal functions that
    do the same thing as the functions removed.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    182ebe5 View commit details
    Browse the repository at this point in the history
  2. mailbox: omap: Remove unused omap_mbox_request_channel() function

    This function is not used, remove this function.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    6faf89a View commit details
    Browse the repository at this point in the history
  3. mailbox: omap: Move omap_mbox_irq_t into driver

    This is only used internal to the driver, move it out of the
    public header and into the driver file. While we are here,
    this is not used as a bitwise, so drop that and make it a
    simple enum type.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    6979e8b View commit details
    Browse the repository at this point in the history
  4. mailbox: omap: Move fifo size check to point of use

    The mbox_kfifo_size can be changed at runtime, the sanity
    check on it's value should be done when it is used, not
    only once at init time.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    e9eceec View commit details
    Browse the repository at this point in the history
  5. mailbox: omap: Remove unneeded header omap-mailbox.h

    The type of message sent using omap-mailbox is always u32. The definition
    of mbox_msg_t is uintptr_t which is wrong as that type changes based on
    the architecture (32bit vs 64bit). This type should have been defined as
    u32. Instead of making that change here, simply remove the header usage
    and fix the last couple users of the same in this driver.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    8aa4a34 View commit details
    Browse the repository at this point in the history
  6. mailbox: omap: Remove device class

    The driver currently creates a new device class "mbox". Then for each
    mailbox adds a device to that class. This class provides no file
    operations provided for any userspace users of this device class.
    It may have been extended to be functional in our vendor tree at
    some point, but that is not the case anymore, nor does it matter
    for the upstream tree.
    
    Remove this device class and related functions and variables.
    This also allows us to switch to module_platform_driver() as
    there is nothing left to do in module_init().
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    982b145 View commit details
    Browse the repository at this point in the history
  7. mailbox: omap: Use devm_pm_runtime_enable() helper

    Use device life-cycle managed runtime enable function to simplify probe
    and exit paths.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    e4e8b1f View commit details
    Browse the repository at this point in the history
  8. mailbox: omap: Merge mailbox child node setup loops

    Currently the driver loops through all mailbox child nodes twice, once
    to read in data from each node, and again to make use of this data.
    Instead read the data and make use of it in one pass. This removes
    the need for several temporary data structures and reduces the
    complexity of this main loop in probe.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    7077ac4 View commit details
    Browse the repository at this point in the history
  9. mailbox: omap: Use function local struct mbox_controller

    The mbox_controller struct is only needed in the probe function. Make
    it a local variable instead of storing a copy in omap_mbox_device
    to simplify that struct.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    2a0fca3 View commit details
    Browse the repository at this point in the history
  10. mailbox: omap: Use mbox_controller channel list directly

    The driver stores a list of omap_mbox structs so it can later use it to
    lookup the mailbox names in of_xlate. This same information is already
    available in the mbox_controller passed into of_xlate. Simply use that
    data and remove the extra allocation and storage of the omap_mbox list.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    34123b1 View commit details
    Browse the repository at this point in the history
  11. mailbox: omap: Remove mbox_chan_to_omap_mbox()

    This function only checks if mbox_chan *chan is not NULL, but that cannot
    be the case and if it was returning NULL which is not later checked
    doesn't save us from this. The second check for chan->con_priv is
    completely redundant as if it was NULL we would return NULL just the
    same. Simply dereference con_priv directly and remove this function.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    5aa00b6 View commit details
    Browse the repository at this point in the history
  12. mailbox: omap: Reverse FIFO busy check logic

    It is much more clear to check if the hardware FIFO is full and return
    EBUSY if true. This allows us to also remove one level of indention
    from the core of this function. It also makes the similarities between
    omap_mbox_chan_send_noirq() and omap_mbox_chan_send() more obvious.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    04a07a3 View commit details
    Browse the repository at this point in the history
  13. mailbox: omap: Remove kernel FIFO message queuing

    The kernel FIFO queue has a couple issues. The biggest issue is that
    it causes extra latency in a path that can be used in real-time tasks,
    such as communication with real-time remote processors.
    
    The whole FIFO idea itself looks to be a leftover from before the
    unified mailbox framework. The current mailbox framework expects
    mbox_chan_received_data() to be called with data immediately as it
    arrives. Remove the FIFO and pass the messages to the mailbox
    framework directly as part of a threaded IRQ handler.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    glneo authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    3f58c1f View commit details
    Browse the repository at this point in the history
  14. dt-bindings: mailbox: arm,mhuv3: Add bindings

    Add bindings for the ARM MHUv3 Mailbox controller.
    
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    freefall75 authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    cd25197 View commit details
    Browse the repository at this point in the history
  15. mailbox: arm_mhuv3: Add driver

    Add support for ARM MHUv3 mailbox controller.
    
    Support is limited to the MHUv3 Doorbell extension using only the PBX/MBX
    combined interrupts.
    
    Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    freefall75 authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    ca1a868 View commit details
    Browse the repository at this point in the history
  16. mailbox: zynqmp: handle SGI for shared IPI

    At least one IPI is used in TF-A for communication with PMC firmware.
    If this IPI needs to be used by other agents such as RPU then, IPI
    system interrupt can't be generated in mailbox driver. In such case
    TF-A generates SGI to mailbox driver for IPI notification.
    
    Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
    Signed-off-by: Saeed Nowshadi <saeed.nowshadi@amd.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    tnmysh authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    6ffb163 View commit details
    Browse the repository at this point in the history
  17. mailbox: mtk-cmdq-mailbox: fix module autoloading

    Add MODULE_DEVICE_TABLE(), so this module could be properly autoloaded
    based on the alias from of_device_id table.
    
    Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    krzk authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    dc48215 View commit details
    Browse the repository at this point in the history
  18. mailbox: mtk-cmdq: Fix pm_runtime_get_sync() warning in mbox shutdown

    The return value of pm_runtime_get_sync() in cmdq_mbox_shutdown()
    will return 1 when pm runtime state is active, and we don't want to
    get the warning message in this case.
    
    So we change the return value < 0 for WARN_ON().
    
    Fixes: 8afe816 ("mailbox: mtk-cmdq-mailbox: Implement Runtime PM with autosuspend")
    Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    Jason-JH.Lin authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    747a69a View commit details
    Browse the repository at this point in the history
  19. mailbox: Convert from tasklet to BH workqueue

    The only generic interface to execute asynchronously in the BH context is
    tasklet; however, it's marked deprecated and has some design flaws. To
    replace tasklets, BH workqueue support was recently added. A BH workqueue
    behaves similarly to regular workqueues except that the queued work items
    are executed in the BH context.
    
    Based on the work done by Tejun Heo <tj@kernel.org>
    Branch: https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-6.10
    
    Signed-off-by: Allen Pais <allen.lkml@gmail.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    allenpais authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    c9834d8 View commit details
    Browse the repository at this point in the history
  20. dt-bindings: mailbox: qcom: Add MSM8974 APCS compatible

    Add compatible for the Qualcomm MSM8974 APCS block.
    
    Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
    Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    z3ntu authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    b714363 View commit details
    Browse the repository at this point in the history
  21. dt-bindings: mailbox: qcom-ipcc: Document the SDX75 IPCC

    Document the Inter-Processor Communication Controller on the SDX75 Platform.
    
    Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
    Acked-by: Rob Herring (Arm) <robh@kernel.org>
    Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
    RohitAgarwalQUIC authored and Jassi Brar committed May 20, 2024
    Configuration menu
    Copy the full SHA
    10b9858 View commit details
    Browse the repository at this point in the history
  22. net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled

    Stephen reported that he was unable to get the dsa_loop driver to get
    probed, and the reason ended up being because he had CONFIG_FIXED_PHY=y
    in his kernel configuration. As Masahiro explained it:
    
      "obj-m += dsa/" means everything under dsa/ must be modular.
    
      If there is a built-in object under dsa/ with CONFIG_NET_DSA=m,
      you cannot do  "obj-$(CONFIG_NET_DSA) += dsa/".
    
      You need to change it back to "obj-y += dsa/".
    
    This was the case here whereby CONFIG_NET_DSA=m, and so the
    obj-$(CONFIG_FIXED_PHY) += dsa_loop_bdinfo.o rule is not executed and
    the DSA loop mdio_board info structure is not registered with the
    kernel, and eventually the device is simply not found.
    
    To preserve the intention of the original commit of limiting the amount
    of folder descending, conditionally descend into drivers/net/dsa when
    CONFIG_NET_DSA is enabled.
    
    Fixes: 227d720 ("dsa: simplify Kconfig symbols and dependencies")
    Reported-by: Stephen Langstaff <stephenlangstaff1@gmail.com>
    Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
    Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    ffainelli authored and davem330 committed May 20, 2024
    Configuration menu
    Copy the full SHA
    b1fa60e View commit details
    Browse the repository at this point in the history
  23. ipv6: sr: fix missing sk_buff release in seg6_input_core

    The seg6_input() function is responsible for adding the SRH into a
    packet, delegating the operation to the seg6_input_core(). This function
    uses the skb_cow_head() to ensure that there is sufficient headroom in
    the sk_buff for accommodating the link-layer header.
    In the event that the skb_cow_header() function fails, the
    seg6_input_core() catches the error but it does not release the sk_buff,
    which will result in a memory leak.
    
    This issue was introduced in commit af3b515 ("ipv6: sr: fix BUG due
    to headroom too small after SRH push") and persists even after commit
    7a3f5b0 ("netfilter: add netfilter hooks to SRv6 data plane"),
    where the entire seg6_input() code was refactored to deal with netfilter
    hooks.
    
    The proposed patch addresses the identified memory leak by requiring the
    seg6_input_core() function to release the sk_buff in the event that
    skb_cow_head() fails.
    
    Fixes: af3b515 ("ipv6: sr: fix BUG due to headroom too small after SRH push")
    Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Reviewed-by: David Ahern <dsahern@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    skorpion17 authored and davem330 committed May 20, 2024
    Configuration menu
    Copy the full SHA
    5447f97 View commit details
    Browse the repository at this point in the history
  24. selftests: net: kill smcrouted in the cleanup logic in amt.sh

    The amt.sh requires smcrouted for multicasting routing.
    So, it starts smcrouted before forwarding tests.
    It must be stopped after all tests, but it isn't.
    
    To fix this issue, it kills smcrouted in the cleanup logic.
    
    Fixes: c08e8ba ("selftests: add amt interface selftest script")
    Signed-off-by: Taehee Yoo <ap420073@gmail.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    TaeheeYoo authored and davem330 committed May 20, 2024
    Configuration menu
    Copy the full SHA
    cc563e7 View commit details
    Browse the repository at this point in the history
  25. nfc: nci: Fix uninit-value in nci_rx_work

    syzbot reported the following uninit-value access issue [1]
    
    nci_rx_work() parses received packet from ndev->rx_q. It should be
    validated header size, payload size and total packet size before
    processing the packet. If an invalid packet is detected, it should be
    silently discarded.
    
    Fixes: d24b035 ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet")
    Reported-and-tested-by: syzbot+d7b4dc6cd50410152534@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=d7b4dc6cd50410152534 [1]
    Signed-off-by: Ryosuke Yasuoka <ryasuoka@redhat.com>
    Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    YsuOS authored and davem330 committed May 20, 2024
    Configuration menu
    Copy the full SHA
    e4a87ab View commit details
    Browse the repository at this point in the history
  26. Revert "selftests: Compile kselftest headers with -D_GNU_SOURCE"

    This reverts commit daef47b.
    
    This framework change to add D_GNU_SOURCE to KHDR_INCLUDES
    to Makefile, lib.mk, and kselftest_harness.h is causing build
    failures and warnings.
    
    Revert this change.
    
    Reported-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
    shuahkh committed May 20, 2024
    Configuration menu
    Copy the full SHA
    cee27ae View commit details
    Browse the repository at this point in the history
  27. Revert "selftests/sgx: Include KHDR_INCLUDES in Makefile"

    This reverts commit 2c3b8f8.
    
    The framework change to add D_GNU_SOURCE to KHDR_INCLUDES
    to Makefile, lib.mk, and kselftest_harness.h is reverted
    as it is causing build failures and warnings.
    
    Revert this change as this change depends on the framework
    change.
    
    Reported-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
    shuahkh committed May 20, 2024
    Configuration menu
    Copy the full SHA
    3da1640 View commit details
    Browse the repository at this point in the history
  28. Revert "selftests/cgroup: Drop define _GNU_SOURCE"

    This reverts commit c1457d9.
    
    The framework change to add D_GNU_SOURCE to KHDR_INCLUDES
    to Makefile, lib.mk, and kselftest_harness.h is reverted
    as it is causing build failures and warnings.
    
    Revert this change as this change depends on the framework
    change.
    
    Reported-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
    shuahkh committed May 20, 2024
    Configuration menu
    Copy the full SHA
    a97853f View commit details
    Browse the repository at this point in the history
  29. Merge tag 'v6.10-p2' of git://git.kernel.org/pub/scm/linux/kernel/git…

    …/herbert/crypto-2.6
    
    Pull crypto fixes from Herbert Xu:
     "Fix a bug in the new ecc P521 code as well as a buggy fix in qat"
    
    * tag 'v6.10-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
      crypto: ecc - Prevent ecc_digits_from_bytes from reading too many bytes
      crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    568c98a View commit details
    Browse the repository at this point in the history
  30. Merge tag 'pinctrl-v6.10-1' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/linusw/linux-pinctrl
    
    Pull pin control updates from Linus Walleij:
     "Core changes:
    
       - Use DEFINE_SHOW_STORE_ATTRIBUTE() in debugfs entries
    
      New drivers:
    
       - Qualcomm PMIH0108, PMD8028, PMXR2230 and PM6450 pin control support
    
      Improvements:
    
       - Serious cleanup of the recently merged aw9523 driver
    
       - Fix PIN_CONFIG_BIAS_DISABLE handling in pinctrl-single
    
       - A slew of device tree binding cleanups
    
       - Support a bus clock in the Samsung driver"
    
    * tag 'pinctrl-v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (48 commits)
      pinctrl: bcm2835: Make pin freeing behavior configurable
      dt-bindings: pinctrl: qcom,pmic-gpio: Fix "comptaible" typo for PMIH0108
      pinctrl: qcom: pinctrl-sm7150: Fix sdc1 and ufs special pins regs
      dt-bindings: pinctrl: mediatek: mt7622: add "antsel" function
      dt-bindings: pinctrl: mediatek: mt7622: fix array properties
      pinctrl: samsung: drop redundant drvdata assignment
      pinctrl: samsung: support a bus clock
      dt-bindings: pinctrl: samsung: google,gs101-pinctrl needs a clock
      pinctrl: renesas: rzg2l: Limit 2.5V power supply to Ethernet interfaces
      pinctrl: renesas: r8a779h0: Add INTC-EX pins, groups, and function
      pinctrl: renesas: r8a779h0: Fix IRQ suffixes
      pinctrl: renesas: rzg2l: Remove extra space in function parameter
      dt-bindings: pinctrl: qcom,pmic-mpp: add support for PM8901
      pinctrl: pinconf-generic: print hex value
      pinctrl: realtek: fix module autoloading
      pinctrl: qcom: sm7150: fix module autoloading
      pinctrl: loongson2: fix module autoloading
      pinctrl: mediatek: fix module autoloading
      pinctrl: freescale: imx8ulp: fix module autoloading
      dt-bindings: pinctrl: qcom,pmic-gpio: Allow gpio-hog nodes
      ...
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    2de6863 View commit details
    Browse the repository at this point in the history
  31. Merge tag 'i2c-for-6.10-rc1' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/wsa/linux
    
    Pull i2c updates from Wolfram Sang:
     "i2c core removes an argument from the i2c_mux_add_adapter() call to
      further deprecate class based I2C device instantiation. All users are
      converted, too.
    
      Other that that, Andi collected a number if I2C host driver patches.
      Those merges have their own description"
    
    * tag 'i2c-for-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (72 commits)
      power: supply: sbs-manager: Remove class argument from i2c_mux_add_adapter()
      i2c: mux: Remove class argument from i2c_mux_add_adapter()
      i2c: synquacer: Fix an error handling path in synquacer_i2c_probe()
      i2c: acpi: Unbind mux adapters before delete
      i2c: designware: Replace MODULE_ALIAS() with MODULE_DEVICE_TABLE()
      i2c: pxa: use 'time_left' variable with wait_event_timeout()
      i2c: s3c2410: use 'time_left' variable with wait_event_timeout()
      i2c: rk3x: use 'time_left' variable with wait_event_timeout()
      i2c: qcom-geni: use 'time_left' variable with wait_for_completion_timeout()
      i2c: jz4780: use 'time_left' variable with wait_for_completion_timeout()
      i2c: synquacer: use 'time_left' variable with wait_for_completion_timeout()
      i2c: stm32f7: use 'time_left' variable with wait_for_completion_timeout()
      i2c: stm32f4: use 'time_left' variable with wait_for_completion_timeout()
      i2c: st: use 'time_left' variable with wait_for_completion_timeout()
      i2c: omap: use 'time_left' variable with wait_for_completion_timeout()
      i2c: imx-lpi2c: use 'time_left' variable with wait_for_completion_timeout()
      i2c: hix5hd2: use 'time_left' variable with wait_for_completion_timeout()
      i2c: exynos5: use 'time_left' variable with wait_for_completion_timeout()
      i2c: digicolor: use 'time_left' variable with wait_for_completion_timeout()
      i2c: amd-mp2-plat: use 'time_left' variable with wait_for_completion_timeout()
      ...
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    0a07e09 View commit details
    Browse the repository at this point in the history
  32. Merge tag 'linux-watchdog-6.10-rc1' of git://www.linux-watchdog.org/l…

    …inux-watchdog
    
    Pull watchdog updates from Wim Van Sebroeck:
    
     - Add Lenovo SE10 platform Watchdog Driver
    
     - Other small fixes and improvements
    
    * tag 'linux-watchdog-6.10-rc1' of git://www.linux-watchdog.org/linux-watchdog:
      watchdog: LENOVO_SE10_WDT should depend on X86 && DMI
      watchdog: sa1100: Fix PTR_ERR_OR_ZERO() vs NULL check in sa1100dog_probe()
      watchdog: rti_wdt: Set min_hw_heartbeat_ms to accommodate a safety margin
      watchdog: add HAS_IOPORT dependencies
      watchdog/wdt-main: Use cpumask_of() to avoid cpumask var on stack
      watchdog: bd9576: Drop "always-running" property
      watchdog: mtx-1: drop driver owner assignment
      watchdog: cpu5wdt.c: Fix use-after-free bug caused by cpu5wdt_trigger
      watchdog: lenovo_se10_wdt: Watchdog driver for Lenovo SE10 platform
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    a913d94 View commit details
    Browse the repository at this point in the history
  33. Merge tag 'dmi-for-v6.10' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/jdelvare/staging
    
    Pull dmi updates from Jean Delvare:
     "Bug fixes:
    
       - KCFI violation in dmi-id
    
       - stop decoding on broken (short) DMI table entry
    
      New features:
    
       - print info about populated memory slots at boot"
    
    * tag 'dmi-for-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
      firmware: dmi: Add info message for number of populated and total memory slots
      firmware: dmi: Stop decoding on broken entry
      firmware: dmi-id: add a release callback function
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    80f9d90 View commit details
    Browse the repository at this point in the history
  34. Merge tag 'mips_6.10' of git://git.kernel.org/pub/scm/linux/kernel/gi…

    …t/mips/linux
    
    Pull MIPS updates from Thomas Bogendoerfer:
     "Just cleanups and fixes"
    
    * tag 'mips_6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (24 commits)
      MIPS: Take in account load hazards for HI/LO restoring
      MIPS: SGI-IP27: use WARN_ON() output
      MIPS: SGI-IP27: fix -Wunused-variable in arch_init_irq()
      MIPS: SGI-IP27: micro-optimize arch_init_irq()
      mips: dts: ralink: mt7621: reorder the attributes of the root node
      mips: dts: ralink: mt7621: reorder pci?_phy attributes
      mips: dts: ralink: mt7621: reorder pcie node attributes and children
      mips: dts: ralink: mt7621: reorder ethernet node attributes and kids
      mips: dts: ralink: mt7621: reorder gic node attributes
      mips: dts: ralink: mt7621: reorder mmc node attributes
      mips: dts: ralink: mt7621: move pinctrl and sort its children
      mips: dts: ralink: mt7621: reorder spi0 node attributes
      mips: dts: ralink: mt7621: reorder i2c node attributes
      mips: dts: ralink: mt7621: reorder gpio node attributes
      mips: dts: ralink: mt7621: reorder sysc node attributes
      mips: dts: ralink: mt7621: reorder mmc regulator attributes
      mips: dts: ralink: mt7621: reorder cpuintc node attributes
      mips: dts: ralink: mt7621: reorder cpu node attributes
      MIPS: Add prototypes for plat_post_relocation() and relocate_kernel()
      MIPS: Octeon: Add PCIe link status check
      ...
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    6e51b4b View commit details
    Browse the repository at this point in the history
  35. Merge tag 'dma-mapping-6.10-2024-05-20' of git://git.infradead.org/us…

    …ers/hch/dma-mapping
    
    Pull dma-mapping updates from Christoph Hellwig:
    
     - optimize DMA sync calls when they are no-ops (Alexander Lobakin)
    
     - fix swiotlb padding for untrusted devices (Michael Kelley)
    
     - add documentation for swiotb (Michael Kelley)
    
    * tag 'dma-mapping-6.10-2024-05-20' of git://git.infradead.org/users/hch/dma-mapping:
      dma: fix DMA sync for drivers not calling dma_set_mask*()
      xsk: use generic DMA sync shortcut instead of a custom one
      page_pool: check for DMA sync shortcut earlier
      page_pool: don't use driver-set flags field directly
      page_pool: make sure frag API fields don't span between cachelines
      iommu/dma: avoid expensive indirect calls for sync operations
      dma: avoid redundant calls for sync operations
      dma: compile-out DMA sync op calls when not used
      iommu/dma: fix zeroing of bounce buffer padding used by untrusted devices
      swiotlb: remove alloc_size argument to swiotlb_tbl_map_single()
      Documentation/core-api: add swiotlb documentation
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    daa1211 View commit details
    Browse the repository at this point in the history
  36. coccinelle: misc: minmax: Suppress reports for err returns

    Most of the people prefer:
    
    return ret < 0 ? ret: 0;
    
    than:
    
    return min(ret, 0);
    
    Let's tweak the cocci file to ignore those lines completely.
    
    Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
    Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
    ribalda authored and JuliaLawall committed May 20, 2024
    Configuration menu
    Copy the full SHA
    e465519 View commit details
    Browse the repository at this point in the history
  37. Coccinelle: pm_runtime: Fix grammar in comment

    s/does not use unnecessary/do not unnecessarily use/
    
    Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
    Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
    toblux authored and JuliaLawall committed May 20, 2024
    Configuration menu
    Copy the full SHA
    88a1fc2 View commit details
    Browse the repository at this point in the history
  38. Merge tag 'fsnotify_for_v6.10-rc1' of git://git.kernel.org/pub/scm/li…

    …nux/kernel/git/jack/linux-fs
    
    Pull fsnotify updates from Jan Kara:
    
     - reduce overhead of fsnotify infrastructure when no permission events
       are in use
    
     - a few small cleanups
    
    * tag 'fsnotify_for_v6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
      fsnotify: fix UAF from FS_ERROR event on a shutting down filesystem
      fsnotify: optimize the case of no permission event watchers
      fsnotify: use an enum for group priority constants
      fsnotify: move s_fsnotify_connectors into fsnotify_sb_info
      fsnotify: lazy attach fsnotify_sb_info state to sb
      fsnotify: create helper fsnotify_update_sb_watchers()
      fsnotify: pass object pointer and type to fsnotify mark helpers
      fanotify: merge two checks regarding add of ignore mark
      fsnotify: create a wrapper fsnotify_find_inode_mark()
      fsnotify: create helpers to get sb and connp from object
      fsnotify: rename fsnotify_{get,put}_sb_connectors()
      fsnotify: Avoid -Wflex-array-member-not-at-end warning
      fanotify: remove unneeded sub-zero check for unsigned value
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    5af9d1c View commit details
    Browse the repository at this point in the history
  39. Revert "fanotify: remove unneeded sub-zero check for unsigned value"

    This reverts commit e659522.
    
    These kinds of patches are only making the code worse.
    
    Compilers don't care about the unnecessary check, but removing it makes
    the code less obvious to a human.  The declaration of 'len' is more than
    80 lines earlier, so a human won't easily see that 'len' is of an
    unsigned type, so to a human the range check that checks against zero is
    much more explicit and obvious.
    
    Any tool that complains about a range check like this just because the
    variable is unsigned is actively detrimental, and should be ignored.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    d0e71e2 View commit details
    Browse the repository at this point in the history
  40. dm-integrity: set discard_granularity to logical block size

    dm-integrity could set discard_granularity lower than the logical block
    size. This could result in failures when sending discard requests to
    dm-integrity.
    
    This fix is needed for kernels prior to 6.10.
    
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Reported-by: Eric Wheeler <linux-integrity@lists.ewheeler.net>
    Cc: stable@vger.kernel.org # <= 6.9
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    Mikulas Patocka authored and Mike Snitzer committed May 20, 2024
    Configuration menu
    Copy the full SHA
    69381cf View commit details
    Browse the repository at this point in the history
  41. Merge tag 'fs_for_v6.10-rc1' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/jack/linux-fs
    
    Pull isofs, udf, quota, ext2, and reiserfs updates from Jan Kara:
    
     - convert isofs to the new mount API
    
     - cleanup isofs Makefile
    
     - udf conversion to folios
    
     - some other small udf cleanups and fixes
    
     - ext2 cleanups
    
     - removal of reiserfs .writepage method
    
     - update reiserfs README file
    
    * tag 'fs_for_v6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
      isofs: Use *-y instead of *-objs in Makefile
      ext2: Remove LEGACY_DIRECT_IO dependency
      isofs: Remove calls to set/clear the error flag
      ext2: Remove call to folio_set_error()
      udf: Use a folio in udf_write_end()
      udf: Convert udf_page_mkwrite() to use a folio
      udf: Convert udf_symlink_getattr() to use a folio
      udf: Convert udf_adinicb_readpage() to udf_adinicb_read_folio()
      udf: Convert udf_expand_file_adinicb() to use a folio
      udf: Convert udf_write_begin() to use a folio
      udf: Convert udf_symlink_filler() to use a folio
      reiserfs: Trim some README bits
      quota: fix to propagate error of mark_dquot_dirty() to caller
      reiserfs: Convert to writepages
      udf: udftime: prevent overflow in udf_disk_stamp_to_time()
      ext2: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method
      udf: replace deprecated strncpy/strcpy with strscpy
      udf: Remove second semicolon
      isofs: convert isofs to use the new mount API
      fs: quota: use group allocation of per-cpu counters API
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    bb6b206 View commit details
    Browse the repository at this point in the history
  42. dm: always manage discard support in terms of max_hw_discard_sectors

    Commit 4f563a6 ("block: add a max_user_discard_sectors queue
    limit") changed block core to set max_discard_sectors to:
     min(lim->max_hw_discard_sectors, lim->max_user_discard_sectors)
    
    Since commit 1c0e720 ("dm: use queue_limits_set") it was reported
    dm-thinp was failing in a few fstests (generic/347 and generic/405)
    with the first WARN_ON_ONCE in dm_cell_key_has_valid_range() being
    reported, e.g.:
    WARNING: CPU: 1 PID: 30 at drivers/md/dm-bio-prison-v1.c:128 dm_cell_key_has_valid_range+0x3d/0x50
    
    blk_set_stacking_limits() sets max_user_discard_sectors to UINT_MAX,
    so given how block core now sets max_discard_sectors (detailed above)
    it follows that blk_stack_limits() stacks up the underlying device's
    max_hw_discard_sectors and max_discard_sectors is set to match it. If
    max_hw_discard_sectors exceeds dm's BIO_PRISON_MAX_RANGE, then
    dm_cell_key_has_valid_range() will trigger the warning with:
    WARN_ON_ONCE(key->block_end - key->block_begin > BIO_PRISON_MAX_RANGE)
    
    Aside from this warning, the discard will fail.  Fix this and other DM
    issues by governing discard support in terms of max_hw_discard_sectors
    instead of max_discard_sectors.
    
    Reported-by: Theodore Ts'o <tytso@mit.edu>
    Fixes: 1c0e720 ("dm: use queue_limits_set")
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    Mike Snitzer committed May 20, 2024
    Configuration menu
    Copy the full SHA
    825d8bb View commit details
    Browse the repository at this point in the history
  43. Merge tag 'xfs-6.10-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/x…

    …fs-linux
    
    Pull xfs updates from Chandan Babu:
     "Online repair feature continues to be expanded. Also, we now support
      delayed allocation for realtime devices which have an extent size that
      is equal to filesystem's block size.
    
      New code:
    
       - Introduce Parent Pointer extended attribute for inodes
    
       - Bring back delalloc support for realtime devices which have an
         extent size that is equal to filesystem's block size
    
       - Improve performance of log incompat feature handling
    
      Online Repair:
    
       - Implement atomic file content exchanges i.e. exchange ranges of
         bytes between two files atomically
    
       - Create temporary files to repair file-based metadata. This uses
         atomic file content exchange facility to swap file fork mappings
         between the temporary file and the metadata inode
    
       - Allow callers of directory/xattr code to set an explicit owner
         number to be written into the header fields of any new blocks that
         are created. This is required to avoid walking every block of the
         new structure and modify their ownership during online repair
    
       - Repair more data structures:
           - Extended attributes
           - Inode unlinked state
           - Directories
           - Symbolic links
           - AGI's unlinked inode list
           - Parent pointers
    
       - Move Orphan files to lost and found directory
    
       - Fixes for Inode repair functionality
    
       - Introduce a new sub-AG FITRIM implementation to reduce the duration
         for which the AGF lock is held
    
       - Updates for the design documentation
    
       - Use Parent Pointers to assist in checking directories, parent
         pointers, extended attributes, and link counts
    
      Fixes:
    
       - Prevent userspace from reading invalid file data due to incorrect.
         updation of file size when performing a non-atomic clone operation
    
       - Minor fixes to online repair
    
       - Fix confusing return values from xfs_bmapi_write()
    
       - Fix an out of bounds access due to incorrect h_size during log
         recovery
    
       - Defer upgrading the extent counters in xfs_reflink_end_cow_extent()
         until we know we are going to modify the extent mapping
    
       - Remove racy access to if_bytes check in
         xfs_reflink_end_cow_extent()
    
       - Fix sparse warnings
    
      Cleanups:
    
       - Hold inode locks on all files involved in a rename until the
         completion of the operation. This is in preparation for the parent
         pointers patchset where parent pointers are applied in a separate
         chained update from the actual directory update
    
       - Compile out v4 support when disabled
    
       - Cleanup xfs_extent_busy_clear()
    
       - Remove unused flags and fields from struct xfs_da_args
    
       - Remove definitions of unused functions
    
       - Improve extended attribute validation
    
       - Add higher level directory operations helpers to remove duplication
         of code
    
       - Cleanup quota (un)reservation interfaces"
    
    * tag 'xfs-6.10-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (221 commits)
      xfs: simplify iext overflow checking and upgrade
      xfs: remove a racy if_bytes check in xfs_reflink_end_cow_extent
      xfs: upgrade the extent counters in xfs_reflink_end_cow_extent later
      xfs: xfs_quota_unreserve_blkres can't fail
      xfs: consolidate the xfs_quota_reserve_blkres definitions
      xfs: clean up buffer allocation in xlog_do_recovery_pass
      xfs: fix log recovery buffer allocation for the legacy h_size fixup
      xfs: widen flags argument to the xfs_iflags_* helpers
      xfs: minor cleanups of xfs_attr3_rmt_blocks
      xfs: create a helper to compute the blockcount of a max sized remote value
      xfs: turn XFS_ATTR3_RMT_BUF_SPACE into a function
      xfs: use unsigned ints for non-negative quantities in xfs_attr_remote.c
      xfs: do not allocate the entire delalloc extent in xfs_bmapi_write
      xfs: fix xfs_bmap_add_extent_delay_real for partial conversions
      xfs: remove the xfs_iext_peek_prev_extent call in xfs_bmapi_allocate
      xfs: pass the actual offset and len to allocate to xfs_bmapi_allocate
      xfs: don't open code XFS_FILBLKS_MIN in xfs_bmapi_write
      xfs: lift a xfs_valid_startblock into xfs_bmapi_allocate
      xfs: remove the unusued tmp_logflags variable in xfs_bmapi_allocate
      xfs: fix error returns from xfs_bmapi_write
      ...
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    119d1b8 View commit details
    Browse the repository at this point in the history
  44. Merge tag 'f2fs-for-6.10.rc1' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/jaegeuk/f2fs
    
    Pull f2fs updates from Jaegeuk Kim:
     "In this round, we've tried to address some performance issues on zoned
      storage such as direct IO and write_hints. In addition, we've migrated
      some IO paths using folio. Meanwhile, there are multiple bug fixes in
      the compression paths, sanity check conditions, and error handlers.
    
      Enhancements:
       - allow direct io of pinned files for zoned storage
       - assign the write hint per stream by default
       - convert read paths and test_writeback to folio
       - avoid allocating WARM_DATA segment for direct IO
    
      Bug fixes:
       - fix false alarm on invalid block address
       - fix to add missing iput() in gc_data_segment()
       - fix to release node block count in error path of
         f2fs_new_node_page()
       - compress:
           - don't allow unaligned truncation on released compress inode
           - cover {reserve,release}_compress_blocks() w/ cp_rwsem lock
           - fix error path of inc_valid_block_count()
           - fix to update i_compr_blocks correctly
       - fix block migration when section is not aligned to pow2
       - don't trigger OPU on pinfile for direct IO
       - fix to do sanity check on i_xattr_nid in sanity_check_inode()
       - write missing last sum blk of file pinning section
       - clear writeback when compression failed
       - fix to adjust appropirate defragment pg_end
    
      As usual, there are several minor code clean-ups, and fixes to manage
      missing corner cases in the error paths"
    
    * tag 'f2fs-for-6.10.rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (50 commits)
      f2fs: initialize last_block_in_bio variable
      f2fs: Add inline to f2fs_build_fault_attr() stub
      f2fs: fix some ambiguous comments
      f2fs: fix to add missing iput() in gc_data_segment()
      f2fs: allow dirty sections with zero valid block for checkpoint disabled
      f2fs: compress: don't allow unaligned truncation on released compress inode
      f2fs: fix to release node block count in error path of f2fs_new_node_page()
      f2fs: compress: fix to cover {reserve,release}_compress_blocks() w/ cp_rwsem lock
      f2fs: compress: fix error path of inc_valid_block_count()
      f2fs: compress: fix typo in f2fs_reserve_compress_blocks()
      f2fs: compress: fix to update i_compr_blocks correctly
      f2fs: check validation of fault attrs in f2fs_build_fault_attr()
      f2fs: fix to limit gc_pin_file_threshold
      f2fs: remove unused GC_FAILURE_PIN
      f2fs: use f2fs_{err,info}_ratelimited() for cleanup
      f2fs: fix block migration when section is not aligned to pow2
      f2fs: zone: fix to don't trigger OPU on pinfile for direct IO
      f2fs: fix to do sanity check on i_xattr_nid in sanity_check_inode()
      f2fs: fix to avoid allocating WARM_DATA segment for direct IO
      f2fs: remove redundant parameter in is_next_segment_free()
      ...
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    72ece20 View commit details
    Browse the repository at this point in the history
  45. arch: Fix name collision with ACPI's video.o

    Commit 2fd001c ("arch: Rename fbdev header and source files")
    renames the video source files under arch/ such that they do not
    refer to fbdev any longer. The new files named video.o conflict with
    ACPI's video.ko module. Modprobing the ACPI module can then fail with
    warnings about missing symbols, as shown below.
    
      (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol acpi_video_unregister (err -2)
      (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol acpi_video_register_backlight (err -2)
      (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol __acpi_video_get_backlight_type (err -2)
      (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol acpi_video_register (err -2)
    
    Fix the issue by renaming the architecture's video.o to video-common.o.
    
    Reported-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
    Closes: https://lore.kernel.org/intel-gfx/9dcac6e9-a3bf-4ace-bbdc-f697f767f9e0@suse.de/T/#t
    Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
    Fixes: 2fd001c ("arch: Rename fbdev header and source files")
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: linux-arch@vger.kernel.org
    Cc: linux-fbdev@vger.kernel.org
    Cc: dri-devel@lists.freedesktop.org
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Thomas Zimmermann authored and arndb committed May 20, 2024
    Configuration menu
    Copy the full SHA
    34cda5a View commit details
    Browse the repository at this point in the history
  46. Merge tag 'linux_kselftest-next-6.10-rc1-fixes' of git://git.kernel.o…

    …rg/pub/scm/linux/kernel/git/shuah/linux-kselftest
    
    Pull kselftest fixes from Shuah Khan:
     "Revert framework change to add D_GNU_SOURCE to KHDR_INCLUDES to
      Makefile, lib.mk, and kselftest_harness.h and follow-on changes to
      cgroup and sgx test as they are causing build failures and warnings"
    
    * tag 'linux_kselftest-next-6.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
      Revert "selftests/cgroup: Drop define _GNU_SOURCE"
      Revert "selftests/sgx: Include KHDR_INCLUDES in Makefile"
      Revert "selftests: Compile kselftest headers with -D_GNU_SOURCE"
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    70ec81c View commit details
    Browse the repository at this point in the history
  47. Merge tag 'vfio-v6.10-rc1' of https://github.com/awilliam/linux-vfio

    Pull vfio updates from Alex Williamson:
    
     - The vfio fsl-mc bus driver has become orphaned. We'll consider
       removing it in future releases if a new maintainer isn't found (Alex
       Williamson)
    
     - Improved usage of opaque data in vfio-pci INTx handling, avoiding
       lookups of the eventfd through the interrupt and irqfd runtime paths
       (Alex Williamson)
    
     - Resolve an error path memory leak introduced in vfio-pci interrupt
       code (Ye Bin)
    
     - Addition of interrupt support for vfio devices exposed on the CDX
       bus, including a new MSI allocation helper and export of existing
       helpers for MSI alloc and free (Nipun Gupta)
    
     - A new vfio-pci variant driver supporting migration of Intel QAT VF
       devices for the GEN4 PFs (Xin Zeng & Yahui Cao)
    
     - Resolve a possibly circular locking dependency in vfio-pci by
       avoiding copy_to_user() from a PCI bus walk callback (Alex
       Williamson)
    
     - Trivial docs update to remove a duplicate semicolon (Foryun Ma)
    
    * tag 'vfio-v6.10-rc1' of https://github.com/awilliam/linux-vfio:
      vfio/pci: Restore zero affected bus reset devices warning
      vfio: remove an extra semicolon
      vfio/pci: Collect hot-reset devices to local buffer
      vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices
      vfio/cdx: add interrupt support
      genirq/msi: Add MSI allocation helper and export MSI functions
      vfio/pci: fix potential memory leak in vfio_intx_enable()
      vfio/pci: Pass eventfd context object through irqfd
      vfio/pci: Pass eventfd context to IRQ handler
      MAINTAINERS: Orphan vfio fsl-mc bus driver
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    30aec6e View commit details
    Browse the repository at this point in the history
  48. Merge tag 'soc-dt-late-6.10' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/soc/soc
    
    Pull more SoC devicetree updates from Arnd Bergmann:
     "This is a follow-up to an earlier pull request for device tree
      changes, as three platform maintainers sent their contents too late to
      be included in the main set, but had not caused any further problems
      since then:
    
       - The Amlogic platform now containts support for two new SoC types,
         the A4 and A5 chips for audio applications. Both come with a
         reference board, and one more dts file gets addded for the
         combination of the MNT Reform Laptop with the BPI-CM4 CPU module
    
       - The ASpeed platform adds support for six addititional server
         platforms that use ast2500 or ast2600 as their BMC, while another
         one gets removed
    
       - The RISC-V platforms from Microchip, Starfive and and T-HEAD get
         additional features for existing hardware, plus the addition of the
         Milk-V Mars based on the StarFive VisionFive v2 board"
    
    * tag 'soc-dt-late-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (76 commits)
      riscv: dts: microchip: add pac1934 power-monitor to icicle
      riscv: dts: thead: Fix node ordering in TH1520 device tree
      ARM: dts: aspeed: Add ASRock E3C256D4I BMC
      dt-bindings: arm: aspeed: document ASRock E3C256D4I
      dt-bindings: trivial-devices: add isil,isl69269
      ARM: dts: aspeed: x4tf: Add dts for asus x4tf project
      dt-bindings: arm: aspeed: add ASUS X4TF board
      ARM: dts: aspeed: Remove Facebook Cloudripper dts
      ARM: dts: aspeed: drop unused ref_voltage ADC property
      ARM: dts: aspeed: harma: correct Mellanox multi-host property
      ARM: dts: aspeed: yosemitev2: correct Mellanox multi-host property
      ARM: dts: aspeed: yosemite4: correct Mellanox multi-host property
      ARM: dts: aspeed: greatlakes: correct Mellanox multi-host property
      ARM: dts: aspeed: Modify I2C bus configuration
      ARM: dts: aspeed: Disable unused ADC channels for Asrock X570D4U BMC
      ARM: dts: aspeed: Modify GPIO table for Asrock X570D4U BMC
      ARM: dts: aspeed: yosemite4: set bus13 frequency to 100k
      ARM: dts: Aspeed: Bonnell: Fix NVMe LED labels
      ARM: dts: aspeed: yosemite4: Enable ipmb device for OCP debug card
      ARM: dts: aspeed: ahe50dc: Update lm25066 regulator name
      ...
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    1b03616 View commit details
    Browse the repository at this point in the history
  49. Merge tag 'asm-generic-6.10' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/arnd/asm-generic
    
    Pull asm-generic cleanups from Arnd Bergmann:
     "These are a few cross-architecture cleanup patches:
    
       - separate out fbdev support from the asm/video.h contents that may
         be used by either the old fbdev drivers or the newer drm display
         code (Thomas Zimmermann)
    
       - cleanups for the generic bitops code and asm-generic/bug.h
         (Thorsten Blum)
    
       - remove the orphaned include/asm-generic/page.h header that used to
         be included by long-removed mmu-less architectures (me)"
    
    * tag 'asm-generic-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
      arch: Fix name collision with ACPI's video.o
      bug: Improve comment
      asm-generic: remove unused asm-generic/page.h
      arch: Rename fbdev header and source files
      arch: Remove struct fb_info from video helpers
      arch: Select fbdev helpers with CONFIG_VIDEO
      bitops: Change function return types from long to int
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    3eb3c33 View commit details
    Browse the repository at this point in the history
  50. Merge tag 'cocci-for-6.10' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/jlawall/linux
    
    Pull coccinelle updates from Julia Lawall:
     "One patch slightly improves the text in a comment.
    
      The other patch (on minmax.cocci) removes a report about ? being used
      in return statements that has been generating not very useful
      suggestions to change idiomatic code"
    
    * tag 'cocci-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
      Coccinelle: pm_runtime: Fix grammar in comment
      coccinelle: misc: minmax: Suppress reports for err returns
    torvalds committed May 20, 2024
    Configuration menu
    Copy the full SHA
    8f6a15f View commit details
    Browse the repository at this point in the history
  51. KEYS: trusted: Fix memory leak in tpm2_key_encode()

    'scratch' is never freed. Fix this by calling kfree() in the success, and
    in the error case.
    
    Cc: stable@vger.kernel.org # +v5.13
    Fixes: f221974 ("security: keys: trusted: use ASN.1 TPM2 key format for the blobs")
    Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
    jarkkojs committed May 20, 2024
    Configuration menu
    Copy the full SHA
    ffcaa21 View commit details
    Browse the repository at this point in the history
  52. KEYS: trusted: Do not use WARN when encode fails

    When asn1_encode_sequence() fails, WARN is not the correct solution.
    
    1. asn1_encode_sequence() is not an internal function (located
       in lib/asn1_encode.c).
    2. Location is known, which makes the stack trace useless.
    3. Results a crash if panic_on_warn is set.
    
    It is also noteworthy that the use of WARN is undocumented, and it
    should be avoided unless there is a carefully considered rationale to
    use it.
    
    Replace WARN with pr_err, and print the return value instead, which is
    only useful piece of information.
    
    Cc: stable@vger.kernel.org # v5.13+
    Fixes: f221974 ("security: keys: trusted: use ASN.1 TPM2 key format for the blobs")
    Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
    jarkkojs committed May 20, 2024
    Configuration menu
    Copy the full SHA
    050bf3c View commit details
    Browse the repository at this point in the history

Commits on May 21, 2024

  1. Merge branch 'pm-cpufreq'

    Merge an amd-pstate driver fix for 6.10-rc1:
    
     - Fix a memory leak in the exit path of amd-pstate (Peng Ma).
    
    * pm-cpufreq:
      cpufreq: amd-pstate: fix memory leak on CPU EPP exit
    rafaeljw committed May 21, 2024
    Configuration menu
    Copy the full SHA
    dee8f20 View commit details
    Browse the repository at this point in the history
  2. Revert "r8169: don't try to disable interrupts if NAPI is, scheduled …

    …already"
    
    This reverts commit 7274c41.
    
    Ken reported that RTL8125b can lock up if gro_flush_timeout has the
    default value of 20000 and napi_defer_hard_irqs is set to 0.
    In this scenario device interrupts aren't disabled, what seems to
    trigger some silicon bug under heavy load. I was able to reproduce this
    behavior on RTL8168h. Fix this by reverting 7274c41.
    
    Fixes: 7274c41 ("r8169: don't try to disable interrupts if NAPI is scheduled already")
    Cc: stable@vger.kernel.org
    Reported-by: Ken Milmore <ken.milmore@gmail.com>
    Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://lore.kernel.org/r/9b5b6f4c-4f54-4b90-b0b3-8d8023c2e780@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    hkallweit authored and Paolo Abeni committed May 21, 2024
    Configuration menu
    Copy the full SHA
    eabb8a9 View commit details
    Browse the repository at this point in the history
  3. af_unix: Update unix_sk(sk)->oob_skb under sk_receive_queue lock.

    Billy Jheng Bing-Jhong reported a race between __unix_gc() and
    queue_oob().
    
    __unix_gc() tries to garbage-collect close()d inflight sockets,
    and then if the socket has MSG_OOB in unix_sk(sk)->oob_skb, GC
    will drop the reference and set NULL to it locklessly.
    
    However, the peer socket still can send MSG_OOB message and
    queue_oob() can update unix_sk(sk)->oob_skb concurrently, leading
    NULL pointer dereference. [0]
    
    To fix the issue, let's update unix_sk(sk)->oob_skb under the
    sk_receive_queue's lock and take it everywhere we touch oob_skb.
    
    Note that we defer kfree_skb() in manage_oob() to silence lockdep
    false-positive (See [1]).
    
    [0]:
    BUG: kernel NULL pointer dereference, address: 0000000000000008
     PF: supervisor write access in kernel mode
     PF: error_code(0x0002) - not-present page
    PGD 8000000009f5e067 P4D 8000000009f5e067 PUD 9f5d067 PMD 0
    Oops: 0002 [#1] PREEMPT SMP PTI
    CPU: 3 PID: 50 Comm: kworker/3:1 Not tainted 6.9.0-rc5-00191-gd091e579b864 #110
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
    Workqueue: events delayed_fput
    RIP: 0010:skb_dequeue (./include/linux/skbuff.h:2386 ./include/linux/skbuff.h:2402 net/core/skbuff.c:3847)
    Code: 39 e3 74 3e 8b 43 10 48 89 ef 83 e8 01 89 43 10 49 8b 44 24 08 49 c7 44 24 08 00 00 00 00 49 8b 14 24 49 c7 04 24 00 00 00 00 <48> 89 42 08 48 89 10 e8 e7 c5 42 00 4c 89 e0 5b 5d 41 5c c3 cc cc
    RSP: 0018:ffffc900001bfd48 EFLAGS: 00000002
    RAX: 0000000000000000 RBX: ffff8880088f5ae8 RCX: 00000000361289f9
    RDX: 0000000000000000 RSI: 0000000000000206 RDI: ffff8880088f5b00
    RBP: ffff8880088f5b00 R08: 0000000000080000 R09: 0000000000000001
    R10: 0000000000000003 R11: 0000000000000001 R12: ffff8880056b6a00
    R13: ffff8880088f5280 R14: 0000000000000001 R15: ffff8880088f5a80
    FS:  0000000000000000(0000) GS:ffff88807dd80000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000008 CR3: 0000000006314000 CR4: 00000000007506f0
    PKRU: 55555554
    Call Trace:
     <TASK>
     unix_release_sock (net/unix/af_unix.c:654)
     unix_release (net/unix/af_unix.c:1050)
     __sock_release (net/socket.c:660)
     sock_close (net/socket.c:1423)
     __fput (fs/file_table.c:423)
     delayed_fput (fs/file_table.c:444 (discriminator 3))
     process_one_work (kernel/workqueue.c:3259)
     worker_thread (kernel/workqueue.c:3329 kernel/workqueue.c:3416)
     kthread (kernel/kthread.c:388)
     ret_from_fork (arch/x86/kernel/process.c:153)
     ret_from_fork_asm (arch/x86/entry/entry_64.S:257)
     </TASK>
    Modules linked in:
    CR2: 0000000000000008
    
    Link: https://lore.kernel.org/netdev/a00d3993-c461-43f2-be6d-07259c98509a@rbox.co/ [1]
    Fixes: 1279f9d ("af_unix: Call kfree_skb() for dead unix_(sk)->oob_skb in GC.")
    Reported-by: Billy Jheng Bing-Jhong <billy@starlabs.sg>
    Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
    Link: https://lore.kernel.org/r/20240516134835.8332-1-kuniyu@amazon.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    q2ven authored and Paolo Abeni committed May 21, 2024
    Configuration menu
    Copy the full SHA
    9841991 View commit details
    Browse the repository at this point in the history
  4. ipv6: sr: fix memleak in seg6_hmac_init_algo

    seg6_hmac_init_algo returns without cleaning up the previous allocations
    if one fails, so it's going to leak all that memory and the crypto tfms.
    
    Update seg6_hmac_exit to only free the memory when allocated, so we can
    reuse the code directly.
    
    Fixes: bf355b8 ("ipv6: sr: add core files for SR HMAC support")
    Reported-by: Sabrina Dubroca <sd@queasysnail.net>
    Closes: https://lore.kernel.org/netdev/Zj3bh-gE7eT6V6aH@hog/
    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
    Link: https://lore.kernel.org/r/20240517005435.2600277-1-liuhangbin@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    liuhangbin authored and Paolo Abeni committed May 21, 2024
    Configuration menu
    Copy the full SHA
    efb9f4f View commit details
    Browse the repository at this point in the history
  5. selftests/net: use tc rule to filter the na packet

    Test arp_ndisc_untracked_subnets use tcpdump to filter the unsolicited
    and untracked na messages. It set -e before calling tcpdump. But if
    tcpdump filters 0 packet, it will return none zero, and cause the script
    to exit.
    
    Instead of using slow tcpdump to capture packets, let's using tc rule
    to filter out the na message.
    
    At the same time, fix function setup_v6 which only needs one parameter.
    Move all the related helpers from forwarding lib.sh to net lib.sh.
    
    Fixes: 0ea7b0a ("selftests: net: arp_ndisc_untracked_subnets: test for arp_accept and accept_untracked_na")
    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://lore.kernel.org/r/20240517010327.2631319-1-liuhangbin@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    liuhangbin authored and Paolo Abeni committed May 21, 2024
    Configuration menu
    Copy the full SHA
    ea63ac1 View commit details
    Browse the repository at this point in the history
  6. tcp: Fix shift-out-of-bounds in dctcp_update_alpha().

    In dctcp_update_alpha(), we use a module parameter dctcp_shift_g
    as follows:
    
      alpha -= min_not_zero(alpha, alpha >> dctcp_shift_g);
      ...
      delivered_ce <<= (10 - dctcp_shift_g);
    
    It seems syzkaller started fuzzing module parameters and triggered
    shift-out-of-bounds [0] by setting 100 to dctcp_shift_g:
    
      memcpy((void*)0x20000080,
             "/sys/module/tcp_dctcp/parameters/dctcp_shift_g\000", 47);
      res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x20000080ul,
                    /*flags=*/2ul, /*mode=*/0ul);
      memcpy((void*)0x20000000, "100\000", 4);
      syscall(__NR_write, /*fd=*/r[0], /*val=*/0x20000000ul, /*len=*/4ul);
    
    Let's limit the max value of dctcp_shift_g by param_set_uint_minmax().
    
    With this patch:
    
      # echo 10 > /sys/module/tcp_dctcp/parameters/dctcp_shift_g
      # cat /sys/module/tcp_dctcp/parameters/dctcp_shift_g
      10
      # echo 11 > /sys/module/tcp_dctcp/parameters/dctcp_shift_g
      -bash: echo: write error: Invalid argument
    
    [0]:
    UBSAN: shift-out-of-bounds in net/ipv4/tcp_dctcp.c:143:12
    shift exponent 100 is too large for 32-bit type 'u32' (aka 'unsigned int')
    CPU: 0 PID: 8083 Comm: syz-executor345 Not tainted 6.9.0-05151-g1b294a1f3561 #2
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
    1.13.0-1ubuntu1.1 04/01/2014
    Call Trace:
     <TASK>
     __dump_stack lib/dump_stack.c:88 [inline]
     dump_stack_lvl+0x201/0x300 lib/dump_stack.c:114
     ubsan_epilogue lib/ubsan.c:231 [inline]
     __ubsan_handle_shift_out_of_bounds+0x346/0x3a0 lib/ubsan.c:468
     dctcp_update_alpha+0x540/0x570 net/ipv4/tcp_dctcp.c:143
     tcp_in_ack_event net/ipv4/tcp_input.c:3802 [inline]
     tcp_ack+0x17b1/0x3bc0 net/ipv4/tcp_input.c:3948
     tcp_rcv_state_process+0x57a/0x2290 net/ipv4/tcp_input.c:6711
     tcp_v4_do_rcv+0x764/0xc40 net/ipv4/tcp_ipv4.c:1937
     sk_backlog_rcv include/net/sock.h:1106 [inline]
     __release_sock+0x20f/0x350 net/core/sock.c:2983
     release_sock+0x61/0x1f0 net/core/sock.c:3549
     mptcp_subflow_shutdown+0x3d0/0x620 net/mptcp/protocol.c:2907
     mptcp_check_send_data_fin+0x225/0x410 net/mptcp/protocol.c:2976
     __mptcp_close+0x238/0xad0 net/mptcp/protocol.c:3072
     mptcp_close+0x2a/0x1a0 net/mptcp/protocol.c:3127
     inet_release+0x190/0x1f0 net/ipv4/af_inet.c:437
     __sock_release net/socket.c:659 [inline]
     sock_close+0xc0/0x240 net/socket.c:1421
     __fput+0x41b/0x890 fs/file_table.c:422
     task_work_run+0x23b/0x300 kernel/task_work.c:180
     exit_task_work include/linux/task_work.h:38 [inline]
     do_exit+0x9c8/0x2540 kernel/exit.c:878
     do_group_exit+0x201/0x2b0 kernel/exit.c:1027
     __do_sys_exit_group kernel/exit.c:1038 [inline]
     __se_sys_exit_group kernel/exit.c:1036 [inline]
     __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1036
     do_syscall_x64 arch/x86/entry/common.c:52 [inline]
     do_syscall_64+0xe4/0x240 arch/x86/entry/common.c:83
     entry_SYSCALL_64_after_hwframe+0x67/0x6f
    RIP: 0033:0x7f6c2b5005b6
    Code: Unable to access opcode bytes at 0x7f6c2b50058c.
    RSP: 002b:00007ffe883eb948 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
    RAX: ffffffffffffffda RBX: 00007f6c2b5862f0 RCX: 00007f6c2b5005b6
    RDX: 0000000000000001 RSI: 000000000000003c RDI: 0000000000000001
    RBP: 0000000000000001 R08: 00000000000000e7 R09: ffffffffffffffc0
    R10: 0000000000000006 R11: 0000000000000246 R12: 00007f6c2b5862f0
    R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
     </TASK>
    
    Reported-by: syzkaller <syzkaller@googlegroups.com>
    Reported-by: Yue Sun <samsun1006219@gmail.com>
    Reported-by: xingwei lee <xrivendell7@gmail.com>
    Closes: https://lore.kernel.org/netdev/CAEkJfYNJM=cw-8x7_Vmj1J6uYVCWMbbvD=EFmDPVBGpTsqOxEA@mail.gmail.com/
    Fixes: e3118e8 ("net: tcp: add DCTCP congestion control algorithm")
    Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://lore.kernel.org/r/20240517091626.32772-1-kuniyu@amazon.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    q2ven authored and Paolo Abeni committed May 21, 2024
    Configuration menu
    Copy the full SHA
    3ebc46c View commit details
    Browse the repository at this point in the history
  7. af_unix: Fix garbage collection of embryos carrying OOB with SCM_RIGHTS

    GC attempts to explicitly drop oob_skb's reference before purging the hit
    list.
    
    The problem is with embryos: kfree_skb(u->oob_skb) is never called on an
    embryo socket.
    
    The python script below [0] sends a listener's fd to its embryo as OOB
    data.  While GC does collect the embryo's queue, it fails to drop the OOB
    skb's refcount.  The skb which was in embryo's receive queue stays as
    unix_sk(sk)->oob_skb and keeps the listener's refcount [1].
    
    Tell GC to dispose embryo's oob_skb.
    
    [0]:
    from array import array
    from socket import *
    
    addr = '\x00unix-oob'
    lis = socket(AF_UNIX, SOCK_STREAM)
    lis.bind(addr)
    lis.listen(1)
    
    s = socket(AF_UNIX, SOCK_STREAM)
    s.connect(addr)
    scm = (SOL_SOCKET, SCM_RIGHTS, array('i', [lis.fileno()]))
    s.sendmsg([b'x'], [scm], MSG_OOB)
    lis.close()
    
    [1]
    $ grep unix-oob /proc/net/unix
    $ ./unix-oob.py
    $ grep unix-oob /proc/net/unix
    0000000000000000: 00000002 00000000 00000000 0001 02     0 @unix-oob
    0000000000000000: 00000002 00000000 00010000 0001 01  6072 @unix-oob
    
    Fixes: 4090fa3 ("af_unix: Replace garbage collection algorithm.")
    Signed-off-by: Michal Luczaj <mhal@rbox.co>
    Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    mmhal authored and Paolo Abeni committed May 21, 2024
    Configuration menu
    Copy the full SHA
    041933a View commit details
    Browse the repository at this point in the history
  8. selftest: af_unix: Make SCM_RIGHTS into OOB data.

    scm_rights.c covers various test cases for inflight file descriptors
    and garbage collector for AF_UNIX sockets.
    
    Currently, SCM_RIGHTS messages are sent with 3-bytes string, and it's
    not good for MSG_OOB cases, as SCM_RIGTS cmsg goes with the first 2-bytes,
    which is non-OOB data.
    
    Let's send SCM_RIGHTS messages with 1-byte character to pack SCM_RIGHTS
    into OOB data.
    
    Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
    Signed-off-by: Michal Luczaj <mhal@rbox.co>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    q2ven authored and Paolo Abeni committed May 21, 2024
    Configuration menu
    Copy the full SHA
    e060e43 View commit details
    Browse the repository at this point in the history
  9. Merge branch 'af_unix-fix-gc-and-improve-selftest'

    Michal Luczaj says:
    
    ====================
    af_unix: Fix GC and improve selftest
    
    Series deals with AF_UNIX garbage collector mishandling some in-flight
    graph cycles. Embryos carrying OOB packets with SCM_RIGHTS cause issues.
    
    Patch 1/2 fixes the memory leak.
    Patch 2/2 tweaks the selftest for a better OOB coverage.
    
    v3:
      - Patch 1/2: correct the commit message (Kuniyuki)
    
    v2: https://lore.kernel.org/netdev/20240516145457.1206847-1-mhal@rbox.co/
      - Patch 1/2: remove WARN_ON_ONCE() (Kuniyuki)
      - Combine both patches into a series (Kuniyuki)
    
    v1: https://lore.kernel.org/netdev/20240516103049.1132040-1-mhal@rbox.co/
    ====================
    
    Link: https://lore.kernel.org/r/20240517093138.1436323-1-mhal@rbox.co
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Paolo Abeni committed May 21, 2024
    Configuration menu
    Copy the full SHA
    580acf6 View commit details
    Browse the repository at this point in the history
  10. openvswitch: Set the skbuff pkt_type for proper pmtud support.

    Open vSwitch is originally intended to switch at layer 2, only dealing with
    Ethernet frames.  With the introduction of l3 tunnels support, it crossed
    into the realm of needing to care a bit about some routing details when
    making forwarding decisions.  If an oversized packet would need to be
    fragmented during this forwarding decision, there is a chance for pmtu
    to get involved and generate a routing exception.  This is gated by the
    skbuff->pkt_type field.
    
    When a flow is already loaded into the openvswitch module this field is
    set up and transitioned properly as a packet moves from one port to
    another.  In the case that a packet execute is invoked after a flow is
    newly installed this field is not properly initialized.  This causes the
    pmtud mechanism to omit sending the required exception messages across
    the tunnel boundary and a second attempt needs to be made to make sure
    that the routing exception is properly setup.  To fix this, we set the
    outgoing packet's pkt_type to PACKET_OUTGOING, since it can only get
    to the openvswitch module via a port device or packet command.
    
    Even for bridge ports as users, the pkt_type needs to be reset when
    doing the transmit as the packet is truly outgoing and routing needs
    to get involved post packet transformations, in the case of
    VXLAN/GENEVE/udp-tunnel packets.  In general, the pkt_type on output
    gets ignored, since we go straight to the driver, but in the case of
    tunnel ports they go through IP routing layer.
    
    This issue is periodically encountered in complex setups, such as large
    openshift deployments, where multiple sets of tunnel traversal occurs.
    A way to recreate this is with the ovn-heater project that can setup
    a networking environment which mimics such large deployments.  We need
    larger environments for this because we need to ensure that flow
    misses occur.  In these environment, without this patch, we can see:
    
      ./ovn_cluster.sh start
      podman exec ovn-chassis-1 ip r a 170.168.0.5/32 dev eth1 mtu 1200
      podman exec ovn-chassis-1 ip netns exec sw01p1 ip r flush cache
      podman exec ovn-chassis-1 ip netns exec sw01p1 \
             ping 21.0.0.3 -M do -s 1300 -c2
      PING 21.0.0.3 (21.0.0.3) 1300(1328) bytes of data.
      From 21.0.0.3 icmp_seq=2 Frag needed and DF set (mtu = 1142)
    
      --- 21.0.0.3 ping statistics ---
      ...
    
    Using tcpdump, we can also see the expected ICMP FRAG_NEEDED message is not
    sent into the server.
    
    With this patch, setting the pkt_type, we see the following:
    
      podman exec ovn-chassis-1 ip netns exec sw01p1 \
             ping 21.0.0.3 -M do -s 1300 -c2
      PING 21.0.0.3 (21.0.0.3) 1300(1328) bytes of data.
      From 21.0.0.3 icmp_seq=1 Frag needed and DF set (mtu = 1222)
      ping: local error: message too long, mtu=1222
    
      --- 21.0.0.3 ping statistics ---
      ...
    
    In this case, the first ping request receives the FRAG_NEEDED message and
    a local routing exception is created.
    
    Tested-by: Jaime Caamano <jcaamano@redhat.com>
    Reported-at: https://issues.redhat.com/browse/FDP-164
    Fixes: 5826484 ("openvswitch: Add vxlan tunneling support.")
    Signed-off-by: Aaron Conole <aconole@redhat.com>
    Acked-by: Eelco Chaudron <echaudro@redhat.com>
    Link: https://lore.kernel.org/r/20240516200941.16152-1-aconole@redhat.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    apconole authored and Paolo Abeni committed May 21, 2024
    Configuration menu
    Copy the full SHA
    30a92c9 View commit details
    Browse the repository at this point in the history
  11. fs/pidfs: make 'lsof' happy with our inode changes

    pidfs started using much saner inodes in commit b28ddcc ("pidfs:
    convert to path_from_stashed() helper"), but that exposed the fact that
    lsof had some knowledge of just how odd our old anon_inode usage was.
    
    For example, legacy anon_inodes hadn't even initialized the inode type
    in the inode mode, so everything had a type of zero.
    
    So sane tools like 'stat' would report these files as "weird file", but
    'lsof' instead used that (together with the name of the link in proc) to
    notice that it's an anonymous inode, and used it to detect pidfd files.
    
    Let's keep our internal new sane inode model, but mask the file type
    bits at 'stat()' time in the getattr() function we already have, and by
    making the dentry name match what lsof expects too.
    
    This keeps our internal models sane, but should make user space see the
    same old odd behavior.
    
    Reported-by: Jiri Slaby <jirislaby@kernel.org>
    Link: https://lore.kernel.org/all/a15b1050-4b52-4740-a122-a4d055c17f11@kernel.org/
    Link: lsof-org/lsof#317
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Seth Forshee <sforshee@kernel.org>
    Cc: Tycho Andersen <tycho@tycho.pizza>
    Signed-off-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    db3d841 View commit details
    Browse the repository at this point in the history
  12. gpiolib: acpi: Move ACPI device NULL check to acpi_can_fallback_to_crs()

    Following the relocation of the function call outside of
    __acpi_find_gpio(), move the ACPI device NULL check to
    acpi_can_fallback_to_crs().
    
    Signed-off-by: Laura Nao <laura.nao@collabora.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Reported-by: kernelci.org bot <bot@kernelci.org>
    Closes: https://lore.kernel.org/all/20240426154208.81894-1-laura.nao@collabora.com/
    Fixes: 49c02f6 ("gpiolib: acpi: Move acpi_can_fallback_to_crs() out of __acpi_find_gpio()")
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    laura-nao authored and andy-shev committed May 21, 2024
    Configuration menu
    Copy the full SHA
    4bcc9bb View commit details
    Browse the repository at this point in the history
  13. Merge tag 'pull-set_blocksize' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/viro/vfs
    
    Pull vfs blocksize updates from Al Viro:
     "This gets rid of bogus set_blocksize() uses, switches it over
      to be based on a 'struct file *' and verifies that the caller
      has the device opened exclusively"
    
    * tag 'pull-set_blocksize' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
      make set_blocksize() fail unless block device is opened exclusive
      set_blocksize(): switch to passing struct file *
      btrfs_get_bdev_and_sb(): call set_blocksize() only for exclusive opens
      swsusp: don't bother with setting block size
      zram: don't bother with reopening - just use O_EXCL for open
      swapon(2): open swap with O_EXCL
      swapon(2)/swapoff(2): don't bother with block size
      pktcdvd: sort set_blocksize() calls out
      bcache_register(): don't bother with set_blocksize()
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    5ad8b6a View commit details
    Browse the repository at this point in the history
  14. gpiolib: acpi: Fix failed in acpi_gpiochip_find() by adding parent no…

    …de match
    
    Previous patch modified the standard used by acpi_gpiochip_find()
    to match device nodes. Using the device node set in gc->gpiodev->d-
    ev instead of gc->parent.
    
    However, there is a situation in gpio-dwapb where the GPIO device
    driver will set gc->fwnode for each port corresponding to a child
    node under a GPIO device, so gc->gpiodev->dev will be assigned the
    value of each child node in gpiochip_add_data().
    
    gpio-dwapb.c:
    128,31 static int dwapb_gpio_add_port(struct dwapb_gpio *gpio,
    			       struct dwapb_port_property *pp,
    			       unsigned int offs);
    port->gc.fwnode = pp->fwnode;
    
    693,39 static int dwapb_gpio_probe;
    err = dwapb_gpio_add_port(gpio, &pdata->properties[i], i);
    
    When other drivers request GPIO pin resources through the GPIO device
    node provided by ACPI (corresponding to the parent node), the change
    of the matching object to gc->gpiodev->dev in acpi_gpiochip_find()
    only allows finding the value of each port (child node), resulting
    in a failed request.
    
    Reapply the condition of using gc->parent for match in acpi_gpio-
    chip_find() in the code can compatible with the problem of gpio-dwapb,
    and will not affect the two cases mentioned in the patch:
    1. There is no setting for gc->fwnode.
    2. The case that depends on using gc->fwnode for match.
    
    Fixes: 5062e4c ("gpiolib: acpi: use the fwnode in acpi_gpiochip_find()")
    Fixes: 067dbc1 ("gpiolib: acpi: Don't use GPIO chip fwnode in acpi_gpiochip_find()")
    Signed-off-by: Devyn Liu <liudingyuan@huawei.com>
    Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
    Tested-by: Benjamin Tissoires <bentiss@kernel.org>
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Devyn Liu authored and andy-shev committed May 21, 2024
    Configuration menu
    Copy the full SHA
    adbc49a View commit details
    Browse the repository at this point in the history
  15. Merge tag 'pull-bd_inode-1' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/viro/vfs
    
    Pull bdev bd_inode updates from Al Viro:
     "Replacement of bdev->bd_inode with sane(r) set of primitives by me and
      Yu Kuai"
    
    * tag 'pull-bd_inode-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
      RIP ->bd_inode
      dasd_format(): killing the last remaining user of ->bd_inode
      nilfs_attach_log_writer(): use ->bd_mapping->host instead of ->bd_inode
      block/bdev.c: use the knowledge of inode/bdev coallocation
      gfs2: more obvious initializations of mapping->host
      fs/buffer.c: massage the remaining users of ->bd_inode to ->bd_mapping
      blk_ioctl_{discard,zeroout}(): we only want ->bd_inode->i_mapping here...
      grow_dev_folio(): we only want ->bd_inode->i_mapping there
      use ->bd_mapping instead of ->bd_inode->i_mapping
      block_device: add a pointer to struct address_space (page cache of bdev)
      missing helpers: bdev_unhash(), bdev_drop()
      block: move two helpers into bdev.c
      block2mtd: prevent direct access of bd_inode
      dm-vdo: use bdev_nr_bytes(bdev) instead of i_size_read(bdev->bd_inode)
      blkdev_write_iter(): saner way to get inode and bdev
      bcachefs: remove dead function bdev_sectors()
      ext4: remove block_device_ejected()
      erofs_buf: store address_space instead of inode
      erofs: switch erofs_bread() to passing offset instead of block number
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    38da32e View commit details
    Browse the repository at this point in the history
  16. Merge tag 'keys-trusted-next-6.10-rc1-part2' of git://git.kernel.org/…

    …pub/scm/linux/kernel/git/jarkko/linux-tpmdd
    
    Pull trusted keys fixes from Jarkko Sakkinen:
     "These are two bugs I found from trusted keys while working on a new
      RSA key type for TPM2. Both originate form v5.13.
    
      The memory leak is more crucial but I don't think it is either good
      idea if kernel throws WARN when ASN.1 parser fails, even if it is
      related to programming error, as it is not that mature code yet.
    
      There's at least two WARN's in that code but I picked just the one
      more likely to trigger. Planning to fix the other one too over time"
    
    * tag 'keys-trusted-next-6.10-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
      KEYS: trusted: Do not use WARN when encode fails
      KEYS: trusted: Fix memory leak in tpm2_key_encode()
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    fa8151c View commit details
    Browse the repository at this point in the history
  17. Merge tag 'pci-v6.10-changes' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/pci/pci
    
    Pull pci updates from Bjorn Helgaas:
     "Enumeration:
    
       - Skip E820 checks for MCFG ECAM regions for new (2016+) machines,
         since there's no requirement to describe them in E820 and some
         platforms require ECAM to work (Bjorn Helgaas)
    
       - Rename PCI_IRQ_LEGACY to PCI_IRQ_INTX to be more specific (Damien
         Le Moal)
    
       - Remove last user and pci_enable_device_io() (Heiner Kallweit)
    
       - Wait for Link Training==0 to avoid possible race (Ilpo Järvinen)
    
       - Skip waiting for devices that have been disconnected while
         suspended (Ilpo Järvinen)
    
       - Clear Secondary Status errors after enumeration since Master Aborts
         and Unsupported Request errors are an expected part of enumeration
         (Vidya Sagar)
    
      MSI:
    
       - Remove unused IMS (Interrupt Message Store) support (Bjorn Helgaas)
    
      Error handling:
    
       - Mask Genesys GL975x SD host controller Replay Timer Timeout
         correctable errors caused by a hardware defect; the errors cause
         interrupts that prevent system suspend (Kai-Heng Feng)
    
       - Fix EDR-related _DSM support, which previously evaluated revision 5
         but assumed revision 6 behavior (Kuppuswamy Sathyanarayanan)
    
      ASPM:
    
       - Simplify link state definitions and mask calculation (Ilpo
         Järvinen)
    
      Power management:
    
       - Avoid D3cold for HP Pavilion 17 PC/1972 PCIe Ports, where BIOS
         apparently doesn't know how to put them back in D0 (Mario
         Limonciello)
    
      CXL:
    
       - Support resetting CXL devices; special handling required because
         CXL Ports mask Secondary Bus Reset by default (Dave Jiang)
    
      DOE:
    
       - Support DOE Discovery Version 2 (Alexey Kardashevskiy)
    
      Endpoint framework:
    
       - Set endpoint BAR to be 64-bit if the driver says that's all the
         device supports, in addition to doing so if the size is >2GB
         (Niklas Cassel)
    
       - Simplify endpoint BAR allocation and setting interfaces (Niklas
         Cassel)
    
      Cadence PCIe controller driver:
    
       - Drop DT binding redundant msi-parent and pci-bus.yaml (Krzysztof
         Kozlowski)
    
      Cadence PCIe endpoint driver:
    
       - Configure endpoint BARs to be 64-bit based on the BAR type, not the
         BAR value (Niklas Cassel)
    
      Freescale Layerscape PCIe controller driver:
    
       - Convert DT binding to YAML (Frank Li)
    
      MediaTek MT7621 PCIe controller driver:
    
       - Add DT binding missing 'reg' property for child Root Ports
         (Krzysztof Kozlowski)
    
       - Fix theoretical string truncation in PHY name (Sergio Paracuellos)
    
      NVIDIA Tegra194 PCIe controller driver:
    
       - Return success for endpoint probe instead of falling through to the
         failure path (Vidya Sagar)
    
      Renesas R-Car PCIe controller driver:
    
       - Add DT binding missing IOMMU properties (Geert Uytterhoeven)
    
       - Add DT binding R-Car V4H compatible for host and endpoint mode
         (Yoshihiro Shimoda)
    
      Rockchip PCIe controller driver:
    
       - Configure endpoint BARs to be 64-bit based on the BAR type, not the
         BAR value (Niklas Cassel)
    
       - Add DT binding missing maxItems to ep-gpios (Krzysztof Kozlowski)
    
       - Set the Subsystem Vendor ID, which was previously zero because it
         was masked incorrectly (Rick Wertenbroek)
    
      Synopsys DesignWare PCIe controller driver:
    
       - Restructure DBI register access to accommodate devices where this
         requires Refclk to be active (Manivannan Sadhasivam)
    
       - Remove the deinit() callback, which was only need by the
         pcie-rcar-gen4, and do it directly in that driver (Manivannan
         Sadhasivam)
    
       - Add dw_pcie_ep_cleanup() so drivers that support PERST# can clean
         up things like eDMA (Manivannan Sadhasivam)
    
       - Rename dw_pcie_ep_exit() to dw_pcie_ep_deinit() to make it parallel
         to dw_pcie_ep_init() (Manivannan Sadhasivam)
    
       - Rename dw_pcie_ep_init_complete() to dw_pcie_ep_init_registers() to
         reflect the actual functionality (Manivannan Sadhasivam)
    
       - Call dw_pcie_ep_init_registers() directly from all the glue
         drivers, not just those that require active Refclk from the host
         (Manivannan Sadhasivam)
    
       - Remove the "core_init_notifier" flag, which was an obscure way for
         glue drivers to indicate that they depend on Refclk from the host
         (Manivannan Sadhasivam)
    
      TI J721E PCIe driver:
    
       - Add DT binding J784S4 SoC Device ID (Siddharth Vadapalli)
    
       - Add DT binding J722S SoC support (Siddharth Vadapalli)
    
      TI Keystone PCIe controller driver:
    
       - Add DT binding missing num-viewport, phys and phy-name properties
         (Jan Kiszka)
    
      Miscellaneous:
    
       - Constify and annotate with __ro_after_init (Heiner Kallweit)
    
       - Convert DT bindings to YAML (Krzysztof Kozlowski)
    
       - Check for kcalloc() failure in of_pci_prop_intr_map() (Duoming
         Zhou)"
    
    * tag 'pci-v6.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (97 commits)
      PCI: Do not wait for disconnected devices when resuming
      x86/pci: Skip early E820 check for ECAM region
      PCI: Remove unused pci_enable_device_io()
      ata: pata_cs5520: Remove unnecessary call to pci_enable_device_io()
      PCI: Update pci_find_capability() stub return types
      PCI: Remove PCI_IRQ_LEGACY
      scsi: vmw_pvscsi: Do not use PCI_IRQ_LEGACY instead of PCI_IRQ_LEGACY
      scsi: pmcraid: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY
      scsi: mpt3sas: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY
      scsi: megaraid_sas: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY
      scsi: ipr: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY
      scsi: hpsa: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY
      scsi: arcmsr: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY
      wifi: rtw89: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY
      dt-bindings: PCI: rockchip,rk3399-pcie: Add missing maxItems to ep-gpios
      Revert "genirq/msi: Provide constants for PCI/IMS support"
      Revert "x86/apic/msi: Enable PCI/IMS"
      Revert "iommu/vt-d: Enable PCI/IMS"
      Revert "iommu/amd: Enable PCI/IMS"
      Revert "PCI/MSI: Provide IMS (Interrupt Message Store) support"
      ...
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    f0bae24 View commit details
    Browse the repository at this point in the history
  18. Merge tag 'rpmsg-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/remoteproc/linux
    
    Pull rpmsg updates from Bjorn Andersson:
     "This makes core rpmsg_class const and ensures that the automatic
      module loading of the Qualcomm glink_ssr driver happens"
    
    * tag 'rpmsg-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
      rpmsg: qcom_glink_ssr: fix module autoloading
      rpmsg: core: Make rpmsg_class constant
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    e66128f View commit details
    Browse the repository at this point in the history
  19. Merge tag 'rproc-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/remoteproc/linux
    
    Pull remoteproc updates from Bjorn Andersson:
     "This makes the remoteproc core rproc_class const.
    
      DeviceTree bindings for a few different Qualcomm remoteprocs are
      updated to remove a range of validation warnings/errors. The Qualcomm
      SMD binding marks qcom,ipc deprecated, in favor or the mailbox
      interface.
    
      The TI K3 R5 remoteproc driver is updated to ensure that cores are
      powered up in the appropriate order. The driver also see a couple of
      fixes related to cleanups in error paths during probe.
    
      The Mediatek remoteproc driver is extended to support the MT8188 SCP
      core 1. Support for varying DRAM and IPI shared buffer sizes are
      introduced. This together with a couple of bug fixes and improvements
      to the driver.
    
      Support for the AMD-Xilinx Versal and Versal-NET platforms are added.
      Coredump support and support for parsing TCM information from
      DeviceTree is added to the Xilinx R5F remoteproc driver"
    
    * tag 'rproc-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (22 commits)
      dt-bindings: remoteproc: qcom,sdm845-adsp-pil: Fix qcom,halt-regs definition
      dt-bindings: remoteproc: qcom,sc7280-wpss-pil: Fix qcom,halt-regs definition
      dt-bindings: remoteproc: qcom,qcs404-cdsp-pil: Fix qcom,halt-regs definition
      dt-bindings: remoteproc: qcom,msm8996-mss-pil: allow glink-edge on msm8996
      dt-bindings: remoteproc: qcom,smd-edge: Mark qcom,ipc as deprecated
      remoteproc: k3-r5: Jump to error handling labels in start/stop errors
      remoteproc: mediatek: Fix error code in scp_rproc_init()
      remoteproc: k3-r5: Do not allow core1 to power up before core0 via sysfs
      remoteproc: k3-r5: Wait for core0 power-up before powering up core1
      remoteproc: mediatek: Add IMGSYS IPI command
      remoteproc: mediatek: Support setting DRAM and IPI shared buffer sizes
      remoteproc: mediatek: Support MT8188 SCP core 1
      dt-bindings: remoteproc: mediatek: Support MT8188 dual-core SCP
      drivers: remoteproc: xlnx: Fix uninitialized tcm mode
      drivers: remoteproc: xlnx: Fix uninitialized variable use
      drivers: remoteproc: xlnx: Add Versal and Versal-NET support
      remoteproc: zynqmp: parse TCM from device tree
      dt-bindings: remoteproc: Add Tightly Coupled Memory (TCM) bindings
      remoteproc: zynqmp: fix lockstep mode memory region
      remoteproc: zynqmp: Add coredump support
      ...
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    ab7b884 View commit details
    Browse the repository at this point in the history
  20. bpftool: Un-const bpf_func_info to fix it for llvm 17 and newer

    LLVM 17 started treating const structs as constants:
    
    * llvm/llvm-project@0b2d5b967d98
    
    Combined with pointer laundering via ptr_to_u64, which takes a const ptr,
    but in reality treats the underlying memory as mutable, this makes clang
    always pass zero to btf__type_by_id, which breaks full name resolution.
    
    Disassembly before (LLVM 16) and after (LLVM 17):
    
        -    8b 75 cc                 mov    -0x34(%rbp),%esi
        -    e8 47 8d 02 00           call   3f5b0 <btf__type_by_id>
        +    31 f6                    xor    %esi,%esi
        +    e8 a9 8c 02 00           call   3f510 <btf__type_by_id>
    
    It's a bigger project to fix this properly (and a question whether LLVM
    itself should detect this), but for right now let's just fix bpftool.
    
    For more information, see this thread in bpf mailing list:
    
    * https://lore.kernel.org/bpf/CABWYdi0ymezpYsQsPv7qzpx2fWuTkoD1-wG1eT-9x-TSREFrQg@mail.gmail.com/T/
    
    Fixes: b662000 ("bpftool: Adding support for BTF program names")
    Signed-off-by: Ivan Babrou <ivan@cloudflare.com>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Acked-by: Nick Desaulniers <ndesaulniers@google.com>
    Acked-by: Yonghong Song <yonghong.song@linux.dev>
    Link: https://lore.kernel.org/bpf/20240520225149.5517-1-ivan@cloudflare.com
    bobrik authored and anakryiko committed May 21, 2024
    Configuration menu
    Copy the full SHA
    f4aba34 View commit details
    Browse the repository at this point in the history
  21. Merge tag 'mailbox-v6.10' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/jassibrar/mailbox
    
    Pull mailbox updates from Jassi Brar:
    
     - redo the omap driver from legacy to mailbox api
    
     - enable bufferless IPI for zynqmp
    
     - add mhu-v3 driver
    
     - convert from tasklet to BH workqueue
    
     - add qcom MSM8974 APCS compatible IDs
    
    * tag 'mailbox-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox: (24 commits)
      dt-bindings: mailbox: qcom-ipcc: Document the SDX75 IPCC
      dt-bindings: mailbox: qcom: Add MSM8974 APCS compatible
      mailbox: Convert from tasklet to BH workqueue
      mailbox: mtk-cmdq: Fix pm_runtime_get_sync() warning in mbox shutdown
      mailbox: mtk-cmdq-mailbox: fix module autoloading
      mailbox: zynqmp: handle SGI for shared IPI
      mailbox: arm_mhuv3: Add driver
      dt-bindings: mailbox: arm,mhuv3: Add bindings
      mailbox: omap: Remove kernel FIFO message queuing
      mailbox: omap: Reverse FIFO busy check logic
      mailbox: omap: Remove mbox_chan_to_omap_mbox()
      mailbox: omap: Use mbox_controller channel list directly
      mailbox: omap: Use function local struct mbox_controller
      mailbox: omap: Merge mailbox child node setup loops
      mailbox: omap: Use devm_pm_runtime_enable() helper
      mailbox: omap: Remove device class
      mailbox: omap: Remove unneeded header omap-mailbox.h
      mailbox: omap: Move fifo size check to point of use
      mailbox: omap: Move omap_mbox_irq_t into driver
      mailbox: omap: Remove unused omap_mbox_request_channel() function
      ...
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    34dcc46 View commit details
    Browse the repository at this point in the history
  22. bpf: Remove unused variable "prev_state"

    The variable "prev_state" is not used for any actual operations
    
    v2: Fix commit message and description.
    
    Signed-off-by: Ying Zhang <yingzhang098@163.com>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Acked-by: Yonghong Song <yonghong.song@linux.dev>
    Link: https://lore.kernel.org/bpf/20240521161702.4339-1-yingzhang098@163.com
    Ying Zhang authored and anakryiko committed May 21, 2024
    Configuration menu
    Copy the full SHA
    1b0215a View commit details
    Browse the repository at this point in the history
  23. selftests/bpf: Fix prog numbers in test_sockmap

    bpf_prog5 and bpf_prog7 are removed from progs/test_sockmap_kern.h in
    commit d79a321 ("bpf: Selftests, remove prints from sockmap tests"),
    now there are only 9 progs in it, not 11:
    
    	SEC("sk_skb1")
    	int bpf_prog1(struct __sk_buff *skb)
    	SEC("sk_skb2")
    	int bpf_prog2(struct __sk_buff *skb)
    	SEC("sk_skb3")
    	int bpf_prog3(struct __sk_buff *skb)
    	SEC("sockops")
    	int bpf_sockmap(struct bpf_sock_ops *skops)
    	SEC("sk_msg1")
    	int bpf_prog4(struct sk_msg_md *msg)
    	SEC("sk_msg2")
    	int bpf_prog6(struct sk_msg_md *msg)
    	SEC("sk_msg3")
    	int bpf_prog8(struct sk_msg_md *msg)
    	SEC("sk_msg4")
    	int bpf_prog9(struct sk_msg_md *msg)
    	SEC("sk_msg5")
    	int bpf_prog10(struct sk_msg_md *msg)
    
    This patch updates the array sizes of prog_fd[], prog_attach_type[] and
    prog_type[] from 11 to 9 accordingly.
    
    Fixes: d79a321 ("bpf: Selftests, remove prints from sockmap tests")
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/9c10d9f974f07fcb354a43a8eca67acb2fafc587.1715926605.git.tanggeliang@kylinos.cn
    Geliang Tang authored and anakryiko committed May 21, 2024
    Configuration menu
    Copy the full SHA
    6c8d759 View commit details
    Browse the repository at this point in the history
  24. arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY

    When CONFIG_DEBUG_BUGVERBOSE=n, we fail to add necessary padding bytes
    to bug_table entries, and as a result the last entry in a bug table will
    be ignored, potentially leading to an unexpected panic(). All prior
    entries in the table will be handled correctly.
    
    The arm64 ABI requires that struct fields of up to 8 bytes are
    naturally-aligned, with padding added within a struct such that struct
    are suitably aligned within arrays.
    
    When CONFIG_DEBUG_BUGVERPOSE=y, the layout of a bug_entry is:
    
    	struct bug_entry {
    		signed int      bug_addr_disp;	// 4 bytes
    		signed int      file_disp;	// 4 bytes
    		unsigned short  line;		// 2 bytes
    		unsigned short  flags;		// 2 bytes
    	}
    
    ... with 12 bytes total, requiring 4-byte alignment.
    
    When CONFIG_DEBUG_BUGVERBOSE=n, the layout of a bug_entry is:
    
    	struct bug_entry {
    		signed int      bug_addr_disp;	// 4 bytes
    		unsigned short  flags;		// 2 bytes
    		< implicit padding >		// 2 bytes
    	}
    
    ... with 8 bytes total, with 6 bytes of data and 2 bytes of trailing
    padding, requiring 4-byte alginment.
    
    When we create a bug_entry in assembly, we align the start of the entry
    to 4 bytes, which implicitly handles padding for any prior entries.
    However, we do not align the end of the entry, and so when
    CONFIG_DEBUG_BUGVERBOSE=n, the final entry lacks the trailing padding
    bytes.
    
    For the main kernel image this is not a problem as find_bug() doesn't
    depend on the trailing padding bytes when searching for entries:
    
    	for (bug = __start___bug_table; bug < __stop___bug_table; ++bug)
    		if (bugaddr == bug_addr(bug))
    			return bug;
    
    However for modules, module_bug_finalize() depends on the trailing
    bytes when calculating the number of entries:
    
    	mod->num_bugs = sechdrs[i].sh_size / sizeof(struct bug_entry);
    
    ... and as the last bug_entry lacks the necessary padding bytes, this entry
    will not be counted, e.g. in the case of a single entry:
    
    	sechdrs[i].sh_size == 6
    	sizeof(struct bug_entry) == 8;
    
    	sechdrs[i].sh_size / sizeof(struct bug_entry) == 0;
    
    Consequently module_find_bug() will miss the last bug_entry when it does:
    
    	for (i = 0; i < mod->num_bugs; ++i, ++bug)
    		if (bugaddr == bug_addr(bug))
    			goto out;
    
    ... which can lead to a kenrel panic due to an unhandled bug.
    
    This can be demonstrated with the following module:
    
    	static int __init buginit(void)
    	{
    		WARN(1, "hello\n");
    		return 0;
    	}
    
    	static void __exit bugexit(void)
    	{
    	}
    
    	module_init(buginit);
    	module_exit(bugexit);
    	MODULE_LICENSE("GPL");
    
    ... which will trigger a kernel panic when loaded:
    
    	------------[ cut here ]------------
    	hello
    	Unexpected kernel BRK exception at EL1
    	Internal error: BRK handler: 00000000f2000800 [#1] PREEMPT SMP
    	Modules linked in: hello(O+)
    	CPU: 0 PID: 50 Comm: insmod Tainted: G           O       6.9.1 #8
    	Hardware name: linux,dummy-virt (DT)
    	pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    	pc : buginit+0x18/0x1000 [hello]
    	lr : buginit+0x18/0x1000 [hello]
    	sp : ffff800080533ae0
    	x29: ffff800080533ae0 x28: 0000000000000000 x27: 0000000000000000
    	x26: ffffaba8c4e70510 x25: ffff800080533c30 x24: ffffaba8c4a28a58
    	x23: 0000000000000000 x22: 0000000000000000 x21: ffff3947c0eab3c0
    	x20: ffffaba8c4e3f000 x19: ffffaba846464000 x18: 0000000000000006
    	x17: 0000000000000000 x16: ffffaba8c2492834 x15: 0720072007200720
    	x14: 0720072007200720 x13: ffffaba8c49b27c8 x12: 0000000000000312
    	x11: 0000000000000106 x10: ffffaba8c4a0a7c8 x9 : ffffaba8c49b27c8
    	x8 : 00000000ffffefff x7 : ffffaba8c4a0a7c8 x6 : 80000000fffff000
    	x5 : 0000000000000107 x4 : 0000000000000000 x3 : 0000000000000000
    	x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff3947c0eab3c0
    	Call trace:
    	 buginit+0x18/0x1000 [hello]
    	 do_one_initcall+0x80/0x1c8
    	 do_init_module+0x60/0x218
    	 load_module+0x1ba4/0x1d70
    	 __do_sys_init_module+0x198/0x1d0
    	 __arm64_sys_init_module+0x1c/0x28
    	 invoke_syscall+0x48/0x114
    	 el0_svc_common.constprop.0+0x40/0xe0
    	 do_el0_svc+0x1c/0x28
    	 el0_svc+0x34/0xd8
    	 el0t_64_sync_handler+0x120/0x12c
    	 el0t_64_sync+0x190/0x194
    	Code: d0ffffe0 910003fd 91000000 9400000b (d4210000)
    	---[ end trace 0000000000000000 ]---
    	Kernel panic - not syncing: BRK handler: Fatal exception
    
    Fix this by always aligning the end of a bug_entry to 4 bytes, which is
    correct regardless of CONFIG_DEBUG_BUGVERBOSE.
    
    Fixes: 9fb7410 ("arm64/BUG: Use BRK instruction for generic BUG traps")
    
    Signed-off-by: Yuanbin Xie <xieyuanbin1@huawei.com>
    Signed-off-by: Jiangfeng Xiao <xiaojiangfeng@huawei.com>
    Reviewed-by: Mark Rutland <mark.rutland@arm.com>
    Link: https://lore.kernel.org/r/1716212077-43826-1-git-send-email-xiaojiangfeng@huawei.com
    Signed-off-by: Will Deacon <will@kernel.org>
    xiaojiangfeng authored and willdeacon committed May 21, 2024
    Configuration menu
    Copy the full SHA
    ffbf4fb View commit details
    Browse the repository at this point in the history
  25. Merge tag 'dmaengine-6.10-rc1' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/vkoul/dmaengine
    
    Pull dmaengine updates from Vinod Koul:
     "New HW support:
       - Freescale i.MX8ULP edma support in edma driver
       - StarFive JH8100 DMA support in Synopsis axi-dmac driver
    
      Updates:
       - Tracing support for freescale edma driver, updates to dpaa2 driver
       - Remove unused QCom hidma DT support
       - Support for i2c dma in imx-sdma
       - Maintainers update for idxd and edma drivers"
    
    * tag 'dmaengine-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (42 commits)
      MAINTAINERS: Update role for IDXD driver
      dmaengine: fsl-edma: use _Generic to handle difference type
      dmaengine: fsl-edma: add trace event support
      dmaengine: idxd: Avoid unnecessary destruction of file_ida
      dmaengine: xilinx: xdma: fix module autoloading
      dt-bindings: dma: fsl-edma: allow 'power-domains' property
      dt-bindings: dma: fsl-edma: remove 'clocks' from required
      dmaengine: fsl-dpaa2-qdma: Fix kernel-doc check warning
      dmaengine: imx-sdma: Add i2c dma support
      dmaengine: imx-sdma: utilize compiler to calculate ADDRS_ARRAY_SIZE_V<n>
      dt-bindings: fsl-imx-sdma: Add I2C peripheral types ID
      dt-bindings: fsl-dma: fsl-edma: clean up unused "fsl,imx8qm-adma" compatible string
      dmaengine: fsl-edma: clean up unused "fsl,imx8qm-adma" compatible string
      dt-bindings: dma: Drop unused QCom hidma binding
      dmaengine: qcom: Drop hidma DT support
      dmaengine: pl08x: Use kcalloc() instead of kzalloc()
      dmaengine: fsl-dpaa2-qdma: Update DPDMAI interfaces to version 3
      dmaengine: fsl-edma: fix miss mutex unlock at an error return path
      dmaengine: pch_dma: remove unused function chan2parent
      dmaengine: fsl-dpaa2-qdma: Add dpdmai_cmd_open
      ...
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    d4e034b View commit details
    Browse the repository at this point in the history
  26. Merge tag 'phy-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/phy/linux-phy
    
    Pull generic phy updates from Vinod Koul:
     "New HW Support:
       - Support for Embedded DisplayPort and DisplayPort submodes and
         driver support on Qualcomm X1E80100 edp driver
       - Qualcomm QMP UFS PHY for SM8475, QMP USB phy for QDU1000/QRU1000
         and eusb2-repeater for SMB2360
       - Samsung HDMI PHY for i.MX8MP, gs101 UFS phy
       - Mediatek XFI T-PHY support for mt7988
       - Rockchip usbdp combo phy driver
    
      Updates:
       - Qualcomm x4 lane EP support for sa8775p, v4 ad v6 support for
         X1E80100, SM8650 tables for UFS Gear 4 & 5 and correct voltage
         swing tables
       - Freescale imx8m-pci pcie link-up updates
       - Rockchip rx-common-refclk-mode support
       - More platform remove callback returning void conversions"
    
    * tag 'phy-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (43 commits)
      dt-bindings: phy: qcom,usb-snps-femto-v2: use correct fallback for sc8180x
      dt-bindings: phy: qcom,sc8280xp-qmp-ufs-phy: fix msm899[68] power-domains
      dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: fix x1e80100-gen3x2 schema
      phy: qcpm-qmp-usb: Add support for QDU1000/QRU1000
      dt-bindings: phy: qcom,qmp-usb: Add QDU1000 USB3 PHY
      dt-bindings: phy: qcom,usb-snps-femto-v2: Add bindings for QDU1000
      phy: qcom-qmp-pcie: add x4 lane EP support for sa8775p
      phy: samsung-ufs: ufs: exit on first reported error
      phy: samsung-ufs: ufs: remove superfluous mfd/syscon.h header
      phy: rockchip: fix CONFIG_TYPEC dependency
      phy: rockchip: usbdp: fix uninitialized variable
      phy: rockchip-snps-pcie3: add support for rockchip,rx-common-refclk-mode
      dt-bindings: phy: rockchip,pcie3-phy: add rockchip,rx-common-refclk-mode
      phy: rockchip: add usbdp combo phy driver
      dt-bindings: phy: add rockchip usbdp combo phy document
      phy: add driver for MediaTek XFI T-PHY
      dt-bindings: phy: mediatek,mt7988-xfi-tphy: add new bindings
      phy: freescale: fsl-samsung-hdmi: Convert to platform remove callback returning void
      phy: qcom: qmp-ufs: update SM8650 tables for Gear 4 & 5
      MAINTAINERS: Add phy-gs101-ufs file to Tensor GS101.
      ...
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    8053d2f View commit details
    Browse the repository at this point in the history
  27. Merge tag 'soundwire-6.10-rc1' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/vkoul/soundwire
    
    Pull soundwire updates from Vinod Koul:
    
     - cleanup and conversion for soundwire sysfs groups
    
     - intel support for ace2x bits, auxdevice pm improvements
    
     - qcom multi link device support
    
    * tag 'soundwire-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (33 commits)
      soundwire: intel_ace2.x: add support for DOAISE property
      soundwire: intel_ace2.x: add support for DODSE property
      soundwire: intel_ace2x: use DOAIS and DODS settings from firmware
      soundwire: intel_ace2x: cleanup DOAIS/DODS settings
      soundwire: intel_ace2x: simplify check_wake()
      soundwire: intel_ace2x: fix wakeup handling
      soundwire: intel_init: resume all devices on exit.
      soundwire: intel: export intel_resume_child_device
      soundwire: intel_auxdevice: use pm_runtime_resume() instead of pm_request_resume()
      ASoC: SOF: Intel: hda: disable SoundWire interrupt later
      soundwire: qcom: allow multi-link on newer devices
      soundwire: intel_ace2x: use legacy formula for intel_alh_id
      soundwire: reconcile dp0_prop and dpn_prop
      soundwire: intel_ace2x: set the clock source
      soundwire: intel_ace2.x: power-up first before setting SYNCPRD
      soundwire: intel_ace2x: move and extend clock selection
      soundwire: intel: add support for MeteorLake additional clocks
      soundwire: intel: add more values for SYNCPRD
      soundwire: bus: extend base clock checks to 96 MHz
      soundwire: cadence: show the bus frequency and frame shape
      ...
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    b9dd56e View commit details
    Browse the repository at this point in the history
  28. Merge tag 'intel-gpio-v6.10-2' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/andy/linux-gpio-intel
    
    Pull intel-gpio fixes from Andy Shevchenko:
    
     - NULL pointer dereference fix in GPIO APCI library
    
     - Restore ACPI handle matching for GPIO devices represented in banks
    
    * tag 'intel-gpio-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel:
      gpiolib: acpi: Fix failed in acpi_gpiochip_find() by adding parent node match
      gpiolib: acpi: Move ACPI device NULL check to acpi_can_fallback_to_crs()
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    3b14403 View commit details
    Browse the repository at this point in the history
  29. Merge tag 'thermal-6.10-rc1-2' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/rafael/linux-pm
    
    Pull thermal control fixes from Rafael Wysocki:
     "These fix the MediaTek lvts_thermal driver and the handling of trip
      points that start as invalid and are adjusted later by user space via
      sysfs.
    
      Specifics:
    
       - Fix and clean up the MediaTek lvts_thermal driver (Julien Panis)
    
       - Prevent invalid trip point handling from triggering spurious trip
         point crossing events and allow passive polling to stop when a
         passive trip point involved in it becomes invalid (Rafael Wysocki)"
    
    * tag 'thermal-6.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
      thermal: core: Fix the handling of invalid trip points
      thermal/drivers/mediatek/lvts_thermal: Fix wrong lvts_ctrl index
      thermal/drivers/mediatek/lvts_thermal: Remove unused members from struct lvts_ctrl_data
      thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    5b5a5ad View commit details
    Browse the repository at this point in the history
  30. Merge tag 'acpi-6.10-rc1-2' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/rafael/linux-pm
    
    Pull ACPI fixes from Rafael Wysocki:
     "These make the ACPI EC driver always install the EC address space
      handler at the root of the ACPI namespace which causes it to take care
      of all EC operation regions everywhere.
    
      This means that the custom EC address space handler in the WMI driver
      is not needed any more and accordingly it gets removed altogether"
    
    * tag 'acpi-6.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
      platform/x86: wmi: Remove custom EC address space handler
      ACPI: EC: Install address space handler at the namespace root
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    62a1281 View commit details
    Browse the repository at this point in the history
  31. Merge tag 'pm-6.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/rafael/linux-pm
    
    Pull power management fixes from Rafael Wysocki:
     "These fix the amd-pstate driver and the operating performance point
      (OPP) handling related to generic PM domains.
    
      Specifics:
    
       - Fix a memory leak in the exit path of amd-pstate (Peng Ma)
    
       - Fix required_opp_tables handling in the cases when multiple generic
         PM domains share one OPP table (Viresh Kumar)"
    
    * tag 'pm-6.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
      OPP: Fix required_opp_tables for multiple genpds using same table
      cpufreq: amd-pstate: fix memory leak on CPU EPP exit
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    98f312b View commit details
    Browse the repository at this point in the history
  32. Merge tag 'for-6.10/dm-fixes' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/device-mapper/linux-dm
    
    Pull device mapper fixes from Mike Snitzer:
    
     - Fix DM discard regressions due to DM core switching over to using
       queue_limits_set() without DM core and targets first being updated to
       set (and stack) discard limits in terms of max_hw_discard_sectors and
       not max_discard_sectors
    
     - Fix stable@ DM integrity discard support to set device's
       discard_granularity limit to the device's logical block size
    
    * tag 'for-6.10/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
      dm: always manage discard support in terms of max_hw_discard_sectors
      dm-integrity: set discard_granularity to logical block size
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    8567263 View commit details
    Browse the repository at this point in the history
  33. Merge tag 'efi-fixes-for-v6.10-1' of git://git.kernel.org/pub/scm/lin…

    …ux/kernel/git/efi/efi
    
    Pull EFI fix from Ard Biesheuvel:
    
     - Followup fix for the EFI boot sequence refactor, which may result in
       physical KASLR putting the kernel in a region which is being used for
       a special purpose via a command line argument.
    
    * tag 'efi-fixes-for-v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
      x86/efistub: Omit physical KASLR when memory reservations exist
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    5499315 View commit details
    Browse the repository at this point in the history
  34. Merge tag 'm68knommu-for-v6.10' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/gerg/m68knommu
    
    Pull m68knommu update from Greg Ungerer:
    
     . remove use of kernel config option from uapi header
    
    * tag 'm68knommu-for-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
      m68k: Avoid CONFIG_COLDFIRE switch in uapi header
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    334e563 View commit details
    Browse the repository at this point in the history
  35. Merge tag 's390-6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/s390/linux
    
    Pull more s390 updates from Alexander Gordeev:
    
     - Switch read and write software bits for PUDs
    
     - Add missing hardware bits for PUDs and PMDs
    
     - Generate unwind information for C modules to fix GDB unwind error for
       vDSO functions
    
     - Create .build-id links for unstripped vDSO files to enable vDSO
       debugging with symbols
    
     - Use standard stack frame layout for vDSO generated stack frames to
       manually walk stack frames without DWARF information
    
     - Rework perf_callchain_user() and arch_stack_walk_user() functions to
       reduce code duplication
    
     - Skip first stack frame when walking user stack
    
     - Add basic checks to identify invalid instruction pointers when
       walking stack frames
    
     - Introduce and use struct stack_frame_vdso_wrapper within vDSO user
       wrapper code to automatically generate an asm-offset define. Also use
       STACK_FRAME_USER_OVERHEAD instead of STACK_FRAME_OVERHEAD to document
       that the code works with user space stack
    
     - Clear the backchain of the extra stack frame added by the vDSO user
       wrapper code. This allows the user stack walker to detect and skip
       the non-standard stack frame. Without this an incorrect instruction
       pointer would be added to stack traces.
    
     - Rewrite psw_idle() function in C to ease maintenance and further
       enhancements
    
     - Remove get_vtimer() function and use get_cpu_timer() instead
    
     - Mark psw variable in __load_psw_mask() as __unitialized to avoid
       superfluous clearing of PSW
    
     - Remove obsolete and superfluous comment about removed TIF_FPU flag
    
     - Replace memzero_explicit() and kfree() with kfree_sensitive() to fix
       warnings reported by Coccinelle
    
     - Wipe sensitive data and all copies of protected- or secure-keys from
       stack when an IOCTL fails
    
     - Both do_airq_interrupt() and do_io_interrupt() functions set
       CIF_NOHZ_DELAY flag. Move it in do_io_irq() to simplify the code
    
     - Provide iucv_alloc_device() and iucv_release_device() helpers, which
       can be used to deduplicate more or less identical IUCV device
       allocation and release code in four different drivers
    
     - Make use of iucv_alloc_device() and iucv_release_device() helpers to
       get rid of quite some code and also remove a cast to an incompatible
       function (clang W=1)
    
     - There is no user of iucv_root outside of the core IUCV code left.
       Therefore remove the EXPORT_SYMBOL
    
     - __apply_alternatives() contains a runtime check which verifies that
       the size of the to be patched code area is even. Convert this to a
       compile time check
    
     - Increase size of buffers for sending z/VM CP DIAGNOSE X'008' commands
       from 128 to 240
    
     - Do not accept z/VM CP DIAGNOSE X'008' commands longer than maximally
       allowed
    
     - Use correct defines IPL_BP_NVME_LEN and IPL_BP0_NVME_LEN instead of
       IPL_BP_FCP_LEN and IPL_BP0_FCP_LEN ones to initialize NVMe reIPL
       block on 'scp_data' sysfs attribute update
    
     - Initialize the correct fields of the NVMe dump block, which were
       confused with FCP fields
    
     - Refactor macros for 'scp_data' (re-)IPL sysfs attribute to reduce
       code duplication
    
     - Introduce 'scp_data' sysfs attribute for dump IPL to allow tools such
       as dumpconf passing additional kernel command line parameters to a
       stand-alone dumper
    
     - Rework the CPACF query functions to use the correct RRE or RRF
       instruction formats and set instruction register fields correctly
    
     - Instead of calling BUG() at runtime force a link error during compile
       when a unsupported opcode is used with __cpacf_query() or
       __cpacf_check_opcode() functions
    
     - Fix a crash in ap_parse_bitmap_str() function on /sys/bus/ap/apmask
       or /sys/bus/ap/aqmask sysfs file update with a relative mask value
    
     - Fix "bindings complete" udev event which should be sent once all AP
       devices have been bound to device drivers and again when unbind/bind
       actions take place and all AP devices are bound again
    
     - Facility list alt_stfle_fac_list is nowhere used in the decompressor,
       therefore remove it there
    
     - Remove custom kprobes insn slot allocator in favour of the standard
       module_alloc() one, since kernel image and module areas are located
       within 4GB
    
     - Use kvcalloc() instead of kvmalloc_array() in zcrypt driver to avoid
       calling memset() with a large byte count and get rid of the sparse
       warning as result
    
    * tag 's390-6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (39 commits)
      s390/zcrypt: Use kvcalloc() instead of kvmalloc_array()
      s390/kprobes: Remove custom insn slot allocator
      s390/boot: Remove alt_stfle_fac_list from decompressor
      s390/ap: Fix bind complete udev event sent after each AP bus scan
      s390/ap: Fix crash in AP internal function modify_bitmap()
      s390/cpacf: Make use of invalid opcode produce a link error
      s390/cpacf: Split and rework cpacf query functions
      s390/ipl: Introduce sysfs attribute 'scp_data' for dump ipl
      s390/ipl: Introduce macros for (re)ipl sysfs attribute 'scp_data'
      s390/ipl: Fix incorrect initialization of nvme dump block
      s390/ipl: Fix incorrect initialization of len fields in nvme reipl block
      s390/ipl: Do not accept z/VM CP diag X'008' cmds longer than max length
      s390/ipl: Fix size of vmcmd buffers for sending z/VM CP diag X'008' cmds
      s390/alternatives: Convert runtime sanity check into compile time check
      s390/iucv: Unexport iucv_root
      tty: hvc-iucv: Make use of iucv_alloc_device()
      s390/smsgiucv_app: Make use of iucv_alloc_device()
      s390/netiucv: Make use of iucv_alloc_device()
      s390/vmlogrdr: Make use of iucv_alloc_device()
      s390/iucv: Provide iucv_alloc_device() / iucv_release_device()
      ...
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    2a8120d View commit details
    Browse the repository at this point in the history
  36. Merge tag 'pull-bd_flags-2' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/viro/vfs
    
    Pull bdev flags update from Al Viro:
     "Compactifying bdev flags.
    
      We can easily have up to 24 flags with sane atomicity, _without_
      pushing anything out of the first cacheline of struct block_device"
    
    * tag 'pull-bd_flags-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
      bdev: move ->bd_make_it_fail to ->__bd_flags
      bdev: move ->bd_ro_warned to ->__bd_flags
      bdev: move ->bd_has_subit_bio to ->__bd_flags
      bdev: move ->bd_write_holder into ->__bd_flags
      bdev: move ->bd_read_only to ->__bd_flags
      bdev: infrastructure for flags
      wrapper for access to ->bd_partno
      Use bdev_is_paritition() instead of open-coding it
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    3413efa View commit details
    Browse the repository at this point in the history
  37. Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/gi…

    …t/viro/vfs
    
    Pull misc vfs updates from Al Viro:
     "Assorted commits that had missed the last merge window..."
    
    * tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
      remove call_{read,write}_iter() functions
      do_dentry_open(): kill inode argument
      kernel_file_open(): get rid of inode argument
      get_file_rcu(): no need to check for NULL separately
      fd_is_open(): move to fs/file.c
      close_on_exec(): pass files_struct instead of fdtable
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    b6394d6 View commit details
    Browse the repository at this point in the history
  38. Merge tag 'bitmap-for-6.10v2' of https://github.com/norov/linux

    Pull bitmap updates from Yury Norov:
    
     - topology_span_sane() optimization from Kyle Meyer
    
     - fns() rework from Kuan-Wei Chiu (used in cpumask_local_spread() and
       other places)
    
     - headers cleanup from Andy
    
     - add a MAINTAINERS record for bitops API
    
    * tag 'bitmap-for-6.10v2' of https://github.com/norov/linux:
      usercopy: Don't use "proxy" headers
      bitops: Move aligned_byte_mask() to wordpart.h
      MAINTAINERS: add BITOPS API record
      bitmap: relax find_nth_bit() limitation on return value
      lib: make test_bitops compilable into the kernel image
      bitops: Optimize fns() for improved performance
      lib/test_bitops: Add benchmark test for fns()
      Compiler Attributes: Add __always_used macro
      sched/topology: Optimize topology_span_sane()
      cpumask: Add for_each_cpu_from()
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    4865a27 View commit details
    Browse the repository at this point in the history
  39. Merge tag 'perf-tools-for-v6.10-1-2024-05-21' of git://git.kernel.org…

    …/pub/scm/linux/kernel/git/perf/perf-tools
    
    Pull perf tools updates from Arnaldo Carvalho de Melo:
     "General:
    
       - Integrate the shellcheck utility with the build of perf to allow
         catching shell problems early in areas such as 'perf test', 'perf
         trace' scrape scripts, etc
    
       - Add 'uretprobe' variant in the 'perf bench uprobe' tool
    
       - Add script to run instances of 'perf script' in parallel
    
       - Allow parsing tracepoint names that start with digits, such as
         9p/9p_client_req, etc. Make sure 'perf test' tests it even on
         systems where those tracepoints aren't available
    
       - Add Kan Liang to MAINTAINERS as a perf tools reviewer
    
       - Add support for using the 'capstone' disassembler library in
         various tools, such as 'perf script' and 'perf annotate'. This is
         an alternative for the use of the 'xed' and 'objdump' disassemblers
    
      Data-type profiling improvements:
    
       - Resolve types for a->b->c by backtracking the assignments until it
         finds DWARF info for one of those members
    
       - Support for global variables, keeping a cache to speed up lookups
    
       - Handle the 'call' instruction, dealing with effects on registers
         and handling its return when tracking register data types
    
       - Handle x86's segment based addressing like %gs:0x28, to support
         things like per CPU variables, the stack canary, etc
    
       - Data-type profiling got big speedups when using capstone for
         disassembling. The objdump outoput parsing method is left as a
         fallback when capstone fails or isn't available. There are patches
         posted for 6.11 that to use a LLVM disassembler
    
       - Support event group display in the TUI when annotating types with
         --data-type, for instance to show memory load and store events for
         the data type fields
    
       - Optimize the 'perf annotate' data structures, reducing memory usage
    
       - Add a initial 'perf test' for 'perf annotate', checking that a
         target symbol appears on the output, specifying objdump via the
         command line, etc
    
      Vendor Events:
    
       - Update Intel JSON files for Cascade Lake X, Emerald Rapids, Grand
         Ridge, Ice Lake X, Lunar Lake, Meteor Lake, Sapphire Rapids, Sierra
         Forest, Sky Lake X, Sky Lake and Snow Ridge X. Remove info metrics
         erroneously in TopdownL1
    
       - Add AMD's Zen 5 core and uncore events and metrics. Those come from
         the "Performance Monitor Counters for AMD Family 1Ah Model 00h- 0Fh
         Processors" document, with events that capture information on op
         dispatch, execution and retirement, branch prediction, L1 and L2
         cache activity, TLB activity, etc
    
       - Mark L1D_CACHE_INVAL impacted by errata for ARM64's AmpereOne/
         AmpereOneX
    
      Miscellaneous:
    
       - Sync header copies with the kernel sources
    
       - Move some header copies used only for generating translation string
         tables for ioctl cmds and other syscall integer arguments to a new
         directory under tools/perf/beauty/, to separate from copies in
         tools/include/ that are used to build the tools
    
       - Introduce scrape script for several syscall 'flags'/'mask'
         arguments
    
       - Improve cpumap utilization, fixing up pairing of refcounts, using
         the right iterators (perf_cpu_map__for_each_cpu), etc
    
       - Give more details about raw event encodings in 'perf list', show
         tracepoint encoding in the detailed output
    
       - Refactor the DSOs handling code, reducing memory usage
    
       - Document the BPF event modifier and add a 'perf test' for it
    
       - Improve the event parser, better error messages and add further
         'perf test's for it
    
       - Add reference count checking to 'struct comm_str' and 'struct
         mem_info'
    
       - Make ARM64's 'perf test' entries for the Neoverse N1 more robust
    
       - Tweak the ARM64's Coresight 'perf test's
    
       - Improve ARM64's CoreSight ETM version detection and error reporting
    
       - Fix handling of symbols when using kcore
    
       - Fix PAI (Processor Activity Instrumentation) counter names for s390
         virtual machines in 'perf report'
    
       - Fix -g/--call-graph option failure in 'perf sched timehist'
    
       - Add LIBTRACEEVENT_DIR build option to allow building with
         libtraceevent installed in non-standard directories, such as when
         doing cross builds
    
       - Various 'perf test' and 'perf bench' fixes
    
       - Improve 'perf probe' error message for long C++ probe names"
    
    * tag 'perf-tools-for-v6.10-1-2024-05-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (260 commits)
      tools lib subcmd: Show parent options in help
      perf pmu: Count sys and cpuid JSON events separately
      perf stat: Don't display metric header for non-leader uncore events
      perf annotate-data: Ensure the number of type histograms
      perf annotate: Fix segfault on sample histogram
      perf daemon: Fix file leak in daemon_session__control
      libsubcmd: Fix parse-options memory leak
      perf lock: Avoid memory leaks from strdup()
      perf sched: Rename 'switches' column header to 'count' and add usage description, options for latency
      perf tools: Ignore deleted cgroups
      perf parse: Allow tracepoint names to start with digits
      perf parse-events: Add new 'fake_tp' parameter for tests
      perf parse-events: pass parse_state to add_tracepoint
      perf symbols: Fix ownership of string in dso__load_vmlinux()
      perf symbols: Update kcore map before merging in remaining symbols
      perf maps: Re-use __maps__free_maps_by_name()
      perf symbols: Remove map from list before updating addresses
      perf tracepoint: Don't scan all tracepoints to test if one exists
      perf dwarf-aux: Fix build with HAVE_DWARF_CFI_SUPPORT
      perf thread: Fixes to thread__new() related to initializing comm
      ...
    torvalds committed May 21, 2024
    Configuration menu
    Copy the full SHA
    29c73fc View commit details
    Browse the repository at this point in the history
  40. ring-buffer: Correct stale comments related to non-consuming readers

    Adjust the following code documentation:
    
    * Kernel-doc comments for ring_buffer_read_prepare() and
      ring_buffer_read_finish() mention that recording to the ring buffer is
      disabled when the read is active. Remove mention of this restriction
      because it was already lifted in commit 1039221 ("ring-buffer: Do
      not disable recording when there is an iterator").
    
    * Function ring_buffer_read_finish() performs a self-check of the
      ring-buffer by locking cpu_buffer->reader_lock and then calling
      rb_check_pages(). The preceding comment explains that the lock is
      needed because rb_check_pages() clears the HEAD flag required by
      readers which might be running in parallel. Remove this explanation
      because commit 8843e06 ("ring-buffer: Handle race between
      rb_move_tail and rb_check_pages") simplified the function so it no
      longer resets the mentioned flag. Nonetheless, the lock is still
      needed because a reader swapping a page into the ring buffer can make
      the underlying doubly-linked list temporarily inconsistent.
    
    This is a non-functional change.
    
    Link: https://lore.kernel.org/linux-trace-kernel/20240517134008.24529-2-petr.pavlu@suse.com
    
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    petrpavlu authored and rostedt committed May 21, 2024
    Configuration menu
    Copy the full SHA
    ea70a96 View commit details
    Browse the repository at this point in the history
  41. ring-buffer: Fix a race between readers and resize checks

    The reader code in rb_get_reader_page() swaps a new reader page into the
    ring buffer by doing cmpxchg on old->list.prev->next to point it to the
    new page. Following that, if the operation is successful,
    old->list.next->prev gets updated too. This means the underlying
    doubly-linked list is temporarily inconsistent, page->prev->next or
    page->next->prev might not be equal back to page for some page in the
    ring buffer.
    
    The resize operation in ring_buffer_resize() can be invoked in parallel.
    It calls rb_check_pages() which can detect the described inconsistency
    and stop further tracing:
    
    [  190.271762] ------------[ cut here ]------------
    [  190.271771] WARNING: CPU: 1 PID: 6186 at kernel/trace/ring_buffer.c:1467 rb_check_pages.isra.0+0x6a/0xa0
    [  190.271789] Modules linked in: [...]
    [  190.271991] Unloaded tainted modules: intel_uncore_frequency(E):1 skx_edac(E):1
    [  190.272002] CPU: 1 PID: 6186 Comm: cmd.sh Kdump: loaded Tainted: G            E      6.9.0-rc6-default #5 158d3e1e6d0b091c34c3b96bfd99a1c58306d79f
    [  190.272011] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552c-rebuilt.opensuse.org 04/01/2014
    [  190.272015] RIP: 0010:rb_check_pages.isra.0+0x6a/0xa0
    [  190.272023] Code: [...]
    [  190.272028] RSP: 0018:ffff9c37463abb70 EFLAGS: 00010206
    [  190.272034] RAX: ffff8eba04b6cb80 RBX: 0000000000000007 RCX: ffff8eba01f13d80
    [  190.272038] RDX: ffff8eba01f130c0 RSI: ffff8eba04b6cd00 RDI: ffff8eba0004c700
    [  190.272042] RBP: ffff8eba0004c700 R08: 0000000000010002 R09: 0000000000000000
    [  190.272045] R10: 00000000ffff7f52 R11: ffff8eba7f600000 R12: ffff8eba0004c720
    [  190.272049] R13: ffff8eba00223a00 R14: 0000000000000008 R15: ffff8eba067a8000
    [  190.272053] FS:  00007f1bd64752c0(0000) GS:ffff8eba7f680000(0000) knlGS:0000000000000000
    [  190.272057] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  190.272061] CR2: 00007f1bd6662590 CR3: 000000010291e001 CR4: 0000000000370ef0
    [  190.272070] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [  190.272073] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [  190.272077] Call Trace:
    [  190.272098]  <TASK>
    [  190.272189]  ring_buffer_resize+0x2ab/0x460
    [  190.272199]  __tracing_resize_ring_buffer.part.0+0x23/0xa0
    [  190.272206]  tracing_resize_ring_buffer+0x65/0x90
    [  190.272216]  tracing_entries_write+0x74/0xc0
    [  190.272225]  vfs_write+0xf5/0x420
    [  190.272248]  ksys_write+0x67/0xe0
    [  190.272256]  do_syscall_64+0x82/0x170
    [  190.272363]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
    [  190.272373] RIP: 0033:0x7f1bd657d263
    [  190.272381] Code: [...]
    [  190.272385] RSP: 002b:00007ffe72b643f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
    [  190.272391] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f1bd657d263
    [  190.272395] RDX: 0000000000000002 RSI: 0000555a6eb538e0 RDI: 0000000000000001
    [  190.272398] RBP: 0000555a6eb538e0 R08: 000000000000000a R09: 0000000000000000
    [  190.272401] R10: 0000555a6eb55190 R11: 0000000000000246 R12: 00007f1bd6662500
    [  190.272404] R13: 0000000000000002 R14: 00007f1bd6667c00 R15: 0000000000000002
    [  190.272412]  </TASK>
    [  190.272414] ---[ end trace 0000000000000000 ]---
    
    Note that ring_buffer_resize() calls rb_check_pages() only if the parent
    trace_buffer has recording disabled. Recent commit d78ab79
    ("tracing: Stop current tracer when resizing buffer") causes that it is
    now always the case which makes it more likely to experience this issue.
    
    The window to hit this race is nonetheless very small. To help
    reproducing it, one can add a delay loop in rb_get_reader_page():
    
     ret = rb_head_page_replace(reader, cpu_buffer->reader_page);
     if (!ret)
     	goto spin;
     for (unsigned i = 0; i < 1U << 26; i++)  /* inserted delay loop */
     	__asm__ __volatile__ ("" : : : "memory");
     rb_list_head(reader->list.next)->prev = &cpu_buffer->reader_page->list;
    
    .. and then run the following commands on the target system:
    
     echo 1 > /sys/kernel/tracing/events/sched/sched_switch/enable
     while true; do
     	echo 16 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1
     	echo 8 > /sys/kernel/tracing/buffer_size_kb; sleep 0.1
     done &
     while true; do
     	for i in /sys/kernel/tracing/per_cpu/*; do
     		timeout 0.1 cat $i/trace_pipe; sleep 0.2
     	done
     done
    
    To fix the problem, make sure ring_buffer_resize() doesn't invoke
    rb_check_pages() concurrently with a reader operating on the same
    ring_buffer_per_cpu by taking its cpu_buffer->reader_lock.
    
    Link: https://lore.kernel.org/linux-trace-kernel/20240517134008.24529-3-petr.pavlu@suse.com
    
    Cc: stable@vger.kernel.org
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Fixes: 659f451 ("ring-buffer: Add integrity check at end of iter read")
    Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
    [ Fixed whitespace ]
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    petrpavlu authored and rostedt committed May 21, 2024
    Configuration menu
    Copy the full SHA
    c2274b9 View commit details
    Browse the repository at this point in the history
  42. tracing: Add MODULE_DESCRIPTION() to preemptirq_delay_test

    Fix the 'make W=1' warning:
    
    WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/trace/preemptirq_delay_test.o
    
    Link: https://lore.kernel.org/linux-trace-kernel/20240518-md-preemptirq_delay_test-v1-1-387d11b30d85@quicinc.com
    
    Cc: stable@vger.kernel.org
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Fixes: f96e857 ("lib: Add module for testing preemptoff/irqsoff latency tracers")
    Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
    Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Jeff Johnson authored and rostedt committed May 21, 2024
    Configuration menu
    Copy the full SHA
    23748e3 View commit details
    Browse the repository at this point in the history
  43. rv: Update rv_en(dis)able_monitor doc to match kernel-doc

    The patch updates the function documentation comment for
    rv_en(dis)able_monitor to adhere to the kernel-doc specification.
    
    Link: https://lore.kernel.org/linux-trace-kernel/20240520054239.61784-1-yang.lee@linux.alibaba.com
    
    Fixes: 102227b ("rv: Add Runtime Verification (RV) interface")
    Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Yang Li authored and rostedt committed May 21, 2024
    Configuration menu
    Copy the full SHA
    1e8b7b3 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. net: lan966x: Remove ptp traps in case the ptp is not enabled.

    Lan966x is adding ptp traps to redirect the ptp frames to the CPU such
    that the HW will not forward these frames anywhere. The issue is that in
    case ptp is not enabled and the timestamping source is et to
    HWTSTAMP_SOURCE_NETDEV then these traps would not be removed on the
    error path.
    Fix this by removing the traps in this case as they are not needed.
    
    Fixes: 54e1ed6 ("net: lan966x: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set()")
    Suggested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
    Link: https://lore.kernel.org/r/20240517135808.3025435-1-horatiu.vultur@microchip.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    HoratiuVultur authored and Paolo Abeni committed May 22, 2024
    Configuration menu
    Copy the full SHA
    eda40be View commit details
    Browse the repository at this point in the history
  2. net: mana: Fix the extra HZ in mana_hwc_send_request

    Commit 62c1bff added an extra HZ along with msecs_to_jiffies.
    This patch fixes that.
    
    Cc: stable@vger.kernel.org
    Fixes: 62c1bff ("net: mana: Configure hwc timeout from hardware")
    Signed-off-by: Souradeep Chakrabarti <schakrabarti@linux.microsoft.com>
    Reviewed-by: Brett Creeley <brett.creeley@amd.com>
    Reviewed-by: Dexuan Cui <decui@microsoft.com>
    Link: https://lore.kernel.org/r/1716185104-31658-1-git-send-email-schakrabarti@linux.microsoft.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Souradeep Chakrabarti authored and Paolo Abeni committed May 22, 2024
    Configuration menu
    Copy the full SHA
    9c91c7f View commit details
    Browse the repository at this point in the history
  3. Reapply "arm64: fpsimd: Implement lazy restore for kernel mode FPSIMD"

    This reverts commit b8995a1.
    
    Ard managed to reproduce the dm-crypt corruption problem and got to the
    bottom of it, so re-apply the problematic patch in preparation for
    fixing things properly.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Will Deacon <will@kernel.org>
    willdeacon committed May 22, 2024
    Configuration menu
    Copy the full SHA
    f481bb3 View commit details
    Browse the repository at this point in the history
  4. arm64/fpsimd: Avoid erroneous elide of user state reload

    TIF_FOREIGN_FPSTATE is a 'convenience' flag that should reflect whether
    the current CPU holds the most recent user mode FP/SIMD state of the
    current task. It combines two conditions:
    - whether the current CPU's FP/SIMD state belongs to the task;
    - whether that state is the most recent associated with the task (as a
      task may have executed on other CPUs as well).
    
    When a task is scheduled in and TIF_KERNEL_FPSTATE is set, it means the
    task was in a kernel mode NEON section when it was scheduled out, and so
    the kernel mode FP/SIMD state is restored. Since this implies that the
    current CPU is *not* holding the most recent user mode FP/SIMD state of
    the current task, the TIF_FOREIGN_FPSTATE flag is set too, so that the
    user mode FP/SIMD state is reloaded from memory when returning to
    userland.
    
    However, the task may be scheduled out after completing the kernel mode
    NEON section, but before returning to userland. When this happens, the
    TIF_FOREIGN_FPSTATE flag will not be preserved, but will be set as usual
    the next time the task is scheduled in, and will be based on the above
    conditions.
    
    This means that, rather than setting TIF_FOREIGN_FPSTATE when scheduling
    in a task with TIF_KERNEL_FPSTATE set, the underlying state should be
    updated so that TIF_FOREIGN_FPSTATE will assume the expected value as a
    result.
    
    So instead, call fpsimd_flush_cpu_state(), which takes care of this.
    
    Closes: https://lore.kernel.org/all/cb8822182231850108fa43e0446a4c7f@kernel.org
    Reported-by: Johannes Nixdorf <mixi@shadowice.org>
    Fixes: aefbab8 ("arm64: fpsimd: Preserve/restore kernel mode NEON at context switch")
    Cc: Mark Brown <broonie@kernel.org>
    Cc: Dave Martin <Dave.Martin@arm.com>
    Cc: Janne Grunau <j@jannau.net>
    Cc: stable@vger.kernel.org
    Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
    Tested-by: Janne Grunau <j@jannau.net>
    Tested-by: Johannes Nixdorf <mixi@shadowice.org>
    Reviewed-by: Mark Brown <broonie@kernel.org>
    Link: https://lore.kernel.org/r/20240522091335.335346-2-ardb+git@google.com
    Signed-off-by: Will Deacon <will@kernel.org>
    ardbiesheuvel authored and willdeacon committed May 22, 2024
    Configuration menu
    Copy the full SHA
    e92bee9 View commit details
    Browse the repository at this point in the history
  5. vp_vdpa: Fix return value check vp_vdpa_request_irq

    In the vp_vdpa_set_status function, when setting the device status to
    VIRTIO_CONFIG_S_DRIVER_OK, the vp_vdpa_request_irq function may fail.
    In such cases, the device status should not be set to DRIVER_OK. Add
    exception printing to remind the user.
    
    Signed-off-by: Yuxue Liu <yuxue.liu@jaguarmicro.com>
    Message-Id: <20240325105448.235-1-gavin.liu@jaguarmicro.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Yuxue Liu authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    f181a37 View commit details
    Browse the repository at this point in the history
  6. vdpa: Convert sprintf/snprintf to sysfs_emit

    Per filesystems/sysfs.rst, show() should only use sysfs_emit()
    or sysfs_emit_at() when formatting the value to be returned to user space.
    
    coccinelle complains that there are still a couple of functions that use
    snprintf(). Convert them to sysfs_emit().
    
    sprintf() will be converted as weel if they have.
    
    Generally, this patch is generated by
    make coccicheck M=<path/to/file> MODE=patch \
    COCCI=scripts/coccinelle/api/device_attr_show.cocci
    
    No functional change intended
    
    CC: "Michael S. Tsirkin" <mst@redhat.com>
    CC: Jason Wang <jasowang@redhat.com>
    CC: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
    CC: virtualization@lists.linux.dev
    Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
    Message-Id: <20240314095853.1326111-1-lizhijian@fujitsu.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    zhijianli88 authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    7b1b5c7 View commit details
    Browse the repository at this point in the history
  7. vhost-scsi: Handle vhost_vq_work_queue failures for events

    Currently, we can try to queue an event's work before the vhost_task is
    created. When this happens we just drop it in vhost_scsi_do_plug before
    even calling vhost_vq_work_queue. During a device shutdown we do the
    same thing after vhost_scsi_clear_endpoint has cleared the backends.
    
    In the next patches we will be able to kill the vhost_task before we
    have cleared the endpoint. In that case, vhost_vq_work_queue can fail
    and we will leak the event's memory. This has handle the failure by
    just freeing the event. This is safe to do, because
    vhost_vq_work_queue will only return failure for us when the vhost_task
    is killed and so userspace will not be able to handle events if we
    sent them.
    
    Signed-off-by: Mike Christie <michael.christie@oracle.com>
    Message-Id: <20240316004707.45557-2-michael.christie@oracle.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    mikechristie authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    b1b2ce5 View commit details
    Browse the repository at this point in the history
  8. vhost-scsi: Handle vhost_vq_work_queue failures for cmds

    In the next patches we will support the vhost_task being killed while in
    use. The problem for vhost-scsi is that we can't free some structs until
    we get responses for commands we have submitted to the target layer and
    we currently process the responses from the vhost_task.
    
    This has just drop the responses and free the command's resources. When
    all commands have completed then operations like flush will be woken up
    and we can complete device release and endpoint cleanup.
    
    Signed-off-by: Mike Christie <michael.christie@oracle.com>
    Message-Id: <20240316004707.45557-3-michael.christie@oracle.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    mikechristie authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    1ecedde View commit details
    Browse the repository at this point in the history
  9. vhost-scsi: Use system wq to flush dev for TMFs

    We flush all the workers that are not also used by the ctl vq to make
    sure that responses queued by LIO before the TMF response are sent
    before the TMF response. This requires a special vhost_vq_flush
    function which, in the next patches where we handle SIGKILL killing
    workers while in use, will require extra locking/complexity. To avoid
    that, this patch has us flush the entire device from the system work
    queue, then queue up sending the response from there.
    
    This is a little less optimal since we now flush all workers but this
    will be ok since commands have already timed out and perf is not a
    concern.
    
    Signed-off-by: Mike Christie <michael.christie@oracle.com>
    Message-Id: <20240316004707.45557-4-michael.christie@oracle.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    mikechristie authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    59b701b View commit details
    Browse the repository at this point in the history
  10. vhost: Remove vhost_vq_flush

    vhost_vq_flush is no longer used so remove it.
    
    Signed-off-by: Mike Christie <michael.christie@oracle.com>
    Message-Id: <20240316004707.45557-5-michael.christie@oracle.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    mikechristie authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    d9e59ee View commit details
    Browse the repository at this point in the history
  11. vhost_scsi: Handle vhost_vq_work_queue failures for TMFs

    vhost_vq_work_queue will never fail when queueing the TMF's response
    handling because a guest can only send us TMFs when the device is fully
    setup so there is always a worker at that time. In the next patches we
    will modify the worker code so it handles SIGKILL by exiting before
    outstanding commands/TMFs have sent their responses. In that case
    vhost_vq_work_queue can fail when we try to send a response.
    
    This has us just free the TMF's resources since at this time the guest
    won't be able to get a response even if we could send it.
    
    Signed-off-by: Mike Christie <michael.christie@oracle.com>
    Message-Id: <20240316004707.45557-6-michael.christie@oracle.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    mikechristie authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    0352c96 View commit details
    Browse the repository at this point in the history
  12. vhost: Use virtqueue mutex for swapping worker

    __vhost_vq_attach_worker uses the vhost_dev mutex to serialize the
    swapping of a virtqueue's worker. This was done for simplicity because
    we are already holding that mutex.
    
    In the next patches where the worker can be killed while in use, we need
    finer grained locking because some drivers will hold the vhost_dev mutex
    while flushing. However in the SIGKILL handler in the next patches, we
    will need to be able to swap workers (set current one to NULL), kill
    queued works and stop new flushes while flushes are in progress.
    
    To prepare us, this has us use the virtqueue mutex for swapping workers
    instead of the vhost_dev one.
    
    Signed-off-by: Mike Christie <michael.christie@oracle.com>
    Message-Id: <20240316004707.45557-7-michael.christie@oracle.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    mikechristie authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    34cf9ba View commit details
    Browse the repository at this point in the history
  13. vhost: Release worker mutex during flushes

    In the next patches where the worker can be killed while in use, we
    need to be able to take the worker mutex and kill queued works for
    new IO and flushes, and set some new flags to prevent new
    __vhost_vq_attach_worker calls from swapping in/out killed workers.
    
    If we are holding the worker mutex during a flush and the flush's work
    is still in the queue, the worker code that will handle the SIGKILL
    cleanup won't be able to take the mutex and perform it's cleanup. So
    this patch has us drop the worker mutex while waiting for the flush
    to complete.
    
    Signed-off-by: Mike Christie <michael.christie@oracle.com>
    Message-Id: <20240316004707.45557-8-michael.christie@oracle.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    mikechristie authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    ba704ff View commit details
    Browse the repository at this point in the history
  14. vhost_task: Handle SIGKILL by flushing work and exiting

    Instead of lingering until the device is closed, this has us handle
    SIGKILL by:
    
    1. marking the worker as killed so we no longer try to use it with
       new virtqueues and new flush operations.
    2. setting the virtqueue to worker mapping so no new works are queued.
    3. running all the exiting works.
    
    Suggested-by: Edward Adam Davis <eadavis@qq.com>
    Reported-and-tested-by: syzbot+98edc2df894917b3431f@syzkaller.appspotmail.com
    Message-Id: <tencent_546DA49414E876EEBECF2C78D26D242EE50A@qq.com>
    Signed-off-by: Mike Christie <michael.christie@oracle.com>
    Message-Id: <20240316004707.45557-9-michael.christie@oracle.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    mikechristie authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    db5247d View commit details
    Browse the repository at this point in the history
  15. kernel: Remove signal hacks for vhost_tasks

    This removes the signal/coredump hacks added for vhost_tasks in:
    
    Commit f9010db ("fork, vhost: Use CLONE_THREAD to fix freezer/ps regression")
    
    When that patch was added vhost_tasks did not handle SIGKILL and would
    try to ignore/clear the signal and continue on until the device's close
    function was called. In the previous patches vhost_tasks and the vhost
    drivers were converted to support SIGKILL by cleaning themselves up and
    exiting. The hacks are no longer needed so this removes them.
    
    Signed-off-by: Mike Christie <michael.christie@oracle.com>
    Message-Id: <20240316004707.45557-10-michael.christie@oracle.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    mikechristie authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    240a185 View commit details
    Browse the repository at this point in the history
  16. virtio-mem: support suspend+resume

    With virtio-mem, primarily hibernation is problematic: as the machine shuts
    down, the virtio-mem device loses its state. Powering the machine back up
    is like losing a bunch of DIMMs. While there would be ways to add limited
    support, suspend+resume is more commonly used for VMs and "easier" to
    support cleanly.
    
    s2idle can be supported without any device dependencies. Similarly, one
    would expect suspend-to-ram (i.e., S3) to work out of the box. However,
    QEMU currently unplugs all device memory when resuming the VM, using a
    cold reset on the "wakeup" path. In order to support S3, we need a feature
    flag for the device to tell us if memory remains plugged when waking up. In
    the future, QEMU will implement this feature.
    
    So let's always support s2idle and support S3 with plugged memory only if
    the device indicates support. Block hibernation early using the PM
    notifier.
    
    Trying to hibernate now fails early:
    	# echo disk > /sys/power/state
    	[   26.455369] PM: hibernation: hibernation entry
    	[   26.458271] virtio_mem virtio0: hibernation is not supported.
    	[   26.462498] PM: hibernation: hibernation exit
    	-bash: echo: write error: Operation not permitted
    
    s2idle works even without the new feature bit:
    	# echo s2idle > /sys/power/mem_sleep
    	# echo mem > /sys/power/state
    	[   52.083725] PM: suspend entry (s2idle)
    	[   52.095950] Filesystems sync: 0.010 seconds
    	[   52.101493] Freezing user space processes
    	[   52.104213] Freezing user space processes completed (elapsed 0.001 seconds)
    	[   52.106520] OOM killer disabled.
    	[   52.107655] Freezing remaining freezable tasks
    	[   52.110880] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
    	[   52.113296] printk: Suspending console(s) (use no_console_suspend to debug)
    
    S3 does not work without the feature bit when memory is plugged:
    	# echo deep > /sys/power/mem_sleep
    	# echo mem > /sys/power/state
    	[   32.788281] PM: suspend entry (deep)
    	[   32.816630] Filesystems sync: 0.027 seconds
    	[   32.820029] Freezing user space processes
    	[   32.823870] Freezing user space processes completed (elapsed 0.001 seconds)
    	[   32.827756] OOM killer disabled.
    	[   32.829608] Freezing remaining freezable tasks
    	[   32.833842] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
    	[   32.837953] printk: Suspending console(s) (use no_console_suspend to debug)
    	[   32.916172] virtio_mem virtio0: suspend+resume with plugged memory is not supported
    	[   32.916181] virtio-pci 0000:00:02.0: PM: pci_pm_suspend(): virtio_pci_freeze+0x0/0x50 returns -1
    	[   32.916197] virtio-pci 0000:00:02.0: PM: dpm_run_callback(): pci_pm_suspend+0x0/0x170 returns -1
    	[   32.916210] virtio-pci 0000:00:02.0: PM: failed to suspend async: error -1
    
    But S3 works with the new feature bit when memory is plugged (patched
    QEMU):
    	# echo deep > /sys/power/mem_sleep
    	# echo mem > /sys/power/state
    	[   33.983694] PM: suspend entry (deep)
    	[   34.009828] Filesystems sync: 0.024 seconds
    	[   34.013589] Freezing user space processes
    	[   34.016722] Freezing user space processes completed (elapsed 0.001 seconds)
    	[   34.019092] OOM killer disabled.
    	[   34.020291] Freezing remaining freezable tasks
    	[   34.023549] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
    	[   34.026090] printk: Suspending console(s) (use no_console_suspend to debug)
    
    Cc: "Michael S. Tsirkin" <mst@redhat.com>
    Cc: Jason Wang <jasowang@redhat.com>
    Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
    Signed-off-by: David Hildenbrand <david@redhat.com>
    Message-Id: <20240318120645.105664-1-david@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    davidhildenbrand authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    e4544c5 View commit details
    Browse the repository at this point in the history
  17. virtio_balloon: Give the balloon its own wakeup source

    Wakeup sources don't support nesting multiple events, so sharing a
    single object between multiple drivers can result in one driver
    overriding the wakeup event processing period specified by another
    driver. Have the virtio balloon driver use the wakeup source of the
    device it is bound to rather than the wakeup source of the parent
    device, to avoid conflicts with the transport layer.
    
    Note that although the virtio balloon's virtio_device itself isn't what
    actually wakes up the device, it is responsible for processing wakeup
    events. In the same way that EPOLLWAKEUP uses a dedicated wakeup_source
    to prevent suspend when userspace is processing wakeup events, a
    dedicated wakeup_source is necessary when processing wakeup events in a
    higher layer in the kernel.
    
    Fixes: b12fbc3 ("virtio_balloon: stay awake while adjusting balloon")
    Signed-off-by: David Stevens <stevensd@chromium.org>
    Acked-by: David Hildenbrand <david@redhat.com>
    Message-Id: <20240321012445.1593685-2-stevensd@google.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    David Stevens authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    810d831 View commit details
    Browse the repository at this point in the history
  18. virtio_balloon: Treat stats requests as wakeup events

    Treat stats requests as wakeup events to ensure that the driver responds
    to device requests in a timely manner.
    
    Signed-off-by: David Stevens <stevensd@chromium.org>
    Acked-by: David Hildenbrand <david@redhat.com>
    Message-Id: <20240321012445.1593685-3-stevensd@google.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    David Stevens authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    c578123 View commit details
    Browse the repository at this point in the history
  19. virtio: balloon: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-2-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    7cc5d6c View commit details
    Browse the repository at this point in the history
  20. virtio: input: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-3-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    ebfb92a View commit details
    Browse the repository at this point in the history
  21. virtio: mem: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-4-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    b0e55a9 View commit details
    Browse the repository at this point in the history
  22. um: virt-pci: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Acked-by: Johannes Berg <johannes@sipsolutions.net>
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Message-Id: <20240331-module-owner-virtio-v2-5-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    9731be4 View commit details
    Browse the repository at this point in the history
  23. virtio_blk: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-6-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    bdb8e2f View commit details
    Browse the repository at this point in the history
  24. bluetooth: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-7-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    1e0d03b View commit details
    Browse the repository at this point in the history
  25. hwrng: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-8-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    6098bb3 View commit details
    Browse the repository at this point in the history
  26. virtio_console: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-9-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    a610e31 View commit details
    Browse the repository at this point in the history
  27. crypto: virtio - drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-10-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    9e00c14 View commit details
    Browse the repository at this point in the history
  28. firmware: arm_scmi: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-11-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Acked-by: Sudeep Holla <sudeep.holla@arm.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    cfffb29 View commit details
    Browse the repository at this point in the history
  29. gpio: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Message-Id: <20240331-module-owner-virtio-v2-12-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Acked-by: Linus Walleij <linus.walleij@linaro.org>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    2ce0b26 View commit details
    Browse the repository at this point in the history
  30. drm/virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-13-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    41dca82 View commit details
    Browse the repository at this point in the history
  31. iommu: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-14-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    ac5990d View commit details
    Browse the repository at this point in the history
  32. misc: nsm: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-15-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Alexander Graf <graf@amazon.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    7249ad5 View commit details
    Browse the repository at this point in the history
  33. net: caif: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-16-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    606f1f9 View commit details
    Browse the repository at this point in the history
  34. net: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-17-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    9a03bfa View commit details
    Browse the repository at this point in the history
  35. net: 9p: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-18-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    d26dd25 View commit details
    Browse the repository at this point in the history
  36. vsock/virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Acked-by: Stefano Garzarella <sgarzare@redhat.com>
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Message-Id: <20240331-module-owner-virtio-v2-19-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    b1c16d4 View commit details
    Browse the repository at this point in the history
  37. wifi: mac80211_hwsim: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-20-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    19680c7 View commit details
    Browse the repository at this point in the history
  38. nvdimm: virtio_pmem: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Acked-by: Dave Jiang <dave.jiang@intel.com>
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Message-Id: <20240331-module-owner-virtio-v2-21-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com
    Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    9dceed1 View commit details
    Browse the repository at this point in the history
  39. rpmsg: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Message-Id: <20240331-module-owner-virtio-v2-22-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    f42c740 View commit details
    Browse the repository at this point in the history
  40. scsi: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-23-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    e1e4d37 View commit details
    Browse the repository at this point in the history
  41. fuse: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-24-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    bc21020 View commit details
    Browse the repository at this point in the history
  42. sound: virtio: drop owner assignment

    virtio core already sets the .owner, so driver does not need to.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    
    Message-Id: <20240331-module-owner-virtio-v2-25-98f04bfaf46a@linaro.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Acked-by: Anton Yakovlev <anton.yakovlev@opensynergy.com>
    krzk authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    1fa74f2 View commit details
    Browse the repository at this point in the history
  43. vp_vdpa: don't allocate unused msix vectors

    When there is a ctlq and it doesn't require interrupt
    callbacks,the original method of calculating vectors
    wastes hardware msi or msix resources as well as system
    IRQ resources.
    
    When conducting performance testing using testpmd in the
    guest os, it was found that the performance was lower compared
    to directly using vfio-pci to passthrough the device
    
    In scenarios where the virtio device in the guest os does
    not utilize interrupts, the vdpa driver still configures
    the hardware's msix vector. Therefore, the hardware still
    sends interrupts to the host os. Because of this unnecessary
    action by the hardware, hardware performance decreases, and
    it also affects the performance of the host os.
    
    Before modification:(interrupt mode)
     32:  0   0  0  0 PCI-MSI 32768-edge    vp-vdpa[0000:00:02.0]-0
     33:  0   0  0  0 PCI-MSI 32769-edge    vp-vdpa[0000:00:02.0]-1
     34:  0   0  0  0 PCI-MSI 32770-edge    vp-vdpa[0000:00:02.0]-2
     35:  0   0  0  0 PCI-MSI 32771-edge    vp-vdpa[0000:00:02.0]-config
    
    After modification:(interrupt mode)
     32:  0  0  1  7   PCI-MSI 32768-edge  vp-vdpa[0000:00:02.0]-0
     33: 36  0  3  0   PCI-MSI 32769-edge  vp-vdpa[0000:00:02.0]-1
     34:  0  0  0  0   PCI-MSI 32770-edge  vp-vdpa[0000:00:02.0]-config
    
    Before modification:(virtio pmd mode for guest os)
     32:  0   0  0  0 PCI-MSI 32768-edge    vp-vdpa[0000:00:02.0]-0
     33:  0   0  0  0 PCI-MSI 32769-edge    vp-vdpa[0000:00:02.0]-1
     34:  0   0  0  0 PCI-MSI 32770-edge    vp-vdpa[0000:00:02.0]-2
     35:  0   0  0  0 PCI-MSI 32771-edge    vp-vdpa[0000:00:02.0]-config
    
    After modification:(virtio pmd mode for guest os)
     32: 0  0  0   0   PCI-MSI 32768-edge   vp-vdpa[0000:00:02.0]-config
    
    To verify the use of the virtio PMD mode in the guest operating
    system, the following patch needs to be applied to QEMU:
    https://lore.kernel.org/all/20240408073311.2049-1-yuxue.liu@jaguarmicro.com
    
    Signed-off-by: Yuxue Liu <yuxue.liu@jaguarmicro.com>
    Acked-by: Jason Wang <jasowang@redhat.com>
    Reviewed-by: Heng Qi <hengqi@linux.alibaba.com>
    Message-Id: <20240410033020.1310-1-yuxue.liu@jaguarmicro.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Yuxue Liu authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    4d68562 View commit details
    Browse the repository at this point in the history
  44. vhost-vdpa: Remove usage of the deprecated ida_simple_xx() API

    ida_alloc() and ida_free() should be preferred to the deprecated
    ida_simple_get() and ida_simple_remove().
    
    Note that the upper limit of ida_simple_get() is exclusive, but the one of
    ida_alloc_max() is inclusive. So a -1 has been added when needed.
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Message-Id: <67c2edf49788c27d5f7a49fc701520b9fcf739b5.1713088999.git.christophe.jaillet@wanadoo.fr>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Acked-by: Jason Wang <jasowang@redhat.com>
    tititiou36 authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    f452001 View commit details
    Browse the repository at this point in the history
  45. MAINTAINERS: add Eugenio Pérez as reviewer

    Add myself as a reviewer of some VirtIO areas I'm interested.
    
    Until this point I've been scanning manually the list looking for
    series that touches this area.  Adding myself to make this task easier.
    
    Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
    Message-Id: <20240213182450.106796-1-eperezma@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    eugpermar authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    10e49da View commit details
    Browse the repository at this point in the history
  46. virtio: delete vq in vp_find_vqs_msix() when request_irq() fails

    When request_irq() fails, error path calls vp_del_vqs(). There, as vq is
    present in the list, free_irq() is called for the same vector. That
    causes following splat:
    
    [    0.414355] Trying to free already-free IRQ 27
    [    0.414403] WARNING: CPU: 1 PID: 1 at kernel/irq/manage.c:1899 free_irq+0x1a1/0x2d0
    [    0.414510] Modules linked in:
    [    0.414540] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.9.0-rc4+ #27
    [    0.414540] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-1.fc39 04/01/2014
    [    0.414540] RIP: 0010:free_irq+0x1a1/0x2d0
    [    0.414540] Code: 1e 00 48 83 c4 08 48 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc 90 8b 74 24 04 48 c7 c7 98 80 6c b1 e8 00 c9 f7 ff 90 <0f> 0b 90 90 48 89 ee 4c 89 ef e8 e0 20 b8 00 49 8b 47 40 48 8b 40
    [    0.414540] RSP: 0000:ffffb71480013ae0 EFLAGS: 00010086
    [    0.414540] RAX: 0000000000000000 RBX: ffffa099c2722000 RCX: 0000000000000000
    [    0.414540] RDX: 0000000000000000 RSI: ffffb71480013998 RDI: 0000000000000001
    [    0.414540] RBP: 0000000000000246 R08: 00000000ffffdfff R09: 0000000000000001
    [    0.414540] R10: 00000000ffffdfff R11: ffffffffb18729c0 R12: ffffa099c1c91760
    [    0.414540] R13: ffffa099c1c916a4 R14: ffffa099c1d2f200 R15: ffffa099c1c91600
    [    0.414540] FS:  0000000000000000(0000) GS:ffffa099fec40000(0000) knlGS:0000000000000000
    [    0.414540] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [    0.414540] CR2: 0000000000000000 CR3: 0000000008e3e001 CR4: 0000000000370ef0
    [    0.414540] Call Trace:
    [    0.414540]  <TASK>
    [    0.414540]  ? __warn+0x80/0x120
    [    0.414540]  ? free_irq+0x1a1/0x2d0
    [    0.414540]  ? report_bug+0x164/0x190
    [    0.414540]  ? handle_bug+0x3b/0x70
    [    0.414540]  ? exc_invalid_op+0x17/0x70
    [    0.414540]  ? asm_exc_invalid_op+0x1a/0x20
    [    0.414540]  ? free_irq+0x1a1/0x2d0
    [    0.414540]  vp_del_vqs+0xc1/0x220
    [    0.414540]  vp_find_vqs_msix+0x305/0x470
    [    0.414540]  vp_find_vqs+0x3e/0x1a0
    [    0.414540]  vp_modern_find_vqs+0x1b/0x70
    [    0.414540]  init_vqs+0x387/0x600
    [    0.414540]  virtnet_probe+0x50a/0xc80
    [    0.414540]  virtio_dev_probe+0x1e0/0x2b0
    [    0.414540]  really_probe+0xc0/0x2c0
    [    0.414540]  ? __pfx___driver_attach+0x10/0x10
    [    0.414540]  __driver_probe_device+0x73/0x120
    [    0.414540]  driver_probe_device+0x1f/0xe0
    [    0.414540]  __driver_attach+0x88/0x180
    [    0.414540]  bus_for_each_dev+0x85/0xd0
    [    0.414540]  bus_add_driver+0xec/0x1f0
    [    0.414540]  driver_register+0x59/0x100
    [    0.414540]  ? __pfx_virtio_net_driver_init+0x10/0x10
    [    0.414540]  virtio_net_driver_init+0x90/0xb0
    [    0.414540]  do_one_initcall+0x58/0x230
    [    0.414540]  kernel_init_freeable+0x1a3/0x2d0
    [    0.414540]  ? __pfx_kernel_init+0x10/0x10
    [    0.414540]  kernel_init+0x1a/0x1c0
    [    0.414540]  ret_from_fork+0x31/0x50
    [    0.414540]  ? __pfx_kernel_init+0x10/0x10
    [    0.414540]  ret_from_fork_asm+0x1a/0x30
    [    0.414540]  </TASK>
    
    Fix this by calling deleting the current vq when request_irq() fails.
    
    Fixes: 0b0f9dc ("Revert "virtio_pci: use shared interrupts for virtqueues"")
    Signed-off-by: Jiri Pirko <jiri@nvidia.com>
    Message-Id: <20240426150845.3999481-1-jiri@resnulli.us>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Jiri Pirko authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    8987515 View commit details
    Browse the repository at this point in the history
  47. Merge tag 'stable/vduse-virtio-net' into vhost

    This adds support for virtio-net to vduse.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    c0a7233 View commit details
    Browse the repository at this point in the history
  48. virtio-pci: Check if is_avq is NULL

    [bug]
    In the virtio_pci_common.c function vp_del_vqs, vp_dev->is_avq is involved
    to determine whether it is admin virtqueue, but this function vp_dev->is_avq
     may be empty. For installations, virtio_pci_legacy does not assign a value
     to vp_dev->is_avq.
    
    [fix]
    Check whether it is vp_dev->is_avq before use.
    
    [test]
    Test with virsh Attach device
    Before this patch, the following command would crash the guest system
    
    After applying the patch, everything seems to be working fine.
    
    Signed-off-by: Li Zhang <zhanglikernel@gmail.com>
    Message-Id: <1710566754-3532-1-git-send-email-zhanglikernel@gmail.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    zhanglikernel authored and mstsirkin committed May 22, 2024
    Configuration menu
    Copy the full SHA
    c8fae27 View commit details
    Browse the repository at this point in the history
  49. vfs: Delete the associated dentry when deleting a file

    Our applications, built on Elasticsearch[0], frequently create and
    delete files.  These applications operate within containers, some with a
    memory limit exceeding 100GB.  Over prolonged periods, the accumulation
    of negative dentries within these containers can amount to tens of
    gigabytes.
    
    Upon container exit, directories are deleted.  However, due to the
    numerous associated dentries, this process can be time-consuming.  Our
    users have expressed frustration with this prolonged exit duration,
    which constitutes our first issue.
    
    Simultaneously, other processes may attempt to access the parent
    directory of the Elasticsearch directories.  Since the task responsible
    for deleting the dentries holds the inode lock, processes attempting
    directory lookup experience significant delays.  This issue, our second
    problem, is easily demonstrated:
    
      - Task 1 generates negative dentries:
      $ pwd
      ~/test
      $ mkdir es && cd es/ && ./create_and_delete_files.sh
    
      [ After generating tens of GB dentries ]
    
      $ cd ~/test && rm -rf es
    
      [ It will take a long duration to finish ]
    
      - Task 2 attempts to lookup the 'test/' directory
      $ pwd
      ~/test
      $ ls
    
      The 'ls' command in Task 2 experiences prolonged execution as Task 1
      is deleting the dentries.
    
    We've devised a solution to address both issues by deleting associated
    dentry when removing a file.  Interestingly, we've noted that a similar
    patch was proposed years ago[1], although it was rejected citing the
    absence of tangible issues caused by negative dentries.  Given our
    current challenges, we're resubmitting the proposal.  All relevant
    stakeholders from previous discussions have been included for reference.
    
    Some alternative solutions are also under discussion[2][3], such as
    shrinking child dentries outside of the parent inode lock or even
    asynchronously shrinking child dentries.  However, given the
    straightforward nature of the current solution, I believe this approach
    is still necessary.
    
    [ NOTE! This is a pretty fundamental change in how we deal with
      unlinking dentries, and it doesn't change the fact that you can have
      lots of negative dentries from just doing negative lookups.
    
      But the kernel test robot is at least initially happy with this from a
      performance angle, so I'm applying this ASAP just to get more testing
      and as a "known fix for an issue people hit in real life".
    
      Put another way: we should still look at the alternatives, and this
      patch may get reverted if somebody finds a performance regression on
      some other load.       - Linus ]
    
    Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
    Link: https://github.com/elastic/elasticsearch [0]
    Link: https://patchwork.kernel.org/project/linux-fsdevel/patch/1502099673-31620-1-git-send-email-wangkai86@huawei.com [1]
    Link: https://lore.kernel.org/linux-fsdevel/20240511200240.6354-2-torvalds@linux-foundation.org/ [2]
    Link: https://lore.kernel.org/linux-fsdevel/CAHk-=wjEMf8Du4UFzxuToGDnF3yLaMcrYeyNAaH1NJWa6fwcNQ@mail.gmail.com/ [3]
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Christian Brauner <brauner@kernel.org>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Waiman Long <longman@redhat.com>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: Wangkai <wangkai86@huawei.com>
    Cc: Colin Walters <walters@verbum.org>
    Tested-by: kernel test robot <oliver.sang@intel.com>
    Link: https://lore.kernel.org/all/202405221518.ecea2810-oliver.sang@intel.com/
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    laoar authored and torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    681ce86 View commit details
    Browse the repository at this point in the history
  50. Merge tag 'fuse-update-6.10' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/mszeredi/fuse
    
    Pull fuse updates from Miklos Szeredi:
    
     - Add fs-verity support (Richard Fung)
    
     - Add multi-queue support to virtio-fs (Peter-Jan Gootzen)
    
     - Fix a bug in NOTIFY_RESEND handling (Hou Tao)
    
     - page -> folio cleanup (Matthew Wilcox)
    
    * tag 'fuse-update-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
      virtio-fs: add multi-queue support
      virtio-fs: limit number of request queues
      fuse: clear FR_SENT when re-adding requests into pending list
      fuse: set FR_PENDING atomically in fuse_resend()
      fuse: Add initial support for fs-verity
      fuse: Convert fuse_readpages_end() to use folio_end_read()
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    4f2d34b View commit details
    Browse the repository at this point in the history
  51. Merge tag 'ovl-update-6.10' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/overlayfs/vfs
    
    Pull overlayfs updates from Miklos Szeredi:
    
     - Add tmpfile support
    
     - Clean up include
    
    * tag 'ovl-update-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
      ovl: remove duplicate included header
      ovl: remove upper umask handling from ovl_create_upper()
      ovl: implement tmpfile
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    0e22bed View commit details
    Browse the repository at this point in the history
  52. Merge tag 'microblaze-v6.10' of git://git.monstr.eu/linux-2.6-microblaze

    Pull microblaze updates from Michal Simek:
    
     - Cleanup code around removed early_printk
    
    * tag 'microblaze-v6.10' of git://git.monstr.eu/linux-2.6-microblaze:
      microblaze: Remove early printk call from cpuinfo-static.c
      microblaze: Remove gcc flag for non existing early_printk.c file
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    f33fda2 View commit details
    Browse the repository at this point in the history
  53. Merge tag 'loongarch-6.10' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/chenhuacai/linux-loongson
    
    Pull LoongArch updates from Huacai Chen:
    
     - Select some options in Kconfig
    
     - Give a chance to build with !CONFIG_SMP
    
     - Switch to use built-in rustc target
    
     - Add new supported device nodes to dts
    
     - Some bug fixes and other small changes
    
     - Update the default config file
    
    * tag 'loongarch-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
      LoongArch: Update Loongson-3 default config file
      LoongArch: dts: Add new supported device nodes to Loongson-2K2000
      LoongArch: dts: Add new supported device nodes to Loongson-2K0500
      LoongArch: dts: Remove "disabled" state of clock controller node
      LoongArch: rust: Switch to use built-in rustc target
      LoongArch: Fix callchain parse error with kernel tracepoint events again
      LoongArch: Give a chance to build with !CONFIG_SMP
      LoongArch: Select THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
      LoongArch: Select ARCH_WANT_DEFAULT_BPF_JIT
      LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
      LoongArch: Select ARCH_HAS_FAST_MULTIPLIER
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    4f05e82 View commit details
    Browse the repository at this point in the history
  54. Merge tag 'riscv-for-linus-6.10-mw1' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/riscv/linux
    
    Pull RISC-V updates from Palmer Dabbelt:
    
     - Add byte/half-word compare-and-exchange, emulated via LR/SC loops
    
     - Support for Rust
    
     - Support for Zihintpause in hwprobe
    
     - Add PR_RISCV_SET_ICACHE_FLUSH_CTX prctl()
    
     - Support lockless lockrefs
    
    * tag 'riscv-for-linus-6.10-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (42 commits)
      riscv: defconfig: Enable CONFIG_CLK_SOPHGO_CV1800
      riscv: select ARCH_HAS_FAST_MULTIPLIER
      riscv: mm: still create swiotlb buffer for kmalloc() bouncing if required
      riscv: Annotate pgtable_l{4,5}_enabled with __ro_after_init
      riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
      riscv: mm: Always use an ASID to flush mm contexts
      riscv: mm: Preserve global TLB entries when switching contexts
      riscv: mm: Make asid_bits a local variable
      riscv: mm: Use a fixed layout for the MM context ID
      riscv: mm: Introduce cntx2asid/cntx2version helper macros
      riscv: Avoid TLB flush loops when affected by SiFive CIP-1200
      riscv: Apply SiFive CIP-1200 workaround to single-ASID sfence.vma
      riscv: mm: Combine the SMP and UP TLB flush code
      riscv: Only send remote fences when some other CPU is online
      riscv: mm: Broadcast kernel TLB flushes only when needed
      riscv: Use IPIs for remote cache/TLB flushes by default
      riscv: Factor out page table TLB synchronization
      riscv: Flush the instruction cache during SMP bringup
      riscv: hwprobe: export Zihintpause ISA extension
      riscv: misaligned: remove CONFIG_RISCV_M_MODE specific code
      ...
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    0bfbc91 View commit details
    Browse the repository at this point in the history
  55. Merge tag 'mfd-next-6.10' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/lee/mfd
    
    Pull MFD updates from Lee Jones:
     "New Device Support:
       - Add support for X-Powers AXP717 PMIC to AXP22X
       - Add support for Rockchip RK816 PMIC to RK8XX
       - Add support for TI TPS65224 PMIC to TPS6594
    
      New Functionality:
       - Add Power Off functionality to Rohm BD71828
       - Allow I2C SMBus access in Renesas RSMU
    
      Fix-ups:
       - Device Tree binding adaptions/conversions/creation
       - Shift Intel support over to MSI interrupts
       - Generify adding platform data away from being ACPI specific
       - Use device core supplied attribute to register sysfs entries
       - Replace hand-rolled functionality with generic APIs
       - Utilise centrally provided helpers and macros
       - Clean-up error handling
       - Remove superfluous/duplicated/unused sections
       - Trivial; spelling, whitespace, coding-style adaptions
       - More Maple Tree conversions"
    
    * tag 'mfd-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (44 commits)
      dt-bindings: mfd: Use full path to other schemas
      mfd: rsmu: support I2C SMBus access
      dt-bindings: mfd: Convert lp873x.txt to json-schema
      dt-bindings: mfd: aspeed: Drop 'oneOf' for pinctrl node
      dt-bindings: mfd: allwinner,sun6i-a31-prcm: Use hyphens in node names
      mfd: ssbi: Remove unused field 'slave' from 'struct ssbi'
      mfd: kempld: Remove custom DMI matching code
      mfd: cs42l43: Update patching revision check
      dt-bindings: mfd: qcom: pm8xxx: Add pm8901 compatible
      mfd: timberdale: Remove redundant assignment to variable err
      dt-bindings: mfd: qcom,spmi-pmic: Add pbs to SPMI device types
      dt-bindings: mfd: syscon: Add ti,am62p-cpsw-mac-efuse compatible
      dt-bindings: mfd: qcom,tcsr: Add compatible for SDX75
      mfd: axp20x: Convert to use Maple Tree register cache
      mfd: bd71828: Remove commented code lines
      mfd: intel-m10-bmc: Change staging size to a variable
      dt-bindings: mfd: Add ROHM BD71879
      mfd: Tidy Kconfig dependency's parentheses
      mfd: ocelot-spi: Use spi_sync_transfer()
      dt-bindings: mfd: syscon: Add missing simple syscon compatibles
      ...
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    a85629f View commit details
    Browse the repository at this point in the history
  56. Merge tag 'backlight-next-6.10' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/lee/backlight
    
    Pull backlight updates from Lee Jones:
     "Fix-ups:
       - FB Backlight interaction overhaul
       - Remove superfluous code and simplify overall
       - Constify various structs and struct attributes
    
      Bug Fixes:
       - Repair LED flickering
       - Fix signedness bugs"
    
    * tag 'backlight-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (42 commits)
      backlight: sky81452-backlight: Remove unnecessary call to of_node_get()
      backlight: mp3309c: Fix LEDs flickering in PWM mode
      backlight: otm3225a: Drop driver owner assignment
      backlight: lp8788: Drop support for platform data
      backlight: lcd: Make lcd_class constant
      backlight: Make backlight_class constant
      backlight: mp3309c: Fix signedness bug in mp3309c_parse_fwnode()
      const_structs.checkpatch: add lcd_ops
      fbdev: omap: lcd_ams_delta: Constify lcd_ops
      fbdev: imx: Constify lcd_ops
      fbdev: clps711x: Constify lcd_ops
      HID: picoLCD: Constify lcd_ops
      backlight: tdo24m: Constify lcd_ops
      backlight: platform_lcd: Constify lcd_ops
      backlight: otm3225a: Constify lcd_ops
      backlight: ltv350qv: Constify lcd_ops
      backlight: lms501kf03: Constify lcd_ops
      backlight: lms283gf05: Constify lcd_ops
      backlight: l4f00242t03: Constify lcd_ops
      backlight: jornada720_lcd: Constify lcd_ops
      ...
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    7eae27c View commit details
    Browse the repository at this point in the history
  57. Merge tag 'leds-next-6.10' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/lee/leds
    
    Pull LED updates from Lee Jones:
     "Core Frameworks:
       - Ensure seldom updated triggers have a brightness value before first
         update
    
      New Device Support:
       - Add support for Simatic IPC Device BX_59A to IPC LEDs Core
       - Add support for Qualcomm PMI8950 PWM to LPG Core
    
      New Functionality:
       - Add a bunch of new LED function identifiers
       - Add support for High Resolution Timers in LED Trigger Patten
    
      Fix-ups:
       - Shift out Audio Trigger to the Sound subsystem
       - Convert suitable calls to devm_* managed resources
       - Device Tree binding adaptions/conversions/creation
       - Remove superfluous code/variables/attributes and simplify overall
       - Use/convert to new/better APIs/helpers/MACROs instead of
         hand-rolling implementations
    
      Bug Fixes:
       - Repair enabling Torch Mode from V4L2 on the second LED
       - Ensure PWM is disabled when suspending"
    
    * tag 'leds-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (28 commits)
      leds: mt6370: Remove unused field 'reg_cfgs' from 'struct mt6370_priv'
      leds: lp50xx: Remove unused field 'num_of_banked_leds' from 'struct lp50xx'
      leds: lp50xx: Remove unused field 'bank_modules' from 'struct lp50xx_led'
      leds: aat1290: Remove unused field 'torch_brightness' from 'struct aat1290_led'
      leds: sun50i-a100: Use match_string() helper to simplify the code
      leds: pwm: Disable PWM when going to suspend
      leds: trigger: pattern: Add support for hrtimer
      leds: mt6360: Fix the second LED can not enable torch mode by V4L2
      dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM
      leds: qcom-lpg: Add support for PMI8950 PWM
      leds: apu: Remove duplicate DMI lookup data
      leds: trigger: netdev: Remove not needed call to led_set_brightness in deactivate
      dt-bindings: leds: Add LED_FUNCTION_SPEED_* for link speed on LAN/WAN
      dt-bindings: leds: Add LED_FUNCTION_MOBILE for mobile network
      leds: simatic-ipc-leds-gpio: Add support for module BX-59A
      dt-bindings: leds: qcom-lpg: Document PM6150L compatible
      dt-bindings: leds: pca963x: Convert text bindings to YAML
      leds: an30259a: Use devm_mutex_init() for mutex initialization
      leds: mlxreg: Use devm_mutex_init() for mutex initialization
      leds: nic78bx: Use devm API to cleanup module's resources
      ...
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    f3033eb View commit details
    Browse the repository at this point in the history
  58. Merge tag 'usb-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/gregkh/usb
    
    Pull USB / Thunderbolt updates from Greg KH:
     "Here is the big set of USB and Thunderbolt changes for 6.10-rc1.
      Nothing hugely earth-shattering, just constant forward progress for
      hardware support of new devices and cleanups over the drivers.
    
      Included in here are:
    
       - Thunderbolt / USB 4 driver updates
    
       - typec driver updates
    
       - dwc3 driver updates
    
       - gadget driver updates
    
       - uss720 driver id additions and fixes (people use USB->arallel port
         devices still!)
    
       - onboard-hub driver rename and additions for new hardware
    
       - xhci driver updates
    
       - other small USB driver updates and additions for quirks and api
         changes
    
      All of these have been in linux-next for a while with no reported
      problems"
    
    * tag 'usb-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (154 commits)
      drm/bridge: aux-hpd-bridge: correct devm_drm_dp_hpd_bridge_add() stub
      usb: fotg210: Add missing kernel doc description
      usb: dwc3: core: Fix unused variable warning in core driver
      usb: typec: tipd: rely on i2c_get_match_data()
      usb: typec: tipd: fix event checking for tps6598x
      usb: typec: tipd: fix event checking for tps25750
      dt-bindings: usb: qcom,dwc3: fix interrupt max items
      usb: fotg210: Use *-y instead of *-objs in Makefile
      usb: phy: tegra: Replace of_gpio.h by proper one
      usb: typec: ucsi: displayport: Fix potential deadlock
      usb: typec: qcom-pmic-typec: split HPD bridge alloc and registration
      usb: musc: Remove unused list 'buffers'
      usb: dwc3: Wait unconditionally after issuing EndXfer command
      usb: gadget: u_audio: Clear uac pointer when freed.
      usb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind.
      dt-bindings: usb: dwc3: Add QDU1000 compatible
      usb: core: Remove the useless struct usb_devmap which is just a bitmap
      MAINTAINERS: Remove {ehci,uhci}-platform.c from ARM/VT8500 entry
      USB: usb_parse_endpoint: ignore reserved bits
      usb: xhci: compact 'trb_in_td()' arguments
      ...
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    89601f6 View commit details
    Browse the repository at this point in the history
  59. Merge tag 'tty-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/gregkh/tty
    
    Pull tty / serial updates from Greg KH:
     "Here is the big set of tty/serial driver changes for 6.10-rc1.
      Included in here are:
    
       - Usual good set of api cleanups and evolution by Jiri Slaby to make
         the serial interfaces move out of the 1990's by using kfifos
         instead of hand-rolling their own logic.
    
       - 8250_exar driver updates
    
       - max3100 driver updates
    
       - sc16is7xx driver updates
    
       - exar driver updates
    
       - sh-sci driver updates
    
       - tty ldisc api addition to help refuse bindings
    
       - other smaller serial driver updates
    
      All of these have been in linux-next for a while with no reported
      issues"
    
    * tag 'tty-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (113 commits)
      serial: Clear UPF_DEAD before calling tty_port_register_device_attr_serdev()
      serial: imx: Raise TX trigger level to 8
      serial: 8250_pnp: Simplify "line" related code
      serial: sh-sci: simplify locking when re-issuing RXDMA fails
      serial: sh-sci: let timeout timer only run when DMA is scheduled
      serial: sh-sci: describe locking requirements for invalidating RXDMA
      serial: sh-sci: protect invalidating RXDMA on shutdown
      tty: add the option to have a tty reject a new ldisc
      serial: core: Call device_set_awake_path() for console port
      dt-bindings: serial: brcm,bcm2835-aux-uart: convert to dtschema
      tty: serial: uartps: Add support for uartps controller reset
      arm64: zynqmp: Add resets property for UART nodes
      dt-bindings: serial: cdns,uart: Add optional reset property
      serial: 8250_pnp: Switch to DEFINE_SIMPLE_DEV_PM_OPS()
      serial: 8250_exar: Keep the includes sorted
      serial: 8250_exar: Make type of bit the same in exar_ee_*_bit()
      serial: 8250_exar: Use BIT() in exar_ee_read()
      serial: 8250_exar: Switch to use dev_err_probe()
      serial: 8250_exar: Return directly from switch-cases
      serial: 8250_exar: Decrease indentation level
      ...
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    f6b8e86 View commit details
    Browse the repository at this point in the history
  60. Merge tag 'staging-6.10-rc1' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/gregkh/staging
    
    Pull staging driver updates from Greg KH:
     "Here is the big set of staging driver changes for 6.10-rc1. Not a lot
      of cleanups happening this kernel release, intern applications must be
      out of sync at the moment. But we did delete two drivers, wlan-ng and
      pi433, as they are no longer in use and the developers involved wanted
      them just gone entirely, allowing us to drop 19k lines from the tree.
    
      Other than the normal coding style cleanups here, there has been a lot
      of work on the vc04_services code, with the intent to finally get that
      out of staging hopefully soon. It's getting closer, which is nice to
      see.
    
      All of these have been in linux-next for a while with no reported
      issues"
    
    * tag 'staging-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (98 commits)
      staging: pi433: Remove unused driver
      staging: vchiq_core: Add missing blank lines
      staging: vchiq_core: Drop unnecessary blank lines
      staging: vchiq_core: Add parentheses to VCHIQ_MSG_SRCPORT
      staging: vchiq_core: Use printk messages for devices
      staging: vchiq_arm: Drop unnecessary NULL check
      staging: vc04_services: Delete unnecessary NULL check
      staging: vc04_services: vchiq_arm: Fix NULL ptr dereferences
      Staging: rtl8192e: Rename variable DssCCk
      Staging: rtl8192e: Rename variable ExtHTCapInfo
      Staging: rtl8192e: Rename variable MPDUDensity
      Staging: rtl8192e: Rename variable MaxRxAMPDUFactor
      Staging: rtl8192e: Rename variable MaxAMSDUSize
      Staging: rtl8192e: Rename variable DelayBA
      Staging: rtl8192e: Rename variable RxSTBC
      Staging: rtl8192e: Rename variable TxSTBC
      Staging: rtl8192e: Rename variable GreenField
      Staging: rtl8192e: Rename variable ShortGI20Mhz
      Staging: rtl8192e: Rename variable ShortGI40Mhz
      Staging: rtl8192e: Rename variable MimoPwrSave
      ...
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    be81389 View commit details
    Browse the repository at this point in the history
  61. Merge tag 'driver-core-6.10-rc1' of git://git.kernel.org/pub/scm/linu…

    …x/kernel/git/gregkh/driver-core
    
    Pull driver core updates from Greg KH:
     "Here is the small set of driver core and kernfs changes for 6.10-rc1.
    
      Nothing major here at all, just a small set of changes for some driver
      core apis, and minor fixups. Included in here are:
    
       - sysfs_bin_attr_simple_read() helper added and used
    
       - device_show_string() helper added and used
    
      All usages of these were acked by the various maintainers. Also in
      here are:
    
       - kernfs minor cleanup
    
       - removed unused functions
    
       - typo fix in documentation
    
       - pay attention to sysfs_create_link() failures in module.c finally
    
      All of these have been in linux-next for a very long time with no
      reported problems"
    
    * tag 'driver-core-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
      device property: Fix a typo in the description of device_get_child_node_count()
      kernfs: mount: Remove unnecessary ‘NULL’ values from knparent
      scsi: Use device_show_string() helper for sysfs attributes
      platform/x86: Use device_show_string() helper for sysfs attributes
      perf: Use device_show_string() helper for sysfs attributes
      IB/qib: Use device_show_string() helper for sysfs attributes
      hwmon: Use device_show_string() helper for sysfs attributes
      driver core: Add device_show_string() helper for sysfs attributes
      treewide: Use sysfs_bin_attr_simple_read() helper
      sysfs: Add sysfs_bin_attr_simple_read() helper
      module: don't ignore sysfs_create_link() failures
      driver core: Remove unused platform_notify, platform_notify_remove
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    d90be6e View commit details
    Browse the repository at this point in the history
  62. Merge tag 'char-misc-6.10-rc1' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/gregkh/char-misc
    
    Pull char/misc and other driver subsystem updates from Greg KH:
     "Here is the big set of char/misc and other driver subsystem updates
      for 6.10-rc1. Nothing major here, just lots of new drivers and updates
      for apis and new hardware types. Included in here are:
    
       - big IIO driver updates with more devices and drivers added
    
       - fpga driver updates
    
       - hyper-v driver updates
    
       - uio_pruss driver removal, no one uses it, other drivers control the
         same hardware now
    
       - binder minor updates
    
       - mhi driver updates
    
       - excon driver updates
    
       - counter driver updates
    
       - accessability driver updates
    
       - coresight driver updates
    
       - other hwtracing driver updates
    
       - nvmem driver updates
    
       - slimbus driver updates
    
       - spmi driver updates
    
       - other smaller misc and char driver updates
    
      All of these have been in linux-next for a while with no reported
      issues"
    
    * tag 'char-misc-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (319 commits)
      misc: ntsync: mark driver as "broken" to prevent from building
      spmi: pmic-arb: Add multi bus support
      spmi: pmic-arb: Register controller for bus instead of arbiter
      spmi: pmic-arb: Make core resources acquiring a version operation
      spmi: pmic-arb: Make the APID init a version operation
      spmi: pmic-arb: Fix some compile warnings about members not being described
      dt-bindings: spmi: Deprecate qcom,bus-id
      dt-bindings: spmi: Add X1E80100 SPMI PMIC ARB schema
      spmi: pmic-arb: Replace three IS_ERR() calls by null pointer checks in spmi_pmic_arb_probe()
      spmi: hisi-spmi-controller: Do not override device identifier
      dt-bindings: spmi: hisilicon,hisi-spmi-controller: clean up example
      dt-bindings: spmi: hisilicon,hisi-spmi-controller: fix binding references
      spmi: make spmi_bus_type const
      extcon: adc-jack: Document missing struct members
      extcon: realtek: Remove unused of_gpio.h
      extcon: usbc-cros-ec: Convert to platform remove callback returning void
      extcon: usb-gpio: Convert to platform remove callback returning void
      extcon: max77843: Convert to platform remove callback returning void
      extcon: max3355: Convert to platform remove callback returning void
      extcon: intel-mrfld: Convert to platform remove callback returning void
      ...
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    5f16eb0 View commit details
    Browse the repository at this point in the history
  63. clang: work around asm input constraint problems

    Work around clang problems with asm constraints that have multiple
    possibilities, particularly "g" and "rm".
    
    Clang seems to turn inputs like that into the most generic form, which
    is the memory input - but to make matters worse, clang won't even use a
    possible original memory location, but will spill the value to stack,
    and use the stack for the asm input.
    
    See
    
      llvm/llvm-project#20571 (comment)
    
    for some explanation of why clang has this strange behavior, but the end
    result is that "g" and "rm" really end up generating horrid code.
    
    Link: llvm/llvm-project#20571
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    dbaaabd View commit details
    Browse the repository at this point in the history
  64. x86: improve array_index_mask_nospec() code generation

    Don't force the inputs to be 'unsigned long', when the comparison can
    easily be done in 32-bit if that's more appropriate.
    
    Note that while we can look at the inputs to choose an appropriate size
    for the compare instruction, the output is fixed at 'unsigned long'.
    That's not technically optimal either, since a 32-bit 'sbbl' would often
    be sufficient.
    
    But for the outgoing mask we don't know how the mask ends up being used
    (ie we have uses that have an incoming 32-bit array index, but end up
    using the mask for other things).  That said, it only costs the extra
    REX prefix to always generate the 64-bit mask.
    
    [ A 'sbbl' also always technically generates a 64-bit mask, but with the
      upper 32 bits clear: that's fine for when the incoming index that will
      be masked is already 32-bit, but not if you use the mask to mask a
      pointer afterwards, like the file table lookup does ]
    
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    7453b94 View commit details
    Browse the repository at this point in the history
  65. x86: improve bitop code generation with clang

    This uses the new ASM_INPUT_RM macro to avoid the bad code generation
    issue that clang has with more generic asm inputs.
    
    This ends up avoiding generating code like this:
    
     	mov    %r10,(%rsp)
     	tzcnt  (%rsp),%rcx
    
    which now becomes just
    
     	tzcnt  %r10,%rcx
    
    and in the process ends up also removing a few unnecessary stack frames
    when the only use was that pointless "asm uses memory location off stack".
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    b9b60b3 View commit details
    Browse the repository at this point in the history
  66. Merge local branch 'x86-codegen'

    Merge trivial x86 code generation annoyances
    
     - Introduce helper macros for clang asm input problems
    
     - use said macros to improve trivially stupid code generation issues in
       bitops and array_index_mask_nospec
    
     - also improve codegen with 32-bit array index comparisons
    
    None of these really matter, but I look at code generation and profiles
    fairly regularly, and these misfeatures caused the generated code to
    look really odd and distract from the real issues.
    
    * branch 'x86-codegen' of local tree:
      x86: improve bitop code generation with clang
      x86: improve array_index_mask_nospec() code generation
      clang: work around asm input constraint problems
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    f8a6e48 View commit details
    Browse the repository at this point in the history
  67. mm: simplify and improve print_vma_addr() output

    Use '%pD' to print out the filename, and print out the actual offset
    within the file too, rather than just what the virtual address of the
    mapping is (which doesn't tell you anything about any mapping offsets).
    
    Also, use the exact vma_lookup() instead of find_vma() - the latter
    looks up any vma _after_ the address, which is of questionable value
    (yes, maybe you fell off the beginning, but you'd be more likely to fall
    off the end).
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed May 22, 2024
    Configuration menu
    Copy the full SHA
    de7e71e View commit details
    Browse the repository at this point in the history
  68. net: netfilter: Make ct zone opts configurable for bpf ct helpers

    Add ct zone id and direction to bpf_ct_opts so that arbitrary ct zones
    can be used for xdp/tc bpf ct helper functions bpf_{xdp,skb}_ct_alloc
    and bpf_{xdp,skb}_ct_lookup.
    
    Signed-off-by: Brad Cowie <brad@faucet.nz>
    Link: https://lore.kernel.org/r/20240522050712.732558-1-brad@faucet.nz
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    gizmoguy authored and Martin KaFai Lau committed May 22, 2024
    Configuration menu
    Copy the full SHA
    ece4b29 View commit details
    Browse the repository at this point in the history
  69. selftests/bpf: Update tests for new ct zone opts for nf_conntrack kfuncs

    Add test for allocating and looking up ct entry in a
    non-default ct zone with kfuncs bpf_{xdp,skb}_ct_alloc
    and bpf_{xdp,skb}_ct_lookup.
    
    Add negative tests for looking up ct entry in a different
    ct zone to where it was allocated and with a different
    direction.
    
    Update reserved test for old struct definition to test for
    ct_zone_id being set when opts size isn't NF_BPF_CT_OPTS_SZ (16).
    
    Signed-off-by: Brad Cowie <brad@faucet.nz>
    Link: https://lore.kernel.org/r/20240522050712.732558-2-brad@faucet.nz
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    gizmoguy authored and Martin KaFai Lau committed May 22, 2024
    Configuration menu
    Copy the full SHA
    a87f34e View commit details
    Browse the repository at this point in the history

Commits on May 23, 2024

  1. tracing/treewide: Remove second parameter of __assign_str()

    With the rework of how the __string() handles dynamic strings where it
    saves off the source string in field in the helper structure[1], the
    assignment of that value to the trace event field is stored in the helper
    value and does not need to be passed in again.
    
    This means that with:
    
      __string(field, mystring)
    
    Which use to be assigned with __assign_str(field, mystring), no longer
    needs the second parameter and it is unused. With this, __assign_str()
    will now only get a single parameter.
    
    There's over 700 users of __assign_str() and because coccinelle does not
    handle the TRACE_EVENT() macro I ended up using the following sed script:
    
      git grep -l __assign_str | while read a ; do
          sed -e 's/\(__assign_str([^,]*[^ ,]\) *,[^;]*/\1)/' $a > /tmp/test-file;
          mv /tmp/test-file $a;
      done
    
    I then searched for __assign_str() that did not end with ';' as those
    were multi line assignments that the sed script above would fail to catch.
    
    Note, the same updates will need to be done for:
    
      __assign_str_len()
      __assign_rel_str()
      __assign_rel_str_len()
    
    I tested this with both an allmodconfig and an allyesconfig (build only for both).
    
    [1] https://lore.kernel.org/linux-trace-kernel/20240222211442.634192653@goodmis.org/
    
    Link: https://lore.kernel.org/linux-trace-kernel/20240516133454.681ba6a0@rorschach.local.home
    
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Julia Lawall <Julia.Lawall@inria.fr>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Acked-by: Jani Nikula <jani.nikula@intel.com>
    Acked-by: Christian König <christian.koenig@amd.com> for the amdgpu parts.
    Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> #for
    Acked-by: Rafael J. Wysocki <rafael@kernel.org> # for thermal
    Acked-by: Takashi Iwai <tiwai@suse.de>
    Acked-by: Darrick J. Wong <djwong@kernel.org>	# xfs
    Tested-by: Guenter Roeck <linux@roeck-us.net>
    rostedt committed May 23, 2024
    Configuration menu
    Copy the full SHA
    2c92ca8 View commit details
    Browse the repository at this point in the history
  2. Merge tag 'mm-stable-2024-05-22-17-22' of git://git.kernel.org/pub/sc…

    …m/linux/kernel/git/akpm/mm
    
    Pull more mm updates from Andrew Morton:
     "A series from Dave Chinner which cleans up and fixes the handling of
      nested allocations within stackdepot and page-owner"
    
    * tag 'mm-stable-2024-05-22-17-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
      mm/page-owner: use gfp_nested_mask() instead of open coded masking
      stackdepot: use gfp_nested_mask() instead of open coded masking
      mm: lift gfp_kmemleak_mask() to gfp.h
    torvalds committed May 23, 2024
    Configuration menu
    Copy the full SHA
    5c6f4d6 View commit details
    Browse the repository at this point in the history
  3. Merge tag 'mm-nonmm-stable-2024-05-22-17-30' of git://git.kernel.org/…

    …pub/scm/linux/kernel/git/akpm/mm
    
    Pull more non-mm updates from Andrew Morton:
    
     - A series ("kbuild: enable more warnings by default") from Arnd
       Bergmann which enables a number of additional build-time warnings. We
       fixed all the fallout which we could find, there may still be a few
       stragglers.
    
     - Samuel Holland has developed the series "Unified cross-architecture
       kernel-mode FPU API". This does a lot of consolidation of
       per-architecture kernel-mode FPU usage and enables the use of newer
       AMD GPUs on RISC-V.
    
     - Tao Su has fixed some selftests build warnings in the series
       "Selftests: Fix compilation warnings due to missing _GNU_SOURCE
       definition".
    
     - This pull also includes a nilfs2 fixup from Ryusuke Konishi.
    
    * tag 'mm-nonmm-stable-2024-05-22-17-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (23 commits)
      nilfs2: make block erasure safe in nilfs_finish_roll_forward()
      selftests/harness: use 1024 in place of LINE_MAX
      Revert "selftests/harness: remove use of LINE_MAX"
      selftests/fpu: allow building on other architectures
      selftests/fpu: move FP code to a separate translation unit
      drm/amd/display: use ARCH_HAS_KERNEL_FPU_SUPPORT
      drm/amd/display: only use hard-float, not altivec on powerpc
      riscv: add support for kernel-mode FPU
      x86: implement ARCH_HAS_KERNEL_FPU_SUPPORT
      powerpc: implement ARCH_HAS_KERNEL_FPU_SUPPORT
      LoongArch: implement ARCH_HAS_KERNEL_FPU_SUPPORT
      lib/raid6: use CC_FLAGS_FPU for NEON CFLAGS
      arm64: crypto: use CC_FLAGS_FPU for NEON CFLAGS
      arm64: implement ARCH_HAS_KERNEL_FPU_SUPPORT
      ARM: crypto: use CC_FLAGS_FPU for NEON CFLAGS
      ARM: implement ARCH_HAS_KERNEL_FPU_SUPPORT
      arch: add ARCH_HAS_KERNEL_FPU_SUPPORT
      x86/fpu: fix asm/fpu/types.h include guard
      kbuild: enable -Wcast-function-type-strict unconditionally
      kbuild: enable -Wformat-truncation on clang
      ...
    torvalds committed May 23, 2024
    Configuration menu
    Copy the full SHA
    c760b37 View commit details
    Browse the repository at this point in the history
  4. testing: net-drv: use stats64 for testing

    Testing a network device that has large numbers of bytes/packets may
    overflow. Using stats64 when comparing fixes this problem.
    
    I tripped on this while iterating on a qstats patch for mlx5. See below
    for confirmation without my added code that this is a bug.
    
    Before this patch (with added debugging output):
    
    $ NETIF=eth0 tools/testing/selftests/drivers/net/stats.py
    KTAP version 1
    1..4
    ok 1 stats.check_pause
    ok 2 stats.check_fec
    rstat: 481708634 qstat: 666201639514 key: tx-bytes
    not ok 3 stats.pkt_byte_sum
    ok 4 stats.qstat_by_ifindex
    
    Note the huge delta above ^^^ in the rtnl vs qstats.
    
    After this patch:
    
    $ NETIF=eth0 tools/testing/selftests/drivers/net/stats.py
    KTAP version 1
    1..4
    ok 1 stats.check_pause
    ok 2 stats.check_fec
    ok 3 stats.pkt_byte_sum
    ok 4 stats.qstat_by_ifindex
    
    It looks like rtnl_fill_stats in net/core/rtnetlink.c will attempt to
    copy the 64bit stats into a 32bit structure which is probably why this
    behavior is occurring.
    
    To show this is happening, you can get the underlying stats that the
    stats.py test uses like this:
    
    $ ./cli.py --spec ../../../Documentation/netlink/specs/rt_link.yaml \
               --do getlink --json '{"ifi-index": 7}'
    
    And examine the output (heavily snipped to show relevant fields):
    
     'stats': {
               'multicast': 3739197,
               'rx-bytes': 1201525399,
               'rx-packets': 56807158,
               'tx-bytes': 492404458,
               'tx-packets': 1200285371,
    
     'stats64': {
                 'multicast': 3739197,
                 'rx-bytes': 35561263767,
                 'rx-packets': 56807158,
                 'tx-bytes': 666212335338,
                 'tx-packets': 1200285371,
    
    The stats.py test prior to this patch was using the 'stats' structure
    above, which matches the failure output on my system.
    
    Comparing side by side, rx-bytes and tx-bytes, and getting ethtool -S
    output:
    
    rx-bytes stats:    1201525399
    rx-bytes stats64: 35561263767
    rx-bytes ethtool: 36203402638
    
    tx-bytes stats:      492404458
    tx-bytes stats64: 666212335338
    tx-bytes ethtool: 666215360113
    
    Note that the above was taken from a system with an mlx5 NIC, which only
    exposes ndo_get_stats64.
    
    Based on the ethtool output and qstat output, it appears that stats.py
    should be updated to use the 'stats64' structure for accurate
    comparisons when packet/byte counters get very large.
    
    To confirm that this was not related to the qstats code I was iterating
    on, I booted a kernel without my driver changes and re-ran the test
    which shows the qstats are skipped (as they don't exist for mlx5):
    
    NETIF=eth0 tools/testing/selftests/drivers/net/stats.py
    KTAP version 1
    1..4
    ok 1 stats.check_pause
    ok 2 stats.check_fec
    ok 3 stats.pkt_byte_sum # SKIP qstats not supported by the device
    ok 4 stats.qstat_by_ifindex # SKIP No ifindex supports qstats
    
    But, fetching the stats using the CLI
    
    $ ./cli.py --spec ../../../Documentation/netlink/specs/rt_link.yaml \
               --do getlink --json '{"ifi-index": 7}'
    
    Shows the same issue (heavily snipped for relevant fields only):
    
     'stats': {
               'multicast': 105489,
               'rx-bytes': 530879526,
               'rx-packets': 751415,
               'tx-bytes': 2510191396,
               'tx-packets': 27700323,
     'stats64': {
                 'multicast': 105489,
                 'rx-bytes': 530879526,
                 'rx-packets': 751415,
                 'tx-bytes': 15395093284,
                 'tx-packets': 27700323,
    
    Comparing side by side with ethtool -S on the unmodified mlx5 driver:
    
    tx-bytes stats:    2510191396
    tx-bytes stats64: 15395093284
    tx-bytes ethtool: 17718435810
    
    Fixes: f0e6c86 ("testing: net-drv: add a driver test for stats reporting")
    Signed-off-by: Joe Damato <jdamato@fastly.com>
    Link: https://lore.kernel.org/r/20240520235850.190041-1-jdamato@fastly.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    jdamato-fsly authored and Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    a61a459 View commit details
    Browse the repository at this point in the history
  5. Revert "ixgbe: Manual AN-37 for troublesome link partners for X550 SFI"

    This reverts commit 5657360.
    
    According to the commit, it implements a manual AN-37 for some
    "troublesome" Juniper MX5 switches. This appears to be a workaround for a
    particular switch.
    
    It has been reported that this causes a severe breakage for other switches,
    including a Cisco 3560CX-12PD-S.
    
    The code appears to be a workaround for a specific switch which fails to
    link in SFI mode. It expects to see AN-37 auto negotiation in order to
    link. The Cisco switch is not expecting AN-37 auto negotiation. When the
    device starts the manual AN-37, the Cisco switch decides that the port is
    confused and stops attempting to link with it. This persists until a power
    cycle. A simple driver unload and reload does not resolve the issue, even
    if loading with a version of the driver which lacks this workaround.
    
    The authors of the workaround commit have not responded with
    clarifications, and the result of the workaround is complete failure to
    connect with other switches.
    
    This appears to be a case where the driver can either "correctly" link with
    the Juniper MX5 switch, at the cost of bricking the link with the Cisco
    switch, or it can behave properly for the Cisco switch, but fail to link
    with the Junipir MX5 switch. I do not know enough about the standards
    involved to clearly determine whether either switch is at fault or behaving
    incorrectly. Nor do I know whether there exists some alternative fix which
    corrects behavior with both switches.
    
    Revert the workaround for the Juniper switch.
    
    Fixes: 5657360 ("ixgbe: Manual AN-37 for troublesome link partners for X550 SFI")
    Link: https://lore.kernel.org/netdev/cbe874db-9ac9-42b8-afa0-88ea910e1e99@intel.com/T/
    Link: https://forum.proxmox.com/threads/intel-x553-sfp-ixgbe-no-go-on-pve8.135129/#post-612291
    Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
    Cc: Jeff Daly <jeffd@silicom-usa.com>
    Cc: kernel.org-fo5k2w@ycharbi.fr
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://lore.kernel.org/r/20240520-net-2024-05-20-revert-silicom-switch-workaround-v1-1-50f80f261c94@intel.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    jacob-keller authored and Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    b35b1c0 View commit details
    Browse the repository at this point in the history
  6. net: fec: avoid lock evasion when reading pps_enable

    The assignment of pps_enable is protected by tmreg_lock, but the read
    operation of pps_enable is not. So the Coverity tool reports a lock
    evasion warning which may cause data race to occur when running in a
    multithread environment. Although this issue is almost impossible to
    occur, we'd better fix it, at least it seems more logically reasonable,
    and it also prevents Coverity from continuing to issue warnings.
    
    Fixes: 278d240 ("net: fec: ptp: Enable PPS output based on ptp clock")
    Signed-off-by: Wei Fang <wei.fang@nxp.com>
    Link: https://lore.kernel.org/r/20240521023800.17102-1-wei.fang@nxp.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Wei Fang authored and Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    3b1c92f View commit details
    Browse the repository at this point in the history
  7. tls: fix missing memory barrier in tls_init

    In tls_init(), a write memory barrier is missing, and store-store
    reordering may cause NULL dereference in tls_{setsockopt,getsockopt}.
    
    CPU0                               CPU1
    -----                              -----
    // In tls_init()
    // In tls_ctx_create()
    ctx = kzalloc()
    ctx->sk_proto = READ_ONCE(sk->sk_prot) -(1)
    
    // In update_sk_prot()
    WRITE_ONCE(sk->sk_prot, tls_prots)     -(2)
    
                                       // In sock_common_setsockopt()
                                       READ_ONCE(sk->sk_prot)->setsockopt()
    
                                       // In tls_{setsockopt,getsockopt}()
                                       ctx->sk_proto->setsockopt()    -(3)
    
    In the above scenario, when (1) and (2) are reordered, (3) can observe
    the NULL value of ctx->sk_proto, causing NULL dereference.
    
    To fix it, we rely on rcu_assign_pointer() which implies the release
    barrier semantic. By moving rcu_assign_pointer() after ctx->sk_proto is
    initialized, we can ensure that ctx->sk_proto are visible when
    changing sk->sk_prot.
    
    Fixes: d5bee73 ("net/tls: Annotate access to sk_prot with READ_ONCE/WRITE_ONCE")
    Signed-off-by: Yewon Choi <woni9911@gmail.com>
    Signed-off-by: Dae R. Jeong <threeearcat@gmail.com>
    Link: https://lore.kernel.org/netdev/ZU4OJG56g2V9z_H7@dragonet/T/
    Link: https://lore.kernel.org/r/Zkx4vjSFp0mfpjQ2@libra05
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    threeearcat authored and Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    91e61dd View commit details
    Browse the repository at this point in the history
  8. net: ti: icssg_prueth: Fix NULL pointer dereference in prueth_probe()

    In the prueth_probe() function, if one of the calls to emac_phy_connect()
    fails due to of_phy_connect() returning NULL, then the subsequent call to
    phy_attached_info() will dereference a NULL pointer.
    
    Check the return code of emac_phy_connect and fail cleanly if there is an
    error.
    
    Fixes: 128d587 ("net: ti: icssg-prueth: Add ICSSG ethernet driver")
    Cc: stable@vger.kernel.org
    Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Reviewed-by: MD Danish Anwar <danishanwar@ti.com>
    Link: https://lore.kernel.org/r/20240521-icssg-prueth-fix-v1-1-b4b17b1433e9@bootlin.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    rgantois authored and Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    b31c7e7 View commit details
    Browse the repository at this point in the history
  9. tcp: remove 64 KByte limit for initial tp->rcv_wnd value

    Recently, we had some servers upgraded to the latest kernel and noticed
    the indicator from the user side showed worse results than before. It is
    caused by the limitation of tp->rcv_wnd.
    
    In 2018 commit a337531 ("tcp: up initial rmem to 128KB and SYN rwin
    to around 64KB") limited the initial value of tp->rcv_wnd to 65535, most
    CDN teams would not benefit from this change because they cannot have a
    large window to receive a big packet, which will be slowed down especially
    in long RTT. Small rcv_wnd means slow transfer speed, to some extent. It's
    the side effect for the latency/time-sensitive users.
    
    To avoid future confusion, current change doesn't affect the initial
    receive window on the wire in a SYN or SYN+ACK packet which are set within
    65535 bytes according to RFC 7323 also due to the limit in
    __tcp_transmit_skb():
    
        th->window      = htons(min(tp->rcv_wnd, 65535U));
    
    In one word, __tcp_transmit_skb() already ensures that constraint is
    respected, no matter how large tp->rcv_wnd is. The change doesn't violate
    RFC.
    
    Let me provide one example if with or without the patch:
    Before:
    client   --- SYN: rwindow=65535 ---> server
    client   <--- SYN+ACK: rwindow=65535 ----  server
    client   --- ACK: rwindow=65536 ---> server
    Note: for the last ACK, the calculation is 512 << 7.
    
    After:
    client   --- SYN: rwindow=65535 ---> server
    client   <--- SYN+ACK: rwindow=65535 ----  server
    client   --- ACK: rwindow=175232 ---> server
    Note: I use the following command to make it work:
    ip route change default via [ip] dev eth0 metric 100 initrwnd 120
    For the last ACK, the calculation is 1369 << 7.
    
    When we apply such a patch, having a large rcv_wnd if the user tweak this
    knob can help transfer data more rapidly and save some rtts.
    
    Fixes: a337531 ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Acked-by: Neal Cardwell <ncardwell@google.com>
    Link: https://lore.kernel.org/r/20240521134220.12510-1-kerneljasonxing@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    JasonXing authored and Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    378979e View commit details
    Browse the repository at this point in the history
  10. net: relax socket state check at accept time.

    Christoph reported the following splat:
    
    WARNING: CPU: 1 PID: 772 at net/ipv4/af_inet.c:761 __inet_accept+0x1f4/0x4a0
    Modules linked in:
    CPU: 1 PID: 772 Comm: syz-executor510 Not tainted 6.9.0-rc7-g7da7119fe22b #56
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7 04/01/2014
    RIP: 0010:__inet_accept+0x1f4/0x4a0 net/ipv4/af_inet.c:759
    Code: 04 38 84 c0 0f 85 87 00 00 00 41 c7 04 24 03 00 00 00 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc e8 ec b7 da fd <0f> 0b e9 7f fe ff ff e8 e0 b7 da fd 0f 0b e9 fe fe ff ff 89 d9 80
    RSP: 0018:ffffc90000c2fc58 EFLAGS: 00010293
    RAX: ffffffff836bdd14 RBX: 0000000000000000 RCX: ffff888104668000
    RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
    RBP: dffffc0000000000 R08: ffffffff836bdb89 R09: fffff52000185f64
    R10: dffffc0000000000 R11: fffff52000185f64 R12: dffffc0000000000
    R13: 1ffff92000185f98 R14: ffff88810754d880 R15: ffff8881007b7800
    FS:  000000001c772880(0000) GS:ffff88811b280000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007fb9fcf2e178 CR3: 00000001045d2002 CR4: 0000000000770ef0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    PKRU: 55555554
    Call Trace:
     <TASK>
     inet_accept+0x138/0x1d0 net/ipv4/af_inet.c:786
     do_accept+0x435/0x620 net/socket.c:1929
     __sys_accept4_file net/socket.c:1969 [inline]
     __sys_accept4+0x9b/0x110 net/socket.c:1999
     __do_sys_accept net/socket.c:2016 [inline]
     __se_sys_accept net/socket.c:2013 [inline]
     __x64_sys_accept+0x7d/0x90 net/socket.c:2013
     do_syscall_x64 arch/x86/entry/common.c:52 [inline]
     do_syscall_64+0x58/0x100 arch/x86/entry/common.c:83
     entry_SYSCALL_64_after_hwframe+0x76/0x7e
    RIP: 0033:0x4315f9
    Code: fd ff 48 81 c4 80 00 00 00 e9 f1 fe ff ff 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 ab b4 fd ff c3 66 2e 0f 1f 84 00 00 00 00
    RSP: 002b:00007ffdb26d9c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002b
    RAX: ffffffffffffffda RBX: 0000000000400300 RCX: 00000000004315f9
    RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
    RBP: 00000000006e1018 R08: 0000000000400300 R09: 0000000000400300
    R10: 0000000000400300 R11: 0000000000000246 R12: 0000000000000000
    R13: 000000000040cdf0 R14: 000000000040ce80 R15: 0000000000000055
     </TASK>
    
    The reproducer invokes shutdown() before entering the listener status.
    After commit 9406279 ("tcp: defer shutdown(SEND_SHUTDOWN) for
    TCP_SYN_RECV sockets"), the above causes the child to reach the accept
    syscall in FIN_WAIT1 status.
    
    Eric noted we can relax the existing assertion in __inet_accept()
    
    Reported-by: Christoph Paasch <cpaasch@apple.com>
    Closes: multipath-tcp/mptcp_net-next#490
    Suggested-by: Eric Dumazet <edumazet@google.com>
    Fixes: 9406279 ("tcp: defer shutdown(SEND_SHUTDOWN) for TCP_SYN_RECV sockets")
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://lore.kernel.org/r/23ab880a44d8cfd967e84de8b93dbf48848e3d8c.1716299669.git.pabeni@redhat.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    26afda7 View commit details
    Browse the repository at this point in the history
  11. nfc: nci: Fix handling of zero-length payload packets in nci_rx_work()

    When nci_rx_work() receives a zero-length payload packet, it should not
    discard the packet and exit the loop. Instead, it should continue
    processing subsequent packets.
    
    Fixes: d24b035 ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet")
    Signed-off-by: Ryosuke Yasuoka <ryasuoka@redhat.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Link: https://lore.kernel.org/r/20240521153444.535399-1-ryasuoka@redhat.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    YsuOS authored and Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    6671e35 View commit details
    Browse the repository at this point in the history
  12. ice: Interpret .set_channels() input differently

    A bug occurs because a safety check guarding AF_XDP-related queues in
    ethnl_set_channels(), does not trigger. This happens, because kernel and
    ice driver interpret the ethtool command differently.
    
    How the bug occurs:
    1. ethtool -l <IFNAME> -> combined: 40
    2. Attach AF_XDP to queue 30
    3. ethtool -L <IFNAME> rx 15 tx 15
       combined number is not specified, so command becomes {rx_count = 15,
       tx_count = 15, combined_count = 40}.
    4. ethnl_set_channels checks, if there are any AF_XDP of queues from the
       new (combined_count + rx_count) to the old one, so from 55 to 40, check
       does not trigger.
    5. ice interprets `rx 15 tx 15` as 15 combined channels and deletes the
       queue that AF_XDP is attached to.
    
    Interpret the command in a way that is more consistent with ethtool
    manual [0] (--show-channels and --set-channels).
    
    Considering that in the ice driver only the difference between RX and TX
    queues forms dedicated channels, change the correct way to set number of
    channels to:
    
    ethtool -L <IFNAME> combined 10 /* For symmetric queues */
    ethtool -L <IFNAME> combined 8 tx 2 rx 0 /* For asymmetric queues */
    
    [0] https://man7.org/linux/man-pages/man8/ethtool.8.html
    
    Fixes: 87324e7 ("ice: Implement ethtool ops for channels")
    Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
    Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
    Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com>
    Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com>
    Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
    Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    walking-machine authored and Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    05d6f44 View commit details
    Browse the repository at this point in the history
  13. idpf: Interpret .set_channels() input differently

    Unlike ice, idpf does not check, if user has requested at least 1 combined
    channel. Instead, it relies on a check in the core code. Unfortunately, the
    check does not trigger for us because of the hacky .set_channels()
    interpretation logic that is not consistent with the core code.
    
    This naturally leads to user being able to trigger a crash with an invalid
    input. This is how:
    
    1. ethtool -l <IFNAME> -> combined: 40
    2. ethtool -L <IFNAME> rx 0 tx 0
       combined number is not specified, so command becomes {rx_count = 0,
       tx_count = 0, combined_count = 40}.
    3. ethnl_set_channels checks, if there is at least 1 RX and 1 TX channel,
       comparing (combined_count + rx_count) and (combined_count + tx_count)
       to zero. Obviously, (40 + 0) is greater than zero, so the core code
       deems the input OK.
    4. idpf interprets `rx 0 tx 0` as 0 channels and tries to proceed with such
       configuration.
    
    The issue has to be solved fundamentally, as current logic is also known to
    cause AF_XDP problems in ice [0].
    
    Interpret the command in a way that is more consistent with ethtool
    manual [1] (--show-channels and --set-channels) and new ice logic.
    
    Considering that in the idpf driver only the difference between RX and TX
    queues forms dedicated channels, change the correct way to set number of
    channels to:
    
    ethtool -L <IFNAME> combined 10 /* For symmetric queues */
    ethtool -L <IFNAME> combined 8 tx 2 rx 0 /* For asymmetric queues */
    
    [0] https://lore.kernel.org/netdev/20240418095857.2827-1-larysa.zaremba@intel.com/
    [1] https://man7.org/linux/man-pages/man8/ethtool.8.html
    
    Fixes: 02cbfba ("idpf: add ethtool callbacks")
    Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
    Reviewed-by: Igor Bagnucki <igor.bagnucki@intel.com>
    Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
    Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    walking-machine authored and Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    5e7695e View commit details
    Browse the repository at this point in the history
  14. Merge branch 'intel-interpret-set_channels-input-differently'

    Jacob Keller says:
    
    ====================
    intel: Interpret .set_channels() input differently
    
    The ice and idpf drivers can trigger a crash with AF_XDP due to incorrect
    interpretation of the asymmetric Tx and Rx parameters in their
    .set_channels() implementations:
    
    1. ethtool -l <IFNAME> -> combined: 40
    2. Attach AF_XDP to queue 30
    3. ethtool -L <IFNAME> rx 15 tx 15
       combined number is not specified, so command becomes {rx_count = 15,
       tx_count = 15, combined_count = 40}.
    4. ethnl_set_channels checks, if there are any AF_XDP of queues from the
       new (combined_count + rx_count) to the old one, so from 55 to 40, check
       does not trigger.
    5. the driver interprets `rx 15 tx 15` as 15 combined channels and deletes
       the queue that AF_XDP is attached to.
    
    This is fundamentally a problem with interpreting a request for asymmetric
    queues as symmetric combined queues.
    
    Fix the ice and idpf drivers to stop interpreting such requests as a
    request for combined queues. Due to current driver design for both ice and
    idpf, it is not possible to support requests of the same count of Tx and Rx
    queues with independent interrupts, (i.e. ethtool -L <IFNAME> rx 15 tx 15)
    so such requests are now rejected.
    
    Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
    ====================
    
    Link: https://lore.kernel.org/r/20240521-iwl-net-2024-05-14-set-channels-fixes-v2-0-7aa39e2e99f1@intel.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    3d8597d View commit details
    Browse the repository at this point in the history
  15. r8169: Fix possible ring buffer corruption on fragmented Tx packets.

    An issue was found on the RTL8125b when transmitting small fragmented
    packets, whereby invalid entries were inserted into the transmit ring
    buffer, subsequently leading to calls to dma_unmap_single() with a null
    address.
    
    This was caused by rtl8169_start_xmit() not noticing changes to nr_frags
    which may occur when small packets are padded (to work around hardware
    quirks) in rtl8169_tso_csum_v2().
    
    To fix this, postpone inspecting nr_frags until after any padding has been
    applied.
    
    Fixes: 9020845 ("r8169: improve rtl8169_start_xmit")
    Cc: stable@vger.kernel.org
    Signed-off-by: Ken Milmore <ken.milmore@gmail.com>
    Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
    Link: https://lore.kernel.org/r/27ead18b-c23d-4f49-a020-1fc482c5ac95@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    KenMilmore authored and Paolo Abeni committed May 23, 2024
    Configuration menu
    Copy the full SHA
    c71e3a5 View commit details
    Browse the repository at this point in the history
  16. tools/latency-collector: Fix -Wformat-security compile warns

    Fix the following -Wformat-security compile warnings adding missing
    format arguments:
    
    latency-collector.c: In function ‘show_available’:
    latency-collector.c:938:17: warning: format not a string literal and
    no format arguments [-Wformat-security]
      938 |                 warnx(no_tracer_msg);
          |                 ^~~~~
    
    latency-collector.c:943:17: warning: format not a string literal and
    no format arguments [-Wformat-security]
      943 |                 warnx(no_latency_tr_msg);
          |                 ^~~~~
    
    latency-collector.c: In function ‘find_default_tracer’:
    latency-collector.c:986:25: warning: format not a string literal and
    no format arguments [-Wformat-security]
      986 |                         errx(EXIT_FAILURE, no_tracer_msg);
          |
                             ^~~~
    latency-collector.c: In function ‘scan_arguments’:
    latency-collector.c:1881:33: warning: format not a string literal and
    no format arguments [-Wformat-security]
     1881 |                                 errx(EXIT_FAILURE, no_tracer_msg);
          |                                 ^~~~
    
    Link: https://lore.kernel.org/linux-trace-kernel/20240404011009.32945-1-skhan@linuxfoundation.org
    
    Cc: stable@vger.kernel.org
    Fixes: e23db80 ("tracing/tools: Add the latency-collector to tools directory")
    Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    shuahkh authored and rostedt committed May 23, 2024
    Configuration menu
    Copy the full SHA
    df73757 View commit details
    Browse the repository at this point in the history
  17. Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/gi…

    …t/mst/vhost
    
    Pull virtio updates from Michael Tsirkin:
     "Several new features here:
    
       - virtio-net is finally supported in vduse
    
       - virtio (balloon and mem) interaction with suspend is improved
    
       - vhost-scsi now handles signals better/faster
    
      And fixes, cleanups all over the place"
    
    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (48 commits)
      virtio-pci: Check if is_avq is NULL
      virtio: delete vq in vp_find_vqs_msix() when request_irq() fails
      MAINTAINERS: add Eugenio Pérez as reviewer
      vhost-vdpa: Remove usage of the deprecated ida_simple_xx() API
      vp_vdpa: don't allocate unused msix vectors
      sound: virtio: drop owner assignment
      fuse: virtio: drop owner assignment
      scsi: virtio: drop owner assignment
      rpmsg: virtio: drop owner assignment
      nvdimm: virtio_pmem: drop owner assignment
      wifi: mac80211_hwsim: drop owner assignment
      vsock/virtio: drop owner assignment
      net: 9p: virtio: drop owner assignment
      net: virtio: drop owner assignment
      net: caif: virtio: drop owner assignment
      misc: nsm: drop owner assignment
      iommu: virtio: drop owner assignment
      drm/virtio: drop owner assignment
      gpio: virtio: drop owner assignment
      firmware: arm_scmi: virtio: drop owner assignment
      ...
    torvalds committed May 23, 2024
    Configuration menu
    Copy the full SHA
    2ef32ad View commit details
    Browse the repository at this point in the history
  18. Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/arm64/linux
    
    Pull arm64 fixes from Will Deacon:
     "The major fix here is for a filesystem corruption issue reported on
      Apple M1 as a result of buggy management of the floating point
      register state introduced in 6.8. I initially reverted one of the
      offending patches, but in the end Ard cooked a proper fix so there's a
      revert+reapply in the series.
    
      Aside from that, we've got some CPU errata workarounds and misc other
      fixes.
    
       - Fix broken FP register state tracking which resulted in filesystem
         corruption when dm-crypt is used
    
       - Workarounds for Arm CPU errata affecting the SSBS Spectre
         mitigation
    
       - Fix lockdep assertion in DMC620 memory controller PMU driver
    
       - Fix alignment of BUG table when CONFIG_DEBUG_BUGVERBOSE is
         disabled"
    
    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
      arm64/fpsimd: Avoid erroneous elide of user state reload
      Reapply "arm64: fpsimd: Implement lazy restore for kernel mode FPSIMD"
      arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY
      perf/arm-dmc620: Fix lockdep assert in ->event_init()
      Revert "arm64: fpsimd: Implement lazy restore for kernel mode FPSIMD"
      arm64: errata: Add workaround for Arm errata 3194386 and 3312417
      arm64: cputype: Add Neoverse-V3 definitions
      arm64: cputype: Add Cortex-X4 definitions
      arm64: barrier: Restore spec_bar() macro
    torvalds committed May 23, 2024
    Configuration menu
    Copy the full SHA
    2b7ced1 View commit details
    Browse the repository at this point in the history
  19. Merge tag 'sparc-for-6.10-tag1' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/alarsson/linux-sparc
    
    Pull sparc updates from Andreas Larsson:
    
     - Avoid on-stack cpumask variables in a number of places
    
     - Move struct termio to asm/termios.h, matching other architectures and
       allowing certain user space applications to build also for sparc
    
     - Fix missing prototype warnings for sparc64
    
     - Fix version generation warnings for sparc32
    
     - Fix bug where non-consecutive CPU IDs lead to some CPUs not starting
    
     - Simplification using swap and cleanup using NULL for pointer
    
     - Convert sparc parport and chmc drivers to use remove callbacks
       returning void
    
    * tag 'sparc-for-6.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc:
      sparc/leon: Remove on-stack cpumask var
      sparc/pci_msi: Remove on-stack cpumask var
      sparc/of: Remove on-stack cpumask var
      sparc/irq: Remove on-stack cpumask var
      sparc/srmmu: Remove on-stack cpumask var
      sparc: chmc: Convert to platform remove callback returning void
      sparc: parport: Convert to platform remove callback returning void
      sparc: Compare pointers to NULL instead of 0
      sparc: Use swap() to fix Coccinelle warning
      sparc32: Fix version generation failed warnings
      sparc64: Fix number of online CPUs
      sparc64: Fix prototype warning for sched_clock
      sparc64: Fix prototype warnings in adi_64.c
      sparc64: Fix prototype warning for dma_4v_iotsb_bind
      sparc64: Fix prototype warning for uprobe_trap
      sparc64: Fix prototype warning for alloc_irqstack_bootmem
      sparc64: Fix prototype warning for vmemmap_free
      sparc64: Fix prototype warnings in traps_64.c
      sparc64: Fix prototype warning for init_vdso_image
      sparc: move struct termio to asm/termios.h
    torvalds committed May 23, 2024
    Configuration menu
    Copy the full SHA
    bca2a25 View commit details
    Browse the repository at this point in the history
  20. Merge tag 'trace-assign-str-v6.10' of git://git.kernel.org/pub/scm/li…

    …nux/kernel/git/trace/linux-trace
    
    Pull tracing cleanup from Steven Rostedt:
     "Remove second argument of __assign_str()
    
      The __assign_str() macro logic of the TRACE_EVENT() macro was
      optimized so that it no longer needs the second argument. The
      __assign_str() is always matched with __string() field that takes a
      field name and the source for that field:
    
        __string(field, source)
    
      The TRACE_EVENT() macro logic will save off the source value and then
      use that value to copy into the ring buffer via the __assign_str().
    
      Before commit c1fa617 ("tracing: Rework __assign_str() and
      __string() to not duplicate getting the string"), the __assign_str()
      needed the second argument which would perform the same logic as the
      __string() source parameter did. Not only would this add overhead, but
      it was error prone as if the __assign_str() source produced something
      different, it may not have allocated enough for the string in the ring
      buffer (as the __string() source was used to determine how much to
      allocate)
    
      Now that the __assign_str() just uses the same string that was used in
      __string() it no longer needs the source parameter. It can now be
      removed"
    
    * tag 'trace-assign-str-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
      tracing/treewide: Remove second parameter of __assign_str()
    torvalds committed May 23, 2024
    Configuration menu
    Copy the full SHA
    d6a326d View commit details
    Browse the repository at this point in the history
  21. Merge tag 'trace-tools-v6.10-2' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/trace/linux-trace
    
    Pull tracing tool fix from Steven Rostedt:
     "Fix printf format warnings in latency-collector.
    
      Use the printf format string with %s to take a string instead of
      taking in a string directly"
    
    * tag 'trace-tools-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
      tools/latency-collector: Fix -Wformat-security compile warns
    torvalds committed May 23, 2024
    Configuration menu
    Copy the full SHA
    e82d2af View commit details
    Browse the repository at this point in the history
  22. Merge tag 'trace-fixes-v6.10' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/trace/linux-trace
    
    Pull tracing fixes from Steven Rostedt:
     "Minor last minute fixes:
    
       - Fix a very tight race between the ring buffer readers and resizing
         the ring buffer
    
       - Correct some stale comments in the ring buffer code
    
       - Fix kernel-doc in the rv code
    
       - Add a MODULE_DESCRIPTION to preemptirq_delay_test"
    
    * tag 'trace-fixes-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
      rv: Update rv_en(dis)able_monitor doc to match kernel-doc
      tracing: Add MODULE_DESCRIPTION() to preemptirq_delay_test
      ring-buffer: Fix a race between readers and resize checks
      ring-buffer: Correct stale comments related to non-consuming readers
    torvalds committed May 23, 2024
    Configuration menu
    Copy the full SHA
    404001d View commit details
    Browse the repository at this point in the history
  23. Merge tag 'net-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/netdev/net
    
    Pull networking fixes from Paolo Abeni:
     "Quite smaller than usual. Notably it includes the fix for the unix
      regression from the past weeks. The TCP window fix will require some
      follow-up, already queued.
    
      Current release - regressions:
    
       - af_unix: fix garbage collection of embryos
    
      Previous releases - regressions:
    
       - af_unix: fix race between GC and receive path
    
       - ipv6: sr: fix missing sk_buff release in seg6_input_core
    
       - tcp: remove 64 KByte limit for initial tp->rcv_wnd value
    
       - eth: r8169: fix rx hangup
    
       - eth: lan966x: remove ptp traps in case the ptp is not enabled
    
       - eth: ixgbe: fix link breakage vs cisco switches
    
       - eth: ice: prevent ethtool from corrupting the channels
    
      Previous releases - always broken:
    
       - openvswitch: set the skbuff pkt_type for proper pmtud support
    
       - tcp: Fix shift-out-of-bounds in dctcp_update_alpha()
    
      Misc:
    
       - a bunch of selftests stabilization patches"
    
    * tag 'net-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (25 commits)
      r8169: Fix possible ring buffer corruption on fragmented Tx packets.
      idpf: Interpret .set_channels() input differently
      ice: Interpret .set_channels() input differently
      nfc: nci: Fix handling of zero-length payload packets in nci_rx_work()
      net: relax socket state check at accept time.
      tcp: remove 64 KByte limit for initial tp->rcv_wnd value
      net: ti: icssg_prueth: Fix NULL pointer dereference in prueth_probe()
      tls: fix missing memory barrier in tls_init
      net: fec: avoid lock evasion when reading pps_enable
      Revert "ixgbe: Manual AN-37 for troublesome link partners for X550 SFI"
      testing: net-drv: use stats64 for testing
      net: mana: Fix the extra HZ in mana_hwc_send_request
      net: lan966x: Remove ptp traps in case the ptp is not enabled.
      openvswitch: Set the skbuff pkt_type for proper pmtud support.
      selftest: af_unix: Make SCM_RIGHTS into OOB data.
      af_unix: Fix garbage collection of embryos carrying OOB with SCM_RIGHTS
      tcp: Fix shift-out-of-bounds in dctcp_update_alpha().
      selftests/net: use tc rule to filter the na packet
      ipv6: sr: fix memleak in seg6_hmac_init_algo
      af_unix: Update unix_sk(sk)->oob_skb under sk_receive_queue lock.
      ...
    torvalds committed May 23, 2024
    Configuration menu
    Copy the full SHA
    66ad482 View commit details
    Browse the repository at this point in the history
  24. net: Rename mono_delivery_time to tstamp_type for scalabilty

    mono_delivery_time was added to check if skb->tstamp has delivery
    time in mono clock base (i.e. EDT) otherwise skb->tstamp has
    timestamp in ingress and delivery_time at egress.
    
    Renaming the bitfield from mono_delivery_time to tstamp_type is for
    extensibilty for other timestamps such as userspace timestamp
    (i.e. SO_TXTIME) set via sock opts.
    
    As we are renaming the mono_delivery_time to tstamp_type, it makes
    sense to start assigning tstamp_type based on enum defined
    in this commit.
    
    Earlier we used bool arg flag to check if the tstamp is mono in
    function skb_set_delivery_time, Now the signature of the functions
    accepts tstamp_type to distinguish between mono and real time.
    
    Also skb_set_delivery_type_by_clockid is a new function which accepts
    clockid to determine the tstamp_type.
    
    In future tstamp_type:1 can be extended to support userspace timestamp
    by increasing the bitfield.
    
    Signed-off-by: Abhishek Chauhan <quic_abchauha@quicinc.com>
    Reviewed-by: Willem de Bruijn <willemb@google.com>
    Reviewed-by: Martin KaFai Lau <martin.lau@kernel.org>
    Link: https://lore.kernel.org/r/20240509211834.3235191-2-quic_abchauha@quicinc.com
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Abhishek Chauhan authored and Martin KaFai Lau committed May 23, 2024
    Configuration menu
    Copy the full SHA
    4d25ca2 View commit details
    Browse the repository at this point in the history
  25. net: Add additional bit to support clockid_t timestamp type

    tstamp_type is now set based on actual clockid_t compressed
    into 2 bits.
    
    To make the design scalable for future needs this commit bring in
    the change to extend the tstamp_type:1 to tstamp_type:2 to support
    other clockid_t timestamp.
    
    We now support CLOCK_TAI as part of tstamp_type as part of this
    commit with existing support CLOCK_MONOTONIC and CLOCK_REALTIME.
    
    Signed-off-by: Abhishek Chauhan <quic_abchauha@quicinc.com>
    Reviewed-by: Willem de Bruijn <willemb@google.com>
    Reviewed-by: Martin KaFai Lau <martin.lau@kernel.org>
    Link: https://lore.kernel.org/r/20240509211834.3235191-3-quic_abchauha@quicinc.com
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Abhishek Chauhan authored and Martin KaFai Lau committed May 23, 2024
    Configuration menu
    Copy the full SHA
    1693c5d View commit details
    Browse the repository at this point in the history
  26. selftests/bpf: Handle forwarding of UDP CLOCK_TAI packets

    With changes in the design to forward CLOCK_TAI in the skbuff
    framework,  existing selftest framework needs modification
    to handle forwarding of UDP packets with CLOCK_TAI as clockid.
    
    Signed-off-by: Abhishek Chauhan <quic_abchauha@quicinc.com>
    Reviewed-by: Martin KaFai Lau <martin.lau@kernel.org>
    Link: https://lore.kernel.org/r/20240509211834.3235191-4-quic_abchauha@quicinc.com
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Abhishek Chauhan authored and Martin KaFai Lau committed May 23, 2024
    Configuration menu
    Copy the full SHA
    c34e3ab View commit details
    Browse the repository at this point in the history
  27. Merge branch 'Replace mono_delivery_time with tstamp_type'

    Abhishek Chauhan says:
    
    ====================
    Patch 1 :- This patch takes care of only renaming the mono delivery
    timestamp to tstamp_type with no change in functionality of
    existing available code in kernel also
    Starts assigning tstamp_type with either mono or real and
    introduces a new enum in the skbuff.h, again no change in functionality
    of the existing available code in kernel , just making the code scalable.
    
    Patch 2 :- Additional bit was added to support tai timestamp type to
    avoid tstamp drops in the forwarding path when testing TC-ETF.
    Patch is also updating bpf filter.c
    Some updates to bpf header files with introduction to BPF_SKB_CLOCK_TAI
    and documentation updates stating deprecation of BPF_SKB_TSTAMP_UNSPEC
    and BPF_SKB_TSTAMP_DELIVERY_MONO
    
    Patch 3:- Handles forwarding of UDP packets with TAI clock id tstamp_type
    type with supported changes for tc_redirect/tc_redirect_dtime
    to handle forwarding of UDP packets with TAI tstamp_type
    ====================
    
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Martin KaFai Lau committed May 23, 2024
    Configuration menu
    Copy the full SHA
    ecec188 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. riscv, bpf: Optimize zextw insn with Zba extension

    The Zba extension provides add.uw insn which can be used to implement
    zext.w with rs2 set as ZERO.
    
    Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Tested-by: Pu Lehui <pulehui@huawei.com>
    Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
    Reviewed-by: Pu Lehui <pulehui@huawei.com>
    Link: https://lore.kernel.org/bpf/20240516090430.493122-1-xiao.w.wang@intel.com
    XiaoWang1772 authored and borkmann committed May 24, 2024
    Configuration menu
    Copy the full SHA
    c12603e View commit details
    Browse the repository at this point in the history
  2. riscv, bpf: Use STACK_ALIGN macro for size rounding up

    Use the macro STACK_ALIGN that is defined in asm/processor.h for stack size
    rounding up, just like bpf_jit_comp32.c does.
    
    Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Reviewed-by: Pu Lehui <pulehui@huawei.com>
    Link: https://lore.kernel.org/bpf/20240523031835.3977713-1-xiao.w.wang@intel.com
    XiaoWang1772 authored and borkmann committed May 24, 2024
    Configuration menu
    Copy the full SHA
    e944fc8 View commit details
    Browse the repository at this point in the history
  3. riscv, bpf: Try RVC for reg move within BPF_CMPXCHG JIT

    We could try to emit compressed insn for reg move operation during CMPXCHG
    JIT, the instruction compression has no impact on the jump offsets of
    following forward and backward jump instructions.
    
    Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Acked-by: Björn Töpel <bjorn@kernel.org>
    Link: https://lore.kernel.org/bpf/20240519050507.2217791-1-xiao.w.wang@intel.com
    XiaoWang1772 authored and borkmann committed May 24, 2024
    Configuration menu
    Copy the full SHA
    99fa63d View commit details
    Browse the repository at this point in the history
  4. bpf: constify member bpf_sysctl_kern:: Table

    The sysctl core is preparing to only expose instances of struct ctl_table
    as "const". This will also affect the ctl_table argument of sysctl handlers,
    for which bpf_sysctl_kern::table is also used.
    
    As the function prototype of all sysctl handlers throughout the tree
    needs to stay consistent that change will be done in one commit.
    
    To reduce the size of that final commit, switch this utility type which
    is not bound by "typedef proc_handler" to "const struct ctl_table".
    
    No functional change.
    
    Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Reviewed-by: Joel Granados <j.granados@samsung.com>
    Link: https://lore.kernel.org/bpf/20240518-sysctl-const-handler-bpf-v1-1-f0d7186743c1@weissschuh.net
    t-8ch authored and borkmann committed May 24, 2024
    Configuration menu
    Copy the full SHA
    2c1713a View commit details
    Browse the repository at this point in the history

Commits on May 25, 2024

  1. bpf, docs: Move sentence about returning R0 to abi.rst

    As discussed at LSF/MM/BPF, the sentence about using R0 for returning
    values from calls is part of the calling convention and belongs in
    abi.rst.  Any further additions or clarifications to this text are left
    for future patches on abi.rst.  The current patch is simply to unblock
    progression of instruction-set.rst to a standard.
    
    In contrast, the restriction of register numbers to the range 0-10
    is untouched, left in the instruction-set.rst definition of the
    src_reg and dst_reg fields.
    
    Signed-off-by: Dave Thaler <dthaler1968@googlemail.com>
    Link: https://lore.kernel.org/r/20240517153445.3914-1-dthaler1968@gmail.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Dave Thaler authored and Alexei Starovoitov committed May 25, 2024
    Configuration menu
    Copy the full SHA
    4652072 View commit details
    Browse the repository at this point in the history
  2. bpf, docs: Use RFC 2119 language for ISA requirements

    Per IETF convention and discussion at LSF/MM/BPF, use MUST etc.
    keywords as requested by IETF Area Director review.  Also as
    requested, indicate that documenting BTF is out of scope of this
    document and will be covered by a separate IETF specification.
    
    Added paragraph about the terminology that is required IETF boilerplate
    and must be worded exactly as such.
    
    Signed-off-by: Dave Thaler <dthaler1968@googlemail.com>
    Acked-by: David Vernet <void@manifault.com>
    Link: https://lore.kernel.org/r/20240517165855.4688-1-dthaler1968@gmail.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Dave Thaler authored and Alexei Starovoitov committed May 25, 2024
    Configuration menu
    Copy the full SHA
    a985fdc View commit details
    Browse the repository at this point in the history
  3. bpf, docs: clarify sign extension of 64-bit use of 32-bit imm

    imm is defined as a 32-bit signed integer.
    
    {MOV, K, ALU64} says it does "dst = src" (where src is 'imm') and it
    does do dst = (s64)imm, which in that sense does sign extend imm. The MOVSX
    instruction is explained as sign extending, so added the example of
    {MOV, K, ALU64} to make this more clear.
    
    {JLE, K, JMP} says it does "PC += offset if dst <= src" (where src is 'imm',
    and the comparison is unsigned). This was apparently ambiguous to some
    readers as to whether the comparison was "dst <= (u64)(u32)imm" or
    "dst <= (u64)(s64)imm" so added an example to make this more clear.
    
    v1 -> v2: Address comments from Yonghong
    
    Signed-off-by: Dave Thaler <dthaler1968@googlemail.com>
    Acked-by: Yonghong Song <yonghong.song@linux.dev>
    Acked-by: David Vernet <void@manifault.com>
    Link: https://lore.kernel.org/r/20240520215255.10595-1-dthaler1968@gmail.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Dave Thaler authored and Alexei Starovoitov committed May 25, 2024
    Configuration menu
    Copy the full SHA
    4e1215d View commit details
    Browse the repository at this point in the history
  4. bpf, docs: Add table captions

    As suggested by Ines Robles in his IETF GENART review at
    https://datatracker.ietf.org/doc/review-ietf-bpf-isa-02-genart-lc-robles-2024-05-16/
    
    Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
    Link: https://lore.kernel.org/r/20240524164618.18894-1-dthaler1968@gmail.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Dave Thaler authored and Alexei Starovoitov committed May 25, 2024
    Configuration menu
    Copy the full SHA
    6a6d8b6 View commit details
    Browse the repository at this point in the history
  5. bpf, docs: Clarify call local offset

    In the Jump instructions section it explains that the offset is
    "relative to the instruction following the jump instruction".
    But the program-local section confusingly said "referenced by
    offset from the call instruction, similar to JA".
    
    This patch updates that sentence with consistent wording, saying
    it's relative to the instruction following the call instruction.
    
    Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
    Acked-by: Yonghong Song <yonghong.song@linux.dev>
    Link: https://lore.kernel.org/r/20240525153332.21355-1-dthaler1968@gmail.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Dave Thaler authored and Alexei Starovoitov committed May 25, 2024
    Configuration menu
    Copy the full SHA
    f980f13 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2024

  1. bpf, docs: Fix instruction.rst indentation

    The table captions patch corrected indented most tables to work with
    the table directive for adding a caption but missed two of them.
    
    Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Link: https://lore.kernel.org/r/20240526061815.22497-1-dthaler1968@gmail.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Dave Thaler authored and Alexei Starovoitov committed May 26, 2024
    Configuration menu
    Copy the full SHA
    e245ef8 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. mISDN: remove unused struct 'bf_ctx'

    'bf_ctx' appears unused since the original
    commit 960366c ("Add mISDN DSP").
    
    Remove it.
    
    Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
    Link: https://lore.kernel.org/r/20240523155922.67329-1-linux@treblig.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Dr. David Alan Gilbert authored and kuba-moo committed May 27, 2024
    Configuration menu
    Copy the full SHA
    5233a55 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2024

  1. bpf, net: Use DEV_STAT_INC()

    syzbot/KCSAN reported that races happen when multiple CPUs updating
    dev->stats.tx_error concurrently. Adopt SMP safe DEV_STATS_INC() to
    update the dev->stats fields.
    
    Reported-by: syzbot <syzkaller@googlegroups.com>
    Signed-off-by: yunshui <jiangyunshui@kylinos.cn>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/bpf/20240523033520.4029314-1-jiangyunshui@kylinos.cn
    yunshui authored and borkmann committed May 28, 2024
    Configuration menu
    Copy the full SHA
    d9cbd83 View commit details
    Browse the repository at this point in the history
  2. net/core: remove redundant sk_callback_lock initialization

    sk_callback_lock has already been initialized in sk_init_common().
    
    Signed-off-by: Gou Hao <gouhao@uniontech.com>
    Reviewed-by: Breno Leitao <leitao@debian.org>
    Link: https://lore.kernel.org/r/20240526145718.9542-1-gouhao@uniontech.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Gou Hao authored and Paolo Abeni committed May 28, 2024
    Configuration menu
    Copy the full SHA
    c65b652 View commit details
    Browse the repository at this point in the history
  3. net/core: move the lockdep-init of sk_callback_lock to sk_init_common()

    In commit cdfbabf ("net: Work around lockdep limitation in
    sockets that use sockets"), it introduces 'af_kern_callback_keys'
    to lockdep-init of sk_callback_lock according to 'sk_kern_sock',
    it modifies sock_init_data() only, and sk_clone_lock() calls
    sk_init_common() to initialize sk_callback_lock too, so the
    lockdep-init of sk_callback_lock should be moved to sk_init_common().
    
    Signed-off-by: Gou Hao <gouhao@uniontech.com>
    Link: https://lore.kernel.org/r/20240526145718.9542-2-gouhao@uniontech.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Gou Hao authored and Paolo Abeni committed May 28, 2024
    Configuration menu
    Copy the full SHA
    de31e96 View commit details
    Browse the repository at this point in the history
  4. net: ethernet: starfire: remove unused structs

    'short_rx_done_desc' and 'basic_rx_done_desc' are unused since
    commit fdecea6 ("  [netdrvr starfire] Add GPL'd firmware, remove
    compat code").
    
    Remove them.
    
    Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Dr. David Alan Gilbert authored and Paolo Abeni committed May 28, 2024
    Configuration menu
    Copy the full SHA
    b2ff269 View commit details
    Browse the repository at this point in the history
  5. net: ethernet: liquidio: remove unused structs

    'niclist' and 'oct_link_status_resp' are unused since the original
    commit f21fb3e ("Add support of Cavium Liquidio ethernet
    adapters").
    
    Remove them.
    
    Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Dr. David Alan Gilbert authored and Paolo Abeni committed May 28, 2024
    Configuration menu
    Copy the full SHA
    a09892f View commit details
    Browse the repository at this point in the history
  6. net: ethernet: mlx4: remove unused struct 'mlx4_port_config'

    'mlx4_port_config was added by
    commit ab9c17a ("mlx4_core: Modify driver initialization flow to
    accommodate SRIOV for Ethernet")
    but remained unused.
    
    Remove it.
    
    Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Dr. David Alan Gilbert authored and Paolo Abeni committed May 28, 2024
    Configuration menu
    Copy the full SHA
    ef7f9fe View commit details
    Browse the repository at this point in the history
  7. net: ethernet: 8390: ne2k-pci: remove unused struct 'ne2k_pci_card'

    'ne2k_pci_card' is unused since 2.3.99-pre3 in March 2000.
    
    Remove it.
    
    Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Dr. David Alan Gilbert authored and Paolo Abeni committed May 28, 2024
    Configuration menu
    Copy the full SHA
    18ae4c0 View commit details
    Browse the repository at this point in the history
  8. net: usb: remove unused structs 'usb_context'

    Both lan78xx and smsc75xx have a 'usb_context'
    struct which is unused, since their original commits.
    
    Remove them.
    
    Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
    Link: https://lore.kernel.org/r/20240526205922.176578-1-linux@treblig.org
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Dr. David Alan Gilbert authored and Paolo Abeni committed May 28, 2024
    Configuration menu
    Copy the full SHA
    c30ff5f View commit details
    Browse the repository at this point in the history
  9. Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel…

    …/git/bpf/bpf-next
    
    Daniel Borkmann says:
    
    ====================
    pull-request: bpf-next 2024-05-28
    
    We've added 23 non-merge commits during the last 11 day(s) which contain
    a total of 45 files changed, 696 insertions(+), 277 deletions(-).
    
    The main changes are:
    
    1) Rename skb's mono_delivery_time to tstamp_type for extensibility
       and add SKB_CLOCK_TAI type support to bpf_skb_set_tstamp(),
       from Abhishek Chauhan.
    
    2) Add netfilter CT zone ID and direction to bpf_ct_opts so that arbitrary
       CT zones can be used from XDP/tc BPF netfilter CT helper functions,
       from Brad Cowie.
    
    3) Several tweaks to the instruction-set.rst IETF doc to address
       the Last Call review comments, from Dave Thaler.
    
    4) Small batch of riscv64 BPF JIT optimizations in order to emit more
       compressed instructions to the JITed image for better icache efficiency,
       from Xiao Wang.
    
    5) Sort bpftool C dump output from BTF, aiming to simplify vmlinux.h
       diffing and forcing more natural type definitions ordering,
       from Mykyta Yatsenko.
    
    6) Use DEV_STATS_INC() macro in BPF redirect helpers to silence
       a syzbot/KCSAN race report for the tx_errors counter,
       from Jiang Yunshui.
    
    7) Un-constify bpf_func_info in bpftool to fix compilation with LLVM 17+
       which started treating const structs as constants and thus breaking
       full BTF program name resolution, from Ivan Babrou.
    
    8) Fix up BPF program numbers in test_sockmap selftest in order to reduce
       some of the test-internal array sizes, from Geliang Tang.
    
    9) Small cleanup in Makefile.btf script to use test-ge check for v1.25-only
       pahole, from Alan Maguire.
    
    10) Fix bpftool's make dependencies for vmlinux.h in order to avoid needless
        rebuilds in some corner cases, from Artem Savkov.
    
    * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (23 commits)
      bpf, net: Use DEV_STAT_INC()
      bpf, docs: Fix instruction.rst indentation
      bpf, docs: Clarify call local offset
      bpf, docs: Add table captions
      bpf, docs: clarify sign extension of 64-bit use of 32-bit imm
      bpf, docs: Use RFC 2119 language for ISA requirements
      bpf, docs: Move sentence about returning R0 to abi.rst
      bpf: constify member bpf_sysctl_kern:: Table
      riscv, bpf: Try RVC for reg move within BPF_CMPXCHG JIT
      riscv, bpf: Use STACK_ALIGN macro for size rounding up
      riscv, bpf: Optimize zextw insn with Zba extension
      selftests/bpf: Handle forwarding of UDP CLOCK_TAI packets
      net: Add additional bit to support clockid_t timestamp type
      net: Rename mono_delivery_time to tstamp_type for scalabilty
      selftests/bpf: Update tests for new ct zone opts for nf_conntrack kfuncs
      net: netfilter: Make ct zone opts configurable for bpf ct helpers
      selftests/bpf: Fix prog numbers in test_sockmap
      bpf: Remove unused variable "prev_state"
      bpftool: Un-const bpf_func_info to fix it for llvm 17 and newer
      bpf: Fix order of args in call to bpf_map_kvcalloc
      ...
    ====================
    
    Link: https://lore.kernel.org/r/20240528105924.30905-1-daniel@iogearbox.net
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    kuba-moo committed May 28, 2024
    Configuration menu
    Copy the full SHA
    4b3529e View commit details
    Browse the repository at this point in the history
  10. libbpf: Configure log verbosity with env variable

    Configure logging verbosity by setting LIBBPF_LOG_LEVEL environment
    variable, which is applied only to default logger. Once user set their
    custom logging callback, it is up to them to handle filtering.
    
    Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20240524131840.114289-1-yatsenko@meta.com
    mykyta5 authored and anakryiko committed May 28, 2024
    Configuration menu
    Copy the full SHA
    eb4e772 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2024

  1. selftests/bpf: Drop struct post_socket_opts

    It's not possible to have one generic/common "struct post_socket_opts"
    for all tests. It's better to have the individual test define its own
    callback opts struct.
    
    So this patch drops struct post_socket_opts, and changes the second
    parameter of post_socket_cb as "void *" type.
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Link: https://lore.kernel.org/r/f8bda41c7cb9cb6979b2779f89fb3a684234304f.1716638248.git.tanggeliang@kylinos.cn
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Geliang Tang authored and Martin KaFai Lau committed May 29, 2024
    Configuration menu
    Copy the full SHA
    ed31adf View commit details
    Browse the repository at this point in the history
  2. selftests/bpf: Add start_server_str helper

    It's a tech debt that start_server() does not take the "opts" argument.
    It's pretty handy to have start_server() as a helper that takes string
    address.
    
    So this patch creates a new helper start_server_str(). Then start_server()
    can be a wrapper of it.
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Link: https://lore.kernel.org/r/606e6cfd7e1aff8bc51ede49862eed0802e52170.1716638248.git.tanggeliang@kylinos.cn
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Geliang Tang authored and Martin KaFai Lau committed May 29, 2024
    Configuration menu
    Copy the full SHA
    6f802cb View commit details
    Browse the repository at this point in the history
  3. selftests/bpf: Use post_socket_cb in connect_to_fd_opts

    Since the post_socket_cb() callback is added in struct network_helper_opts,
    it's make sense to use it not only in __start_server(), but also in
    connect_to_fd_opts(). Then it can be used to set TCP_CONGESTION sockopt.
    
    Add a "void *" type member cb_opts into struct network_helper_opts, and add
    a new struct named cb_opts in prog_tests/bpf_tcp_ca.c, then cc can be moved
    into struct cb_opts from network_helper_opts. Define a new callback cc_cb()
    to set TCP_CONGESTION sockopt, and set it to post_socket_cb pointer of opts.
    Define a new cb_opts cubic, set it to cb_opts of opts. Pass this opts to
    connect_to_fd_opts() in test_dctcp_fallback().
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Link: https://lore.kernel.org/r/b512bb8d8f6854c9ea5c409b69d1bf37c6f272c6.1716638248.git.tanggeliang@kylinos.cn
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Geliang Tang authored and Martin KaFai Lau committed May 29, 2024
    Configuration menu
    Copy the full SHA
    e078255 View commit details
    Browse the repository at this point in the history
  4. selftests/bpf: Use post_socket_cb in start_server_str

    This patch uses start_server_str() helper in test_dctcp_fallback() in
    bpf_tcp_ca.c, instead of using start_server() and settcpca(). For
    support opts in start_server_str() helper, opts->cb_opts needs to be
    passed to post_socket_cb() in __start_server().
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Link: https://lore.kernel.org/r/414c749321fa150435f7fe8e12c80fec8b447c78.1716638248.git.tanggeliang@kylinos.cn
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Geliang Tang authored and Martin KaFai Lau committed May 29, 2024
    Configuration menu
    Copy the full SHA
    79b330c View commit details
    Browse the repository at this point in the history
  5. selftests/bpf: Use start_server_str in do_test in bpf_tcp_ca

    This patch uses new helper start_server_str() in do_test() in bpf_tcp_ca.c
    to accept a struct network_helper_opts argument instead of using
    start_server() and settcpca(). Then change the type of the first paramenter
    of do_test() into a struct network_helper_opts one.
    
    Define its own cb_opts and opts for each test, set its own cc name into
    cb_opts.cc, and cc_cb() into post_socket_cb callback, then pass it to
    do_test().
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Link: https://lore.kernel.org/r/6e1b6555e3284e77c8aa60668c61a66c5f99aa37.1716638248.git.tanggeliang@kylinos.cn
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Geliang Tang authored and Martin KaFai Lau committed May 29, 2024
    Configuration menu
    Copy the full SHA
    ed61271 View commit details
    Browse the repository at this point in the history
  6. Merge branch 'use network helpers, part 5'

    Geliang Tang says:
    
    ====================
    This patchset uses post_socket_cb callbacks of struct network_helper_opts
    to refactor do_test() in bpf_tcp_ca.c.
    
    v5:
     - address Martin's comments in v4 (thanks)
     - add patch 4, use start_server_str in test_dctcp_fallback too
     - ASSERT_* is already used in settcpca, use this helper in cc_cb (patch 3).
    
    v4:
     - address Martin's comments in v3 (thanks).
     - drop 2 patches, keep "type" as the individual arg to start_server_addr,
       connect_to_addr and start_server_str.
    
    v3:
     - Add 4 new patches, 1-3 are cleanups. 4 adds a new helper.
     - address Martin's comments in v2.
    
    v2:
     - rebased on commit "selftests/bpf: Add test for the use of new args in
     cong_control"
    ====================
    
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Martin KaFai Lau committed May 29, 2024
    Configuration menu
    Copy the full SHA
    fbe3e84 View commit details
    Browse the repository at this point in the history
  7. bpf: Add bits iterator

    Add three new kfuncs for the bits iterator:
    - bpf_iter_bits_new
      Initialize a new bits iterator for a given memory area. Due to the
      limitation of bpf memalloc, the max number of words (8-byte units) that
      can be iterated over is limited to (4096 / 8).
    - bpf_iter_bits_next
      Get the next bit in a bpf_iter_bits
    - bpf_iter_bits_destroy
      Destroy a bpf_iter_bits
    
    The bits iterator facilitates the iteration of the bits of a memory area,
    such as cpumask. It can be used in any context and on any address.
    
    Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20240517023034.48138-2-laoar.shao@gmail.com
    laoar authored and anakryiko committed May 29, 2024
    Configuration menu
    Copy the full SHA
    4665415 View commit details
    Browse the repository at this point in the history
  8. selftests/bpf: Add selftest for bits iter

    Add test cases for the bits iter:
    
    - Positive cases
      - Bit mask representing a single word (8-byte unit)
      - Bit mask representing data spanning more than one word
      - The index of the set bit
    
    - Nagative cases
      - bpf_iter_bits_destroy() is required after calling
        bpf_iter_bits_new()
      - bpf_iter_bits_destroy() can only destroy an initialized iter
      - bpf_iter_bits_next() must use an initialized iter
      - Bit mask representing zero words
      - Bit mask representing fewer words than expected
      - Case for ENOMEM
      - Case for NULL pointer
    
    Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20240517023034.48138-3-laoar.shao@gmail.com
    laoar authored and anakryiko committed May 29, 2024
    Configuration menu
    Copy the full SHA
    6ba7acd View commit details
    Browse the repository at this point in the history
  9. Merge branch 'bpf-add-a-generic-bits-iterator'

    Yafang Shao says:
    
    ====================
    bpf: Add a generic bits iterator
    
    Three new kfuncs, namely bpf_iter_bits_{new,next,destroy}, have been
    added for the new bpf_iter_bits functionality. These kfuncs enable the
    iteration of the bits from a given address and a given number of bits.
    
    - bpf_iter_bits_new
      Initialize a new bits iterator for a given memory area. Due to the
      limitation of bpf memalloc, the max number of bits to be iterated
      over is (4096 * 8).
    - bpf_iter_bits_next
      Get the next bit in a bpf_iter_bits
    - bpf_iter_bits_destroy
      Destroy a bpf_iter_bits
    
    The bits iterator can be used in any context and on any address.
    
    Changes:
    - v7->v8:
      Refine the interface to avoid dealing with endianness (Andrii)
    - v6->v7:
      Fix endianness error for non-long-aligned data (Andrii)
    - v5->v6:
      Add positive tests (Andrii)
    - v4->v5:
      Simplify test cases (Andrii)
    - v3->v4:
      - Fix endianness error on s390x (Andrii)
      - zero-initialize kit->bits_copy and zero out nr_bits (Andrii)
    - v2->v3:
      Optimization for u64/u32 mask (Andrii)
    - v1->v2:
      Simplify the CPU number verification code to avoid the failure on s390x
      (Eduard)
    - bpf: Add bpf_iter_cpumask
      https://lwn.net/Articles/961104/
    - bpf: Add new bpf helper bpf_for_each_cpu
      https://lwn.net/Articles/939939/
    ====================
    
    Link: https://lore.kernel.org/r/20240517023034.48138-1-laoar.shao@gmail.com
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    anakryiko committed May 29, 2024
    Configuration menu
    Copy the full SHA
    f088cab View commit details
    Browse the repository at this point in the history

Commits on May 30, 2024

  1. selftests/bpf: use section names understood by libbpf in test_sockmap

    libbpf can deduce program type and attach type from the ELF section name.
    We don't need to pass it out-of-band if we switch to libbpf convention [1].
    
    [1] https://docs.kernel.org/bpf/libbpf/program_types.html
    
    Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20240522080936.2475833-1-jakub@cloudflare.com
    jsitnicki authored and anakryiko committed May 30, 2024
    Configuration menu
    Copy the full SHA
    46253c4 View commit details
    Browse the repository at this point in the history
  2. bpf: pass bpf_struct_ops_link to callbacks in bpf_struct_ops.

    Pass an additional pointer of bpf_struct_ops_link to callback function reg,
    unreg, and update provided by subsystems defined in bpf_struct_ops. A
    bpf_struct_ops_map can be registered for multiple links. Passing a pointer
    of bpf_struct_ops_link helps subsystems to distinguish them.
    
    This pointer will be used in the later patches to let the subsystem
    initiate a detachment on a link that was registered to it previously.
    
    Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
    Link: https://lore.kernel.org/r/20240530065946.979330-2-thinker.li@gmail.com
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    ThinkerYzu1 authored and Martin KaFai Lau committed May 30, 2024
    Configuration menu
    Copy the full SHA
    73287fe View commit details
    Browse the repository at this point in the history
  3. bpf: enable detaching links of struct_ops objects.

    Implement the detach callback in bpf_link_ops for struct_ops so that user
    programs can detach a struct_ops link. The subsystems that struct_ops
    objects are registered to can also use this callback to detach the links
    being passed to them.
    
    Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
    Link: https://lore.kernel.org/r/20240530065946.979330-3-thinker.li@gmail.com
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    ThinkerYzu1 authored and Martin KaFai Lau committed May 30, 2024
    Configuration menu
    Copy the full SHA
    6fb2544 View commit details
    Browse the repository at this point in the history
  4. bpf: support epoll from bpf struct_ops links.

    Add epoll support to bpf struct_ops links to trigger EPOLLHUP event upon
    detachment.
    
    This patch implements the "poll" of the "struct file_operations" for BPF
    links and introduces a new "poll" operator in the "struct bpf_link_ops". By
    implementing "poll" of "struct bpf_link_ops" for the links of struct_ops,
    the file descriptor of a struct_ops link can be added to an epoll file
    descriptor to receive EPOLLHUP events.
    
    Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
    Link: https://lore.kernel.org/r/20240530065946.979330-4-thinker.li@gmail.com
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    ThinkerYzu1 authored and Martin KaFai Lau committed May 30, 2024
    Configuration menu
    Copy the full SHA
    1adddc9 View commit details
    Browse the repository at this point in the history
  5. bpf: export bpf_link_inc_not_zero.

    bpf_link_inc_not_zero() will be used by kernel modules.  We will use it in
    bpf_testmod.c later.
    
    Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
    Link: https://lore.kernel.org/r/20240530065946.979330-5-thinker.li@gmail.com
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    ThinkerYzu1 authored and Martin KaFai Lau committed May 30, 2024
    Configuration menu
    Copy the full SHA
    67c3e83 View commit details
    Browse the repository at this point in the history
  6. selftests/bpf: test struct_ops with epoll

    Verify whether a user space program is informed through epoll with EPOLLHUP
    when a struct_ops object is detached.
    
    The BPF code in selftests/bpf/progs/struct_ops_module.c has become
    complex. Therefore, struct_ops_detach.c has been added to segregate the BPF
    code for detachment tests from the BPF code for other tests based on the
    recommendation of Andrii Nakryiko.
    
    Suggested-by: Andrii Nakryiko <andrii@kernel.org>
    Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
    Link: https://lore.kernel.org/r/20240530065946.979330-6-thinker.li@gmail.com
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    ThinkerYzu1 authored and Martin KaFai Lau committed May 30, 2024
    Configuration menu
    Copy the full SHA
    1a4b858 View commit details
    Browse the repository at this point in the history
  7. bpftool: Change pid_iter.bpf.c to comply with the change of bpf_link_…

    …fops.
    
    To support epoll, a new instance of file_operations, bpf_link_fops_poll,
    has been added for links that support epoll. The pid_iter.bpf.c checks
    f_ops for links and other BPF objects. The check should fail for struct_ops
    links without this patch.
    
    Acked-by: Quentin Monnet <qmo@kernel.org>
    Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
    Link: https://lore.kernel.org/r/20240530065946.979330-9-thinker.li@gmail.com
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    ThinkerYzu1 authored and Martin KaFai Lau committed May 30, 2024
    Configuration menu
    Copy the full SHA
    d14c1fa View commit details
    Browse the repository at this point in the history
  8. Merge branch 'Notify user space when a struct_ops object is detached/…

    …unregistered'
    
    Kui-Feng Lee says:
    
    ====================
    The subsystems managing struct_ops objects may need to detach a
    struct_ops object due to errors or other reasons. It would be useful
    to notify user space programs so that error recovery or logging can be
    carried out.
    
    This patch set enables the detach feature for struct_ops links and
    send an event to epoll when a link is detached.  Subsystems could call
    link->ops->detach() to detach a link and notify user space programs
    through epoll.
    
    The signatures of callback functions in "struct bpf_struct_ops" have
    been changed as well to pass an extra link argument to
    subsystems. Subsystems could detach the links received from reg() and
    update() callbacks if there is. This also provides a way that
    subsystems can distinguish registrations for an object that has been
    registered multiple times for several links.
    
    However, bpf struct_ops maps without BPF_F_LINK have no any link.
    Subsystems will receive NULL link pointer for this case.
    ---
    Changes from v6:
    
     - Fix the missing header at patch 5.
    
     - Move RCU_INIT_POINTER() back to its original position.
    
    Changes from v5:
    
     - Change the commit title of the patch for bpftool.
    
    Changes from v4:
    
     - Change error code for bpf_struct_ops_map_link_update()
    
     - Always return 0 for bpf_struct_ops_map_link_detach()
    
     - Hold update_mutex in bpf_struct_ops_link_create()
    
     - Add a separated instance of file_operations for links supporting
        poll.
    
     - Fix bpftool for bpf_link_fops_poll.
    
    Changes from v3:
    
     - Add a comment to explain why holding update_mutex is not necessary
        in bpf_struct_ops_link_create()
    
     - Use rcu_access_pointer() in bpf_struct_ops_map_link_poll().
    
    Changes from v2:
    
     - Rephrased commit logs and comments.
    
     - Addressed some mistakes from patch splitting.
    
     - Replace mutex with spinlock in bpf_testmod.c to address lockdep
        Splat and simplify the implementation.
    
     - Fix an argument passing to rcu_dereference_protected().
    
    Changes from v1:
    
     - Pass a link to reg, unreg, and update callbacks.
    
     - Provide a function to detach a link from underlying subsystems.
    
     - Add a kfunc to mimic detachments from subsystems, and provide a
        flexible way to control when to do detachments.
    
     - Add two tests to detach a link from the subsystem after the refcount
        of the link drops to zero.
    
    v6: https://lore.kernel.org/bpf/20240524223036.318800-1-thinker.li@gmail.com/
    v5: https://lore.kernel.org/all/20240523230848.2022072-1-thinker.li@gmail.com/
    v4: https://lore.kernel.org/all/20240521225121.770930-1-thinker.li@gmail.com/
    v3: https://lore.kernel.org/all/20240510002942.1253354-1-thinker.li@gmail.com/
    v2: https://lore.kernel.org/all/20240507055600.2382627-1-thinker.li@gmail.com/
    v1: https://lore.kernel.org/all/20240429213609.487820-1-thinker.li@gmail.com/
    ====================
    
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Martin KaFai Lau committed May 30, 2024
    Configuration menu
    Copy the full SHA
    3f8fde3 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2024

  1. libbpf: keep FD_CLOEXEC flag when dup()'ing FD

    Make sure to preserve and/or enforce FD_CLOEXEC flag on duped FDs.
    Use dup3() with O_CLOEXEC flag for that.
    
    Without this fix libbpf effectively clears FD_CLOEXEC flag on each of BPF
    map/prog FD, which is definitely not the right or expected behavior.
    
    Reported-by: Lennart Poettering <lennart@poettering.net>
    Fixes: bc308d0 ("libbpf: call dup2() syscall directly")
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Acked-by: Jiri Olsa <jolsa@kernel.org>
    Link: https://lore.kernel.org/r/20240529223239.504241-1-andrii@kernel.org
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    anakryiko authored and Alexei Starovoitov committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    531876c View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2024

  1. riscv, bpf: Introduce shift add helper with Zba optimization

    Zba extension is very useful for generating addresses that index into array
    of basic data types. This patch introduces sh2add and sh3add helpers for
    RV32 and RV64 respectively, to accelerate addressing for array of unsigned
    long data.
    
    Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Acked-by: Björn Töpel <bjorn@kernel.org>
    Link: https://lore.kernel.org/bpf/20240524075543.4050464-3-xiao.w.wang@intel.com
    XiaoWang1772 authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    96a27ee View commit details
    Browse the repository at this point in the history
  2. selftests/bpf: Remove unused struct 'scale_test_def'

    'scale_test_def' is unused since commit 3762a39 ("selftests/bpf: Split out
    bpf_verif_scale selftests into multiple tests"). Remove it.
    
    Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/bpf/20240602234112.225107-2-linux@treblig.org
    Dr. David Alan Gilbert authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    dfa7c9f View commit details
    Browse the repository at this point in the history
  3. selftests/bpf: Remove unused 'key_t' structs

    'key_t' is unused in a couple of files since the original commit 60dd49e
    ("selftests/bpf: Add test for bpf array map iterators"). Remove it.
    
    Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/bpf/20240602234112.225107-3-linux@treblig.org
    Dr. David Alan Gilbert authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    3f67639 View commit details
    Browse the repository at this point in the history
  4. selftests/bpf: Remove unused struct 'libcap'

    'libcap' is unused since commit b1c2768 ("bpf: selftests: Remove libcap
    usage from test_verifier"). Remove it.
    
    Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/bpf/20240602234112.225107-4-linux@treblig.org
    Dr. David Alan Gilbert authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    a450d36 View commit details
    Browse the repository at this point in the history
  5. bpftool: Fix typo in MAX_NUM_METRICS macro name

    Correct typo in bpftool profiler and change all instances of 'MATRICS' to
    'METRICS' in the profiler.bpf.c file.
    
    Signed-off-by: Swan Beaujard <beaujardswan@gmail.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Acked-by: Quentin Monnet <qmo@kernel.org>
    Link: https://lore.kernel.org/bpf/20240602225812.81171-1-beaujardswan@gmail.com
    Swan Beaujard authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    ce5249b View commit details
    Browse the repository at this point in the history
  6. test_bpf: Add missing MODULE_DESCRIPTION()

    make allmodconfig && make W=1 C=1 reports:
    WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_bpf.o
    
    Add the missing invocation of the MODULE_DESCRIPTION() macro.
    
    Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/bpf/20240531-md-lib-test_bpf-v1-1-868e4bd2f9ed@quicinc.com
    Jeff Johnson authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    ec1249d View commit details
    Browse the repository at this point in the history
  7. selftests/bpf: Fix tx_prog_fd values in test_sockmap

    The values of tx_prog_fd in run_options() should not be 0, so set it as -1
    in else branch, and test it using "if (tx_prog_fd > 0)" condition, not
    "if (tx_prog_fd)" or "if (tx_prog_fd >= 0)".
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
    Acked-by: John Fastabend <john.fastabend@gmail.com>
    Link: https://lore.kernel.org/bpf/08b20ffc544324d40939efeae93800772a91a58e.1716446893.git.tanggeliang@kylinos.cn
    Geliang Tang authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    d95ba15 View commit details
    Browse the repository at this point in the history
  8. selftests/bpf: Drop duplicate definition of i in test_sockmap

    There's already a definition of i in run_options() at the beginning, no
    need to define a new one in "if (tx_prog_fd > 0)" block.
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
    Acked-by: John Fastabend <john.fastabend@gmail.com>
    Link: https://lore.kernel.org/bpf/8d690682330a59361562bca75d6903253d16f312.1716446893.git.tanggeliang@kylinos.cn
    Geliang Tang authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    a9f0ea1 View commit details
    Browse the repository at this point in the history
  9. selftests/bpf: Use bpf_link attachments in test_sockmap

    Switch attachments to bpf_link using bpf_program__attach_sockmap() instead
    of bpf_prog_attach().
    
    This patch adds a new array progs[] to replace prog_fd[] array, set in
    populate_progs() for each program in bpf object.
    
    And another new array links[] to save the attached bpf_link. It is
    initalized as NULL in populate_progs, set as the return valuses of
    bpf_program__attach_sockmap(), and detached by bpf_link__detach().
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
    Acked-by: John Fastabend <john.fastabend@gmail.com>
    Link: https://lore.kernel.org/bpf/32cf8376a810e2e9c719f8e4cfb97132ed2d1f9c.1716446893.git.tanggeliang@kylinos.cn
    Geliang Tang authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    3f32a11 View commit details
    Browse the repository at this point in the history
  10. selftests/bpf: Replace tx_prog_fd with tx_prog in test_sockmap

    bpf_program__attach_sockmap() needs to take a parameter of type bpf_program
    instead of an fd, so tx_prog_fd becomes useless. This patch uses a pointer
    tx_prog to point to an item in progs[] array.
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
    Acked-by: John Fastabend <john.fastabend@gmail.com>
    Link: https://lore.kernel.org/bpf/23b37f932c547dd1ebfe154bbc0b0e957be21ee6.1716446893.git.tanggeliang@kylinos.cn
    Geliang Tang authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    24bb90a View commit details
    Browse the repository at this point in the history
  11. selftests/bpf: Drop prog_fd array in test_sockmap

    The program fds can be got by using bpf_program__fd(progs[]), then
    prog_fd becomes useless. This patch drops it.
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
    Acked-by: John Fastabend <john.fastabend@gmail.com>
    Link: https://lore.kernel.org/bpf/9a6335e4d8dbab23c0d8906074457ceddd61e74b.1716446893.git.tanggeliang@kylinos.cn
    Geliang Tang authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    467a0c7 View commit details
    Browse the repository at this point in the history
  12. selftests/bpf: Fix size of map_fd in test_sockmap

    The array size of map_fd[] is 9, not 8. This patch changes it as a more
    general form: ARRAY_SIZE(map_fd).
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
    Acked-by: John Fastabend <john.fastabend@gmail.com>
    Link: https://lore.kernel.org/bpf/0972529ee01ebf8a8fd2b310bdec90831c94be77.1716446893.git.tanggeliang@kylinos.cn
    Geliang Tang authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    dcb681b View commit details
    Browse the repository at this point in the history
  13. selftests/bpf: Check length of recv in test_sockmap

    The value of recv in msg_loop may be negative, like EWOULDBLOCK, so it's
    necessary to check if it is positive before accumulating it to bytes_recvd.
    
    Fixes: 16962b2 ("bpf: sockmap, add selftests")
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
    Acked-by: John Fastabend <john.fastabend@gmail.com>
    Link: https://lore.kernel.org/bpf/5172563f7c7b2a2e953cef02e89fc34664a7b190.1716446893.git.tanggeliang@kylinos.cn
    Geliang Tang authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    de1b5ea View commit details
    Browse the repository at this point in the history
  14. selftests/bpf: Drop duplicate bpf_map_lookup_elem in test_sockmap

    bpf_map_lookup_elem is invoked in bpf_prog3() already, no need to invoke
    it again. This patch drops it.
    
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
    Acked-by: John Fastabend <john.fastabend@gmail.com>
    Link: https://lore.kernel.org/bpf/ea8458462b876ee445173e3effb535fd126137ed.1716446893.git.tanggeliang@kylinos.cn
    Geliang Tang authored and borkmann committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    49784c7 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    ae87a82 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    e6508a4 View commit details
    Browse the repository at this point in the history