[PATCH] vhost: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

2025-06-03 Thread Pei Xiao
cocci warning: ./kernel/vhost_task.c:148:9-16: WARNING: ERR_CAST can be used with tsk Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)). Signed-off-by: Pei Xiao --- kernel/vhost_task.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/vhost_task.c b/ker

Re: [PATCH RESEND v10 0/3] vhost: Add support of kthread API

2025-06-03 Thread Lei Yang
Tested this patch with virtio-net regression tests, everything works fine. Tested-by: Lei Yang On Sat, May 31, 2025 at 5:58 PM Cindy Lu wrote: > > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > the vhost now uses vhost_task and operates as a child of the > owner thread.

[PATCH bpf-next] selftests/bpf: Fix compile error of bin_attribute::read/write()

2025-06-03 Thread Rong Tao
From: Rong Tao Since commit 97d06802d10a ("sysfs: constify bin_attribute argument of bin_attribute::read/write()"), make bin_attribute parameter of bin_attribute::read/write() const. Signed-off-by: Rong Tao --- tools/testing/selftests/bpf/test_kmods/bpf_testmod.c | 6 +++--- 1 file changed, 3

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-06-03 Thread Xiongfeng Wang
On 2025/6/4 9:35, Joel Fernandes wrote: > On Tue, Jun 03, 2025 at 03:22:42PM -0400, Joel Fernandes wrote: >> >> >> On 6/3/2025 3:03 PM, Joel Fernandes wrote: >>> >>> >>> On 6/3/2025 2:59 PM, Joel Fernandes wrote: On Fri, May 30, 2025 at 09:55:45AM +0800, Xiongfeng Wang wrote: > Hi Joel,

[PATCH] mm: Remove PFN_MAP, PFN_SPECIAL, PFN_SG_CHAIN and PFN_SG_LAST

2025-06-03 Thread Alistair Popple
The PFN_MAP flag is no longer used for anything, so remove it. The PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so also remove them. The last user of PFN_SPECIAL was removed by 653d7825c149 ("dcssblk: mark DAX broken, remove FS_DAX_LIMITED support"). Signed-off-by: Alistair Po

RE: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-03 Thread Peng Fan
> Subject: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to > pre-booted remote cores > > From: Hiago De Franco > > When the remote core is started before Linux boots (e.g., by the > bootloader), the driver currently is not able to attach because it only > checks for cores running in d

[PATCH 2/3] remoteproc: imx_rproc: Add support for System Manager API

2025-06-03 Thread Peng Fan (OSS)
From: Peng Fan i.MX95 features a Cortex-M33 core, six Cortex-A55 cores, and one Cortex-M7 core. The System Control Management Interface(SCMI) firmware runs on the M33 core. The i.MX95 SCMI firmware named System Manager(SM) includes vendor extension protocols, Logical Machine Management(LMM) proto

[PATCH 3/3] remoteproc: imx_rproc: Add support for i.MX95

2025-06-03 Thread Peng Fan (OSS)
From: Peng Fan Add imx_rproc_cfg_imx95_m7 and address(TCM and DDR) mapping Add i.MX95 of_device_id entry Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index

[PATCH 1/3] dt-bindings: remoteproc: fsl,imx-rproc: Add support for i.MX95

2025-06-03 Thread Peng Fan (OSS)
From: Peng Fan i.MX95 has a System Manager(SM) core runs the System Control Management Interface(SCMI) firmware. Vendor extenions are implemented in the firmware, Logical Machine Management(LMM) protocol to manage Logical Machines and CPU protocol to manage cores. The documentation could be found

[PATCH 0/3] remoteproc: imx_rproc: Support i.MX95

2025-06-03 Thread Peng Fan (OSS)
pddr5-evk-sd.bin-flash_a55 (M7 not under A55 control) imx-boot-imx95-19x19-lpddr5-evk-sd.bin-flash_all (M7 not under A55 control) Patchset is re-based on next-20250603. Thanks for Daniel helping review the patchset before posting out to list. Signed-off-by: Peng Fan --- Peng Fan (3): dt-bin

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-06-03 Thread Joel Fernandes
On Tue, Jun 03, 2025 at 03:22:42PM -0400, Joel Fernandes wrote: > > > On 6/3/2025 3:03 PM, Joel Fernandes wrote: > > > > > > On 6/3/2025 2:59 PM, Joel Fernandes wrote: > >> On Fri, May 30, 2025 at 09:55:45AM +0800, Xiongfeng Wang wrote: > >>> Hi Joel, > >>> > >>> On 2025/5/29 0:30, Joel Fernand

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-03 Thread Jason Wang
On Tue, Jun 3, 2025 at 11:07 PM Bui Quang Minh wrote: > > In virtio-net, we have not yet supported multi-buffer XDP packet in > zerocopy mode when there is a binding XDP program. However, in that > case, when receiving multi-buffer XDP packet, we skip the XDP program > and return XDP_PASS. As a re

