[PATCH v5 2/2] selftests/bpf: Force -O2 for USDT selftests to cover SIB handling logic

2025-08-01 Thread Jiawei Zhao
When using GCC on x86-64 to compile an usdt prog with -O1 or higher optimization, the compiler will generate SIB addressing mode for global array and PC-relative addressing mode for global variable, e.g. "1@-96(%rbp,%rax,8)" and "-1@4+t1(%rip)". In this patch: - force

[PATCH v5 0/2] libbpf: fix USDT SIB argument handling causing unrecognized register error

2025-08-01 Thread Jiawei Zhao
ion in libbpf cannot parse these two formats, causing `bpf_program__attach_usdt()` to fail with -ENOENT (unrecognized register). This patch series adds support for SIB addressing mode in USDT probes. The main changes include: - add correct handling logic for SIB-addressed arguments in `parse_us

[PATCH v5 1/2] libbpf: fix USDT SIB argument handling causing unrecognized register error

2025-08-01 Thread Jiawei Zhao
On x86-64, USDT arguments can be specified using Scale-Index-Base (SIB) addressing, e.g. "1@-96(%rbp,%rax,8)". The current USDT implementation in libbpf cannot parse this format, causing `bpf_program__attach_usdt()` to fail with -ENOENT (unrecognized register). This patch fix

Re: [PATCH v4 1/1] libbpf: fix USDT SIB argument handling causing unrecognized register error

2025-08-01 Thread Alexei Starovoitov
ng `bpf_program__attach_usdt()` > to fail with -ENOENT (unrecognized register). > > This patch fixes this by implementing the necessary changes: > - add correct handling for SIB-addressed arguments in `bpf_usdt_arg`. > - add adaptive support to `__bpf_usdt_arg_type` and > `__

Re: [PATCH] selftests/mm: pass filename as input param to VM_PFNMAP tests

2025-08-01 Thread Sudarsan Mahendran
Thanks for the review! I've sent a follow up v2 patch. On Fri, Aug 1, 2025 at 12:15 AM David Hildenbrand wrote: > > On 31.07.25 22:10, Sudarsan Mahendran wrote: > > Enable these tests to be run on other pfnmap'ed memory like > > NVIDIA's EGM. > > > >

[PATCH v2] selftests/mm: pass filename as input param to VM_PFNMAP tests

2025-08-01 Thread Sudarsan Mahendran
Enable these tests to be run on other pfnmap'ed memory like NVIDIA's EGM. Add '--' as a separator to pass in file path. This allows passing of cmd line arguments to kselftest_harness. Use '/dev/mem' as default filename. Existing test passes: pfnmap TAP version 13 1..6

Re: [PATCH v4 20/38] KVM: x86/pmu: Check if mediated vPMU can intercept rdpmc

2025-08-01 Thread Sean Christopherson
On Wed, Jul 30, 2025, Dapeng Mi wrote: > > On 7/30/2025 8:38 AM, Sean Christopherson wrote: > > On Tue, Jul 29, 2025, Dapeng Mi wrote: > >> BTW, Sean, may I know your plan about the mediated vPMU v5 patch set? > >> Thanks. > > I'll get it out this

Re: [PATCH v7 05/30] KVM: selftests: Update kvm_init_vm_address_properties() for TDX

2025-08-01 Thread Sagi Shahar
On Mon, Jul 21, 2025 at 4:51 PM Ira Weiny wrote: > > On Fri, Jun 13, 2025 at 12:13:32PM -0700, Sagi Shahar wrote: > > From: Isaku Yamahata > > > > [snip] > > > > > diff --git a/tools/testing/selftests/kvm/lib/x86/processor.c > > b/tools/testing/selftests/kvm/lib/x86/processor.c > > index d082d42

Re: [PATCH] selftests/mm: Fix typos and improve output messages

2025-08-01 Thread Andrew Morton
nt." > 2>&1; \ > + echo "This will reduce test coverage of 64-bit" 2>&1; \ > echo "kernels. If you are using a Debian-like distribution," 2>&1; > \ > echo "try:"; 2>&1; > \ > echo ""; > \ Overall, this patch is hitting the too-trivial-to-merge threshold, sorry.

Re: [PATCH 1/3] selftests/proc: test PROCMAP_QUERY ioctl while vma is concurrently modified

2025-08-01 Thread Suren Baghdasaryan
On Fri, Aug 1, 2025 at 6:38 PM SeongJae Park wrote: > > On Thu, 31 Jul 2025 15:00:22 -0700 Suren Baghdasaryan > wrote: > > > Extend /proc/pid/maps tearing tests to verify PROCMAP_QUERY ioctl operation > > correctness while the vma is being concurrently modified. > > > > Signed-off-by: Suren Bagh

Re: [PATCH 1/3] selftests/proc: test PROCMAP_QUERY ioctl while vma is concurrently modified

2025-08-01 Thread SeongJae Park
On Thu, 31 Jul 2025 15:00:22 -0700 Suren Baghdasaryan wrote: > Extend /proc/pid/maps tearing tests to verify PROCMAP_QUERY ioctl operation > correctness while the vma is being concurrently modified. > > Signed-off-by: Suren Baghdasaryan Acked-by: SeongJae Park Tested-by: SeongJae Park Than

Re: [PATCH v10 5/6] x86/sgx: Implement ENCLS[EUPDATESVN]

