Re: [RFC PATCH 0/2] livepatch: Add support for hybrid mode

2025-02-07 Thread Yafang Shao
On Fri, Feb 7, 2025 at 2:01 AM Song Liu wrote: > > On Wed, Feb 5, 2025 at 6:55 PM Yafang Shao wrote: > [...] > > > I think we should first understand why the trampoline is not > > > freed. > > > > IIUC, the fexit works as follows, > > > > bpf_trampoline > > + __bpf_tramp_enter > >+

Re: [PATCHv3 net 0/2] bonding: fix incorrect mac address setting

2025-02-07 Thread Hangbin Liu
Please hold on this patch. Our QE reported that with bare NIC, the backup NIC can't receive the NS messages even after joining the multicast MAC group. But after remove the backup NIC from bond, the NIC interface could receive the NS message. This is weird, it looks the backup NIC dropped the NS m

[PATCH net-next v5 3/3] selftests: drv-net: Test queue xsk attribute

2025-02-07 Thread Joe Damato
Test that queues which are used for AF_XDP have the xsk nest attribute. The attribute is currently empty, but its existence means the AF_XDP is being used for the queue. Signed-off-by: Joe Damato Suggested-by: Jakub Kicinski --- v3: - Change comment style of helper C program to avoid kdoc wa

[PATCH net-next v5 0/3] netdev-genl: Add an xsk attribute to queues

2025-02-07 Thread Joe Damato
Greetings Welcome to v5. No functional changes; removed an unused variable from patch 2. This is an attempt to followup on something Jakub asked me about [1], adding an xsk attribute to queues and more clearly documenting which queues are linked to NAPIs... After the RFC [2], Jakub suggested cre

Re: [RFC PATCH 2/2] livepatch: Implement livepatch hybrid mode

2025-02-07 Thread Yafang Shao
On Sat, Feb 8, 2025 at 12:59 AM Josh Poimboeuf wrote: > > On Fri, Feb 07, 2025 at 11:16:45AM +0800, Yafang Shao wrote: > > On Fri, Feb 7, 2025 at 10:31 AM Josh Poimboeuf wrote: > > > Why does this happen? > > > > It occurs during the KLP transition. It seems like the KLP transition > > is taking

Re: [RFC PATCH 2/2] livepatch: Implement livepatch hybrid mode

2025-02-07 Thread Yafang Shao
On Fri, Feb 7, 2025 at 9:58 PM Petr Mladek wrote: > > On Thu 2025-02-06 10:35:11, Yafang Shao wrote: > > On Thu, Feb 6, 2025 at 12:03 AM Petr Mladek wrote: > > > > > > On Wed 2025-02-05 10:54:47, Yafang Shao wrote: > > > > On Tue, Feb 4, 2025 at 9:21 PM Petr Mladek wrote: > > > > > > > > > > On

Re: [RFC PATCH 0/2] livepatch: Add support for hybrid mode

2025-02-07 Thread Yafang Shao
On Fri, Feb 7, 2025 at 7:01 PM Petr Mladek wrote: > > On Wed 2025-02-05 14:16:42, Yafang Shao wrote: > > On Tue, Feb 4, 2025 at 9:05 PM Petr Mladek wrote: > > > > > > On Mon 2025-02-03 17:44:52, Yafang Shao wrote: > > > > On Fri, Jan 31, 2025 at 9:18 PM Miroslav Benes wrote: > > > > > > > > > >

Re: [PATCH v2] vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines

2025-02-07 Thread Jason Wang
On Wed, Feb 5, 2025 at 2:16 AM Dragos Tatulea wrote: > > On 02/04, Konstantin Shkolnyy wrote: > > mlx5_vdpa_dev_add() doesn’t initialize mvdev->actual_features. It’s > > initialized later by mlx5_vdpa_set_driver_features(). However, > > mlx5_vdpa_get_config() depends on the VIRTIO_F_VERSION_1 flag

Re: [PATCH bpf-next] selftests/bpf: Remove with_addr.sh and with_tunnels.sh

2025-02-07 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Martin KaFai Lau : On Tue, 04 Feb 2025 11:59:43 +0100 you wrote: > Those two scripts were used by test_flow_dissector.sh to setup/cleanup > the network topology before/after the tests. test_flow_dissector.sh > have been deleted by comm

Re: [RFC PATCH 2/2] livepatch: Implement livepatch hybrid mode

2025-02-07 Thread Yafang Shao
On Fri, Feb 7, 2025 at 5:36 PM Petr Mladek wrote: > > On Fri 2025-02-07 11:16:45, Yafang Shao wrote: > > On Fri, Feb 7, 2025 at 10:31 AM Josh Poimboeuf wrote: > > > On Mon, Jan 27, 2025 at 02:35:26PM +0800, Yafang Shao wrote: > > > > - Temporary Loss of Patching > > > > > > > > During the repla

Re: [PATCH v2 bpf 1/2] bpf: skip non exist keys in generic_map_lookup_batch

2025-02-07 Thread Alexei Starovoitov
On Thu, Feb 6, 2025 at 9:45 PM Yan Zhai wrote: > > The generic_map_lookup_batch currently returns EINTR if it fails with > ENOENT and retries several times on bpf_map_copy_value. The next batch > would start from the same location, presuming it's a transient issue. > This is incorrect if a map can

[RFC PATCH v2 4/4] KVM: arm64: Make guests see only counters they can access

