Re: [PATCH v3 3/3] selftests: net: add a virtio_net deadlock selftest

2025-04-15 Thread Bui Quang Minh
On 4/16/25 11:27, Jakub Kicinski wrote: On Tue, 15 Apr 2025 14:43:41 +0700 Bui Quang Minh wrote: +def setup_xsk(cfg, xdp_queue_id = 0) -> bkg: +# Probe for support +xdp = cmd(f'{cfg.net_lib_dir / "xdp_helper"} - -', fail=False) +if xdp.ret == 255: +raise KsftSkipEx('AF_XDP un

Re: [PATCH v3 3/3] selftests: net: add a virtio_net deadlock selftest

2025-04-15 Thread Jakub Kicinski
On Tue, 15 Apr 2025 14:43:41 +0700 Bui Quang Minh wrote: > +def setup_xsk(cfg, xdp_queue_id = 0) -> bkg: > +# Probe for support > +xdp = cmd(f'{cfg.net_lib_dir / "xdp_helper"} - -', fail=False) > +if xdp.ret == 255: > +raise KsftSkipEx('AF_XDP unsupported') > +elif xdp.ret >

Re: [PATCH v2 05/12] rcutorture: Add tests for SRCU up/down reader primitives

2025-04-15 Thread Paul E. McKenney
On Tue, Apr 15, 2025 at 09:14:36PM -0400, Joel Fernandes wrote: > > > On 4/15/2025 5:15 PM, Paul E. McKenney wrote: > > On Tue, Apr 15, 2025 at 10:59:36AM -0700, Paul E. McKenney wrote: > >> On Tue, Apr 15, 2025 at 01:16:15PM -0400, Joel Fernandes wrote: > >>> > >>> > >>> On 3/31/2025 5:03 PM, Pa

[PATCH v9 5/5] KVM: selftests: Add test cases for LoongArch

2025-04-15 Thread Bibo Mao
Some common KVM test cases are supported on LoongArch now as following: coalesced_io_test demand_paging_test dirty_log_perf_test dirty_log_test guest_print_test hardware_disable_test kvm_binary_stats_test kvm_create_max_vcpus kvm_page_table_test memslot_modification_stress_test

[PATCH v9 3/5] KVM: selftests: Add core KVM selftests support for LoongArch

2025-04-15 Thread Bibo Mao
Add core KVM selftests support for LoongArch, it includes exception handler, mmu page table setup and vCPU startup entry support. Signed-off-by: Bibo Mao --- .../selftests/kvm/lib/loongarch/exception.S | 59 +++ .../selftests/kvm/lib/loongarch/processor.c | 347 ++ 2 files c

[PATCH v9 4/5] KVM: selftests: Add ucall test support for LoongArch

2025-04-15 Thread Bibo Mao
Add ucall test support for LoongArch, ucall method on LoongArch uses undefined mmio area. It will cause vCPU exits to hypervisor so that hypervisor can communicate with vCPU. Signed-off-by: Bibo Mao --- .../selftests/kvm/include/loongarch/ucall.h | 20 ++ .../selftests/kvm/lib/loongarc

[PATCH v9 0/5] KVM: selftests: Add LoongArch support

2025-04-15 Thread Bibo Mao
--- Changes in v9: 1. Add vm mode VM_MODE_P47V47_16K, LoongArch VM uses this mode by default, rather than VM_MODE_P36V47_16K. 2. Refresh some spelling issues in changelog. Changes in v8: 1. Porting patch based on the latest version. 2. For macro PC_OFFSET_EXREGS, offsetof() method is used for C

[PATCH v9 2/5] KVM: selftests: Add KVM selftests header files for LoongArch

2025-04-15 Thread Bibo Mao
Add KVM selftests header files for LoongArch, including processor.h and kvm_util_base.h. It mainly contains LoongArch CSR register definition and page table entry definition. Signed-off-by: Bibo Mao --- .../testing/selftests/kvm/include/kvm_util.h | 5 + .../kvm/include/loongarch/kvm_util_arc

[PATCH v9 1/5] KVM: selftests: Add VM_MODE_P47V47_16K vm mode

2025-04-15 Thread Bibo Mao
On LoongArch system, GVA width is 47 bit and GPA width is 47 bit also, here add new vm mode VM_MODE_P47V47_16K. Signed-off-by: Bibo Mao --- tools/testing/selftests/kvm/include/kvm_util.h | 1 + tools/testing/selftests/kvm/lib/kvm_util.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a

Re: [PATCH REGRESSION-FIX] x86/paravirt: Move halt paravirt calls under CONFIG_PARAVIRT

2025-04-15 Thread Vishal Annapurve
> ... > 6.12.23 fails to build with the following error if CONFIG_XEN_PV is > not set: > > arch/x86/coco/tdx/tdx.c: In function ‘tdx_early_init’: > arch/x86/coco/tdx/tdx.c:1080:19: error: ‘struct pv_irq_ops’ has no member > named ‘safe_halt’ > 1080 | pv_ops.irq.safe_halt = tdx_safe_halt; >

Re: [PATCH v3 1/2] rcutorture: Perform more frequent testing of ->gpwrap