[PATCH v4 4/7] cxl/acpi: Add background worker to wait for cxl_pci and cxl_mem probe

2025-06-03 Thread Smita Koralahalli
Introduce a waitqueue mechanism to coordinate initialization between the cxl_pci and cxl_mem drivers. Launch a background worker from cxl_acpi_probe() that waits for both drivers to complete initialization before invoking wait_for_device_probe(). Without this, the probe completion wait could begin

Re: [PATCH v4 1/7] cxl/region: Avoid null pointer dereference in is_cxl_region()

2025-06-03 Thread Dave Jiang
On 6/3/25 3:19 PM, Smita Koralahalli wrote: > Add a NULL check in is_cxl_region() to prevent potential null pointer > dereference if a caller passes a NULL device. This change ensures the > function safely returns false instead of triggering undefined behavior > when dev is NULL. Don't think th

Re: [PATCH v4 4/7] cxl/acpi: Add background worker to wait for cxl_pci and cxl_mem probe

2025-06-03 Thread Dave Jiang
On 6/3/25 3:19 PM, Smita Koralahalli wrote: > Introduce a waitqueue mechanism to coordinate initialization between the > cxl_pci and cxl_mem drivers. > > Launch a background worker from cxl_acpi_probe() that waits for both > drivers to complete initialization before invoking wait_for_device_pro

[PATCH v4 0/7] Add managed SOFT RESERVE resource handling

2025-06-03 Thread Smita Koralahalli
Add the ability to manage SOFT RESERVE iomem resources prior to them being added to the iomem resource tree. This allows drivers, such as CXL, to remove any pieces of the SOFT RESERVE resource that intersect with created CXL regions. The current approach of leaving the SOFT RESERVE resources as is

[PATCH v4 7/7] cxl/dax: Defer DAX consumption of SOFT RESERVED resources until after CXL region creation

2025-06-03 Thread Smita Koralahalli
From: Nathan Fontenot The DAX HMEM driver currently consumes all SOFT RESERVED iomem resources during initialization. This interferes with the CXL driver’s ability to create regions and trim overlapping SOFT RESERVED ranges before DAX uses them. To resolve this, defer the DAX driver's resource c

[PATCH v4 6/7] dax/hmem: Save the DAX HMEM platform device pointer

2025-06-03 Thread Smita Koralahalli
From: Nathan Fontenot To enable registration of HMEM devices for SOFT RESERVED regions after the DAX HMEM device is initialized, this patch saves a reference to the DAX HMEM platform device. This saved pointer will be used in a follow-up patch to allow late registration of SOFT RESERVED memory r

[PATCH v4 5/7] cxl/region: Introduce SOFT RESERVED resource removal on region teardown

2025-06-03 Thread Smita Koralahalli
Reworked from a patch by Alison Schofield Previously, when CXL regions were created through autodiscovery and their resources overlapped with SOFT RESERVED ranges, the soft reserved resource remained in place after region teardown. This left the HPA range unavailable for reuse even after the regi

[PATCH v4 1/7] cxl/region: Avoid null pointer dereference in is_cxl_region()

2025-06-03 Thread Smita Koralahalli
Add a NULL check in is_cxl_region() to prevent potential null pointer dereference if a caller passes a NULL device. This change ensures the function safely returns false instead of triggering undefined behavior when dev is NULL. Co-developed-by: Nathan Fontenot Signed-off-by: Nathan Fontenot Co-

[PATCH v4 2/7] cxl/core: Remove CONFIG_CXL_SUSPEND and always build suspend.o

2025-06-03 Thread Smita Koralahalli
In preparation for soft-reserved resource handling, make the suspend infrastructure always available by removing the CONFIG_CXL_SUSPEND Kconfig option. This ensures cxl_mem_active_inc()/dec() and cxl_mem_active() are unconditionally available, enabling coordination between cxl_pci and cxl_mem driv

[PATCH v4 3/7] cxl/pci: Add pci_loaded tracking to mark PCI driver readiness

2025-06-03 Thread Smita Koralahalli
Introduce a pci_loaded flag similar to mem_active, and define mark_cxl_pci_loaded() to indicate when the PCI driver has initialized. This will be used by other CXL components, such as cxl_acpi and the soft reserved resource handling logic, to coordinate initialization and ensure that dependent ope