2025-02-07 Thread Colton Lewis
The ARM architecture specifies that when MDCR_EL2.HPMN is set, EL1 and EL0, which includes KVM guests, should read that value for PMCR.N. Signed-off-by: Colton Lewis --- arch/arm64/kvm/debug.c | 3 +-- arch/arm64/kvm/pmu-emul.c | 8 +

[RFC PATCH v2 2/4] perf: arm_pmuv3: Introduce module param to partition the PMU

2025-02-07 Thread Colton Lewis
For PMUv3, the register MDCR_EL2.HPMN partitiones the PMU counters into two ranges where counters 0..HPMN-1 are accessible by EL1 and, if allowed, EL0 while counters HPMN..N are only accessible by EL2. Introduce a module parameter in the PMUv3 driver to set this register. The name reserved_host_co

[RFC PATCH v2 3/4] perf: arm_pmuv3: Keep out of guest counter partition

2025-02-07 Thread Colton Lewis
If the PMU is partitioned, keep the driver out of the guest counter partition and only use the host counter partition. Partitioning is defined by the MDCR_EL2.HPMN register field and saved in cpu_pmu->hpmn. The range 0..HPMN-1 is accessible by EL1 and EL0 while HPMN..PMCR.N is reserved for EL2. De

[RFC PATCH v2 1/4] perf: arm_pmuv3: Generalize counter bitmasks

2025-02-07 Thread Colton Lewis
These bitmasks are valid for enable and interrupt registers as well as overflow registers. Generalize the names. Signed-off-by: Colton Lewis --- include/linux/perf/arm_pmuv3.h | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/include/linux/perf/arm_pmuv3.h

[RFC PATCH v2 0/4] PMU partitioning driver support

2025-02-07 Thread Colton Lewis
This series introduces support in the ARM PMUv3 driver for partitioning PMU counters into two separate ranges by taking advantage of the MDCR_EL2.HPMN register field. The advantage of a partitioned PMU would be to allow KVM guests direct access to a subset of PMU functionality, greatly reducing th

Re: Re: Re: [PATCH 2/2] libbpf: BPF programs dynamic loading and attaching