2025-04-15 Thread Paul E. McKenney
On Mon, Apr 14, 2025 at 11:05:45AM -0400, Joel Fernandes wrote: > On 4/10/2025 2:29 PM, Paul E. McKenney wrote: > >> +static int rcu_gpwrap_lag_init(void) > >> +{ > >> + if (gpwrap_lag_cycle_mins <= 0 || gpwrap_lag_active_mins <= 0) { > >> + pr_alert("rcu-torture: lag timing parameters mu

[PATCH RFT v16 8/8] selftests/clone3: Test shadow stack support

2025-04-15 Thread Mark Brown
Add basic test coverage for specifying the shadow stack for a newly created thread via clone3(), including coverage of the newly extended argument structure. We check that a user specified shadow stack can be provided, and that invalid combinations of parameters are rejected. In order to facilita

[PATCH RFT v16 7/8] selftests/clone3: Allow tests to flag if -E2BIG is a valid error code

2025-04-15 Thread Mark Brown
The clone_args structure is extensible, with the syscall passing in the length of the structure. Inside the kernel we use copy_struct_from_user() to read the struct but this has the unfortunate side effect of silently accepting some overrun in the structure size providing the extra data is all zero

[PATCH RFT v16 6/8] selftests/clone3: Factor more of main loop into test_clone3()

2025-04-15 Thread Mark Brown
In order to make it easier to add more configuration for the tests and more support for runtime detection of when tests can be run pass the structure describing the tests into test_clone3() rather than picking the arguments out of it and have that function do all the per-test work. No functional c

[PATCH RFT v16 5/8] selftests/clone3: Remove redundant flushes of output streams

2025-04-15 Thread Mark Brown
Since there were widespread issues with output not being flushed the kselftest framework was modified to explicitly set the output streams unbuffered in commit 58e2847ad2e6 ("selftests: line buffer test program's stdout") so there is no need to explicitly flush in the clone3 tests. Reviewed-by: Ke

[PATCH RFT v16 4/8] fork: Add shadow stack support to clone3()

2025-04-15 Thread Mark Brown
Unlike with the normal stack there is no API for configuring the shadow stack for a new thread, instead the kernel will dynamically allocate a new shadow stack with the same size as the normal stack. This appears to be due to the shadow stack series having been in development since before the more

[PATCH RFT v16 3/8] selftests: Provide helper header for shadow stack testing

2025-04-15 Thread Mark Brown
While almost all users of shadow stacks should be relying on the dynamic linker and libc to enable the feature there are several low level test programs where it is useful to enable without any libc support, allowing testing without full system enablement. This low level testing is helpful during b

[PATCH RFT v16 2/8] Documentation: userspace-api: Add shadow stack API documentation

2025-04-15 Thread Mark Brown
There are a number of architectures with shadow stack features which we are presenting to userspace with as consistent an API as we can (though there are some architecture specifics). Especially given that there are some important considerations for userspace code interacting directly with the feat

[PATCH RFT v16 1/8] arm64/gcs: Return a success value from gcs_alloc_thread_stack()

2025-04-15 Thread Mark Brown
Currently as a result of templating from x86 code gcs_alloc_thread_stack() returns a pointer as an unsigned int however on arm64 we don't actually use this pointer value as anything other than a pass/fail flag. Simplify the interface to just return an int with 0 on success and a negative error code

[PATCH RFT v16 0/8] fork: Support shadow stacks in clone3()

2025-04-15 Thread Mark Brown
The kernel has recently added support for shadow stacks, currently x86 only using their CET feature but both arm64 and RISC-V have equivalent features (GCS and Zicfiss respectively), I am actively working on GCS[1]. With shadow stacks the hardware maintains an additional stack containing only the

Re: [PATCH v18 04/15] dt-bindings: PCI: pci-ep: Add support for iommu-map and msi-map

2025-04-15 Thread Rob Herring (Arm)
On Mon, 14 Apr 2025 14:30:58 -0400, Frank Li wrote: > Document the use of (msi|iommu)-map for PCI Endpoint (EP) controllers, > which can use MSI as a doorbell mechanism. Each EP controller can support > up to 8 physical functions and 65,536 virtual functions. > > Define how to construct device I

[PATCH 4/4] media: i2c: imx214: Read clock frequency from device tree

2025-04-15 Thread André Apitzsch via B4 Relay
From: André Apitzsch Replace the hard coded external clock frequency by the one read from device tree. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx21

[PATCH 2/4] media: i2c: imx214: Prepare for variable clock frequency

2025-04-15 Thread André Apitzsch via B4 Relay
From: André Apitzsch Move clock frequency related parameters out of the constant register sequences, such that the hard coded external clock frequency can be replaced by a variable in the upcoming patches. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 54 ++

[PATCH 0/4] media: i2c: imx214: Add support for more clock frequencies

2025-04-15 Thread André Apitzsch via B4 Relay
The imx214 driver currently supports only a 24 MHz external clock. But there are devices, like Qualcomm-MSM8916-based phones, which cannot provide this frequency. To make the sensor usable by those devices, add support for additional clock frequencies. This series supersedes https://lore.kernel.or

[PATCH 3/4] media: i2c: imx214: Make use of CCS PLL calculator

2025-04-15 Thread André Apitzsch via B4 Relay
From: André Apitzsch Calculate PLL parameters based on clock frequency and link frequency. Signed-off-by: André Apitzsch --- drivers/media/i2c/Kconfig | 1 + drivers/media/i2c/imx214.c | 208 - 2 files changed, 170 insertions(+), 39 deletions(-)

[PATCH 1/4] media: i2c: imx214: Reorder imx214_parse_fwnode call

2025-04-15 Thread André Apitzsch via B4 Relay
From: André Apitzsch Reorder imx214_parse_fwnode call to reduce goto paths in upcoming patches. No functional change intended. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/imx214.c b/

Re: [PATCH v2 05/12] rcutorture: Add tests for SRCU up/down reader primitives

2025-04-15 Thread Paul E. McKenney
On Tue, Apr 15, 2025 at 10:59:36AM -0700, Paul E. McKenney wrote: > On Tue, Apr 15, 2025 at 01:16:15PM -0400, Joel Fernandes wrote: > > > > > > On 3/31/2025 5:03 PM, Paul E. McKenney wrote: > > > This commit adds a new rcutorture.n_up_down kernel boot parameter > > > that specifies the number of

[PATCH v7 1/2] selftests: memcg: Allow low event with no memory.low and memory_recursiveprot on

2025-04-15 Thread Waiman Long
The test_memcontrol selftest consistently fails its test_memcg_low sub-test due to the fact that its 3rd test child cgroup which have a memmory.low of 0 have low event count. This happens when memory_recursiveprot mount option is enabled which is the default setting used by systemd to mount cgroup2

[PATCH v7 2/2] selftests: memcg: Increase error tolerance of child memory.current check in test_memcg_protection()

2025-04-15 Thread Waiman Long
The test_memcg_protection() function is used for the test_memcg_min and test_memcg_low sub-tests. This function generates a set of parent/child cgroups like: parent: memory.min/low = 50M child 0: memory.min/low = 75M, memory.current = 50M child 1: memory.min/low = 25M, memory.current = 50

[PATCH v7 0/2] memcg: Fix test_memcg_min/low test failures

2025-04-15 Thread Waiman Long
v7: - Skip the vmscan change as the mem_cgroup_usage() check for now as it is currently redundant. v6: - The memcg_test_low failure is indeed due to the memory_recursiveprot mount option which is enabled by default in systemd cgroup v2 setting. So adopt Michal's suggestion to adjust the

Re: [PATCH v2] lib: PRIME_NUMBERS_KUNIT_TEST should not select PRIME_NUMBERS

2025-04-15 Thread Kees Cook
On Mon, 14 Apr 2025 16:35:00 +0200, Geert Uytterhoeven wrote: > Enabling a (modular) test should not silently enable additional kernel > functionality, as that may increase the attack vector of a product. > > Fix this by making PRIME_NUMBERS_KUNIT_TEST depend on PRIME_NUMBERS > instead of selectin

[PATCH REGRESSION-FIX] x86/paravirt: Move halt paravirt calls under CONFIG_PARAVIRT

2025-04-15 Thread Brett Mastbergen via B4 Relay
alt = pv_native_safe_halt, .irq.halt = native_halt, -#endif /* CONFIG_PARAVIRT_XXL */ /* Mmu ops. */ .mmu.flush_tlb_user = native_flush_tlb_local, --- base-commit: 83b4161a63b87ce40d9f24f09b5b006f63d95b7c change-id: 20250415-stable_fixup-c7b936473f53 Best regards, -- Brett Mastbergen

Re: [PATCH -next] selftest/bpf/benchs: Remove duplicate sys/types.h header

2025-04-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Martin KaFai Lau : On Tue, 15 Apr 2025 14:14:59 +0800 you wrote: > ./tools/testing/selftests/bpf/benchs/bench_sockmap.c: sys/types.h is included > more than once. > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn

Re: [PATCH v2 05/12] rcutorture: Add tests for SRCU up/down reader primitives

2025-04-15 Thread Paul E. McKenney
On Tue, Apr 15, 2025 at 01:16:15PM -0400, Joel Fernandes wrote: > > > On 3/31/2025 5:03 PM, Paul E. McKenney wrote: > > This commit adds a new rcutorture.n_up_down kernel boot parameter > > that specifies the number of outstanding SRCU up/down readers, which > > begin in kthread context and end i

Re: [PATCH 1/2] mm: move mmap/vma locking logic into specific files

2025-04-15 Thread Paul E. McKenney
On Tue, Apr 15, 2025 at 09:06:46AM -0700, Suren Baghdasaryan wrote: > On Tue, Apr 15, 2025 at 6:11 AM Lorenzo Stoakes > wrote: > > > > Currently the VMA and mmap locking logic is entangled in two of the most > > overwrought files in mm - include/linux/mm.h and mm/memory.c. Separate this > > logic

Re: [PATCH v9 00/19] DCD: Add support for Dynamic Capacity Devices (DCD)

2025-04-15 Thread Dan Williams
Jonathan Cameron wrote: > On Mon, 14 Apr 2025 21:50:31 -0700 > Dan Williams wrote: > > > Jonathan Cameron wrote: > > [..] > > > To me we don't need to answer the question of whether we fully understand > > > requirements, or whether this support covers them, but rather to ask > > > if anyone has

Re: [PATCH v2 05/12] rcutorture: Add tests for SRCU up/down reader primitives

2025-04-15 Thread Joel Fernandes
On 3/31/2025 5:03 PM, Paul E. McKenney wrote: > This commit adds a new rcutorture.n_up_down kernel boot parameter > that specifies the number of outstanding SRCU up/down readers, which > begin in kthread context and end in an hrtimer handler. There is a new > kthread ("rcu_torture_updown") that

[PATCH 0/2] kunit: qemu_configs: Add 64-bit SPARC configuration

2025-04-15 Thread Thomas Weißschuh
Add a basic config to run kunit tests on 64-bit SPARC. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (2): kunit: qemu_configs: sparc: Explicitly enable CONFIG_SPARC32=y kunit: qemu_configs: Add 64-bit SPARC configuration tools/testing/kunit/qemu_configs/sparc.py | 1 + too

[PATCH] arm64: dts: qcom: sdm660-xiaomi-lavender: Add missing SD card detect GPIO

2025-04-15 Thread Alexey Minnekhanov
During initial porting these cd-gpios were missed. Having card detect is beneficial because driver does not need to do polling every second and it can just use IRQ. SD card detection in U-Boot is also fixed by this. Fixes: cf85e9aee210 ("arm64: dts: qcom: sdm660-xiaomi-lavender: Add eMMC and SD")

Re: [PATCH bpf-next 1/2] bpf: Allow access to const void pointer arguments in tracing programs

2025-04-15 Thread Kafai Wan
On Mon, Apr 14, 2025 at 6:35 PM Jiri Olsa wrote: > > On Sun, Apr 13, 2025 at 01:06:25AM +0800, KaFai Wan wrote: > > Adding support to access arguments with const void pointer arguments > > in tracing programs. > > > > Currently we allow tracing programs to access void pointers. If we try to > > ac

Re: [PATCH v9 01/19] cxl/mbox: Flag support for Dynamic Capacity Devices (DCD)

2025-04-15 Thread Jonathan Cameron
On Sun, 13 Apr 2025 17:52:09 -0500 Ira Weiny wrote: > Per the CXL 3.1 specification software must check the Command Effects > Log (CEL) for dynamic capacity command support. > > Detect support for the DCD commands while reading the CEL, including: > > Get DC Config > Get DC Extent L

Re: [PATCH v9 00/19] DCD: Add support for Dynamic Capacity Devices (DCD)

2025-04-15 Thread Dan Williams
Ira Weiny wrote: [..] > > However, after that, I tried to create a dax device as below, it failed. > > > > root@debian:~# daxctl create-device -r region0 -v > > libdaxctl: __dax_regions_init: no dax regions found via: /sys/class/dax Note that /sys/class/dax support was removed from the kernel bac

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

2025-04-15 Thread Dongli Zhang
Hi Michael, On 4/14/25 11:39 AM, Michael S. Tsirkin wrote: > On Mon, Apr 14, 2025 at 09:52:04AM -0700, Dongli Zhang wrote: >> Hi Michael, >> >> On 4/14/25 9:32 AM, Michael S. Tsirkin wrote: >>> On Wed, Apr 02, 2025 at 11:29:54PM -0700, Dongli Zhang wrote: Since long time ago, the only user of

[PATCH v3 1/3] virtio-net: disable delayed refill when pausing rx

2025-04-15 Thread Bui Quang Minh
When pausing rx (e.g. set up xdp, xsk pool, rx resize), we call napi_disable() on the receive queue's napi. In delayed refill_work, it also calls napi_disable() on the receive queue's napi. When napi_disable() is called on an already disabled napi, it will sleep in napi_disable_locked while still

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

2025-04-15 Thread Michael S. Tsirkin
On Mon, Apr 14, 2025 at 09:52:04AM -0700, Dongli Zhang wrote: > Hi Michael, > > On 4/14/25 9:32 AM, Michael S. Tsirkin wrote: > > On Wed, Apr 02, 2025 at 11:29:54PM -0700, Dongli Zhang wrote: > >> Since long time ago, the only user of vq->log is vhost-net. The concern is > >> to add support for mo

[PATCH v3 2/3] selftests: net: move xdp_helper to net/lib

2025-04-15 Thread Bui Quang Minh
Move xdp_helper to net/lib to make it easier for other selftests to use the helper. Signed-off-by: Bui Quang Minh --- tools/testing/selftests/drivers/net/Makefile | 2 -- tools/testing/selftests/drivers/net/queues.py | 4 ++-- tools/testing/selftests/net/lib/.git

[PATCH v3 0/2] kunit: qemu_configs: Add MIPS configurations

2025-04-15 Thread Thomas Weißschuh
Add basic support to run various MIPS variants via kunit_tool using the virtualized malta platform. Some of the cs_dsp unittests are broken. They are being disabled by default in the series "Fix up building KUnit tests for Cirrus Logic modules" [0]. [0] https://lore.kernel.org/lkml/2025041112360

Re: [PATCH v3 0/3] virtio-net: disable delayed refill when pausing rx

2025-04-15 Thread Michael S. Tsirkin
On Tue, Apr 15, 2025 at 02:43:38PM +0700, Bui Quang Minh wrote: > Hi everyone, > > This series tries to fix a deadlock in virtio-net when binding/unbinding > XDP program, XDP socket or resizing the rx queue. > > When pausing rx (e.g. set up xdp, xsk pool, rx resize), we call > napi_disable() on t

Re: [PATCH v2 4/4] arm64: dts: qcom: sm6350: Add video clock controller

2025-04-15 Thread Konrad Dybcio
On 4/15/25 6:05 AM, Taniya Das wrote: > > > On 4/12/2025 12:56 AM, Konrad Dybcio wrote: >> On 4/11/25 1:37 PM, Jagadeesh Kona wrote: >>> >>> >>> On 4/11/2025 2:42 PM, Konrad Dybcio wrote: On 4/11/25 9:15 AM, Jagadeesh Kona wrote: > > > On 4/1/2025 10:03 PM, Konrad Dybcio wrote: >

Re: [PATCH] arm64: dts: qcom: Remove unnecessary MM_[UD]L audio routes

2025-04-15 Thread Bjorn Andersson
On Fri, 11 Apr 2025 10:33:29 +0200, Luca Weiss wrote: > Since commit 6fd8d2d275f7 ("ASoC: qcom: qdsp6: Move frontend AIFs to > q6asm-dai") from over 4 years ago the audio routes beween MM_DL* + > MultiMedia* Playback and MultiMedia* Capture + MM_UL* are not necessary > anymore and can be removed

[PATCH v6 16/30] KVM: selftests: TDX: Add TDX MSR read/write tests

2025-04-15 Thread Sagi Shahar
The test verifies reads and writes for MSR registers with different access level. Signed-off-by: Sagi Shahar --- .../selftests/kvm/include/x86/tdx/tdx.h | 4 + tools/testing/selftests/kvm/lib/x86/tdx/tdx.c | 27 +++ tools/testing/selftests/kvm/x86/tdx_vm_test.c | 193 +-

Re: [PATCH net-next v2 0/8] mptcp: various small and unrelated improvements

2025-04-15 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Sun, 13 Apr 2025 11:34:31 +0200 you wrote: > Here are various unrelated patches: > > - Patch 1: sched: remove unused structure. > > - Patch 2: sched: split the validation part, a preparation for later. > > - Pa

Re: [PATCH v4 4/4] drivers: base: handle module_kobject creation

2025-04-15 Thread Greg KH
On Thu, Feb 27, 2025 at 10:49:30AM -0800, Shyam Saini wrote: > module_add_driver() relies on module_kset list for > /sys/module//drivers directory creation. > > Since, > commit 96a1a2412acba ("kernel/params.c: defer most of param_sysfs_init() to > late_initcall time") > drivers which are initiali

[PATCH v4 1/2] rcutorture: Perform more frequent testing of ->gpwrap

2025-04-15 Thread Joel Fernandes
Currently, the ->gpwrap is not tested (at all per my testing) due to the requirement of a large delta between a CPU's rdp->gp_seq and its node's rnp->gpseq. This results in no testing of ->gpwrap being set. This patch by default adds 5 minutes of testing with ->gpwrap forced by lowering the delta

Re: [PATCH 1/2] kunit: qemu_configs: powerpc: Explicitly enable CONFIG_CPU_BIG_ENDIAN=y

2025-04-15 Thread David Gow
On Tue, 15 Apr 2025 at 17:23, Thomas Weißschuh wrote: > > The configuration generated by kunit ends up with big endian. > A new kunit configuration for little endian is to be added. > To make the difference clearer spell out the endianness in the kunit > reference config. > > Signed-off-by: Thomas

Re: [PATCH bpf-next 2/2] selftests/bpf: Add test to access const void pointer argument in tracing program

2025-04-15 Thread Kafai Wan
On Mon, Apr 14, 2025 at 6:35 PM Jiri Olsa wrote: > > On Sun, Apr 13, 2025 at 01:06:26AM +0800, KaFai Wan wrote: > > Adding verifier test for accessing const void pointer argument in > > tracing programs. > > > > The test program loads 2nd argument of kfree tp_btf which is > > const void pointer an

Re: [PATCH v4 2/2] rcutorture: Fix issue with re-using old images on ARM64

2025-04-15 Thread Joel Fernandes
On 4/15/2025 9:36 AM, Joel Fernandes wrote: > On ARM64, when running with --configs '36*SRCU-P', I noticed that only 1 > instance > instead of 36 for starting. > > Fix it by checking for Image files, instead of bzImage which ARM does > not seem to have. With this I see all 36 instances running

[PATCH 2/2] kunit: qemu_configs: Add 64-bit SPARC configuration

2025-04-15 Thread Thomas Weißschuh
Add a basic config to run kunit tests on 64-bit SPARC. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/qemu_configs/sparc64.py | 16 1 file changed, 16 insertions(+) diff --git a/tools/testing/kunit/qemu_configs/sparc64.py b/tools/testing/kunit/qemu_configs/sparc64.py

[PATCH 1/2] kunit: qemu_configs: sparc: Explicitly enable CONFIG_SPARC32=y

2025-04-15 Thread Thomas Weißschuh
The configuration generated by kunit ends up with a 32bit configuration. A new kunit configuration for 64bit is to be added. To make the difference clearer spell out the variant in the kunit reference config. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/qemu_configs/sparc.py | 1 + 1

[PATCH v4 2/2] rcutorture: Fix issue with re-using old images on ARM64

2025-04-15 Thread Joel Fernandes
On ARM64, when running with --configs '36*SRCU-P', I noticed that only 1 instance instead of 36 for starting. Fix it by checking for Image files, instead of bzImage which ARM does not seem to have. With this I see all 36 instances running at the same time in the batch. Tested-by: Paul E. McKenne

Re: [PATCH v4] remoteproc: imx_dsp_rproc: Add support for DSP-specific features

2025-04-15 Thread Mathieu Poirier
On Tue, 15 Apr 2025 at 05:04, Iuliana Prodan wrote: > > On 4/14/2025 6:41 PM, Mathieu Poirier wrote: > > On Thu, Apr 10, 2025 at 12:30:30AM +0300, Iuliana Prodan (OSS) wrote: > >> From: Iuliana Prodan > >> > >> Some DSP firmware requires a FW_READY signal before proceeding, while > >> others do n

Re: [PATCH v3 1/3] virtio-net: disable delayed refill when pausing rx

2025-04-15 Thread Michael S. Tsirkin
On Tue, Apr 15, 2025 at 02:43:39PM +0700, Bui Quang Minh wrote: > When pausing rx (e.g. set up xdp, xsk pool, rx resize), we call > napi_disable() on the receive queue's napi. In delayed refill_work, it > also calls napi_disable() on the receive queue's napi. When > napi_disable() is called on an

Re: [PATCH 2/2] kunit: qemu_configs: Add PowerPC 32-bit BE and 64-bit LE

2025-04-15 Thread David Gow
On Tue, 15 Apr 2025 at 17:23, Thomas Weißschuh wrote: > > Add basic configs to run kunit tests on some more PowerPC variants. > > Signed-off-by: Thomas Weißschuh > --- Hmm... a part of me wonders whether it'd make more sense to rename the 64-bit one to powerpc64, to match e.g. arm/arm64. But it'

Re: [PATCH] arm64: dts: qcom: sdm660-xiaomi-lavender: Add missing SD card detect GPIO

2025-04-15 Thread Dmitry Baryshkov
On Tue, Apr 15, 2025 at 04:01:01PM +0300, Alexey Minnekhanov wrote: > During initial porting these cd-gpios were missed. Having card detect is > beneficial because driver does not need to do polling every second and it > can just use IRQ. SD card detection in U-Boot is also fixed by this. > > Fixe

Re: [PATCH RFT v15 4/8] fork: Add shadow stack support to clone3()

2025-04-15 Thread Mark Brown
On Mon, Apr 14, 2025 at 06:28:14PM +, Edgecombe, Rick P wrote: > First of all, sorry for not contributing on this since v9. I've had an unusual > enormous project conflict (TDX) combined with my test HW dieing. No worries, there doesn't seem to have been huge urgency on this one :( > Both fi

[PATCH -next] selftest/bpf/benchs: Remove duplicate sys/types.h header

2025-04-15 Thread Jiapeng Chong
./tools/testing/selftests/bpf/benchs/bench_sockmap.c: sys/types.h is included more than once. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=20436 Signed-off-by: Jiapeng Chong --- tools/testing/selftests/bpf/benchs/bench_sockmap.c | 1 - 1 file changed, 1 delet

[PATCH net-next v26 16/23] ovpn: implement keepalive mechanism

2025-04-15 Thread Antonio Quartulli
OpenVPN supports configuring a periodic keepalive packet. message to allow the remote endpoint detect link failures. This change implements the keepalive sending and timer expiring logic. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/io.c | 78 - drivers/net/ovpn/

[PATCH v3 1/2] x86/sgx: Use sgx_nr_used_pages for EPC page count instead of sgx_nr_free_pages

2025-04-15 Thread Elena Reshetova
sgx_nr_free_pages is an atomic that is used to keep track of free EPC pages and detect whenever page reclaiming should start. Since successful execution of ENCLS[EUPDATESVN] requires empty EPC and preferably a fast lockless way of checking for this condition in all code paths where EPC is already u

[PATCH v3 0/2] Enable automatic SVN updates for SGX enclaves

2025-04-15 Thread Elena Reshetova
Changes since v2 following review by Jarkko: - formatting of comments is fixed - change from pr_error to ENCLS_WARN to communicate errors from EUPDATESVN - In case an unknown error is detected (must not happen per spec), make page allocation from EPC fail in order to prevent EPC usage Change

[PATCH v3 2/2] x86/sgx: Implement EUPDATESVN and opportunistically call it during first EPC page alloc

2025-04-15 Thread Elena Reshetova
SGX architecture introduced a new instruction called EUPDATESVN to Ice Lake. It allows updating security SVN version, given that EPC is completely empty. The latter is required for security reasons in order to reason that enclave security posture is as secure as the security SVN version of the TCB

Re: [PATCH] selftests: rtnetlink: Fix bridge_parent_id failure on interface state

2025-04-15 Thread Ido Schimmel
On Mon, Apr 14, 2025 at 10:25:33AM -0700, Alok Tiwari wrote: > The selftest "kci_test_bridge_parent_id" fails with the error: > "Device can not be enslaved while up" when trying to attach interfaces > (`eni10np1`, `eni20np1`) to a bonding device (`test-bond0`) while the > interfaces are in the UP s

[PATCH net-next v26 05/23] ovpn: introduce the ovpn_peer object

2025-04-15 Thread Antonio Quartulli
An ovpn_peer object holds the whole status of a remote peer (regardless whether it is a server or a client). This includes status for crypto, tx/rx buffers, napi, etc. Only support for one peer is introduced (P2P mode). Multi peer support is introduced with a later patch. Along with the ovpn_pee

[PATCH net-next v26 10/23] ovpn: store tunnel and transport statistics

2025-04-15 Thread Antonio Quartulli
Byte/packet counters for in-tunnel and transport streams are now initialized and updated as needed. To be exported via netlink. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/Makefile | 1 + drivers/net/ovpn/io.c | 12 +++- drivers/net/ovpn/peer.c | 2 ++ drivers/net/ovpn

[PATCH net-next v26 13/23] ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg

2025-04-15 Thread Antonio Quartulli
Userspace may want to pass the MSG_NOSIGNAL flag to tcp_sendmsg() in order to avoid generating a SIGPIPE. To pass this flag down the TCP stack a new skb sending API accepting a flags argument is introduced. Cc: Eric Dumazet Cc: Paolo Abeni Signed-off-by: Antonio Quartulli --- drivers/net/ovpn

[PATCH net-next v26 23/23] testing/selftests: add test tool and scripts for ovpn module

2025-04-15 Thread Antonio Quartulli
The ovpn-cli tool can be compiled and used as selftest for the ovpn kernel module. [NOTE: it depends on libmedtls for decoding base64-encoded keys] ovpn-cli implements the netlink and RTNL APIs and can thus be integrated in any script for more automated testing. Along with the tool, a bunch of s

[PATCH net-next v26 22/23] ovpn: add basic ethtool support

2025-04-15 Thread Antonio Quartulli
Implement support for basic ethtool functionality. Note that ovpn is a virtual device driver, therefore various ethtool APIs are just not meaningful and thus not implemented. Signed-off-by: Antonio Quartulli Reviewed-by: Andrew Lunn --- drivers/net/ovpn/main.c | 15 +++ 1 file chan

[PATCH net-next v26 21/23] ovpn: notify userspace when a peer is deleted

2025-04-15 Thread Antonio Quartulli
Whenever a peer is deleted, send a notification to userspace so that it can react accordingly. This is most important when a peer is deleted due to ping timeout, because it all happens in kernelspace and thus userspace has no direct way to learn about it. Signed-off-by: Antonio Quartulli --- dr

[PATCH net-next v26 19/23] ovpn: implement key add/get/del/swap via netlink

2025-04-15 Thread Antonio Quartulli
This change introduces the netlink commands needed to add, get, delete and swap keys for a specific peer. Userspace is expected to use these commands to create, inspect (non sensitive data only), destroy and rotate session keys for a specific peer. Signed-off-by: Antonio Quartulli --- drivers/n

[PATCH net-next v26 17/23] ovpn: add support for updating local or remote UDP endpoint

2025-04-15 Thread Antonio Quartulli
In case of UDP links, the local or remote endpoint used to communicate with a given peer may change without a connection restart. Add support for learning the new address in case of change. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/io.c | 8 ++ drivers/net/ovpn/peer.c | 213

[PATCH net-next v26 18/23] ovpn: implement peer add/get/dump/delete via netlink

2025-04-15 Thread Antonio Quartulli
This change introduces the netlink command needed to add, delete and retrieve/dump known peers. Userspace is expected to use these commands to handle known peer lifecycles. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/netlink.c | 686 - driver

[PATCH net-next v26 20/23] ovpn: kill key and notify userspace in case of IV exhaustion

2025-04-15 Thread Antonio Quartulli
IV wrap-around is cryptographically dangerous for a number of ciphers, therefore kill the key and inform userspace (via netlink) should the IV space go exhausted. Userspace has two ways of deciding when the key has to be renewed before exhausting the IV space: 1) time based approach: after X se

[PATCH net-next v26 14/23] ovpn: implement multi-peer support

2025-04-15 Thread Antonio Quartulli
With this change an ovpn instance will be able to stay connected to multiple remote endpoints. This functionality is strictly required when running ovpn on an OpenVPN server. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/main.c | 64 +-- drivers/net/ovpn/ovpnpriv.h | 1

Re: [PATCH v4] remoteproc: imx_dsp_rproc: Add support for DSP-specific features

2025-04-15 Thread Iuliana Prodan
On 4/14/2025 6:41 PM, Mathieu Poirier wrote: On Thu, Apr 10, 2025 at 12:30:30AM +0300, Iuliana Prodan (OSS) wrote: From: Iuliana Prodan Some DSP firmware requires a FW_READY signal before proceeding, while others do not. Therefore, add support to handle i.MX DSP-specific features. Implement h

[PATCH net-next v26 15/23] ovpn: implement peer lookup logic

2025-04-15 Thread Antonio Quartulli
In a multi-peer scenario there are a number of situations when a specific peer needs to be looked up. We may want to lookup a peer by: 1. its ID 2. its VPN destination IP 3. its transport IP/port couple For each of the above, there is a specific routing table referencing all peers for fast look u

[PATCH net-next v26 12/23] skb: implement skb_send_sock_locked_with_flags()

2025-04-15 Thread Antonio Quartulli
When sending an skb over a socket using skb_send_sock_locked(), it is currently not possible to specify any flag to be set in msghdr->msg_flags. However, we may want to pass flags the user may have specified, like MSG_NOSIGNAL. Extend __skb_send_sock() with a new argument 'flags' and add a new in

[PATCH net-next v26 11/23] ovpn: implement TCP transport

2025-04-15 Thread Antonio Quartulli
With this change ovpn is allowed to communicate to peers also via TCP. Parsing of incoming messages is implemented through the strparser API. Note that ovpn redefines sk_prot and sk_socket->ops for the TCP socket used to communicate with the peer. For this reason it needs to access inet6_stream_op

[PATCH net-next v26 09/23] ovpn: implement packet processing

2025-04-15 Thread Antonio Quartulli
This change implements encryption/decryption and encapsulation/decapsulation of OpenVPN packets. Support for generic crypto state is added along with a wrapper for the AEAD crypto kernel API. Signed-off-by: Antonio Quartulli --- drivers/net/Kconfig| 4 + drivers/net/ovpn/Makefile

[PATCH net-next v26 08/23] ovpn: implement basic RX path (UDP)

2025-04-15 Thread Antonio Quartulli
Packets received over the socket are forwarded to the user device. Implementation is UDP only. TCP will be added by a later patch. Note: no decryption/decapsulation exists yet, packets are forwarded as they arrive without much processing. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/i

[PATCH net-next v26 07/23] ovpn: implement basic TX path (UDP)

2025-04-15 Thread Antonio Quartulli
Packets sent over the ovpn interface are processed and transmitted to the connected peer, if any. Implementation is UDP only. TCP will be added by a later patch. Note: no crypto/encapsulation exists yet. Packets are just captured and sent. Signed-off-by: Antonio Quartulli --- drivers/net/Kconf

[PATCH net-next v26 06/23] ovpn: introduce the ovpn_socket object

2025-04-15 Thread Antonio Quartulli
This specific structure is used in the ovpn kernel module to wrap and carry around a standard kernel socket. ovpn takes ownership of passed sockets and therefore an ovpn specific objects is attached to them for status tracking purposes. Initially only UDP support is introduced. TCP will come in a

[PATCH net-next v26 02/23] ovpn: add basic netlink support

2025-04-15 Thread Antonio Quartulli
This commit introduces basic netlink support with family registration/unregistration functionalities and stub pre/post-doit. More importantly it introduces the YAML uAPI description along with its auto-generated files: - include/uapi/linux/ovpn.h - drivers/net/ovpn/netlink-gen.c - drivers/net/ovpn

[PATCH net-next v26 01/23] net: introduce OpenVPN Data Channel Offload (ovpn)

2025-04-15 Thread Antonio Quartulli
OpenVPN is a userspace software existing since around 2005 that allows users to create secure tunnels. So far OpenVPN has implemented all operations in userspace, which implies several back and forth between kernel and user land in order to process packets (encapsulate/decapsulate, encrypt/decrypt

[PATCH net-next v26 04/23] ovpn: keep carrier always on for MP interfaces

2025-04-15 Thread Antonio Quartulli
An ovpn interface configured in MP mode will keep carrier always on and let the user decide when to bring it administratively up and down. This way a MP node (i.e. a server) will keep its interface always up and running, even when no peer is connected. Signed-off-by: Antonio Quartulli --- drive

[PATCH net-next v26 03/23] ovpn: add basic interface creation/destruction/management routines

2025-04-15 Thread Antonio Quartulli
Add basic infrastructure for handling ovpn interfaces. Tested-by: Donald Hunter Signed-off-by: Antonio Quartulli --- Documentation/netlink/specs/rt-link.yaml | 16 +++ drivers/net/ovpn/Makefile| 1 + drivers/net/ovpn/io.c| 22 + drivers/net/ovpn/

[PATCH net-next v26 00/23] Introducing OpenVPN Data Channel Offload

2025-04-15 Thread Antonio Quartulli
Notable changes since v25: * removed netdev notifier (was only used for our own devices) * added .dellink implementation to address what was previously done in notifier * removed .ndo_open and moved netif_carrier_off() call to .ndo_init * fixed author in MODULE_AUTHOR() * properly indented checks

Re: [PATCH v9 00/19] DCD: Add support for Dynamic Capacity Devices (DCD)

2025-04-15 Thread Jonathan Cameron
On Mon, 14 Apr 2025 21:50:31 -0700 Dan Williams wrote: > Jonathan Cameron wrote: > [..] > > To me we don't need to answer the question of whether we fully understand > > requirements, or whether this support covers them, but rather to ask > > if anyone has requirements that are not sensible to sa

Re: [PATCH v3 1/2] MIPS: Don't crash in stack_top() for tasks without ABI or vDSO

2025-04-15 Thread Thomas Weißschuh
Hi Huacai, On Tue, Apr 15, 2025 at 04:47:31PM +0800, Huacai Chen wrote: > On Tue, Apr 15, 2025 at 3:10 PM Thomas Weißschuh > wrote: > > > > Not all tasks have an ABI associated or vDSO mapped, > > for example kthreads never do. > > If such a task ever ends up calling stack_top(), it will derefenc

[PATCH v3 1/2] MIPS: Don't crash in stack_top() for tasks without ABI or vDSO

2025-04-15 Thread Thomas Weißschuh
Not all tasks have an ABI associated or vDSO mapped, for example kthreads never do. If such a task ever ends up calling stack_top(), it will derefence the NULL ABI pointer and crash. This can for example happen when using kunit: mips_stack_top+0x28/0xc0 arch_pick_mmap_layout+0x190/0x220

[PATCH 1/2] kunit: qemu_configs: powerpc: Explicitly enable CONFIG_CPU_BIG_ENDIAN=y

2025-04-15 Thread Thomas Weißschuh
The configuration generated by kunit ends up with big endian. A new kunit configuration for little endian is to be added. To make the difference clearer spell out the endianness in the kunit reference config. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/qemu_configs/powerpc.py | 1 +

[PATCH 2/2] kunit: qemu_configs: Add PowerPC 32-bit BE and 64-bit LE

2025-04-15 Thread Thomas Weißschuh
Add basic configs to run kunit tests on some more PowerPC variants. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/qemu_configs/powerpc32.py | 17 + tools/testing/kunit/qemu_configs/powerpcle.py | 14 ++ 2 files changed, 31 insertions(+) diff --git a/tools/t

  1   2   >