[PATCH v2] selftests: ir_decoder: Convert header comment to proper multi-line block

2025-06-03 Thread Abdelrahman Fekry
well, i checked the script using checkpatch.pl and it shows that the patch has no warnings or errors and its ready to be sent v2: - fixed multiple trailing whitespace errors and - the Signed-off-by mismatch The test file for the IR decoder used single-line comments at the top to document its purp

Re: [PATCH v1 2/2] mm/huge_memory: don't mark refcounted pages special in vmf_insert_folio_pud()

2025-06-03 Thread David Hildenbrand
On 03.06.25 23:16, David Hildenbrand wrote: Marking PUDs that map a "normal" refcounted folios as special is against our rules documented for vm_normal_page(). Fortunately, there are not that many pud_special() check that can be mislead and are right now rather harmless: e.g., none so far bases

Re: [PATCH v1 0/2] mm/huge_memory: don't mark refcounted pages special in vmf_insert_folio_*()

2025-06-03 Thread David Hildenbrand
On 03.06.25 23:16, David Hildenbrand wrote: Based on Linus' master. While working on improving vm_normal_page() and friends, I stumbled over this issues: refcounted "normal" pages must not be marked using pmd_special() / pud_special(). Fortunately, so far there doesn't seem to be serious damage

[PATCH bpf-next v4 9/9] bpf: Fall back to nospec for sanitization-failures

