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

2025-02-13 Thread Puranjay Mohan
Indu Bhagat writes: > On 2/12/25 11:25 PM, Song Liu wrote: >> On Wed, Feb 12, 2025 at 6:45 PM Josh Poimboeuf wrote: >>> >>> On Wed, Feb 12, 2025 at 06:36:04PM -0800, Song Liu wrote: >> [ 81.261748] copy_process+0xfdc/0xfd58 [livepatch_special_static] > > Does that copy_process+0xf

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-02-13 Thread Eric Auger
Hi, On 2/14/25 8:21 AM, Ning, Hongyu wrote: > > > On 2025/2/6 16:59, Eric Auger wrote: >> Hi, >> >> On 2/4/25 12:46 PM, Eric Auger wrote: >>> Hi, >>> >>> On 2/3/25 3:48 PM, Michael S. Tsirkin wrote: On Fri, Jan 31, 2025 at 10:53:15AM +0100, Eric Auger wrote: > Hi Kirill, Michael > >

[PATCH v6 3/3] rust: kunit: allow to know if we are in a test

2025-02-13 Thread David Gow
From: José Expósito In some cases, we need to call test-only code from outside the test case, for example, to mock a function or a module. In order to check whether we are in a test or not, we need to test if `CONFIG_KUNIT` is set. Unfortunately, we cannot rely only on this condition because: -

[PATCH v6 2/3] rust: macros: add macro to easily run KUnit tests

2025-02-13 Thread David Gow
From: José Expósito Add a new procedural macro (`#[kunit_tests(kunit_test_suit_name)]`) to run KUnit tests using a user-space like syntax. The macro, that should be used on modules, transforms every `#[test]` in a `kunit_case!` and adds a `kunit_unsafe_test_suite!` registering all of them. The

[PATCH v6 1/3] rust: kunit: add KUnit case and suite macros

2025-02-13 Thread David Gow
From: José Expósito Add a couple of Rust const functions and macros to allow to develop KUnit tests without relying on generated C code: - The `kunit_unsafe_test_suite!` Rust macro is similar to the `kunit_test_suite` C macro. It requires a NULL-terminated array of test cases (see below).

[PATCH v6 0/3] rust: kunit: Support KUnit tests with a user-space like syntax