2025-02-07 Thread Martin Kelly
On Wed, 2025-02-05 at 14:33 -0800, Andrii Nakryiko wrote: > > > > > > > > I see two ways forward for you. Either you can break apart your > > > > BPF > > > > object of ~100 BPF programs into more independent BPF objects > > > > > > (seeing > > > > that programs can be independently loaded/unloaded

Re: [PATCH v2 bpf 2/2] selftests: bpf: test batch lookup on array of maps with holes

2025-02-07 Thread Hou Tao
On 2/7/2025 1:45 PM, Yan Zhai wrote: > Iterating through array of maps may encounter non existing keys. The > batch operation should not fail on when this happens. > > Signed-off-by: Yan Zhai Acked-by: Hou Tao

Re: [PATCH v2 bpf 1/2] bpf: skip non exist keys in generic_map_lookup_batch

2025-02-07 Thread Hou Tao
On 2/7/2025 1:45 PM, Yan Zhai wrote: > The generic_map_lookup_batch currently returns EINTR if it fails with > ENOENT and retries several times on bpf_map_copy_value. The next batch > would start from the same location, presuming it's a transient issue. > This is incorrect if a map can actually

Re: [PATCH bpf-next v2 0/3] bpf: Some fixes for nullness elision

2025-02-07 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf.git (master) by Alexei Starovoitov : On Tue, 4 Feb 2025 10:25:15 -0700 you wrote: > Two fixes for nullness elision. See commits for more details. > > === Changelog === > Changes from v1: > * Reword commit message in patch 1 > * Add tags > > [...] Here

[PATCH] blackhole_dev: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
sbin/modprobe -q -r test_blackhole_dev; - echo "test_blackhole_dev: ok"; -else - echo "test_blackhole_dev: [FAIL]"; - exit 1; -fi --- base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b change-id: 20250207-blackholedev-kunit-convert-9a52a1a1a032 Best regards, -- Tamir Duberstein

[PATCH 0/2] lib/prime_numbers: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
| 4 - 8 files changed, 175 insertions(+), 156 deletions(-) --- base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b change-id: 20250207-prime_numbers-kunit-convert-71c9b3c1d1d4 Best regards, -- Tamir Duberstein

[PATCH 2/2] lib/prime_numbers: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
Extract a private header and convert the prime_numbers self-test to a KUnit test. I considered parameterizing the test using `KUNIT_CASE_PARAM` but didn't see how it was possible since the test logic is entangled with the test parameter generation logic. Signed-off-by: Tamir Duberstein --- lib/K

[PATCH 1/2] lib/math: Hook up tests/Makefile

2025-02-07 Thread Tamir Duberstein
This Makefile has been dead code since it was added in commit 7fcc9b53216c ("lib/math: Add int_pow test suite"); the tests worked because of the duplicated rules in the parent directory's Makefile. Wire up tests/Makefile and remove the duplication. Fixes: 7fcc9b53216c ("lib/math: Add int_pow test

Re: [PATCH 0/4] ucount: Simplify refcounting with rcuref_t.

2025-02-07 Thread Sebastian Andrzej Siewior
On 2025-02-03 16:05:21 [+0100], To linux-kernel@vger.kernel.org wrote: > I noticed that the atomic_dec_and_lock_irqsave() in put_ucounts() loops > sometimes even during boot. Something like 2-3 iterations but still. > This series replaces the refcounting with rcuref_t and adds a RCU > lookup. > Thi

[PATCH 3/3] bitmap: break kunit into test cases

2025-02-07 Thread Tamir Duberstein
Move some tests into `bitmap_test_cases` and parameterize `test_bitmap_print_buf`. This gives us nicer output in the event of a failure. Signed-off-by: Tamir Duberstein --- lib/bitmap_kunit.c | 182 ++--- 1 file changed, 89 insertions(+), 93 deleti

[PATCH 2/3] bitmap: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
Convert the bitmap() self-test to a KUnit test. In the interest of keeping the patch reasonably-sized this doesn't refactor the tests into proper parameterized tests - it's all one big test case. Signed-off-by: Tamir Duberstein --- MAINTAINERS | 2 +- arch/m68k/confi

[PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
I find no evidence that bitmap in particular is actually testing the running kernel; it is a unit test of the bitmap functions, which is also stated in the config help text. David Gow made many of the same points in his final reply[4], which was never replied to. Link: https://lore.kernel.org

[PATCH 1/3] bitmap: remove _check_eq_u32_array

2025-02-07 Thread Tamir Duberstein
This has been unused since commit 3aa56885e516 ("bitmap: replace bitmap_{from,to}_u32array") in 2018. Remove it to avoid the need to port it to KUnit in this series. Signed-off-by: Tamir Duberstein --- lib/test_bitmap.c | 28 1 file changed, 28 deletions(-) diff --g

[PATCH v14 15/15] arm64: dts: imx95-19x19-evk: Add PCIe1 endpoint function overlay file

2025-02-07 Thread Frank Li
Add an overlay file to configure PCIe1 to function as an endpoint. Enable PCIe1 to work as endpoint mode on the imx95-19x19-evk platform. Signed-off-by: Frank Li --- change from v13 to v14 - new patch --- arch/arm64/boot/dts/freescale/Makefile | 3 +++ .../dts/freescale/imx95-19x19

[PATCH v14 14/15] arm64: dts: imx95: Add msi-map for pci-ep device

2025-02-07 Thread Frank Li
Add msi-map for pci-ep device. Signed-off-by: Frank Li --- change from v13 to v14 - new patch --- arch/arm64/boot/dts/freescale/imx95.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale/imx95.dtsi index 6b8470cb3461a.

[PATCH v14 13/15] pci: imx6: Add LUT setting for MSI/IOMMU in Endpoint mode

2025-02-07 Thread Frank Li
Support only one physical function, so call imx_pcie_add_lut_by_rid(0) to add a single LUT entry when operating in EP mode. Signed-off-by: Frank Li --- change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff

[PATCH v14 10/15] misc: pci_endpoint_test: Add doorbell test case

2025-02-07 Thread Frank Li
Add three registers: PCIE_ENDPOINT_TEST_DB_BAR, PCIE_ENDPOINT_TEST_DB_ADDR, and PCIE_ENDPOINT_TEST_DB_DATA. Trigger the doorbell by writing data from PCI_ENDPOINT_TEST_DB_DATA to the address provided by PCI_ENDPOINT_TEST_DB_OFFSET and wait for endpoint feedback. Add two command to COMMAND_ENABLE_

[PATCH v14 12/15] pci: imx6: Add helper function imx_pcie_add_lut_by_rid()

2025-02-07 Thread Frank Li
Add helper function imx_pcie_add_lut_by_rid(), which will be used for Endpoint mode in the future. No functional change. Signed-off-by: Frank Li --- change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(

[PATCH v14 11/15] selftests: pci_endpoint: Add doorbell test case

2025-02-07 Thread Frank Li
Add doorbell test case. Signed-off-by: Frank Li --- change from v13 to v14 - merge to selftests framework --- .../selftests/pci_endpoint/pci_endpoint_test.c | 25 ++ 1 file changed, 25 insertions(+) diff --git a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c b

[PATCH v14 09/15] PCI: endpoint: pci-epf-test: Add doorbell test support

2025-02-07 Thread Frank Li
Add three registers: doorbell_bar, doorbell_addr, and doorbell_data. Use pci_epf_alloc_doorbell() to allocate a doorbell address space. Enable the Root Complex (RC) side driver to trigger pci-epc-test's doorbell callback handler by writing doorbell_data to the mapped doorbell_bar's address space.

[PATCH v14 08/15] PCI: endpoint: Add pci_epf_align_inbound_addr() helper for address alignment

2025-02-07 Thread Frank Li
Introduce the helper function pci_epf_align_inbound_addr() to adjust addresses according to PCI BAR alignment requirements, converting addresses into base and offset values. Signed-off-by: Frank Li --- Change form v9 to v14 - none change from v8 to v9 - pci_epf_align_inbound_addr(), base and off

[PATCH v14 07/15] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-02-07 Thread Frank Li
Some MSI controller change address/data pair when irq_set_affinity(). Current PCI endpoint can't support this type MSI controller. So add flag MSI_FLAG_MUTABLE in include/linux/msi.h and check it when allocate doorbell. Signed-off-by: Frank Li --- change fomr v13 to v14 - bring v10 back Change f

[PATCH v14 06/15] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller

2025-02-07 Thread Frank Li
Doorbell feature is implemented by mapping the EP's MSI interrupt controller message address to a dedicated BAR in the EPC core. It is the responsibility of the EPF driver to pass the actual message data to be written by the host to the doorbell BAR region through its own logic. Tested-by: Niklas

[PATCH v14 05/15] PCI: endpoint: Set ID and of_node for function driver

2025-02-07 Thread Frank Li
Set device ID as 'vfunc_no << 3 | func_no' and use 'device_set_of_node_from_dev()' to set 'of_node' the same as the EPC parent device. Currently, EPF 'of_node' is NULL, but many functions depend on 'of_node' settings, such as DMA, IOMMU, and MSI. At present, all DMA allocation functions use the EP

[PATCH v14 04/15] irqchip/gic-v3-its: Add support for device tree msi-map and msi-mask

2025-02-07 Thread Frank Li
Some platform devices create child devices dynamically and require the parent device's msi-map to map device IDs to actual sideband information. A typical use case is using ITS as a PCIe Endpoint Controller(EPC)'s doorbell function, where PCI hosts send TLP memory writes to the EP controller. The

[PATCH v14 03/15] irqchip/gic-v3-its: Set IRQ_DOMAIN_FLAG_MSI_IMMUTABLE for ITS

2025-02-07 Thread Frank Li
Set the IRQ_DOMAIN_FLAG_MSI_IMMUTABLE flag for ITS, as it does not change the address/data pair after setup. Ensure compatibility with MSI users, such as PCIe Endpoint Doorbell, which require the address/data pair to remain unchanged. Enable PCIe endpoints to use ITS for triggering doorbells from

[PATCH v14 02/15] irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable()

2025-02-07 Thread Frank Li
Add the flag IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and the API function irq_domain_is_msi_immutable() to check if the MSI controller retains an immutable address/data pair during irq_set_affinity(). Ensure compatibility with MSI users like PCIe Endpoint Doorbell, which require the address/data pair to rem

[PATCH v14 01/15] platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all()

2025-02-07 Thread Frank Li
The follow steps trigger kernel dump warning and platform_device_msi_init_and_alloc_irqs() return false. 1: platform_device_msi_init_and_alloc_irqs(); 2: platform_device_msi_free_irqs_all(); 3: platform_device_msi_init_and_alloc_irqs(); [ 76.713677] WARNING: CPU: 3 PID: 134 at kernel/irq/msi.c:

[PATCH v14 00/15] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-02-07 Thread Frank Li
┌┐ ┌───┐ ┌┐ ││ │ │ ││ ││ │ PCI Endpoint │ │ PCI Host │ ││ │ │ │

Re: [PATCH] kselftest/arm64: Fix uninitialized variable warning in FPMR test

2025-02-07 Thread Mark Brown
On Fri, Feb 07, 2025 at 10:45:39AM -0800, Breno Leitao wrote: > On Fri, Feb 07, 2025 at 05:26:06PM +, Mark Brown wrote: > > On Fri, Feb 07, 2025 at 03:06:42AM -0800, Breno Leitao wrote: > > > Fix compiler warning about potentially uninitialized orig_fpmr variable: > > > testcases/fpmr_siginf

Re: [PATCH RFCv2 09/13] iommufd: Add IOMMU_OPTION_SW_MSI_START/SIZE ioctls

2025-02-07 Thread Nicolin Chen
On Fri, Feb 07, 2025 at 11:28:01AM -0400, Jason Gunthorpe wrote: > On Fri, Feb 07, 2025 at 10:30:20AM -0400, Jason Gunthorpe wrote: > > On Thu, Feb 06, 2025 at 08:26:05PM -0800, Nicolin Chen wrote: > > > Yea, I found iopt_reserve_iova() is actually missed entirely... > > > > > > While fixing this,

Re: [PATCH] kselftest/arm64: Fix uninitialized variable warning in FPMR test

2025-02-07 Thread Breno Leitao
Hello Mark, On Fri, Feb 07, 2025 at 05:26:06PM +, Mark Brown wrote: > On Fri, Feb 07, 2025 at 03:06:42AM -0800, Breno Leitao wrote: > > Fix compiler warning about potentially uninitialized orig_fpmr variable: > > > > testcases/fpmr_siginfo.c: In function ‘fpmr_present’: > > testcases/

[PATCH 9/9] vhost-scsi: Fix vhost_scsi_send_bad_target()

2025-02-07 Thread Dongli Zhang
Although the support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 was signaled by the commit 664ed90e621c ("vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits"), vhost_scsi_send_bad_target() still assumes the response in a single descriptor. In addition, although vhost_scsi_send_

[PATCH 6/9] vhost-scsi: log event queue write descriptors

2025-02-07 Thread Dongli Zhang
Log write descriptors for the event queue, leveraging vhost_get_vq_desc() to retrieve the array of write descriptors to obtain the log buffer. There is only one path for event queue. Suggested-by: Joao Martins Signed-off-by: Dongli Zhang --- drivers/vhost/scsi.c | 16 +++- 1 file c

[PATCH 3/9] vhost-scsi: cache log buffer in I/O queue vhost_scsi_cmd

2025-02-07 Thread Dongli Zhang
The vhost-scsi I/O queue uses vhost_scsi_cmd. Pre-allocate the log buffer during vhost_scsi_cmd allocation, and free it when vhost_scsi_cmd is reclaimed. The cached log buffer will be uses in upcoming patches to log write descriptors for the I/O queue. The core idea is to cache the log in the per-

[PATCH 5/9] vhost-scsi: log control queue write descriptors

2025-02-07 Thread Dongli Zhang
Log write descriptors for the control queue, leveraging vhost_scsi_get_desc() and vhost_get_vq_desc() to retrieve the array of write descriptors to obtain the log buffer. For Task Management Requests, similar to the I/O queue, store the log buffer during the submission path and log it in the compl

[PATCH 2/9] vhost-scsi: adjust vhost_scsi_get_desc() to log vring descriptors

2025-02-07 Thread Dongli Zhang
Adjust vhost_scsi_get_desc() to facilitate logging of vring descriptors. Add new arguments to allow passing the log buffer and length to vhost_get_vq_desc(). In addition, reset 'log_num' since vhost_get_vq_desc() may reset it only after certain condition checks. Suggested-by: Joao Martins Signe

[PATCH 7/9] vhost: add WARNING if log_num is more than limit

2025-02-07 Thread Dongli Zhang
Since long time ago, the only user of vq->log is vhost-net. The concern is to add support for more devices (i.e. vhost-scsi or vsock) may reveals unknown issue in the vhost API. Add a WARNING. Suggested-by: Joao Martins Signed-off-by: Dongli Zhang --- drivers/vhost/vhost.c | 18

[PATCH 1/9] vhost: modify vhost_log_write() for broader users

2025-02-07 Thread Dongli Zhang
Currently, the only user of vhost_log_write() is vhost-net. The 'len' argument prevents logging of pages that are not tainted by the RX path. Adjustments are needed since more drivers (i.e. vhost-scsi) begin using vhost_log_write(). So far vhost-net RX path may only partially use pages shared by t

[PATCH 4/9] vhost-scsi: log I/O queue write descriptors

2025-02-07 Thread Dongli Zhang
Log write descriptors for the I/O queue, leveraging vhost_scsi_get_desc() and vhost_get_vq_desc() to retrieve the array of write descriptors to obtain the log buffer. In addition, introduce a vhost-scsi specific function to log vring descriptors. In this function, the 'partial' argument is set to

[PATCH 8/9] vhost-scsi: protect vq->log_used with vq->mutex

2025-02-07 Thread Dongli Zhang
The vhost-scsi completion path may access vq->log_base when vq->log_used is already set to false. vhost-thread QEMU-thread vhost_scsi_complete_cmd_work() -> vhost_add_used() -> vhost_add_used_n() if (unlikely(vq->log_used))

[PATCH 0/9] vhost-scsi: log write descriptors for live migration (and two bugfix)

2025-02-07 Thread Dongli Zhang
The live migration with vhost-scsi has been enabled by QEMU commit b3e89c941a85 ("vhost-scsi: Allow user to enable migration"), which thoroughly explains the workflow that QEMU collaborates with vhost-scsi on the live migration. Although it logs dirty data for the used ring, it doesn't log any wri

Re: [PATCH 3/8] unwind: add sframe v2 header

2025-02-07 Thread Josh Poimboeuf
On Mon, Jan 27, 2025 at 09:33:05PM +, Weinan Liu wrote: > Add sframe header so that we know how to access the sframe section > generated by compilers. > > This is the sframe header file borrowed from the patchset [1] > Josh Poimboeuf according to sframe v2 spec [2]. > > [1]: > https://lore.k

Re: [PATCH -v2 0/7] module: Strict per-modname namespaces

2025-02-07 Thread Masahiro Yamada
On Wed, Feb 5, 2025 at 7:14 PM Petr Pavlu wrote: > > On 12/16/24 17:43, Petr Pavlu wrote: > > On 12/2/24 15:59, Peter Zijlstra wrote: > >> Hi! > >> > >> Implement a means for exports to be available only to an explicit list of > >> named > >> modules. By explicitly limiting the usage of certain e

Re: [PATCH 1/8] unwind: build kernel with sframe info

2025-02-07 Thread Josh Poimboeuf
On Tue, Feb 04, 2025 at 04:22:27PM -0800, Indu Bhagat wrote: > > +++ b/arch/Kconfig > > @@ -1736,4 +1736,12 @@ config ARCH_WANTS_PRE_LINK_VMLINUX > > An architecture can select this if it provides > > arch//tools/Makefile > > with .arch.vmlinux.o target to be linked into vmlinux. > > +

Re: [PATCH -v2 3/7] module/modpost: Add basename helper

2025-02-07 Thread Masahiro Yamada
On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra wrote: I do not think you need this helper (at least in your purpose). You will use this helper in the 4/7 patch. Then, you will immediately revert it in the 5/7 patch. If you look at the final result, you did not need to add mod_basename() in the

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-07 Thread Josh Poimboeuf
On Fri, Feb 07, 2025 at 12:16:29PM +, Puranjay Mohan wrote: > Weinan Liu writes: > > Thank you for reporting this issue. > > I just found out that Josh also intentionally uses '>' instead of '>=' for > > the same reason > > https://lore.kernel.org/lkml/2025015257.h64ftfnorofe7cb4@jpoimboe

Re: [PATCH] kselftest/arm64: Fix uninitialized variable warning in FPMR test

2025-02-07 Thread Mark Brown
On Fri, Feb 07, 2025 at 03:06:42AM -0800, Breno Leitao wrote: > Fix compiler warning about potentially uninitialized orig_fpmr variable: > > testcases/fpmr_siginfo.c: In function ‘fpmr_present’: > testcases/fpmr_siginfo.c:68:25: warning: ‘orig_fpmr’ may be used > uninitialized in this

Re: [RFC PATCH 2/2] livepatch: Implement livepatch hybrid mode

2025-02-07 Thread Josh Poimboeuf
On Fri, Feb 07, 2025 at 11:16:45AM +0800, Yafang Shao wrote: > On Fri, Feb 7, 2025 at 10:31 AM Josh Poimboeuf wrote: > > Why does this happen? > > It occurs during the KLP transition. It seems like the KLP transition > is taking too long. > > [20329703.332453] livepatch: enabling patch 'livepatc

Re: [RFC PATCH 1/2] KVM: arm64: nv: selftests: Add guest hypervisor test

2025-02-07 Thread Ganapatrao Kulkarni
On 07-02-2025 07:29 pm, Marc Zyngier wrote: On Fri, 07 Feb 2025 13:26:41 +, Ganapatrao Kulkarni wrote: + if (is_vcpu_nested(vcpu)) { + vcpu_set_reg(vcpu, KVM_ARM64_SYS_REG(SYS_CPTR_EL2), fpen); + vcpu_set_reg(vcpu, KVM_ARM64_SYS_REG(SYS_SCTLR_EL2), sct

Re: [PATCH -v2 2/7] module/modpost: Use for() loop

2025-02-07 Thread Masahiro Yamada
The commit subject prefix should be "modpost: " instead of "module/modpost: " You are touching only modpost in this patch. On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra wrote: > > > Signed-off-by: Peter Zijlstra (Intel) > --- > scripts/mod/modpost.c |7 ++- > 1 file changed, 2 insert

Re: [PATCH -v2 4/7] module: Add module specific symbol namespace support

2025-02-07 Thread Masahiro Yamada
On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra wrote: > > Designate the "MODULE_${modname}" symbol namespace to mean: 'only > export to the named module'. > > Notably, explicit imports of anything in the "MODULE_" space is > forbidden. Modules implicitly get the "MODULE_${modname}" namespace > add

Re: [PATCH -v2 5/7] module: Extend the MODULE_ namespace parsing

2025-02-07 Thread Masahiro Yamada
On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra wrote: > > Instead of only accepting "MODULE_${name}", extend it with a comma > separated list of module names and add tail glob support. > > That is, something like: "MODULE_foo-*,bar" is now possible. > > Signed-off-by: Peter Zijlstra (Intel) > ---

Re: [PATCH RFCv2 09/13] iommufd: Add IOMMU_OPTION_SW_MSI_START/SIZE ioctls

2025-02-07 Thread Jason Gunthorpe
On Fri, Feb 07, 2025 at 10:30:20AM -0400, Jason Gunthorpe wrote: > On Thu, Feb 06, 2025 at 08:26:05PM -0800, Nicolin Chen wrote: > > Yea, I found iopt_reserve_iova() is actually missed entirely... > > > > While fixing this, I see a way to turn the OPTIONs back to per- > > idev, if you still prefer

Re: [PATCH v6 0/7] Buddy allocator like (or non-uniform) folio split

2025-02-07 Thread Matthew Wilcox
On Fri, Feb 07, 2025 at 09:35:27AM -0500, Zi Yan wrote: > On 7 Feb 2025, at 9:25, Matthew Wilcox wrote: > > As part of your series, I'd like to remove that limitation, so we'd need > > to allocate log_64(n - m) [ok, more complex than that, but ykwim]. So > > it's not quite "only allocate one node"

Re: [PATCH RFCv2 00/13] iommu: Add MSI mapping support with nested SMMU

2025-02-07 Thread Thomas Gleixner
On Fri, Feb 07 2025 at 10:34, Jason Gunthorpe wrote: > On Fri, Jan 10, 2025 at 07:32:16PM -0800, Nicolin Chen wrote: >> Though these two approaches feel very different on the surface, they can >> share some underlying common infrastructure. Currently, only one pair of >> sw_msi functions (prepare/c

Re: [PATCH v2 1/2] printf: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
On Fri, Feb 7, 2025 at 6:30 AM Tamir Duberstein wrote: > > Convert the printf() self-test to a KUnit test. > > In the interest of keeping the patch reasonably-sized this doesn't > refactor the tests into proper parameterized tests - it's all one big > test case. Apologies for the version churn, I

Re: [PATCH v4 1/2] scanf: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
On Fri, Feb 7, 2025 at 6:49 AM Tamir Duberstein wrote: > > Convert the scanf() self-test to a KUnit test. > > In the interest of keeping the patch reasonably-sized this doesn't > refactor the tests into proper parameterized tests - it's all one big > test case. Apologies for the version churn, I'

Re: [PATCH v6 0/7] Buddy allocator like (or non-uniform) folio split

2025-02-07 Thread Zi Yan
On 7 Feb 2025, at 9:25, Matthew Wilcox wrote: > On Fri, Feb 07, 2025 at 09:11:39AM -0500, Zi Yan wrote: >> Existing uniform split requires 2^(order % XA_CHUNK_SHIFT) xa_node >> allocations >> during split, when the folio needs to be split to order-0. But non-uniform >> split >> only requires at

Re: [PATCH RFCv2 00/13] iommu: Add MSI mapping support with nested SMMU

2025-02-07 Thread Jason Gunthorpe
On Fri, Jan 10, 2025 at 07:32:16PM -0800, Nicolin Chen wrote: > Though these two approaches feel very different on the surface, they can > share some underlying common infrastructure. Currently, only one pair of > sw_msi functions (prepare/compose) are provided by dma-iommu for irqchip > drivers to

Re: [PATCH RFCv2 09/13] iommufd: Add IOMMU_OPTION_SW_MSI_START/SIZE ioctls

2025-02-07 Thread Jason Gunthorpe
On Thu, Feb 06, 2025 at 08:26:05PM -0800, Nicolin Chen wrote: > Yea, I found iopt_reserve_iova() is actually missed entirely... > > While fixing this, I see a way to turn the OPTIONs back to per- > idev, if you still prefer them to be per-idev(?). Then, we can > check a given input in the set_opti

Re: [PATCH v6 0/7] Buddy allocator like (or non-uniform) folio split

2025-02-07 Thread Matthew Wilcox
On Fri, Feb 07, 2025 at 09:11:39AM -0500, Zi Yan wrote: > Existing uniform split requires 2^(order % XA_CHUNK_SHIFT) xa_node allocations > during split, when the folio needs to be split to order-0. But non-uniform > split > only requires at most 1 xa_node allocation. For example, to split an order

Re: [PATCH v6 0/7] Buddy allocator like (or non-uniform) folio split

2025-02-07 Thread Zi Yan
On 6 Feb 2025, at 3:01, Andrew Morton wrote: > On Tue, 4 Feb 2025 22:14:10 -0500 Zi Yan wrote: > >> This patchset adds a new buddy allocator like (or non-uniform) large folio >> split to reduce the total number of after-split folios, the amount of memory >> needed for multi-index xarray split, a

Re: [RFC PATCH 1/2] KVM: arm64: nv: selftests: Add guest hypervisor test

2025-02-07 Thread Marc Zyngier
On Fri, 07 Feb 2025 13:26:41 +, Ganapatrao Kulkarni wrote: > > >> + if (is_vcpu_nested(vcpu)) { > >> + vcpu_set_reg(vcpu, KVM_ARM64_SYS_REG(SYS_CPTR_EL2), fpen); > >> + vcpu_set_reg(vcpu, KVM_ARM64_SYS_REG(SYS_SCTLR_EL2), sctlr_el1); > >> + vcpu_set_reg(vcpu, KVM_A

Re: [RFC PATCH 2/2] livepatch: Implement livepatch hybrid mode

2025-02-07 Thread Petr Mladek
On Thu 2025-02-06 10:35:11, Yafang Shao wrote: > On Thu, Feb 6, 2025 at 12:03 AM Petr Mladek wrote: > > > > On Wed 2025-02-05 10:54:47, Yafang Shao wrote: > > > On Tue, Feb 4, 2025 at 9:21 PM Petr Mladek wrote: > > > > > > > > On Mon 2025-01-27 23:34:50, Yafang Shao wrote: I am not sure if you s

Re: [RFC PATCH 1/2] KVM: arm64: nv: selftests: Add guest hypervisor test

2025-02-07 Thread Ganapatrao Kulkarni
Hi Marc, On 07-02-2025 02:44 am, Marc Zyngier wrote: On Thu, 06 Feb 2025 16:41:19 +, Ganapatrao Kulkarni wrote: This patch adds the required changes to init vcpu in vEL2 context. Also adds a KVM selftest to execute guest code as a guest hypervisor(L1). Signed-off-by: Ganapatrao Kulkarn

Re: [PATCH net-next v18 09/25] ovpn: implement packet processing

2025-02-07 Thread Antonio Quartulli
On 05/02/2025 22:50, Sabrina Dubroca wrote: Hi Antonio, Another one I should have spotted a long time ago :( better late than never (I think..) 2025-01-13, 10:31:28 +0100, Antonio Quartulli wrote: +int ovpn_aead_encrypt(struct ovpn_peer *peer, struct ovpn_crypto_key_slot *ks, +

[syzbot] Monthly wpan report (Feb 2025)

2025-02-07 Thread syzbot
Hello wpan maintainers/developers, This is a 31-day syzbot report for the wpan subsystem. All related reports/information can be found at: https://syzkaller.appspot.com/upstream/s/wpan During the period, 0 new issues were detected and 0 were fixed. In total, 5 issues are still open and 26 have al

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-07 Thread Puranjay Mohan
Weinan Liu writes: >> After some debugging this is what I found: >> >> devtmpfsd() calls devtmpfs_work_loop() which is marked '__noreturn' and has >> an >> infinite loop. The compiler puts the `bl` to devtmpfs_work_loop() as the the >> last instruction in devtmpfsd() and therefore on entry to

[PATCH v4 2/2] scanf: break kunit into test cases

2025-02-07 Thread Tamir Duberstein
Use `suite_{init,exit}` and move some tests into `scanf_test_cases`. This gives us nicer output in the event of a failure. Reviewed-by: David Gow Signed-off-by: Tamir Duberstein --- lib/scanf_kunit.c | 82 +++ 1 file changed, 47 insertions(+),

[PATCH v4 1/2] scanf: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
Convert the scanf() self-test to a KUnit test. In the interest of keeping the patch reasonably-sized this doesn't refactor the tests into proper parameterized tests - it's all one big test case. Acked-by: Geert Uytterhoeven # m68k Acked-by: Petr Mladek Reviewed-by: David Gow Signed-off-by: Tam

[PATCH v4 0/2] scanf: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
This is one of just 3 remaining "Test Module" kselftests (the others being bitmap and printf), the rest having been converted to KUnit. In addition to the enclosed patch, please consider this an RFC on the removal of the "Test Module" kselftest machinery. I tested this using: $ tools/testing/kuni

[PATCH v2 0/2] printf: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
This is one of just 3 remaining "Test Module" kselftests (the others being bitmap and scanf), the rest having been converted to KUnit. I tested this using: $ tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 printf I have also sent out a series converting scanf[0]. Link: http

Re: [PATCH v3 0/2] scanf: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
On Fri, Feb 7, 2025 at 2:33 AM David Gow wrote: > > Thanks very much for doing this. I'm happy with these changes from a KUnit > POV. > > Two things I think we need to be careful about: > - This and the printf test are both changing the m68k configs. This is > fine, but could lead to a (harmless)

[PATCH v2 2/2] printf: break kunit into test cases

2025-02-07 Thread Tamir Duberstein
Use `suite_{init,exit}` and move all tests into `printf_test_cases`. This gives us nicer output in the event of a failure. Combine `plain_format` and `plain_hash` into `hash_pointer` since they're testing the same scenario. Signed-off-by: Tamir Duberstein --- lib/printf_kunit.c | 286 ++

[PATCH v2 1/2] printf: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
Convert the printf() self-test to a KUnit test. In the interest of keeping the patch reasonably-sized this doesn't refactor the tests into proper parameterized tests - it's all one big test case. Acked-by: Geert Uytterhoeven # m68k Signed-off-by: Tamir Duberstein --- Documentation/core-api/pri

Re: [PATCH 0/2] printf: convert self-test to KUnit

2025-02-07 Thread Tamir Duberstein
On Fri, Feb 7, 2025 at 5:01 AM Rasmus Villemoes wrote: > > On Thu, Feb 06 2025, Tamir Duberstein wrote: > > > On Thu, Feb 6, 2025 at 4:27 AM Rasmus Villemoes > > wrote: > >> > >> On Tue, 4 Feb 2025 at 20:36, Tamir Duberstein wrote: > >> > > >> > This is one of just 3 remaining "Test Module" kse

[PATCH] kselftest/arm64: Fix uninitialized variable warning in FPMR test

2025-02-07 Thread Breno Leitao
have_fpmr = getauxval(AT_HWCAP2) & HWCAP2_FPMR; if (have_fpmr) --- base-commit: 0d5248724ed8bc68c867c4c65dda625277f68fbc change-id: 20250207-arm_fix_selftest-ee29dbc33a06 Best regards, -- Breno Leitao

Re: [RFC PATCH 0/2] livepatch: Add support for hybrid mode

2025-02-07 Thread Petr Mladek
On Wed 2025-02-05 14:16:42, Yafang Shao wrote: > On Tue, Feb 4, 2025 at 9:05 PM Petr Mladek wrote: > > > > On Mon 2025-02-03 17:44:52, Yafang Shao wrote: > > > On Fri, Jan 31, 2025 at 9:18 PM Miroslav Benes wrote: > > > > > > > > > > > > > > > > + What exactly is meant by frequent replacements

Re: [PATCH 0/2] printf: convert self-test to KUnit

2025-02-07 Thread Rasmus Villemoes
On Thu, Feb 06 2025, Tamir Duberstein wrote: > On Thu, Feb 6, 2025 at 4:27 AM Rasmus Villemoes > wrote: >> >> On Tue, 4 Feb 2025 at 20:36, Tamir Duberstein wrote: >> > >> > This is one of just 3 remaining "Test Module" kselftests (the others >> > being bitmap and scanf), the rest having been co

Re: [RFC PATCH 2/2] livepatch: Implement livepatch hybrid mode

2025-02-07 Thread Petr Mladek
On Fri 2025-02-07 11:16:45, Yafang Shao wrote: > On Fri, Feb 7, 2025 at 10:31 AM Josh Poimboeuf wrote: > > On Mon, Jan 27, 2025 at 02:35:26PM +0800, Yafang Shao wrote: > > > - Temporary Loss of Patching > > > > > > During the replacement process, the old patch is set to a NOP > > > (no-operatio

[PATCHv3 net 2/2] selftests: bonding: fix incorrect mac address

2025-02-07 Thread Hangbin Liu
The correct mac address for NS target 2001:db8::254 is 33:33:ff:00:02:54, not 33:33:00:00:02:54. The same with client maddress. Fixes: 86fb6173d11e ("selftests: bonding: add ns multicast group testing") Signed-off-by: Hangbin Liu --- tools/testing/selftests/drivers/net/bonding/bond_options.sh |

[PATCHv3 net 1/2] bonding: fix incorrect MAC address setting to receive NS messages

2025-02-07 Thread Hangbin Liu
When validation on the backup slave is enabled, we need to validate the Neighbor Solicitation (NS) messages received on the backup slave. To receive these messages, the correct destination MAC address must be added to the slave. However, the target in bonding is a unicast address, which we cannot u

[PATCHv3 net 0/2] bonding: fix incorrect mac address setting

2025-02-07 Thread Hangbin Liu
The mac address on backup slave should be convert from Solicited-Node Multicast address, not from bonding unicast target address. v3: also fix the mac setting for slave_set_ns_maddr. (Jay) Add function description for slave_set_ns_maddr/slave_set_ns_maddrs (Jay) v2: fix patch 01's subject Han

  1   2   >