2025-08-01 Thread Dave Hansen
The changelog is missing a tidbit about the fact that this is still dead code until sgx_inc_usage_count() gets a real implementation. On 8/1/25 04:25, Elena Reshetova wrote: ... > +/** > + * sgx_update_svn() - Attempt to call ENCLS[EUPDATESVN]. > + * This instruction attempts to update CPUSVN to t

Re: [PATCH v10 4/6] x86/sgx: Define error codes for use by ENCLS[EUPDATESVN]

2025-08-01 Thread Dave Hansen
= 0x0C, > + EAUG= 0x0D, > + EMODPR = 0x0E, > + EMODT = 0x0F, > + EUPDATESVN = 0x18, > }; This update is not consistent with the changelog nor the patch subject. > /** > @@ -73,6 +74,10 @@ enum sgx_encls_function { &

Re: [PATCH v10 3/6] x86/cpufeatures: Add X86_FEATURE_SGX_EUPDATESVN feature flag

2025-08-01 Thread Dave Hansen
On 8/1/25 04:25, Elena Reshetova wrote: > Add a flag indicating whenever ENCLS[EUPDATESVN] SGX instruction > is supported. This will be used by SGX driver to perform CPU > SVN updates. > > Signed-off-by: Elena Reshetova Reviewed-by: Dave Hansen

Re: [PATCH v10 2/6] x86/sgx: Introduce functions to count the sgx_(vepc_)open()

2025-08-01 Thread Dave Hansen
On 8/1/25 04:25, Elena Reshetova wrote: > Note: the sgx_inc_usage_count prototype is defined to return > int for the cleanliness of the follow-up patches. When the > EUPDATESVN SGX instruction will be enabled in the follow-up patch, > the sgx_inc_usage_count will start to return int.

Re: [PATCH v10 1/6] x86/sgx: Convert sgx_(vepc_)open to __sgx_(vepc_)open

2025-08-01 Thread Dave Hansen
On 8/1/25 04:25, Elena Reshetova wrote: > In order to introduce the counting of active sgx users on top > of clean functions that allocate vepc structures, covert existing > sgx_(vepc_)open to __sgx_(vepc_)open. Later patch will introduce the > top level wrappers that manage the

Re: [RFC PATCH] remoteproc: core: Do not process carveout and devmem rsc in attach mode

2025-08-01 Thread Tanmay Shah
t I have few comments: 1) This check should be moved right before `rproc_mem_entry_init`. That means if carveout is found then we should allow flags allocation from firmware. This can happen if platform driver has already allocated the carveout and during next attach, we are just updating flags and offset.

[PATCH v4 0/1] libbpf: fix USDT SIB argument handling causing unrecognized register error

2025-08-01 Thread Jiawei Zhao
ion in libbpf cannot parse these two formats, causing `bpf_program__attach_usdt()` to fail with -ENOENT (unrecognized register). This patch series adds support for SIB addressing mode in USDT probes. The main changes include: - add correct handling logic for SIB-addressed arguments in `parse_us

[PATCH v4 1/1] libbpf: fix USDT SIB argument handling causing unrecognized register error

2025-08-01 Thread Jiawei Zhao
From: Jiawei Zhao On x86-64, USDT arguments can be specified using Scale-Index-Base (SIB) addressing, e.g. "1@-96(%rbp,%rax,8)". The current USDT implementation in libbpf cannot parse this format, causing `bpf_program__attach_usdt()` to fail with -ENOENT (unrecognized register).

Re: [PATCH 2/3] fs/proc/task_mmu: factor out proc_maps_private fields used by PROCMAP_QUERY

2025-08-01 Thread Suren Baghdasaryan
On Fri, Aug 1, 2025 at 3:55 AM Vlastimil Babka wrote: > > On 8/1/25 00:00, Suren Baghdasaryan wrote: > > Refactor struct proc_maps_private so that the fields used by PROCMAP_QUERY > > ioctl are moved into a separate structure. In the next patch this allows > > ioctl to reu

Re: [PATCH] selftests: breakpoints: use suspend_stats to reliably check suspend success

2025-08-01 Thread Moon Hee Lee
programs a CLOCK_BOOTTIME_ALARM to expire in five seconds. While the system is asleep it needs an interrupt to resume; this timer supplies it. The patch only changes how success is checked: we read /sys/power/suspend_stats/success after resume, instead of comparing time diffs on the timerfd. If the t

[PATCH v2] media: pci/ivtv: Replace GPLv2 boilerplate text with SPDX

2025-08-01 Thread Thomas Huth
From: Thomas Huth The FSF does not reside in 59 Temple Place anymore, so we should not ask the people to write to that address in case they need a copy of the GPL. Anyway, all other files in this directory already had their boilerplate text replaced by a proper SPDX tag in the earlier commit 1a5

[PATCH RFC v2 2/2] mmc: sdhci-pxav3: add state_uhs pinctrl setting

2025-08-01 Thread Duje Mihanović
Different bus clocks require different pinctrl states to remain stable. Add support for selecting between a default and UHS state according to the bus clock. Signed-off-by: Duje Mihanović --- Changes in v2: - Don't attempt to lookup pinstates if getting pinctrl fails - Only select pinstates if bo

[PATCH RFC v2 0/2] mmc: sdhci-pxav3: pinctrl setting for fast bus clocks

2025-08-01 Thread Duje Mihanović
Hello, This small series adds a pinctrl setting for fast MMC bus clocks to the pxav3 driver. On bus clocks above 100 MHz, driving the data pins at a higher current helps maintain signal quality. This series is related to Marvell PXA1908 SoC support; the latest version of that patchset (v16 as of

[PATCH RFC v2 1/2] dt-bindings: mmc: sdhci-pxa: add state_uhs pinctrl

2025-08-01 Thread Duje Mihanović
On the pxav3 controller, increasing the drive strength of the data pins might be required to maintain stability on fast bus clocks (above 100 MHz). Add a state_uhs pinctrl to allow this. The existing state_cmd_gpio pinctrl is changed to apply only on pxav1 as it's unneeded on the other controllers

Re: [PATCH 2/2] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable USB audio offload support

2025-08-01 Thread Luca Weiss
On Fri Aug 1, 2025 at 4:03 PM CEST, Konrad Dybcio wrote: > On 8/1/25 3:51 PM, Luca Weiss wrote: >> Enable USB audio offloading which allows to play audio via a USB-C >> headset with lower power consumption and enabling some other features. >> >> This can be used like the following: >> >> $ amix

Re: [PATCH 2/2] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable USB audio offload support

2025-08-01 Thread Konrad Dybcio
On 8/1/25 3:51 PM, Luca Weiss wrote: > Enable USB audio offloading which allows to play audio via a USB-C > headset with lower power consumption and enabling some other features. > > This can be used like the following: > > $ amixer -c0 cset name='USB_RX Audio Mixer MultiMedia1' On > $ aplay

Re: [PATCH 1/2] arm64: dts: qcom: sc7280: Add q6usbdai node

2025-08-01 Thread Konrad Dybcio
On 8/1/25 3:51 PM, Luca Weiss wrote: > Add a node for q6usb which handles USB audio offloading, allowing to > play audio via a USB-C headset with lower power consumption and enabling > some other features. > > We also need to set num-hc-interrupters for the dwc3 for the q6usb to be > able to use i

Re: [PATCH] arm64: dts: qcom: sm6350: Add rpmh-stats node

2025-08-01 Thread Dmitry Baryshkov
On Fri, Aug 01, 2025 at 03:40:59PM +0200, Luca Weiss wrote: > The qcom_stats driver allows querying sleep stats from various > remoteprocs. Add a node to enable it. > > Signed-off-by: Luca Weiss > --- > arch/arm64/boot/dts/qcom/sm6350.dtsi | 5 + > 1 file changed, 5 insertions(+) > Reviewe

[PATCH 2/2] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable USB audio offload support

2025-08-01 Thread Luca Weiss
Enable USB audio offloading which allows to play audio via a USB-C headset with lower power consumption and enabling some other features. This can be used like the following: $ amixer -c0 cset name='USB_RX Audio Mixer MultiMedia1' On $ aplay --device=plughw:0,0 test.wav Compared to regular p

[PATCH 1/2] arm64: dts: qcom: sc7280: Add q6usbdai node

2025-08-01 Thread Luca Weiss
Add a node for q6usb which handles USB audio offloading, allowing to play audio via a USB-C headset with lower power consumption and enabling some other features. We also need to set num-hc-interrupters for the dwc3 for the q6usb to be able to use its sideband interrupter. Signed-off-by: Luca Wei

[PATCH 0/2] Enable USB audio offloading on Fairphone 5

2025-08-01 Thread Luca Weiss
Similar to Fairphone 4, we can enable USB audio offloading quite easily on the QCM6490-based Fairphone 5 smartphone. This allows to play audio via a USB-C headset with lower power consumption and enabling some other features. Signed-off-by: Luca Weiss --- Luca Weiss (2): arm64: dts: qcom:

[PATCH] arm64: dts: qcom: sm6350: Add rpmh-stats node

2025-08-01 Thread Luca Weiss
The qcom_stats driver allows querying sleep stats from various remoteprocs. Add a node to enable it. Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350

[PATCH] drivers/media/pci/ivtv: Replace GPLv2 boilerplate text with SPDX

2025-08-01 Thread Thomas Huth
From: Thomas Huth The FSF does not reside in 59 Temple Place anymore, so we should not ask the people to write to that address in case they need a copy of the GPL. Anyway, all other files in this directory already had their boilerplate text replaced by a proper SPDX tag in the earlier commit 1a5

Re: [PATCH 2/3] fs/proc/task_mmu: factor out proc_maps_private fields used by PROCMAP_QUERY

2025-08-01 Thread kernel test robot
-060200 base: 01da54f10fddf3b01c5a3b80f6b16bbad390c302 patch link: https://lore.kernel.org/r/20250731220024.702621-3-surenb%40google.com patch subject: [PATCH 2/3] fs/proc/task_mmu: factor out proc_maps_private fields used by PROCMAP_QUERY config: riscv-randconfig-002-20250801 (https://download

Re: [PATCH] selftests: breakpoints: use suspend_stats to reliably check suspend success

2025-08-01 Thread Olivier Blin
Le 26/06/2025 à 21:16, Moon Hee Lee a écrit : [...] Replace the timer-based check with a read from /sys/power/suspend_stats/success. This counter is incremented only after a full suspend/resume cycle, providing a reliable and race-free indicator. Also remove the unused file descriptor for /sys

[PATCH v10 6/6] x86/sgx: Enable automatic SVN updates for SGX enclaves

2025-08-01 Thread Elena Reshetova
== Background == ENCLS[EUPDATESVN] is a new SGX instruction [1] which allows enclave attestation to include information about updated microcode SVN without a reboot. Before an EUPDATESVN operation can be successful, all SGX memory (aka. EPC) must be marked as “unused” in the SGX hardware metadata

[PATCH v10 5/6] x86/sgx: Implement ENCLS[EUPDATESVN]

2025-08-01 Thread Elena Reshetova
All running enclaves and cryptographic assets (such as internal SGX encryption keys) are assumed to be compromised whenever an SGX-related microcode update occurs. To mitigate this assumed compromise the new supervisor SGX instruction ENCLS[EUPDATESVN] can generate fresh cryptographic assets. Befo

[PATCH v10 4/6] x86/sgx: Define error codes for use by ENCLS[EUPDATESVN]

2025-08-01 Thread Elena Reshetova
Add error codes for ENCLS[EUPDATESVN], then SGX CPUSVN update process can know the execution state of EUPDATESVN and notify userspace. Signed-off-by: Elena Reshetova --- arch/x86/include/asm/sgx.h | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff

Re: [PATCH v2] arch/x86/kvm/ioapic: Remove license boilerplate with bad FSF address

2025-08-01 Thread Thomas Huth
On 28/07/2025 17.50, Greg Kroah-Hartman wrote: On Mon, Jul 28, 2025 at 05:36:47PM +0200, Greg Kroah-Hartman wrote: On Mon, Jul 28, 2025 at 05:28:43PM +0200, Thomas Huth wrote: From: Thomas Huth The Free Software Foundation does not reside in "59 Temple Place" anymore, so we should not mention

[PATCH v10 3/6] x86/cpufeatures: Add X86_FEATURE_SGX_EUPDATESVN feature flag

2025-08-01 Thread Elena Reshetova
Add a flag indicating whenever ENCLS[EUPDATESVN] SGX instruction is supported. This will be used by SGX driver to perform CPU SVN updates. Signed-off-by: Elena Reshetova --- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/cpuid-deps.c | 1 + arch/x86/kernel/cpu/scatte

[PATCH v10 2/6] x86/sgx: Introduce functions to count the sgx_(vepc_)open()

2025-08-01 Thread Elena Reshetova
patches. When the EUPDATESVN SGX instruction will be enabled in the follow-up patch, the sgx_inc_usage_count will start to return int. Suggested-by: Sean Christopherson Signed-off-by: Elena Reshetova --- arch/x86/kernel/cpu/sgx/driver.c | 19 ++- arch/x86/kernel/cpu/sgx/encl.c

[PATCH v10 1/6] x86/sgx: Convert sgx_(vepc_)open to __sgx_(vepc_)open

2025-08-01 Thread Elena Reshetova
In order to introduce the counting of active sgx users on top of clean functions that allocate vepc structures, covert existing sgx_(vepc_)open to __sgx_(vepc_)open. Later patch will introduce the top level wrappers that manage the usage count. No functional change intended in this patch. Signed

[PATCH v10 0/6] Enable automatic SVN updates for SGX enclaves

2025-08-01 Thread Elena Reshetova
Changes since v9 following reviews by Kai: - postpone the definition of sgx_inc_usage_count until patch 6 - clarify the commit message in patch 6 - minor fixes Note: I didn't merge patch 1 and 2 since it goes against previous suggestion made by Jarkko. Changes since v8 following revie

Re: [PATCH 2/3] fs/proc/task_mmu: factor out proc_maps_private fields used by PROCMAP_QUERY

2025-08-01 Thread Vlastimil Babka
On 8/1/25 00:00, Suren Baghdasaryan wrote: > Refactor struct proc_maps_private so that the fields used by PROCMAP_QUERY > ioctl are moved into a separate structure. In the next patch this allows > ioctl to reuse some of the functions used for reading /proc/pid/maps > withou

[PATCH] x86/mtrr: Remove license boilerplate text with bad FSF address

2025-08-01 Thread Thomas Huth
From: Thomas Huth The Free Software Foundation does not reside in "675 Mass Ave, Cambridge" anymore, so we should not mention that address in the source code here. But instead of updating the address to their current location, let's rather drop the license boilerplate text here and use a proper S

Re: [PATCH v19 2/6] remoteproc: Add TEE support

2025-08-01 Thread Arnaud POULIQUEN
Hello Harshal, On 7/31/25 12:25, Harshal Dev wrote: > Hello Arnaud, > > On 6/25/2025 3:10 PM, Arnaud Pouliquen wrote: >> Add a remoteproc TEE (Trusted Execution Environment) driver that will be >> probed by the TEE bus. If the associated Trusted application is supported >> on the secure part, th

Re: [PATCH] selftests/mm: pass filename as input param to VM_PFNMAP tests

2025-08-01 Thread David Hildenbrand
On 31.07.25 22:10, Sudarsan Mahendran wrote: Enable these tests to be run on other pfnmap'ed memory like NVIDIA's EGM. Add '--' as a separator to pass in file path. This allows passing of cmd line arguments to kselftest_harness. Use '/dev/mem' as default filename. Existing test passes:

Re: [RFC PATCH 2/6] of: reserved-memory: Add of_reserved_mem_lookup_by_name

2025-07-31 Thread Viresh Kumar
On 30-07-25, 13:24, Krzysztof Kozlowski wrote: > I am speaking about coding style. It's explicitly requested to use only > the full constructor syntax (see long time Linus' remark or just read > cleanup.h docs). Ahh, I wasn't aware of the interdependency problem. Thanks. -- viresh

Re: [PATCH] selftests: bpf: Add missing symbol declarations to common header

2025-07-31 Thread Yonghong Song
On 7/31/25 7:52 PM, chenyuan...@163.com wrote: From: Yuan Chen Fix implicit function declaration errors in bpf_qdisc_xxx.c by adding the required kernel symbol declarations to the shared header file bpf_qdisc_common.h. This ensures all qdisc BPF programs can properly resolve these kernel fun

[PATCH] selftests: bpf: Add missing symbol declarations to common header

2025-07-31 Thread chenyuan_fl
From: Yuan Chen Fix implicit function declaration errors in bpf_qdisc_xxx.c by adding the required kernel symbol declarations to the shared header file bpf_qdisc_common.h. This ensures all qdisc BPF programs can properly resolve these kernel functions. The added declarations include: - bpf_qdisc

Re: [PATCH 3/3] remoteproc: mediatek: Support MT8189 SCP

2025-07-31 Thread 纵华宇
mtk_scp.c > > +++ b/drivers/remoteproc/mtk_scp.c > > @@ -225,7 +225,8 @@ static void mt8192_scp_irq_handler(struct > > mtk_scp *scp) > > { > > u32 scp_to_host; > > > > - scp_to_host = readl(scp->cluster->reg_base + > > M

[PATCH v5 2/6] srcu: Add srcu_read_lock_fast_notrace() and srcu_read_unlock_fast_notrace()

2025-07-31 Thread Paul E. McKenney
This commit adds no-trace variants of the srcu_read_lock_fast() and srcu_read_unlock_fast() functions for tracing use. [ paulmck: Apply notrace feedback from Joel Fernandes, Steven Rostedt, and Mathieu Desnoyers. ] [ paulmck: Apply excess-notrace feedback from Boqun Feng. ] Link: https://lore.ke

[PATCH v5 6/6] srcu: Document srcu_flip() memory-barrier D relation to SRCU-fast

2025-07-31 Thread Paul E. McKenney
The smp_mb() memory barrier at the end of srcu_flip() has a comment, but that comment does not make it clear that this memory barrier is an optimization, as opposed to being needed for correctness. This commit therefore adds this information and points out that it is omitted for SRCU-fast, where a

[PATCH v5 4/6] tracing: Guard __DECLARE_TRACE() use of __DO_TRACE_CALL() with SRCU-fast

2025-07-31 Thread Paul E. McKenney
The current use of guard(preempt_notrace)() within __DECLARE_TRACE() to protect invocation of __DO_TRACE_CALL() means that BPF programs attached to tracepoints are non-preemptible. This is unhelpful in real-time systems, whose users apparently wish to use BPF while also achieving low latencies. (

[PATCH v5 3/6] srcu: Add guards for notrace variants of SRCU-fast readers

2025-07-31 Thread Paul E. McKenney
This adds the usual scoped_guard(srcu_fast_notrace, &my_srcu) and guard(srcu_fast_notrace)(&my_srcu). Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes Cc: Mathieu Desnoyers Cc: Steven Rostedt Cc: Sebastian Andrzej Siewior Cc: --- include/linux/srcu.h | 5 + 1 file changed, 5

[PATCH v5 5/6] srcu: Document __srcu_read_{,un}lock_fast() implicit RCU readers

2025-07-31 Thread Paul E. McKenney
This commit documents the implicit RCU readers that are implied by the this_cpu_inc() and atomic_long_inc() operations in __srcu_read_lock_fast() and __srcu_read_unlock_fast(). While in the area, fix the documentation of the memory pairing of atomic_long_inc() in __srcu_read_lock_fast(). [ paulmc

[PATCH v5 1/6] srcu: Move rcu_is_watching() checks to srcu_read_{,un}lock_fast()

2025-07-31 Thread Paul E. McKenney
The rcu_is_watching() warnings are currently in the SRCU-tree implementations of __srcu_read_lock_fast() and __srcu_read_unlock_fast(). However, this makes it difficult to create _notrace variants of srcu_read_lock_fast() and srcu_read_unlock_fast(). This commit therefore moves these checks to src

[PATCH v5 0/6] Switch __DECLARE_TRACE() to new notrace variant of SRCU-fast

2025-07-31 Thread Paul E. McKenney
Hello! This is version 5 of a patch series creating a new notrace variant of SRCU-fast and introducing it to the __DECLARE_TRACE() macro in place of the current preemption disabling. This change enables preemption of BPF programs attached to tracepoints, as is required for runtime use of BPF in

[PATCH 3/3] fs/proc/task_mmu: execute PROCMAP_QUERY ioctl under per-vma locks

2025-07-31 Thread Suren Baghdasaryan
Utilize per-vma locks to stabilize vma after lookup without taking mmap_lock during PROCMAP_QUERY ioctl execution. If vma lock is contended, we fall back to mmap_lock but take it only momentarily to lock the vma and release the mmap_lock. In a very unlikely case of vm_refcnt overflow, this fall bac

[PATCH 2/3] fs/proc/task_mmu: factor out proc_maps_private fields used by PROCMAP_QUERY

2025-07-31 Thread Suren Baghdasaryan
Refactor struct proc_maps_private so that the fields used by PROCMAP_QUERY ioctl are moved into a separate structure. In the next patch this allows ioctl to reuse some of the functions used for reading /proc/pid/maps without using file->private_data. This prevents concurrent modification of f

[PATCH 1/3] selftests/proc: test PROCMAP_QUERY ioctl while vma is concurrently modified

2025-07-31 Thread Suren Baghdasaryan
Extend /proc/pid/maps tearing tests to verify PROCMAP_QUERY ioctl operation correctness while the vma is being concurrently modified. Signed-off-by: Suren Baghdasaryan --- tools/testing/selftests/proc/proc-maps-race.c | 65 +++ 1 file changed, 65 insertions(+) diff --git a/tools

[PATCH 0/3] execute PROCMAP_QUERY ioctl under per-vma lock

2025-07-31 Thread Suren Baghdasaryan
patchset was split out of the original patchset [1] that introduced per-vma lock usage for /proc/pid/maps reading. It contains PROCMAP_QUERY tests, code refactoring patch to simplify the main change and the actual transition to per-vma lock. [1] https://lore.kernel.org/all/20250704060727.724817-1-sur

[PATCH RESEND v5 6/7] Input: synaptics-rmi4 - read product ID on aftermarket touch ICs

2025-07-31 Thread David Heidelberg via B4 Relay
From: Kaustabh Chakraborty Some replacement displays include third-party touch ICs which do not report the product ID correctly unless we read directly from the product ID register. Add a check and a fallback read to handle this. Signed-off-by: Kaustabh Chakraborty Signed-off-by: Caleb Connolly

[PATCH RESEND v5 5/7] Input: synaptics-rmi4 - don't do unaligned reads in IRQ context

2025-07-31 Thread David Heidelberg via B4 Relay
From: Kaustabh Chakraborty Some replacement displays include third-party touch ICs which incur a significant penalty (1-2 seconds) when doing certain unaligned reads. This is enough to break functionality when it happens in the hot path, so adjust the interrupt handler to not read from an unalign

[PATCH RESEND v5 4/7] Input: synaptics-rmi4 - f55: handle zero electrode count

2025-07-31 Thread David Heidelberg via B4 Relay
From: Kaustabh Chakraborty Some third party ICs claim to support f55 but report an electrode count of 0. Catch this and bail out early so that we don't confuse the i2c bus with 0 sized reads. Signed-off-by: Kaustabh Chakraborty [simplify code, adjust wording] Signed-off-by: Caleb Connolly Sign

[PATCH RESEND v5 7/7] Input: synaptics-rmi4 - support fallback values for PDT descriptor bytes

2025-07-31 Thread David Heidelberg via B4 Relay
From: Kaustabh Chakraborty Some replacement displays include third-party touch ICs which do not expose the function number and the interrupt status in its PDT entries. OnePlus 6 (original touch IC) rmi4_i2c 12-0020: read 6 bytes at 0x00e3: 0 (2b 22 0d 06 01 01) OnePlus 6 (aftermarket touch IC

[PATCH RESEND v5 3/7] Input: synaptics-rmi4 - f12: use hardcoded values for aftermarket touch ICs

2025-07-31 Thread David Heidelberg via B4 Relay
From: Kaustabh Chakraborty Some replacement displays include third-party touch ICs which are devoid of register descriptors. Create a fake data register descriptor for such ICs and provide hardcoded default values. It isn't possible to reliably determine if the touch IC is original or not, so th

[PATCH RESEND v5 0/7] Input: synaptics-rmi4 - add quirks for third party touchscreen controllers

2025-07-31 Thread David Heidelberg via B4 Relay
v4: https://lore.kernel.org/r/20250402-synaptics-rmi4-v4-0-1bb95959e...@ixit.cz Changes in v4: - Replaced patch "dt-bindings: input: syna,rmi4: document syna,pdt-fallback-desc" with patch documenting specific touchscreen model used in OnePlus 6 and 6T. - Fixed zero electrode return

[PATCH RESEND v5 1/7] dt-bindings: input: syna,rmi4: Document syna,rmi4-s3706b

2025-07-31 Thread David Heidelberg via B4 Relay
From: David Heidelberg Mostly irrelevant for authentic Synaptics touchscreens, but very important for applying workarounds to cheap TS knockoffs. These knockoffs work well with the downstream driver, and since the user has no way to distinguish them, later in this patch set, we introduce

[PATCH RESEND v5 2/7] Input: synaptics-rmi4 - handle duplicate/unknown PDT entries

2025-07-31 Thread David Heidelberg via B4 Relay
From: Casey Connolly Some third party rmi4-compatible ICs don't expose their PDT entries very well. Add a few checks to skip duplicate entries as well as entries for unsupported functions. This is required to support some phones with third party displays. Validated on a stock OnePlus 6T (origin

[PATCH] selftests/mm: pass filename as input param to VM_PFNMAP tests

2025-07-31 Thread Sudarsan Mahendran
Enable these tests to be run on other pfnmap'ed memory like NVIDIA's EGM. Add '--' as a separator to pass in file path. This allows passing of cmd line arguments to kselftest_harness. Use '/dev/mem' as default filename. Existing test passes: pfnmap TAP version 13 1..6

Re: [PATCH] kunit: tool: Accept --raw_output=full as an alias of 'all'

2025-07-31 Thread Rae Moar
On Tue, Jul 29, 2025 at 11:16 PM David Gow wrote: > > I can never remember whether --raw_output takes 'all' or 'full'. No > reason we can't support both. > > For the record, 'all' is the recommended, documented option. > > Signed-off-by: David Gow Hello! Happy to add the ability to use 'full'.

Re: [PATCH 0/4] mmc: sdhci-brcmstb: rpmb sharing by claiming host for TZOS

2025-07-31 Thread Florian Fainelli
On 7/28/25 02:11, Adrian Hunter wrote: On 11/07/2025 18:42, Kamal Dasu wrote: This patch adds support to claim host for TZOS RPMB access and synchronized access to the controller hardware using hwspinlock framework. To achieve this Linux OS and the secure TZOS make use of: - shared hardware

Re: [PATCH bpf-next v3] selftests/bpf: Add LPM trie microbenchmarks

2025-07-31 Thread Alexei Starovoitov
On Tue, Jul 29, 2025 at 6:56 AM Matt Fleming wrote: > > On Mon, Jul 28, 2025 at 3:35 PM Alexei Starovoitov > wrote: > > > > Please make a full description of what the test does, > > since it's not trivial to decipher from the code. > > If I'm reading it correctly, first, the user space > > makes

Re: [PATCH v2 2/8] selftests/mm: protection_keys: Fix dead code

2025-07-31 Thread Sidhartha Kumar
On 7/31/25 12:01 PM, Muhammad Usama Anjum wrote: The while loop doesn't execute and following warning gets generated: protection_keys.c:561:15: warning: code will never be executed [-Wunreachable-code] int rpkey = alloc_random_pkey(); Let's enable the while loop such that it ge

Re: [PATCH v2 1/8] selftests/mm: Add -Wunreachable-code and fix warnings

2025-07-31 Thread Sidhartha Kumar
On 7/31/25 12:01 PM, Muhammad Usama Anjum wrote: Enable -Wunreachable-code flag to catch dead code and fix them. 1. Remove the dead code and write a comment instead: hmm-tests.c:2033:3: warning: code will never be executed [-Wunreachable-code] perror("Should not reach this\n");

Re: [PATCH] selftests: timers: improve adjtick output readability

2025-07-31 Thread Vishal Parmar
randomized output scheme. oh okay, please ignore this patch. no need to review it further. > For the success case, the actual numbers are uninteresting. In the > failure case it's sufficient to emit: > > ksft_test_result_fail("Req: , Exp: $, Res: $\n"

[PATCH v2 5/8] selftests/mm: Remove unused parameters

2025-07-31 Thread Muhammad Usama Anjum
Cleanup code and remove the unused arguments Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/ksm_tests.c | 17 +++-- tools/testing/selftests/mm/soft-dirty.c | 4 ++-- .../testing/selftests/mm/split_huge_page_test.c | 4 ++-- tools/testing/selftes

[PATCH v2 7/8] selftests/mm: Mark unused arguments with __unused

2025-07-31 Thread Muhammad Usama Anjum
Mark the arguments which cannot be removed with __unused attribute. Signed-off-by: Muhammad Usama Anjum --- .../selftests/mm/hugetlb_fault_after_madv.c| 4 ++-- .../testing/selftests/mm/hugetlb_madv_vs_map.c | 6 +++--- tools/testing/selftests/mm/pkey-arm64.h| 5 +++-- tools/testi

[PATCH v2 2/8] selftests/mm: protection_keys: Fix dead code

2025-07-31 Thread Muhammad Usama Anjum
The while loop doesn't execute and following warning gets generated: protection_keys.c:561:15: warning: code will never be executed [-Wunreachable-code] int rpkey = alloc_random_pkey(); Let's enable the while loop such that it gets executed nr_iterations times. Simplify the code a

[PATCH v2 8/8] selftests/mm: Fix unused parameter warnings for different architectures

2025-07-31 Thread Muhammad Usama Anjum
There are functions which have unused arguments for different architectures. Separate the code for each architecture and move #ifdef arch outside these functions. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/mseal_test.c | 8 +-- .../selftests/mm/pkey_sighandler_

[PATCH v2 4/8] selftests/mm: Add -Wunused family of flags

2025-07-31 Thread Muhammad Usama Anjum
Add -Wunused family of flags and fix all the warnings coming because of argc and argv. Remove them if they aren't being used entirely. Use __unused compiler attribute with argc where argv is being used. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/Makefile|

[PATCH v2 0/8] selftests/mm: Add compiler flags and fix found warnings

2025-07-31 Thread Muhammad Usama Anjum
Recently, I reviewed a patch on the mm/kselftest mailing list about a test which had obvious type mismatch fix in it. It was strange why that wasn't caught during development and when patch was accepted. This led me to discover that those extra compiler options to catch these warnings aren&#x

[PATCH v2 6/8] selftests/mm: Mark unused arguments with __unused

2025-07-31 Thread Muhammad Usama Anjum
Mark the arguments which cannot be removed with __unused attribute. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/cow.c | 20 ++--- tools/testing/selftests/mm/memfd_secret.c| 4 +-- tools/testing/selftests/mm/pfnmap.c | 2 +- tools/testing/

[PATCH v2 3/8] selftests: kselftest.h: Add __unused macro

2025-07-31 Thread Muhammad Usama Anjum
Add __unused macro instead of using the complete verbose unused compiler attribute. The raw __attribute__((__unused__)) is quite long and makes code too much verbose to the kernel developer's taste. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/kselftest.h | 4 1 file chan

[PATCH v2 1/8] selftests/mm: Add -Wunreachable-code and fix warnings

2025-07-31 Thread Muhammad Usama Anjum
Enable -Wunreachable-code flag to catch dead code and fix them. 1. Remove the dead code and write a comment instead: hmm-tests.c:2033:3: warning: code will never be executed [-Wunreachable-code] perror("Should not reach this\n"); ^~ 2. ksft_exit_fail_msg() call

Re: [PATCH V2 05/20] nvdimm/region_label: Add region label updation routine

2025-07-31 Thread kernel test robot
: f11a5f89910a7ae970fbce4fdc02d86a8ba8570f patch link: https://lore.kernel.org/r/20250730121209.303202-6-s.neeraj%40samsung.com patch subject: [PATCH V2 05/20] nvdimm/region_label: Add region label updation routine config: x86_64-randconfig-121-20250731 (https://download.01.org/0day-ci/archive

Re: [PATCH] selftests: ALSA: fix memory leak in utimer test

2025-07-31 Thread Takashi Iwai
On Thu, 31 Jul 2025 12:02:22 +0200, WangYuli wrote: > > Free the malloc'd buffer in TEST_F(timer_f, utimer) to prevent > memory leak. > > Reported-by: Jun Zhan > Signed-off-by: WangYuli Thanks, applied now. I added Fixes tag in my side. Takashi > --- > tools/testing/selftests/alsa/utimer-

Re: [PATCH] selftests: timers: improve adjtick output readability

2025-07-31 Thread Thomas Gleixner
Vishal! On Wed, Jul 30 2025 at 23:35, Vishal Parmar wrote: Please do not top-post and trim your replies. > The intent behind this change is to make output useful as is. > for example, to provide a performance report in case of regression. The point John was making: >> So it might be worth look

[PATCH v1 5/5] perf bench: Add documentation for 'sync rcu' suite

2025-07-31 Thread Yuzhuo Jing
Add documentation for 'perf bench sync rcu'. This benchmark has three modes or subcommands that takes positional arguments. In addition, *kernel* module parameters are directly specified in the form of "name=value", without "--name". Multiple subsections are thus added to the 'sync' section for

[PATCH v1 4/5] perf bench: Add 'ratio' mode to 'sync rcu'

2025-07-31 Thread Yuzhuo Jing
Add a 'ratio' mode to RCU benchmark. This mode helps investigate performance effects on the ratio between selected two parameters. The command is defined as: ratio is the sum of and . specifies the range of param1's values, and thus param2's values can be calculated as 'total-param1'

[PATCH v1 3/5] perf bench: Add 'range' mode to 'sync rcu'

2025-07-31 Thread Yuzhuo Jing
Add 'range' mode to test multiple combinations of parameters in rcuscale. The command format is similar to 'once', but allows parameters to be specified as 'name=start[:end:[:step]]', inclusive integer ranges. The default step is 1. This 'range' mode allows multiple parameters to be ranges, and

[PATCH v1 2/5] perf bench: Implement subprocess execution for 'sync rcu'

2025-07-31 Thread Yuzhuo Jing
Monitor system state is useful for understanding performance impact. This patch enables running external tool during the benchmark. It provides a similar semantic to 'perf record -- perf bench mem', except that the order is reversed. Because the benchmark threads are kernel modu

[PATCH v1 1/5] perf bench: Add RCU benchmark using rcuscale kernel module

2025-07-31 Thread Yuzhuo Jing
Add 'rcu' to the 'perf bench sync' collection. This benchmark depends on the rcuscale kernel module, and also depends on new features in the rcuscale module that exposes control and internal state through debugfs. This patch adds the basic 'once' mode that ru

[PATCH v1 0/5] perf bench: Add rcu to the 'bench sync' collection

2025-07-31 Thread Yuzhuo Jing
Add an 'bench sync rcu' benchmark, using the kernel's rcuscale module. This patch series adds the following features: * Automatic rcuscale module load/unload and grace-period statistics. (The statistics feature was derived from tools/testing/selftests/rcutorture/

Re: [PATCH V2 03/20] nvdimm/namespace_label: Add namespace label changes as per CXL LSA v2.1

2025-07-31 Thread kernel test robot
: f11a5f89910a7ae970fbce4fdc02d86a8ba8570f patch link: https://lore.kernel.org/r/20250730121209.303202-4-s.neeraj%40samsung.com patch subject: [PATCH V2 03/20] nvdimm/namespace_label: Add namespace label changes as per CXL LSA v2.1 config: x86_64-randconfig-121-20250731 (https://download.01.org

Re: [PATCH 0/5] module: Fix minor problems related to MODULE_NAME_LEN

2025-07-31 Thread Daniel Gomez
On Mon, 30 Jun 2025 16:32:31 +0200, Petr Pavlu wrote: > Fix a few minor problems related to MODULE_NAME_LEN and > MAX_PARAM_PREFIX_LEN, and clean up their usage. > > Petr Pavlu (5): > module: Prevent silent truncation of module name in delete_module(2) > module: Remove unnecessary +1 from la

Re: [PATCH V2 20/20] cxl/pmem_region: Add sysfs attribute cxl region label updation/deletion

2025-07-31 Thread kernel test robot
: f11a5f89910a7ae970fbce4fdc02d86a8ba8570f patch link: https://lore.kernel.org/r/20250730121209.303202-21-s.neeraj%40samsung.com patch subject: [PATCH V2 20/20] cxl/pmem_region: Add sysfs attribute cxl region label updation/deletion config: i386-randconfig-062-20250731 (https://download.01.org

Re: [PATCH] net: ipa: add IPA v5.1 and v5.5 to ipa_version_string()

2025-07-31 Thread Luca Weiss
nt there: /** * [...] * Defines the version of IPA (and GSI) hardware present on the platform. * Please update ipa_version_string() whenever a new version is added. */ enum ipa_version { [...] } I previously only noticed 5.5 being missing, but before sending I double checked if anything el

  1   2   3   4   5   6   7   8   9   10   >