2025-02-13 Thread David Gow
Hi all, After much delay, v6 of the KUnit/Rust integration patchset is here. This change incorporates most of Miguels suggestions from v5 (save for some of the copyright headers I wasn't comfortable unilaterally changing). This means the documentation is much improved, and it should work more clea

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-02-13 Thread Ning, Hongyu
On 2025/2/6 16:59, Eric Auger wrote: Hi, On 2/4/25 12:46 PM, Eric Auger wrote: Hi, On 2/3/25 3:48 PM, Michael S. Tsirkin wrote: On Fri, Jan 31, 2025 at 10:53:15AM +0100, Eric Auger wrote: Hi Kirill, Michael On 8/8/24 9:51 AM, Kirill A. Shutemov wrote: Hongyu reported a hang on kexec in

[PATCH v2 0/2] Add Goodix Berlin-A series support

2025-02-13 Thread Jens Reidel
This series adds support for the Goodix Berlin-A series touch ICs (gt9897). This was tested on a Xiaomi 11 Lite 5G NE (xiaomi-lisa), which uses the gt9897 IC connected over SPI. I am not aware of any device that has gt9897 connected over I2C and therefore could not test it, so I didn't add a compat

[PATCH v2 2/2] Input: goodix_berlin - Add support for Berlin-A series

2025-02-13 Thread Jens Reidel
The current implementation of the goodix_berlin driver lacks support for revisions A and B of the Berlin IC. This change adds support for the gt9897 IC, which is a Berlin-A revision part. The differences between revision D and A are rather minor, a handful of address changes and a slightly larger

[PATCH v2 1/2] dt-bindings: input: goodix,gt9916: Document gt9897 compatible

2025-02-13 Thread Jens Reidel
Document the Goodix GT9897 which is a Berlin-A series touchscreen controller IC by Goodix. Acked-by: Rob Herring (Arm) Signed-off-by: Jens Reidel --- .../devicetree/bindings/input/touchscreen/goodix,gt9916.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bi

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

2025-02-13 Thread Jay Vosburgh
Hangbin Liu wrote: >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:

Re: [PATCH net-next RESEND v7 3/3] selftests: drv-net: Test queue xsk attribute

2025-02-13 Thread Jakub Kicinski
On Thu, 13 Feb 2025 19:23:13 + Joe Damato wrote: > +TEST_GEN_PROGS := xdp_helper TEST_GET_PROGS is for self-contained tests TEST_GEN_FILES is the right variable for building helpers -- pw-bot: cr

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

2025-02-13 Thread Song Liu
On Thu, Feb 13, 2025 at 2:22 PM Puranjay Mohan wrote: > > Song Liu writes: > > > On Thu, Feb 13, 2025 at 12:38 AM Puranjay Mohan wrote: > > [...] > >> > >> P.S. - The livepatch doesn't have copy_process() but only copy_signal(), > >> yours had copy_process() somehow. > > > > In my build, copy_si

Re: [PATCH net-next v19 25/26] testing/selftests: add test tool and scripts for ovpn module

2025-02-13 Thread kernel test robot
Hi Antonio, kernel test robot noticed the following build errors: [auto build test ERROR on 39f54262ba499d862420a97719d2f0eea0cbd394] url: https://github.com/intel-lab-lkp/linux/commits/Antonio-Quartulli/net-introduce-OpenVPN-Data-Channel-Offload-ovpn/20250211-091029 base: 39f54262ba499d86

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

2025-02-13 Thread Hangbin Liu
Hi Jay, Any comments? Thanks Hangbin On Tue, Feb 11, 2025 at 07:31:32AM +, Hangbin Liu wrote: > Hi Jay, > On Sat, Feb 08, 2025 at 06:34:21AM +, Hangbin Liu wrote: > > Please hold on this patch. Our QE reported that with bare NIC, the > > backup NIC can't receive the NS messages even after

[Patch net v3] vsock/virtio: fix variables initialization during resuming

2025-02-13 Thread Junnan Wu
When executing suspend to ram twice in a row, the `rx_buf_nr` and `rx_buf_max_nr` increase to three times vq->num_free. Then after virtqueue_get_buf and `rx_buf_nr` decreased in function virtio_transport_rx_work, the condition to fill rx buffer (rx_buf_nr < rx_buf_max_nr / 2) will never be met. It

Re: Re: [Patch net 1/2] vsock/virtio: initialize rx_buf_nr and rx_buf_max_nr when resuming

2025-02-13 Thread Junnan Wu
On Thu, 13 Feb 2025 at 15:47, Stefano Garzarella wrote: >I forgot to mention that IMHO it's better to split this series. >This first patch (this one) seems ready, without controversy, and it's >a real fix, so for me v3 should be a version ready to be merged. > >While the other patch is more contro

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

2025-02-13 Thread Song Liu
On Thu, Feb 13, 2025 at 3:23 PM Indu Bhagat wrote: > > On 2/12/25 11:25 PM, Song Liu wrote: > > On Wed, Feb 12, 2025 at 6:45 PM Josh Poimboeuf wrote: > >> > >> On Wed, Feb 12, 2025 at 06:36:04PM -0800, Song Liu wrote: > > [ 81.261748] copy_process+0xfdc/0xfd58 [livepatch_special_static] >

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

2025-02-13 Thread Song Liu
On Thu, Feb 13, 2025 at 2:22 PM Puranjay Mohan wrote: > > Song Liu writes: > > > On Thu, Feb 13, 2025 at 12:38 AM Puranjay Mohan wrote: > > [...] > >> > >> P.S. - The livepatch doesn't have copy_process() but only copy_signal(), > >> yours had copy_process() somehow. > > > > In my build, copy_si

[PATCH 2/3] rcu/exp: Remove confusing needless full barrier on task unblock

2025-02-13 Thread Frederic Weisbecker
A full memory barrier in the RCU-PREEMPT task unblock path advertizes to order the context switch (or rather the accesses prior to rcu_read_unlock()) with the expedited grace period fastpath. However the grace period can not complete without the rnp calling into rcu_report_exp_rnp() with the node

[PATCH 3/3] rcu/exp: Remove needless CPU up quiescent state report

2025-02-13 Thread Frederic Weisbecker
A CPU coming online checks for an ongoing grace period and reports a quiescent state accordingly if needed. This special treatment that shortcuts the expedited IPI finds its origin as an optimization purpose on the following commit: 338b0f760e84 (rcu: Better hotplug handling for synchroni

[PATCH 1/3] rcu/exp: Protect against early QS report

2025-02-13 Thread Frederic Weisbecker
When a grace period is started, the ->expmask of each node is set up from sync_exp_reset_tree(). Then later on each leaf node also initialize its ->exp_tasks pointer. This means that the initialization of the quiescent state of a node and the initialization of its blocking tasks happen with an unl

[PATCH 0/3] rcu/exp updates

2025-02-13 Thread Frederic Weisbecker
Here are a few updates for expedited RCU. Some were inspired by debates with Paul while he was investigating the issue that got eventually fixed by "rcu: Fix get_state_synchronize_rcu_full() GP-start detection". Frederic Weisbecker (3): rcu/exp: Protect against early QS report rcu/exp: Remove

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

2025-02-13 Thread Indu Bhagat
On 2/12/25 11:25 PM, Song Liu wrote: On Wed, Feb 12, 2025 at 6:45 PM Josh Poimboeuf wrote: On Wed, Feb 12, 2025 at 06:36:04PM -0800, Song Liu wrote: [ 81.261748] copy_process+0xfdc/0xfd58 [livepatch_special_static] Does that copy_process+0xfdc/0xfd58 resolve to this line in copy_process(

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

2025-02-13 Thread Puranjay Mohan
Song Liu writes: > On Thu, Feb 13, 2025 at 12:38 AM Puranjay Mohan wrote: > [...] >> >> P.S. - The livepatch doesn't have copy_process() but only copy_signal(), >> yours had copy_process() somehow. > > In my build, copy_signal is inlined to copy_process, unless I add noinline. > If I do add noin

Re: [PATCH v1 01/13] genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie

2025-02-13 Thread Nicolin Chen
On Thu, Feb 13, 2025 at 09:57:52AM -0400, Jason Gunthorpe wrote: > Nicolin - lets change the patch structure a little bit can you adjust > this patch to leave iommu_dma_compose_msi_msg() in dma-iommu.c and the > next patch will be all about renaming and moving it to the MSI core > code instead? Eas

Re: [PATCH v1 01/13] genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie

2025-02-13 Thread Jacob Pan
Hi Nicolin, On Thu, 13 Feb 2025 13:02:27 -0800 Nicolin Chen wrote: > On Thu, Feb 13, 2025 at 12:28:49PM -0800, Jacob Pan wrote: > > Hi Nicolin, > > > > On Sat, 8 Feb 2025 01:02:34 -0800 > > Nicolin Chen wrote: > > > > > -static inline void msi_desc_set_iommu_cookie(struct msi_desc > > > *de

Re: [PATCH v1 01/13] genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie

2025-02-13 Thread Nicolin Chen
On Thu, Feb 13, 2025 at 12:28:49PM -0800, Jacob Pan wrote: > Hi Nicolin, > > On Sat, 8 Feb 2025 01:02:34 -0800 > Nicolin Chen wrote: > > > -static inline void msi_desc_set_iommu_cookie(struct msi_desc *desc, > > -const void > > *iommu_cookie) +/** > > + *

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

2025-02-13 Thread Song Liu
On Thu, Feb 13, 2025 at 12:38 AM Puranjay Mohan wrote: [...] > > P.S. - The livepatch doesn't have copy_process() but only copy_signal(), > yours had copy_process() somehow. In my build, copy_signal is inlined to copy_process, unless I add noinline. If I do add noinline, the issue will not reprod

Re: [PATCH v2 6/6] selftests/mm: remove local __NR_* definitions

2025-02-13 Thread John Hubbard
On 2/13/25 3:32 AM, Li Wang wrote: Hi John, On Thu, Feb 13, 2025 at 6:31 AM John Hubbard mailto:jhubb...@nvidia.com>> wrote: On 2/12/25 12:34 PM, Dave Hansen wrote: > Hi John, > > On 6/13/24 19:30, John Hubbard wrote: >> --- a/tools/testing/selftests/mm/protection_keys.c

Re: [PATCH v1 01/13] genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie

2025-02-13 Thread Jacob Pan
Hi Nicolin, On Sat, 8 Feb 2025 01:02:34 -0800 Nicolin Chen wrote: > -static inline void msi_desc_set_iommu_cookie(struct msi_desc *desc, > - const void > *iommu_cookie) +/** > + * iommu_dma_compose_msi_msg() - Apply translation to an MSI message > + * @de

Re: [PATCH net-next v19 00/26] Introducing OpenVPN Data Channel Offload

2025-02-13 Thread Antonio Quartulli
On 13/02/2025 16:46, Sabrina Dubroca wrote: 2025-02-13, 12:46:34 +0100, Antonio Quartulli wrote: On 13/02/2025 00:34, Sabrina Dubroca wrote: Hello, 2025-02-11, 01:39:53 +0100, Antonio Quartulli wrote: All minor and major reported problems have been finally addressed. Big thanks to Sabrina, wh

Re: [PATCH net-next v19 00/26] Introducing OpenVPN Data Channel Offload

2025-02-13 Thread Antonio Quartulli
Hi Sean, On 13/02/2025 15:26, Sean Anderson wrote: Hi Antonio, On 2/10/25 19:39, Antonio Quartulli wrote: NOTE: TCP tests are still showing the following warning while running iperf. I have analysed the report several times, but it definitely looks like a false positive to me, so nothing to wo

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

2025-02-13 Thread Song Liu
On Wed, Feb 12, 2025 at 11:53 PM Puranjay Mohan wrote: > > Song Liu writes: > > > On Wed, Feb 12, 2025 at 11:26 PM Puranjay Mohan wrote: > >> > >> Song Liu writes: > >> > >> > On Wed, Feb 12, 2025 at 4:10 PM Indu Bhagat > >> > wrote: > >> >> > >> >> On 2/12/25 3:32 PM, Song Liu wrote: > >> >>

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

2025-02-13 Thread Song Liu
On Wed, Feb 12, 2025 at 11:46 PM Puranjay Mohan wrote: > > Song Liu writes: > > > On Wed, Feb 12, 2025 at 6:45 PM Josh Poimboeuf wrote: > >> > >> On Wed, Feb 12, 2025 at 06:36:04PM -0800, Song Liu wrote: > >> > > > [ 81.261748] copy_process+0xfdc/0xfd58 [livepatch_special_static] > >> > > > >

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

2025-02-13 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. Enable CONFIG_XDP_SOCKETS for selftests/drivers/net tests, as well. Signed-off-by: Joe Damato Suggested-by: Jakub Kicinski ---

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

2025-02-13 Thread Joe Damato
Greetings: [Note: RESEND because apparently my gmail oauth2 client is breaking patches I send] Welcome to v7. Added CONFIG_XDP_SOCKETS to the selftests/driver/net kernel config in patch 3. Updated the xdp_helper.c to return -1 on AF_XDP non-existence, and updated queues.py to skip the test if AF_

Re: [PATCH v2] rseq/selftests: Fix riscv rseq_offset_deref_addv inline asm

2025-02-13 Thread patchwork-bot+linux-riscv
Hello: This patch was applied to riscv/linux.git (fixes) by Palmer Dabbelt : On Tue, 14 Jan 2025 17:07:21 + you wrote: > When working on OpenRISC support for restartable sequences I noticed > and fixed these two issues with the riscv support bits. > > 1 The 'inc' argument to RSEQ_ASM_OP_R_D

Re: [RFC PATCH v3 5/8] KVM: arm64: Introduce module param to partition the PMU

2025-02-13 Thread Colton Lewis
Colton Lewis writes: 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 KVM to set this register. The name re

[PATCH 2/4] selftests/mm: rename guard-pages to guard-regions

2025-02-13 Thread Lorenzo Stoakes
The feature formerly referred to as guard pages is more correctly referred to as 'guard regions', as in fact no pages are ever allocated in the process of installing the regions. To avoid confusion, rename the tests accordingly. Signed-off-by: Lorenzo Stoakes --- tools/testing/selftests/mm/.git

[PATCH 1/4] mm: allow guard regions in file-backed and read-only mappings

2025-02-13 Thread Lorenzo Stoakes
There is no reason to disallow guard regions in file-backed mappings - readahead and fault-around both function correctly in the presence of PTE markers, equally other operations relating to memory-mapped files function correctly. Additionally, read-only mappings if introducing guard-regions, only

[PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-13 Thread Lorenzo Stoakes
The guard regions feature was initially implemented to support anonymous mappings only, excluding shmem. This was done such as to introduce the feature carefully and incrementally and to be conservative when considering the various caveats and corner cases that are applicable to file-backed mappin

[PATCH 4/4] tools/selftests: add file/shmem-backed mapping guard region tests

2025-02-13 Thread Lorenzo Stoakes
Extend the guard region self tests to explicitly assert that guard regions work correctly for functionality specific to file-backed and shmem mappings. In addition to testing all of the existing guard region functionality that is currently tested against anonymous mappings against file-backed and

[PATCH 3/4] tools/selftests: expand all guard region tests to file-backed

2025-02-13 Thread Lorenzo Stoakes
Extend the guard region tests to allow for test fixture variants for anon, shmem, and local file files. This allows us to assert that each of the expected behaviours of anonymous memory also applies correctly to file-backed (both shmem and an a file created locally in the current working directory

[RFC PATCH v3 7/8] perf: arm_pmuv3: Keep out of guest counter partition

2025-02-13 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 v3 8/8] KVM: arm64: selftests: Reword selftests error

2025-02-13 Thread Colton Lewis
It's possible the host has that many counters, but HPMN restricts us from using them. Signed-off-by: Colton Lewis --- tools/testing/selftests/kvm/arm64/vpmu_counter_access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/arm64/vpmu_counter_access.

[RFC PATCH v3 5/8] KVM: arm64: Introduce module param to partition the PMU

2025-02-13 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 KVM to set this register. The name reserved_host_counters reflec

[RFC PATCH v3 6/8] perf: arm_pmuv3: Generalize counter bitmasks

2025-02-13 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 v3 4/8] KVM: arm64: Reorganize PMU functions

2025-02-13 Thread Colton Lewis
A lot of functions in pmu-emul.c aren't specific to the emulated PMU implementation. Move them to the more appropriate pmu.c file where shared PMU functions should live. Signed-off-by: Colton Lewis --- arch/arm64/include/asm/kvm_host.h | 1 + arch/arm64/kvm/pmu-emul.c | 448 ---

[RFC PATCH v3 0/8] PMU partitioning driver support

2025-02-13 Thread Colton Lewis
This series introduces support in the KVM and 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 red

[RFC PATCH v3 3/8] KVM: arm64: Cleanup PMU includes

2025-02-13 Thread Colton Lewis
From: Marc Zyngier asm/kvm_host.h includes asm/arm_pmu.h which includes perf/arm_pmuv3.h which includes asm/arm_pmuv3.h which includes asm/kvm_host.h This causes compilation problems why trying to use anything defined in any of the headers in any other headers. Reorganize these tangled headers.

[RFC PATCH v3 2/8] arm64: Generate sign macro for sysreg Enums

2025-02-13 Thread Colton Lewis
There's no reason Enums shouldn't be equivalent to UnsignedEnums and explicitly specify they are unsigned. Signed-off-by: Colton Lewis --- arch/arm64/tools/gen-sysreg.awk | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/tools/gen-sysreg.awk b/arch/arm64/tools/gen-sysreg.awk index 1

[RFC PATCH v3 1/8] arm64: cpufeature: Add cap for HPMN0

2025-02-13 Thread Colton Lewis
Add a capability for HPMN0, whether MDCR_EL2.HPMN can specify 0 counters reserved for the guest. This required changing HPMN0 to an UnsignedEnum in tools/sysreg because otherwise not all the appropriate macros are generated to add it to arm64_cpu_capabilities_arm64_features. Signed-off-by: Colton

Re: [RFC PATCH 15/39] KVM: guest_memfd: hugetlb: allocate and truncate from hugetlb

2025-02-13 Thread Peter Xu
On Thu, Feb 13, 2025 at 07:52:43AM +, Ackerley Tng wrote: > Peter Xu writes: > > > On Tue, Sep 10, 2024 at 11:43:46PM +, Ackerley Tng wrote: > >> +static struct folio *kvm_gmem_hugetlb_alloc_folio(struct hstate *h, > >> +struct hugepage_subpool

[PATCH] virtio_snd.h: clarify that `controls` depends on VIRTIO_SND_F_CTLS

2025-02-13 Thread Stefano Garzarella
As defined in the specification, the `controls` field in the configuration space is only valid/present if VIRTIO_SND_F_CTLS is negotiated. From https://docs.oasis-open.org/virtio/virtio/v1.3/virtio-v1.3.html: 5.14.4 Device Configuration Layout ... controls (driver-read-only) in

Re: [PATCH v3 1/4] kernel: param: rename locate_module_kobject

2025-02-13 Thread Petr Pavlu
On 2/11/25 22:48, Shyam Saini wrote: > The locate_module_kobject() function looks up an existing > module_kobject for a given module name. If it cannot find the > corresponding module_kobject, it creates one for the given name. > > This commit renames locate_module_kobject() to > lookup_or_create_

Re: [PATCH v3 3/4] kernel: globalize lookup_or_create_module_kobject()

2025-02-13 Thread Petr Pavlu
On 2/11/25 22:48, Shyam Saini wrote: > lookup_or_create_module_kobject() is marked as static and __init, > to make it global drop static keyword. > Since this function can be called from non-init code, use __modinit > instead of __init, __modinit marker will make it __init if > CONFIG_MODULES is no

Re: [PATCH v3 2/4] kernel: refactor lookup_or_create_module_kobject()

2025-02-13 Thread Petr Pavlu
On 2/11/25 22:48, Shyam Saini wrote: > In the unlikely event of the allocation failing, it is better to let > the machine boot with a not fully populated sysfs than to kill it with > this BUG_ON(). All callers are already prepared for > lookup_or_create_module_kobject() returning NULL. > > This is

Re: [PATCH net-next v19 00/26] Introducing OpenVPN Data Channel Offload

2025-02-13 Thread Sabrina Dubroca
2025-02-13, 12:46:34 +0100, Antonio Quartulli wrote: > On 13/02/2025 00:34, Sabrina Dubroca wrote: > > Hello, > > > > 2025-02-11, 01:39:53 +0100, Antonio Quartulli wrote: > > > All minor and major reported problems have been finally addressed. > > > Big thanks to Sabrina, who took the time to guid

Re: [PATCH v2] ww_mutex: convert self-test to KUnit

2025-02-13 Thread Tamir Duberstein
On Thu, Feb 13, 2025 at 6:59 AM Peter Zijlstra wrote: > > On Thu, Feb 13, 2025 at 06:40:20AM -0500, Tamir Duberstein wrote: > > Convert this unit test to a KUnit test. This allows the test to benefit > > from the KUnit tooling. Note that care is taken to avoid test-ending > > assertions in worker

Re: [PATCH net-next v5 0/8] Some pktgen fixes/improvments (part II)

2025-02-13 Thread Jakub Kicinski
On Thu, 13 Feb 2025 12:19:12 +0100 Peter Seiderer wrote: > Patch set splited into part I > And part II (this one): Automation doesn't know how to track dependencies so this won't apply for the testing. I'll mark it as RFC, you'll have to repost..

Re: [Patch net 1/2] vsock/virtio: initialize rx_buf_nr and rx_buf_max_nr when resuming

2025-02-13 Thread Stefano Garzarella
On Thu, 13 Feb 2025 at 10:25, Stefano Garzarella wrote: > > On Thu, Feb 13, 2025 at 09:28:05AM +0800, Junnan Wu wrote: > >>You need to update the title now that you're moving also queued_replies. > >> > > > >Well, I will update the title in V3 version. > > > >>On Tue, Feb 11, 2025 at 03:19:21PM +0

Re: [PATCH v2 6/6] selftests/mm: remove local __NR_* definitions

2025-02-13 Thread Dave Hansen
On 2/13/25 00:04, John Hubbard wrote: > > 2) I'm unable to reproduce what you saw, because in ALL cases (before > or after the commit, and with or without a revert), I get the same > results on my Intel test machine: > >     $ ./protection_keys_64 >     has pkeys: 0 >     running PKEY tests for u

Re: [PATCH v1 02/13] genirq/msi: Rename iommu_dma_compose_msi_msg() to msi_msg_set_addr()

2025-02-13 Thread Jason Gunthorpe
On Thu, Feb 13, 2025 at 01:11:37PM +0100, Thomas Gleixner wrote: > On Sat, Feb 08 2025 at 01:02, Nicolin Chen wrote: > > > From: Jason Gunthorpe > > > > The new function is used to take in a u64 MSI address and store it in the Assuming Nicolin moves the hunk as I suggested for patch 1 lets say:

Re: [PATCH net-next v19 00/26] Introducing OpenVPN Data Channel Offload

2025-02-13 Thread Sean Anderson
Hi Antonio, On 2/10/25 19:39, Antonio Quartulli wrote: NOTE: TCP tests are still showing the following warning while running iperf. I have analysed the report several times, but it definitely looks like a false positive to me, so nothing to worry about. Basically the lockdep engine gets confuse

Re: [PATCH] selftests/vDSO: fix GNU hash table entry size for s390x

2025-02-13 Thread Thomas Weißschuh
On Thu, Feb 13, 2025 at 01:47:26PM +0100, Jens Remus wrote: > On 13.02.2025 10:41, Thomas Weißschuh wrote: > > Commit 14be4e6f3522 ("selftests: vDSO: fix ELF hash table entry size for > > s390x") > > changed the type of the ELF hash table entries to 64bit on s390x. > > However the *GNU* hash table

Re: [PATCH v1 01/13] genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie

2025-02-13 Thread Jason Gunthorpe
On Thu, Feb 13, 2025 at 12:54:15PM +0100, Thomas Gleixner wrote: > So this change log really fails to follow the basic structure: > >The context, the problem and the solution The IOMMU translation for MSI message addresses is a two step process, seperated in time: 1) iommu_dma_prepare_msi()

Re: [PATCH] selftests/vDSO: fix GNU hash table entry size for s390x

2025-02-13 Thread Jens Remus
On 13.02.2025 10:41, Thomas Weißschuh wrote: Commit 14be4e6f3522 ("selftests: vDSO: fix ELF hash table entry size for s390x") changed the type of the ELF hash table entries to 64bit on s390x. However the *GNU* hash tables entries are always 32bit. The "bucket" pointer is shared between both hash

Re: [PATCH v1 02/13] genirq/msi: Rename iommu_dma_compose_msi_msg() to msi_msg_set_addr()

2025-02-13 Thread Thomas Gleixner
On Sat, Feb 08 2025 at 01:02, Nicolin Chen wrote: > From: Jason Gunthorpe > > The new function is used to take in a u64 MSI address and store it in the Which new function? The subject claims this is a rename. That's confusing at best. > msi_msg. If the iommu has provided an alternative address

Re: [PATCH v2] ww_mutex: convert self-test to KUnit

2025-02-13 Thread Peter Zijlstra
On Thu, Feb 13, 2025 at 06:40:20AM -0500, Tamir Duberstein wrote: > Convert this unit test to a KUnit test. This allows the test to benefit > from the KUnit tooling. Note that care is taken to avoid test-ending > assertions in worker threads, which is unsafe in KUnit (and wasn't done > before this

[PATCH net 1/4] sockmap, vsock: For connectible sockets allow only connected

2025-02-13 Thread Michal Luczaj
sockmap expects all vsocks to have a transport assigned, which is expressed in vsock_proto::psock_update_sk_prot(). However, there is an edge case where an unconnected (connectible) socket may lose its previously assigned transport. This is handled with a NULL check in the vsock/BPF recv path. Ano

[PATCH net 4/4] selftest/bpf: Add vsock test for sockmap rejecting unconnected

2025-02-13 Thread Michal Luczaj
Verify that for a connectible AF_VSOCK socket, merely having a transport assigned is insufficient; socket must be connected for the sockmap to accept. This does not test datagram vsocks. Even though it hardly matters. VMCI is the only transport that features VSOCK_TRANSPORT_F_DGRAM, but it has an

[PATCH net 3/4] selftest/bpf: Adapt vsock_delete_on_close to sockmap rejecting unconnected

2025-02-13 Thread Michal Luczaj
Commit 515745445e92 ("selftest/bpf: Add test for vsock removal from sockmap on close()") added test that checked if proto::close() callback was invoked on AF_VSOCK socket release. I.e. it verified that a close()d vsock does indeed get removed from the sockmap. It was done simply by creating a sock

[PATCH net 2/4] vsock/bpf: Warn on socket without transport

2025-02-13 Thread Michal Luczaj
In the spirit of commit 91751e248256 ("vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]"), armorize the "impossible" cases with a warning. Fixes: 634f1a7110b4 ("vsock: support sockmap") Signed-off-by: Michal Luczaj --- net/vmw_vsock/af_vsock.c | 3 +++ net/vmw_vsock/vsock_bpf.c | 2

[PATCH net 0/4] sockmap, vsock: For connectible sockets allow only connected

2025-02-13 Thread Michal Luczaj
Series deals with one more case of vsock surprising BPF/sockmap by being inconsistency about (having an) assigned transport. KASAN: null-ptr-deref in range [0x0120-0x0127] CPU: 7 UID: 0 PID: 56 Comm: kworker/7:0 Not tainted 6.14.0-rc1+ Workqueue: vsock-loopback vsock_loopba

[PATCH] virtio: console: Prepare for making REMOTEPROC modular

2025-02-13 Thread Uwe Kleine-König
virtio_console.c can make use of REMOTEPROC. Therefore it has several tests evaluating IS_ENABLED(CONFIG_REMOTEPROC) . This currently only does the right thing because CONFIG_REMOTEPROC cannot be modular. Otherwise the configuration CONFIG_REMOTEPROC=m CONFIG_VIRTIO_CONSO

Re: [PATCH v1 01/13] genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie

2025-02-13 Thread Thomas Gleixner
On Sat, Feb 08 2025 at 01:02, Nicolin Chen wrote: > From: Jason Gunthorpe > > All the iommu cases simply want to override the MSI page's address with > the IOVA that was mapped through the iommu. This doesn't need a cookie > pointer, we just need to store the IOVA and its page size in the > msi_de

Re: [PATCH net-next v19 00/26] Introducing OpenVPN Data Channel Offload

2025-02-13 Thread Antonio Quartulli
On 13/02/2025 00:34, Sabrina Dubroca wrote: Hello, 2025-02-11, 01:39:53 +0100, Antonio Quartulli wrote: All minor and major reported problems have been finally addressed. Big thanks to Sabrina, who took the time to guide me through converting the peer socket to an RCU pointer. Something is of

[PATCH v2] ww_mutex: convert self-test to KUnit

2025-02-13 Thread Tamir Duberstein
Convert this unit test to a KUnit test. This allows the test to benefit from the KUnit tooling. Note that care is taken to avoid test-ending assertions in worker threads, which is unsafe in KUnit (and wasn't done before this change either). Signed-off-by: Tamir Duberstein --- I tested this using:

[PATCH net-next v5 4/8] net: pktgen: fix mpls maximum labels list parsing

2025-02-13 Thread Peter Seiderer
Fix mpls maximum labels list parsing up to MAX_MPLS_LABELS/16 entries (instead of up to MAX_MPLS_LABELS - 1). Addresses the following: $ echo "mpls 0f00,0f01,0f02,0f03,0f04,0f05,0f06,0f07,0f08,0f09,0f0a,0f0b,0f0c,0f0d,0f0e,0

[PATCH net-next v5 7/8] net: pktgen: remove all superfluous index assignements

2025-02-13 Thread Peter Seiderer
Remove all superfluous index ('i += len') assignements (value not used afterwards). Signed-off-by: Peter Seiderer --- Changes v4 -> v5 - new patch (suggested by Simon Horman) --- net/core/pktgen.c | 52 ++- 1 file changed, 6 insertions(+), 46 deletio

[PATCH net-next v5 8/8] selftest: net: add proc_net_pktgen

2025-02-13 Thread Peter Seiderer
Add some test for /proc/net/pktgen/... interface. - enable 'CONFIG_NET_PKTGEN=m' in tools/testing/selftests/net/config Signed-off-by: Peter Seiderer --- Changes v4 -> v5 - split up patchset into part i/ii (suggested by Simon Horman) - addapt to dropped patch 'net: pktgen: hex32_arg/num_arg e

[PATCH net-next v5 5/8] net: pktgen: fix access outside of user given buffer in pktgen_if_write()

2025-02-13 Thread Peter Seiderer
Honour the user given buffer size for the hex32_arg(), num_arg(), strn_len(), get_imix_entries() and get_labels() calls (otherwise they will access memory outside of the user given buffer). Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v4 -> v5 - split up patchset into pa

[PATCH net-next v5 1/8] net: pktgen: fix mix of int/long

2025-02-13 Thread Peter Seiderer
Fix mix of int/long (and multiple conversion from/to) by using consequently size_t for i and max and ssize_t for len and adjust function signatures of hex32_arg(), count_trail_chars(), num_arg() and strn_len() accordingly. Signed-off-by: Peter Seiderer --- Changes v4 -> v5 - split up patchset i

[PATCH net-next v5 3/8] net: pktgen: remove some superfluous variable initializing

2025-02-13 Thread Peter Seiderer
Remove some superfluous variable initializing before hex32_arg call (as the same init is done here already). Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v4 -> v5 - split up patchset into part i/ii (suggested by Simon Horman) - add rev-by Simon Horman Changes v3 -> v4

[PATCH net-next v5 6/8] net: pktgen: fix mpls reset parsing

2025-02-13 Thread Peter Seiderer
Fix mpls list reset parsing to work as describe in Documentation/networking/pktgen.rst: pgset "mpls 0"turn off mpls (or any invalid argument works too!) - before the patch $ echo "mpls 0001,0002" > /proc/net/pktgen/lo\@0 $ grep mpls /proc/net/pktgen/lo\@0

[PATCH net-next v5 2/8] net: pktgen: remove extra tmp variable (re-use len instead)

2025-02-13 Thread Peter Seiderer
Remove extra tmp variable in pktgen_if_write (re-use len instead). Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v4 -> v5 - split up patchset into part i/ii (suggested by Simon Horman) - add rev-by Simon Horman Changes v3 -> v4 - new patch (factored out of patch 'net

[PATCH net-next v5 0/8] Some pktgen fixes/improvments (part II)

2025-02-13 Thread Peter Seiderer
While taking a look at '[PATCH net] pktgen: Avoid out-of-range in get_imix_entries' ([1]) and '[PATCH net v2] pktgen: Avoid out-of-bounds access in get_imix_entries' ([2], [3]) and doing some tests and code review I detected that the /proc/net/pktgen/... parsing logic does not honour the user given

[PATCH net-next v5 6/8] net: pktgen: fix ctrl interface command parsing

2025-02-13 Thread Peter Seiderer
Enable command writing without trailing '\n': - the good case $ echo "reset" > /proc/net/pktgen/pgctrl - the bad case (before the patch) $ echo -n "reset" > /proc/net/pktgen/pgctrl -bash: echo: write error: Invalid argument - with patch applied $ echo -n "reset

[PATCH net-next v5 0/8] Some pktgen fixes/improvments (part I)

2025-02-13 Thread Peter Seiderer
While taking a look at '[PATCH net] pktgen: Avoid out-of-range in get_imix_entries' ([1]) and '[PATCH net v2] pktgen: Avoid out-of-bounds access in get_imix_entries' ([2], [3]) and doing some tests and code review I detected that the /proc/net/pktgen/... parsing logic does not honour the user given

[PATCH net-next v5 5/8] net: pktgen: fix 'ratep 0' error handling (return -EINVAL)

2025-02-13 Thread Peter Seiderer
Given an invalid 'ratep' command e.g. 'ratep 0' the return value is '1', leading to the following misleading output: - the good case $ echo "ratep 100" > /proc/net/pktgen/lo\@0 $ grep "Result:" /proc/net/pktgen/lo\@0 Result: OK: ratep=100 - the bad case (before the patch)

[PATCH net-next v5 3/8] net: pktgen: fix hex32_arg parsing for short reads

2025-02-13 Thread Peter Seiderer
Fix hex32_arg parsing for short reads (here 7 hex digits instead of the expected 8), shift result only on successful input parsing. - before the patch $ echo "mpls 123" > /proc/net/pktgen/lo\@0 $ grep mpls /proc/net/pktgen/lo\@0 mpls: 1230 Result: OK:

[PATCH net-next v5 7/8] net: pktgen: fix access outside of user given buffer in pktgen_thread_write()

2025-02-13 Thread Peter Seiderer
Honour the user given buffer size for the strn_len() calls (otherwise strn_len() will access memory outside of the user given buffer). Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v4 -> v5 - split up patchset into part i/ii (suggested by Simon Horman) Changes v3 -> v4

[PATCH net-next v5 4/8] net: pktgen: fix 'rate 0' error handling (return -EINVAL)

2025-02-13 Thread Peter Seiderer
Given an invalid 'rate' command e.g. 'rate 0' the return value is '1', leading to the following misleading output: - the good case $ echo "rate 100" > /proc/net/pktgen/lo\@0 $ grep "Result:" /proc/net/pktgen/lo\@0 Result: OK: rate=100 - the bad case (before the patch)

[PATCH net-next v5 8/8] net: pktgen: use defines for the various dec/hex number parsing digits lengths

2025-02-13 Thread Peter Seiderer
Use defines for the various dec/hex number parsing digits lengths (hex32_arg/num_arg calls). Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v4 -> v5 - split up patchset into part i/ii (suggested by Simon Horman) - add rev-by Simon Horman Changes v3 -> v4 - new patch (

[PATCH net-next v5 2/8] net: pktgen: enable 'param=value' parsing

2025-02-13 Thread Peter Seiderer
Enable more flexible parameters syntax, allowing 'param=value' in addition to the already supported 'param value' pattern (additional this gives the skipping '=' in count_trail_chars() a purpose). Tested with: $ echo "min_pkt_size 999" > /proc/net/pktgen/lo\@0 $ echo "min_pkt_size

[PATCH net-next v5 1/8] net: pktgen: replace ENOTSUPP with EOPNOTSUPP

2025-02-13 Thread Peter Seiderer
Replace ENOTSUPP with EOPNOTSUPP, fixes checkpatch hint WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP and e.g. $ echo "clone_skb 1" > /proc/net/pktgen/lo\@0 -bash: echo: write error: Unknown error 524 Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v

Re: [PATCH 2/2] vsock/virtio: Don't reset the created SOCKET during s2r

2025-02-13 Thread Stefano Garzarella
On Wed, Feb 12, 2025 at 12:48:43PM +0800, Junnan Wu wrote: On Mon, Feb 10, 2025 at 12:48:03PM +0100, leona...@redhat.com wrote: Like for the other patch, some maintainers have not been CCd. Yes, please use `scripts/get_maintainer.pl`. Ok, I will add other maintainers by this script in next

Re: [Patch net 1/2] vsock/virtio: initialize rx_buf_nr and rx_buf_max_nr when resuming

2025-02-13 Thread Stefano Garzarella
On Thu, Feb 13, 2025 at 09:28:05AM +0800, Junnan Wu wrote: You need to update the title now that you're moving also queued_replies. Well, I will update the title in V3 version. On Tue, Feb 11, 2025 at 03:19:21PM +0800, Junnan Wu wrote: When executing suspend to ram twice in a row, the `rx_b

Re: [RFC PATCH 14/39] KVM: guest_memfd: hugetlb: initialization and cleanup

2025-02-13 Thread Ackerley Tng
Peter Xu writes: > On Tue, Sep 10, 2024 at 11:43:45PM +, Ackerley Tng wrote: >> +/** >> + * Removes folios in range [@lstart, @lend) from page cache of inode, >> updates >> + * inode metadata and hugetlb reservations. >> + */ >> +static void kvm_gmem_hugetlb_truncate_folios_range(struct inod

  1   2   >