2025-06-03 Thread Luis Gerhorst
ALU sanitization was introduced to ensure that a subsequent ptr access can never go OOB, even under speculation. This is required because we currently allow speculative scalar confusion. Spec. scalar confusion is possible because Spectre v4 sanitization only adds a nospec after critical stores (e.g

[PATCH bpf-next v4 8/9] selftests/bpf: Add test for Spectre v1 mitigation

2025-06-03 Thread Luis Gerhorst
This is based on the gadget from the description of commit 9183671af6db ("bpf: Fix leakage under speculation on mispredicted branches"). Signed-off-by: Luis Gerhorst Acked-by: Kumar Kartikeya Dwivedi --- .../selftests/bpf/progs/verifier_unpriv.c | 57 +++ 1 file changed, 57

[PATCH bpf-next v4 7/9] bpf: Fall back to nospec for Spectre v1

2025-06-03 Thread Luis Gerhorst
This implements the core of the series and causes the verifier to fall back to mitigating Spectre v1 using speculation barriers. The approach was presented at LPC'24 [1] and RAID'24 [2]. If we find any forbidden behavior on a speculative path, we insert a nospec (e.g., lfence speculation barrier o

[PATCH bpf-next v4 6/9] bpf: Rename sanitize_stack_spill to nospec_result

2025-06-03 Thread Luis Gerhorst
This is made to clarify that this flag will cause a nospec to be added after this insn and can therefore be relied upon to reduce speculative path analysis. Signed-off-by: Luis Gerhorst Acked-by: Kumar Kartikeya Dwivedi Cc: Henriette Herzog Cc: Maximilian Ott Cc: Milan Stephan --- include/li

[PATCH bpf-next v4 5/9] bpf, arm64, powerpc: Change nospec to include v1 barrier

2025-06-03 Thread Luis Gerhorst
This changes the semantics of BPF_NOSPEC (previously a v4-only barrier) to always emit a speculation barrier that works against both Spectre v1 AND v4. If mitigation is not needed on an architecture, the backend should set bpf_jit_bypass_spec_v4/v1(). As of now, this commit only has the user-visib

[PATCH v1 2/2] mm/huge_memory: don't mark refcounted pages special in vmf_insert_folio_pud()

2025-06-03 Thread David Hildenbrand
Marking PUDs that map a "normal" refcounted folios as special is against our rules documented for vm_normal_page(). Fortunately, there are not that many pud_special() check that can be mislead and are right now rather harmless: e.g., none so far bases decisions whether to grab a folio reference on

[PATCH v1 1/2] mm/huge_memory: don't mark refcounted pages special in vmf_insert_folio_pmd()

2025-06-03 Thread David Hildenbrand
Marking PMDs that map a "normal" refcounted folios as special is against our rules documented for vm_normal_page(). Fortunately, there are not that many pmd_special() check that can be mislead, and most vm_normal_page_pmd()/vm_normal_folio_pmd() users that would get this wrong right now are rather

[PATCH v1 0/2] mm/huge_memory: don't mark refcounted pages special in vmf_insert_folio_*()

2025-06-03 Thread David Hildenbrand
Based on Linus' master. While working on improving vm_normal_page() and friends, I stumbled over this issues: refcounted "normal" pages must not be marked using pmd_special() / pud_special(). Fortunately, so far there doesn't seem to be serious damage. This is only compile-tested so far. Still l

[PATCH bpf-next v4 4/9] bpf, arm64, powerpc: Add bpf_jit_bypass_spec_v1/v4()

2025-06-03 Thread Luis Gerhorst
JITs can set bpf_jit_bypass_spec_v1/v4() if they want the verifier to skip analysis/patching for the respective vulnerability. For v4, this will reduce the number of barriers the verifier inserts. For v1, it allows more programs to be accepted. The primary motivation for this is to not regress unp

[PATCH bpf-next v4 1/9] bpf: Move insn if/else into do_check_insn()

2025-06-03 Thread Luis Gerhorst
This is required to catch the errors later and fall back to a nospec if on a speculative path. Eliminate the regs variable as it is only used once and insn_idx is not modified in-between the definition and usage. Do not pass insn but compute it in the function itself. As Eduard points out [1], in

Re: [PATCH v2 1/2] libbpf: add support for printing BTF character arrays as strings

2025-06-03 Thread Andrii Nakryiko
On Tue, Jun 3, 2025 at 8:39 AM Blake Jones wrote: > > On Tue, Jun 3, 2025 at 6:18 AM Jiri Olsa wrote: > > > +static int btf_dump_string_data(struct btf_dump *d, > > > + const struct btf_type *t, > > > + __u32 id, > > > +

Re: [PATCH bpf-next v3 10/11] bpf: Allow nospec-protected var-offset stack access

2025-06-03 Thread Luis Gerhorst
Kumar Kartikeya Dwivedi writes: > Hmm, while reading related code, I noticed that sanitize_check_bounds > returns 0 in case the type is not map_value or stack. > It seems like it should be returning an error, cannot check right now > but I'm pretty sure these are not the two pointer types unprivi

[PATCH bpf-next v4 3/9] bpf: Return -EFAULT on internal errors

2025-06-03 Thread Luis Gerhorst
This prevents us from trying to recover from these on speculative paths in the future. Signed-off-by: Luis Gerhorst Reviewed-by: Eduard Zingerman Acked-by: Kumar Kartikeya Dwivedi Acked-by: Henriette Herzog Cc: Maximilian Ott Cc: Milan Stephan --- kernel/bpf/verifier.c | 6 +++--- 1 file ch

[PATCH bpf-next v4 2/9] bpf: Return -EFAULT on misconfigurations

2025-06-03 Thread Luis Gerhorst
Mark these cases as non-recoverable to later prevent them from being caught when they occur during speculative path verification. Eduard writes [1]: The only pace I'm aware of that might act upon specific error code from verifier syscall is libbpf. Looking through libbpf code, it seems that

[PATCH bpf-next v4 0/9] bpf: Mitigate Spectre v1 using barriers

2025-06-03 Thread Luis Gerhorst
This improves the expressiveness of unprivileged BPF by inserting speculation barriers instead of rejecting the programs. The approach was previously presented at LPC'24 [1] and RAID'24 [2]. To mitigate the Spectre v1 (PHT) vulnerability, the kernel rejects potentially-dangerous unprivileged BPF

Re: [PATCH] selftests: Add version file to kselftest installation dir

2025-06-03 Thread Shuah Khan
On 6/2/25 19:13, Tianyi Cui wrote: On 6/2/25 3:48 PM, Shuah Khan wrote: On 5/28/25 18:33, Tianyi Cui wrote: As titled, adding version file to kselftest installation dir, so the user of the tarball can know which kernel version the tarball belongs to. Signed-off-by: Tianyi Cui <1997...@gmail.co

Re: [RESEND PATCH] selftests/bpf: Fix bpf selftest build error

2025-06-03 Thread T.J. Mercier
On Mon, May 12, 2025 at 2:12 AM Saket Kumar Bhaskar wrote: > > On linux-next, build for bpf selftest displays an error due to > mismatch in the expected function signature of bpf_testmod_test_read > and bpf_testmod_test_write. > > Commit 97d06802d10a ("sysfs: constify bin_attribute argument of >

[PATCH v3 2/2] Tests for the ".emit_strings" functionality in the BTF dumper.

2025-06-03 Thread Blake Jones
When this mode is turned on, "emit_zeroes" and "compact" have no effect, and embedded NUL characters always terminate printing of an array. Signed-off-by: Blake Jones --- .../selftests/bpf/prog_tests/btf_dump.c | 118 ++ 1 file changed, 118 insertions(+) diff --git a/tools

[PATCH v3 1/2] libbpf: add support for printing BTF character arrays as strings

2025-06-03 Thread Blake Jones
The BTF dumper code currently displays arrays of characters as just that - arrays, with each character formatted individually. Sometimes this is what makes sense, but it's nice to be able to treat that array as a string. This change adds a special case to the btf_dump functionality to allow 0-term

Re: [PATCH v2 1/2] libbpf: add support for printing BTF character arrays as strings

2025-06-03 Thread Blake Jones
Hi Andrii, On Tue, Jun 3, 2025 at 11:39 AM Andrii Nakryiko wrote: > > Good question. That E2BIG error would happen, for example, if we tried > > to print the array "{ 'a', 'b', 'c' }" when the type was "char[4]". > > Exactly, data is truncated, we have to return E2BIG. But I think that > is check

Re: [PATCH] selftests/timers: Fix integer overlow errors on 32 bit systems

2025-06-03 Thread John Stultz
On Tue, Jun 3, 2025 at 1:10 PM Terry Tritton wrote: > > The use of NSEC_PER_SEC (10L) as defined in include/vdso/time64.h > causes several integer overflow warnings and test errors on 32 bit > architectures. > > Use a long long instead of long to prevent integer overflow when > converting

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread David Hildenbrand
On 03.06.25 19:55, Mark Brown wrote: On Tue, Jun 03, 2025 at 06:48:19PM +0100, Mark Brown wrote: On Tue, Jun 03, 2025 at 06:57:38PM +0200, David Hildenbrand wrote: I agree that printing something in case KSFT_PASS does not make sense indeed. But if something goes wrong (KSFT_FAIL/KSFT_SKIP)

Re: [PATCH v2 2/4] selftests/mm: Add helper for logging test start and results

2025-06-03 Thread David Hildenbrand
On 03.06.25 20:27, Mark Brown wrote: On Tue, Jun 03, 2025 at 02:37:41PM +0200, David Hildenbrand wrote: On 27.05.25 18:04, Mark Brown wrote: +static char test_name[1024]; + +static inline void log_test_start(const char *name, ...) +{ + va_list args; + va_start(args, name); + +

[PATCH] selftests/timers: Fix integer overlow errors on 32 bit systems

2025-06-03 Thread Terry Tritton
The use of NSEC_PER_SEC (10L) as defined in include/vdso/time64.h causes several integer overflow warnings and test errors on 32 bit architectures. Use a long long instead of long to prevent integer overflow when converting seconds to nanoseconds. Signed-off-by: Terry Tritton --- tool

[PATCH RESEND] mm/pagewalk: split walk_page_range_novma() into kernel/user parts

2025-06-03 Thread Lorenzo Stoakes
The walk_page_range_novma() function is rather confusing - it supports two modes, one used often, the other used only for debugging. The first mode is the common case of traversal of kernel page tables, which is what nearly all callers use this for. Secondly it provides an unusual debugging inter

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-06-03 Thread Joel Fernandes
On 6/3/2025 2:59 PM, Joel Fernandes wrote: > On Fri, May 30, 2025 at 09:55:45AM +0800, Xiongfeng Wang wrote: >> Hi Joel, >> >> On 2025/5/29 0:30, Joel Fernandes wrote: >>> On Wed, May 21, 2025 at 5:43 AM Xiongfeng Wang >>> wrote: Hi RCU experts, When I ran syskaller in Linux

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-06-03 Thread Joel Fernandes
On 6/3/2025 3:03 PM, Joel Fernandes wrote: > > > On 6/3/2025 2:59 PM, Joel Fernandes wrote: >> On Fri, May 30, 2025 at 09:55:45AM +0800, Xiongfeng Wang wrote: >>> Hi Joel, >>> >>> On 2025/5/29 0:30, Joel Fernandes wrote: On Wed, May 21, 2025 at 5:43 AM Xiongfeng Wang wrote: > >>

Re: [QUESTION] problems report: rcu_read_unlock_special() called in irq_exit() causes dead loop

2025-06-03 Thread Joel Fernandes
On Fri, May 30, 2025 at 09:55:45AM +0800, Xiongfeng Wang wrote: > Hi Joel, > > On 2025/5/29 0:30, Joel Fernandes wrote: > > On Wed, May 21, 2025 at 5:43 AM Xiongfeng Wang > > wrote: > >> > >> Hi RCU experts, > >> > >> When I ran syskaller in Linux 6.6 with CONFIG_PREEMPT_RCU enabled, I got > >> t

Re: [PATCH v2 2/4] selftests/mm: Add helper for logging test start and results

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 02:37:41PM +0200, David Hildenbrand wrote: > On 27.05.25 18:04, Mark Brown wrote: > > +static char test_name[1024]; > > + > > +static inline void log_test_start(const char *name, ...) > > +{ > > + va_list args; > > + va_start(args, name); > > + > > + vsnprintf(test_na

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 06:48:19PM +0100, Mark Brown wrote: > On Tue, Jun 03, 2025 at 06:57:38PM +0200, David Hildenbrand wrote: > > I agree that printing something in case KSFT_PASS does not make sense > > indeed. > > > > But if something goes wrong (KSFT_FAIL/KSFT_SKIP) I would expect a reason

Re: [RESEND PATCH] selftests/bpf: Fix bpf selftest build error

2025-06-03 Thread T.J. Mercier
On Tue, Jun 3, 2025 at 10:50 AM Song Liu wrote: > > On Tue, Jun 3, 2025 at 10:33 AM T.J. Mercier wrote: > > > > On Mon, May 12, 2025 at 2:12 AM Saket Kumar Bhaskar > > wrote: > > > > > > On linux-next, build for bpf selftest displays an error due to > > > mismatch in the expected function signa

Re: [RESEND PATCH] selftests/bpf: Fix bpf selftest build error

2025-06-03 Thread Song Liu
On Tue, Jun 3, 2025 at 10:33 AM T.J. Mercier wrote: > > On Mon, May 12, 2025 at 2:12 AM Saket Kumar Bhaskar > wrote: > > > > On linux-next, build for bpf selftest displays an error due to > > mismatch in the expected function signature of bpf_testmod_test_read > > and bpf_testmod_test_write. > >

Re: [RESEND PATCH] selftests/bpf: Fix bpf selftest build error

2025-06-03 Thread Alexei Starovoitov
On Tue, Jun 3, 2025 at 10:33 AM T.J. Mercier wrote: > > On Mon, May 12, 2025 at 2:12 AM Saket Kumar Bhaskar > wrote: > > > > On linux-next, build for bpf selftest displays an error due to > > mismatch in the expected function signature of bpf_testmod_test_read > > and bpf_testmod_test_write. > >

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 06:57:38PM +0200, David Hildenbrand wrote: > On 03.06.25 17:22, Mark Brown wrote: > > Like I've been saying this is just the final test result, in this case I > > would expect that for the actual thing we're trying to test any > > confusion would be addressed in the name of

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread David Hildenbrand
On 03.06.25 17:22, Mark Brown wrote: On Tue, Jun 03, 2025 at 05:06:17PM +0200, David Hildenbrand wrote: On 03.06.25 16:58, Mark Brown wrote: Like I said I suspect the test name is just unclear here... I would hope we find some mechanical replacement. E.g., ksft_test_result_pass("No l

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

2025-06-03 Thread Fan Ni
On Sun, Apr 13, 2025 at 05:52:08PM -0500, Ira Weiny wrote: > A git tree of this series can be found here: > > https://github.com/weiny2/linux-kernel/tree/dcd-v6-2025-04-13 > > This is now based on 6.15-rc2. > > Due to the stagnation of solid requirements for users of DCD I do not > plan to

Re: [PATCH v2 1/2] libbpf: add support for printing BTF character arrays as strings

2025-06-03 Thread Blake Jones
On Tue, Jun 3, 2025 at 6:18 AM Jiri Olsa wrote: > > +static int btf_dump_string_data(struct btf_dump *d, > > + const struct btf_type *t, > > + __u32 id, > > + const void *data) > > +{ > > + const struct btf_arr

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 05:06:17PM +0200, David Hildenbrand wrote: > On 03.06.25 16:58, Mark Brown wrote: > > Like I said I suspect the test name is just unclear here... > I would hope we find some mechanical replacement. > E.g., > ksft_test_result_pass("No leak from parent into child\n"); > b

[PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-03 Thread Bui Quang Minh
In virtio-net, we have not yet supported multi-buffer XDP packet in zerocopy mode when there is a binding XDP program. However, in that case, when receiving multi-buffer XDP packet, we skip the XDP program and return XDP_PASS. As a result, the packet is passed to normal network stack which is an in

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread David Hildenbrand
On 03.06.25 16:58, Mark Brown wrote: On Tue, Jun 03, 2025 at 04:15:42PM +0200, David Hildenbrand wrote: On 03.06.25 15:21, Mark Brown wrote: } else { - ksft_test_result_fail("Leak from parent into child\n"); Same here and in other cases below (I probably didn't catch

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 04:15:42PM +0200, David Hildenbrand wrote: > On 03.06.25 15:21, Mark Brown wrote: > > > > } else { > > > > - ksft_test_result_fail("Leak from parent into child\n"); > > > Same here and in other cases below (I probably didn't catch all). > > > We shou

Re: [RFC PATCH net-next v2 1/2] virtio-net: support zerocopy multi buffer XDP in mergeable

2025-06-03 Thread Bui Quang Minh
On 6/3/25 09:56, Jason Wang wrote: On Thu, May 29, 2025 at 8:28 PM Bui Quang Minh wrote: On 5/29/25 12:59, Jason Wang wrote: On Wed, May 28, 2025 at 12:19 AM Bui Quang Minh wrote: Currently, in zerocopy mode with mergeable receive buffer, virtio-net does not support multi buffer but a single

Re: [PATCH v4 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-03 Thread Hiago De Franco
On Tue, Jun 03, 2025 at 02:09:14PM +0200, Ulf Hansson wrote: > On Mon, 2 Jun 2025 at 15:19, Hiago De Franco wrote: > > > > From: Hiago De Franco > > > > This patch series depends on Ulf's patches that are currently under review, > > "pmdomain: Add generic ->sync_state() support to genpd" [1]. Wit

Re: [RFC PATCH net-next v2 2/2] selftests: net: add XDP socket tests for virtio-net

2025-06-03 Thread Bui Quang Minh
On 6/2/25 22:55, Maciej Fijalkowski wrote: On Sat, May 31, 2025 at 03:51:57PM +0700, Bui Quang Minh wrote: On 5/30/25 18:45, Maciej Fijalkowski wrote: On Thu, May 29, 2025 at 09:29:14PM +0700, Bui Quang Minh wrote: On 5/29/25 18:18, Maciej Fijalkowski wrote: On Tue, May 27, 2025 at 11:19:04PM

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread David Hildenbrand
On 03.06.25 15:21, Mark Brown wrote: On Tue, Jun 03, 2025 at 02:51:45PM +0200, David Hildenbrand wrote: On 27.05.25 18:04, Mark Brown wrote: ret = mprotect(mem, size, PROT_READ); - ret |= mprotect(mem, size, PROT_READ|PROT_WRITE); if (ret) { No

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 02:51:45PM +0200, David Hildenbrand wrote: > On 27.05.25 18:04, Mark Brown wrote: > > ret = mprotect(mem, size, PROT_READ); > > - ret |= mprotect(mem, size, PROT_READ|PROT_WRITE); > > if (ret) { > Not sure if that change is really required

Re: [PATCH v2 1/2] libbpf: add support for printing BTF character arrays as strings

2025-06-03 Thread Jiri Olsa
On Mon, Jun 02, 2025 at 09:48:12PM -0700, Blake Jones wrote: SNIP > diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c > index 460c3e57fadb..336a6646e0fa 100644 > --- a/tools/lib/bpf/btf_dump.c > +++ b/tools/lib/bpf/btf_dump.c > @@ -68,6 +68,7 @@ struct btf_dump_data { > bool

Re: [PATCH v2 4/4] selftests/mm: Fix test result reporting in gup_longterm

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 02:36:07PM +0200, David Hildenbrand wrote: > On 27.05.25 18:04, Mark Brown wrote: > > + int result = KSFT_PASS; > > int ret; > > + if (fd < 0) { > > + result = KSFT_FAIL; > > + goto report; > > + } > Not a fan of that, especially as it suddenl

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread David Hildenbrand
On 27.05.25 18:04, Mark Brown wrote: The kselftest framework uses the string logged when a test result is reported as the unique identifier for a test, using it to track test results between runs. The cow test completely fails to follow this pattern, it runs test functions repeatedly with various

Re: [PATCH v2 2/4] selftests/mm: Add helper for logging test start and results

2025-06-03 Thread David Hildenbrand
On 27.05.25 18:04, Mark Brown wrote: Several of the MM tests have a pattern of printing a description of the test to be run then reporting the actual TAP result using a generic string not connected to the specific test, often in a shared function used by many tests. The name reported typically va

Re: [PATCH v2 4/4] selftests/mm: Fix test result reporting in gup_longterm

2025-06-03 Thread David Hildenbrand
On 27.05.25 18:04, Mark Brown wrote: The kselftest framework uses the string logged when a test result is reported as the unique identifier for a test, using it to track test results between runs. The gup_longterm test fails to follow this pattern, it runs a single test function repeatedly with v

Re: [PATCH v2 0/3] KVM: arm64: selftests: arch_timer_edge_cases fixes

2025-06-03 Thread Zenghui Yu
Hi Sebastian, On 2025/5/27 22:24, Sebastian Ott wrote: > Some small fixes for arch_timer_edge_cases that I stumbled upon > while debugging failures for this selftest on ampere-one. > > Changes since v1: modified patch 3 based on suggestions from Marc. > > I've done some tests with this on variou

Re: [PATCH v4 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-03 Thread Ulf Hansson
On Mon, 2 Jun 2025 at 15:19, Hiago De Franco wrote: > > From: Hiago De Franco > > This patch series depends on Ulf's patches that are currently under review, > "pmdomain: Add generic ->sync_state() support to genpd" [1]. Without them, > this series is not going to work. > > For the i.MX8X and i.M

Re: [PATCH net v3] selftests: net: build net/lib dependency in all target

2025-06-03 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Paolo Abeni : On Sun, 1 Jun 2025 21:29:13 +0700 you wrote: > We have the logic to include net/lib automatically for net related > selftests. However, currently, this logic is only in install target > which means only `make install` will h

Re: [PATCH] selftests: ipc: Replace fail print statements with ksft_test_result_fail

2025-06-03 Thread nick Huang
Thank you for taking the time to review this. Best regards, Nick Shuah Khan 於 2025年6月3日 週二 上午6:17寫道: > > On 5/31/25 01:01, Nick Huang wrote: > > Use the standard kselftest failure report function to ensure consistent > > test output formatting. This improves readability and integration with > >

[RESEND PATCH v16 0/6] Introduction of a remoteproc tee to load signed firmware

2025-06-03 Thread Arnaud Pouliquen
Hello Bjorn and Mathieu, I am resending this series after waiting for over two months for Bjorn's feedback, despite a prior reminder. Please could you coordinate between yourselves to determine who will continue reviewing this series? It would be greatly appreciated if the review could proceed wi

[RESEND PATCH v16 2/6] remoteproc: Add TEE support

2025-06-03 Thread Arnaud Pouliquen
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, this driver offers a client interface to load firmware by the secure part. This firmware could be authenticated by the secure truste

[RESEND PATCH v16 5/6] remoteproc: stm32: Create sub-functions to request shutdown and release

2025-06-03 Thread Arnaud Pouliquen
To prepare for the support of TEE remoteproc, create sub-functions that can be used in both cases, with and without remoteproc TEE support. Signed-off-by: Arnaud Pouliquen --- drivers/remoteproc/stm32_rproc.c | 82 +++- 1 file changed, 49 insertions(+), 33 deletions(-

[RESEND PATCH v16 3/6] remoteproc: Introduce release_fw optional operation

2025-06-03 Thread Arnaud Pouliquen
The release_fw operation is the inverse operation of the load, responsible for releasing the remote processor resources configured from the loading of the remoteproc firmware (e.g., memories). The operation is called in the following cases: - An error occurs on boot of the remote processor. - An

[RESEND PATCH v16 1/6] remoteproc: core: Introduce rproc_pa_to_va helper

2025-06-03 Thread Arnaud Pouliquen
When a resource table is loaded by an external entity such as U-boot or OP-TEE, we do not necessarily get the device address(da) but the physical address(pa). This helper performs similar translation than the rproc_da_to_va() but based on a physical address. Signed-off-by: Arnaud Pouliquen --- d

[RESEND PATCH v16 6/6] remoteproc: stm32: Add support of an OP-TEE TA to load the firmware

2025-06-03 Thread Arnaud Pouliquen
The new TEE remoteproc driver is used to manage remote firmware in a secure, trusted context. The 'st,stm32mp1-m4-tee' compatibility is introduced to delegate the loading of the firmware to the trusted execution context. In such cases, the firmware should be signed and adhere to the image format de

[RESEND PATCH v16 4/6] dt-bindings: remoteproc: Add compatibility for TEE support

2025-06-03 Thread Arnaud Pouliquen
The "st,stm32mp1-m4-tee" compatible is utilized in a system configuration where the Cortex-M4 firmware is loaded by the Trusted Execution Environment (TEE). For instance, this compatible is used in both the Linux and OP-TEE device trees: - In OP-TEE, a node is defined in the device tree with the

Re: [PATCH RESEND v10 1/3] vhost: Add a new modparam to allow userspace select kthread

2025-06-03 Thread Simon Horman
On Sat, May 31, 2025 at 05:57:26PM +0800, Cindy Lu wrote: > The vhost now uses vhost_task and workers as a child of the owner thread. > While this aligns with containerization principles, it confuses some > legacy userspace applications, therefore, we are reintroducing kthread > API support. > > A