[PATCH net-next v2 3/8] net: devmem: preserve sockc_err

2025-05-23 Thread Mina Almasry
Preserve the error code returned by sock_cmsg_send and return that on err. Signed-off-by: Mina Almasry --- v2: - Remove unnecessary !! (Stan) --- net/ipv4/tcp.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index

Re: [PATCH v6 1/5] x86/sgx: Introduce a counter to count the sgx_(vepc_)open()

2025-05-23 Thread Jarkko Sakkinen
On Fri, May 23, 2025 at 08:58:54AM -0700, Dave Hansen wrote: > On 5/23/25 08:54, Jarkko Sakkinen wrote: > >> +void sgx_dec_usage_count(void) > >> +{ > >> + atomic64_dec(&sgx_usage_count); > >> +} > > I think these both should be static inlines in arch/x86/kernel/cpu/sgx.h. > > Global symbols is ov

[PATCH net-next v2 2/8] page_pool: fix ugly page_pool formatting

2025-05-23 Thread Mina Almasry
Minor cleanup; this line is badly formatted. Signed-off-by: Mina Almasry --- net/core/page_pool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 974f3eef2efa..4011eb305cee 100644 --- a/net/core/page_pool.c +++ b/net/core

[PATCH net-next v2 8/8] net: devmem: ncdevmem: remove unused variable

2025-05-23 Thread Mina Almasry
This variable is unused and can be removed. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev --- tools/testing/selftests/drivers/net/hw/ncdevmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/drivers/net/hw/ncdevmem.c b/tools/testing/selftests/drivers/net/

[PATCH net-next v2 7/8] net: devmem: ksft: upgrade rx test to send 1K data

2025-05-23 Thread Mina Almasry
The current test just sends "hello\nworld" and verifies that is the string received on the RX side. That is fine, but improve the test a bit by sending 1K data. The test should be improved further to send more data, but for now this should be a welcome improvement. The test will send a repeating p

[PATCH net-next v2 6/8] net: devmem: ksft: add 5 tuple FS support

2025-05-23 Thread Mina Almasry
ncdevmem supports drivers that are limited to either 3-tuple or 5-tuple FS support, but the ksft is currently 3-tuple only. Support drivers that have 5-tuple FS supported by adding a ksft arg. Signed-off-by: Mina Almasry fix 5-tuple fix 5-tuple --- tools/testing/selftests/drivers/net/hw/dev

[PATCH net-next v2 4/8] net: devmem: ksft: add ipv4 support

2025-05-23 Thread Mina Almasry
ncdevmem supports both ipv4 and ipv6, but the ksft is currently ipv6-only. Propagate the ipv4 support to the ksft, so that folks that are limited to these networks can also test. Signed-off-by: Mina Almasry --- v2: - Use cfg.addr and cfg.remote_addr instead of doing ipv4 and ipv6 special han

[PATCH net-next v2 5/8] net: devmem: ksft: add exit_wait to make rx test pass

2025-05-23 Thread Mina Almasry
This exit_wait seems necessary to make the rx side test pass for me. I think this is just missed from the original test add patch. Add it now. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev --- tools/testing/selftests/drivers/net/hw/devmem.py | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH net-next v2 1/8] net: devmem: move list_add to net_devmem_bind_dmabuf.

2025-05-23 Thread Mina Almasry
It's annoying for the list_add to be outside net_devmem_bind_dmabuf, but the list_del is in net_devmem_unbind_dmabuf. Make it consistent by having both the list_add/del be inside the net_devmem_[un]bind_dmabuf. Cc: ap420...@gmail.com Signed-off-by: Mina Almasry Tested-by: Taehee Yoo --- net/co

[PATCH net-next v2 0/8] Devmem TCP minor cleanups and ksft improvements

2025-05-23 Thread Mina Almasry
v2: https://lore.kernel.org/netdev/20250519023517.4062941-1-almasrym...@google.com/ Changelog: - Collect acks and tested-bys (Thanks!) - Drop the patch that removed ksft_disruptive. That seems to not have any relation to behavior when test fails. - Address comments. --- Minor cleanups to the

Re: [RFC] selftests/mm: Skip tests dependent on a binary not built

2025-05-23 Thread Khaled Elnaggar
On 24/05/2025 12:09 am, Shuah Khan wrote: > On 5/23/25 12:43, Khaled Elnaggar wrote: >> Hello. >> > > The above doesn't belong in change log. Refer to a few change logs > in the repo to learn  how to write them. > > You can also check the kernel documentation - this change log > is way too long.

Re: [RFC] selftests/mm: Skip tests dependent on a binary not built

2025-05-23 Thread Shuah Khan
On 5/23/25 12:43, Khaled Elnaggar wrote: Hello. The above doesn't belong in change log. Refer to a few change logs in the repo to learn how to write them. You can also check the kernel documentation - this change log is way too long. It doesn't clearly state what is being fixed. In this cas

[PATCH v2] selftests/cpu-hotplug: fix typo in hotplaggable_offline_cpus function name

2025-05-23 Thread Jihed Chaibi
"hotplaggable" is replaced by "hotpluggable" Signed-off-by: Jihed Chaibi --- Changes in v2: - specify the subsusystem in the change log - Link to v1: https://lore.kernel.org/all/20250517011928.673585-1-jihed.chaibi@gmail.com/ --- tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh | 4

[GIT PULL] Kselftest next update for Linux 6.16-rc1

2025-05-23 Thread Shuah Khan
Hi Linus, Please pull the following kselftest next update for Linux 6.16-rc1. -- Fixes - cpufreq test to not double suspend in rtcwake case. - compile error in pid_namespace test. - run_kselftest.sh to use readlink if realpath is not available. - cpufreq basic read and update testcas

[GIT PULL] kunit next update for Linux 6.16-rc1

2025-05-23 Thread Shuah Khan
Hi Linus, Please pull the following kunit next update for Linux 6.16-rc1. - Enables qemu_config for riscv32, sparc 64-bit, PowerPC 32-bit BE and 64-bit LE. - Enables CONFIG_SPARC32 to clearly differentiate between sparc 32-bit and 64-bit configurations. - Enables CONFIG_CPU_BIG_ENDIAN to cle

Re: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-23 Thread Hiago De Franco
Hi Ulf, On Wed, May 21, 2025 at 02:11:02PM +0200, Ulf Hansson wrote: > You should not provide any flag (or attach_data to > dev_pm_domain_attach_list()) at all. In other words just call > dev_pm_domain_attach_list(dev, NULL, &priv->pd_list), similar to how > drivers/remoteproc/imx_dsp_rproc.c does

Re: [PATCH v2] kselftest: x86: Improve MOV SS test result message

2025-05-23 Thread Shuah Khan
On 5/23/25 01:32, Brigham Campbell wrote: Apparently, this test completes successfully when it completes execution without either causing a kernel panic or being killed by the kernel. This new test result message is more descriptive and grammatically correct. The change log description usually

[RFC] selftests/mm: Skip tests dependent on a binary not built

2025-05-23 Thread Khaled Elnaggar
Hello. Running the mm selftests from the kernel's root directory on an x86_64 debian machine using: make defconfig sudo make kselftest TARGETS=mm the tests run normally till we reach one which stalls for 180 seconds and times out according to the following logs: ``` ---

[PATCH] selftests: kvm: Fix spelling of 'occurrences' in sparsebit.c comments

2025-05-23 Thread Rahul Kumar
Corrected two instances of the misspelled word 'occurences' to 'occurrences' in comments explaining node invariants in sparsebit.c. These comments describe core behavior of the data structure and should be clear. Signed-off-by: Rahul Kumar --- tools/testing/selftests/kvm/lib/sparsebit.c | 4 ++--

Re: [PATCH v2] selftests: net: fix spelling and grammar mistakes

2025-05-23 Thread Aaron Conole
Praveen Balakrishnan writes: > Fix several spelling and grammatical mistakes in output messages from > the net selftests to improve readability. > > Only the message strings for the test output have been modified. No > changes to the functional logic of the tests have been made. > > Signed-off-by

Re: vmlinux BTF as a module (was Re: [PATCH bpf-next v4 0/3] Allow mmap of /sys/kernel/btf/vmlinux)

2025-05-23 Thread Andrii Nakryiko
On Thu, May 22, 2025 at 6:04 PM Alexei Starovoitov wrote: > > On Wed, May 21, 2025 at 8:00 AM Alan Maguire wrote: > > > > > Hi Alan, > > > > > > Thanks for taking a look at this. I've been following your related effort > > > to allow /sys/kernel/btf/vmlinux as a module in support of small systems

Re: [PATCH bpf-next v5 0/3] Allow mmap of /sys/kernel/btf/vmlinux

2025-05-23 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Tue, 20 May 2025 14:01:16 +0100 you wrote: > I'd like to cut down the memory usage of parsing vmlinux BTF in ebpf-go. > With some upcoming changes the library is sitting at 5MiB for a parse. > Most of that memory

Re: [PATCH v2] selftests: timers: valid-adjtimex: fix coding style issues

2025-05-23 Thread Shuah Khan
On 5/22/25 21:59, Rujra Bhatt wrote: This patch corrects minor coding style issues to comply with the Linux kernel coding style: - Align closing parentheses to match opening ones in printf statements. - Break long lines to keep them within the 100-column limit. These changes address warnings

Re: [PATCH bpf-next v5 1/3] btf: allow mmap of vmlinux btf

2025-05-23 Thread Andrii Nakryiko
On Thu, May 22, 2025 at 4:01 PM Shakeel Butt wrote: > > On Tue, May 20, 2025 at 02:01:17PM +0100, Lorenz Bauer wrote: > > User space needs access to kernel BTF for many modern features of BPF. > > Right now each process needs to read the BTF blob either in pieces or > > as a whole. Allow mmaping t

Re: [PATCH v6 1/5] x86/sgx: Introduce a counter to count the sgx_(vepc_)open()

2025-05-23 Thread Jarkko Sakkinen
On Thu, May 22, 2025 at 12:21:34PM +0300, Elena Reshetova wrote: > Currently SGX does not have a global counter to count the > active users from userspace or hypervisor. Implement such a counter, > sgx_usage_count. It will be used by the driver when attempting > to call EUPDATESVN SGX instruction.

Re: [PATCH v6 4/5] x86/sgx: Implement ENCLS[EUPDATESVN]

2025-05-23 Thread Jarkko Sakkinen
On Fri, May 23, 2025 at 06:57:50PM +0300, Jarkko Sakkinen wrote: > On Thu, May 22, 2025 at 12:21:37PM +0300, Elena Reshetova wrote: > > All running enclaves and cryptographic assets (such as internal SGX > > encryption keys) are assumed to be compromised whenever an SGX-related > > microcode update

Re: [PATCH v6 1/5] x86/sgx: Introduce a counter to count the sgx_(vepc_)open()

2025-05-23 Thread Dave Hansen
On 5/23/25 08:54, Jarkko Sakkinen wrote: >> +void sgx_dec_usage_count(void) >> +{ >> +atomic64_dec(&sgx_usage_count); >> +} > I think these both should be static inlines in arch/x86/kernel/cpu/sgx.h. > Global symbols is over the top. Even if I think disassembly (when doing > debugging, bug hunt

Re: [PATCH v6 4/5] x86/sgx: Implement ENCLS[EUPDATESVN]

2025-05-23 Thread Jarkko Sakkinen
On Thu, May 22, 2025 at 12:21:37PM +0300, Elena Reshetova wrote: > 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 ins

Re: [PATCH v6 3/5] x86/sgx: Define error codes for use by ENCLS[EUPDATESVN]

2025-05-23 Thread Jarkko Sakkinen
On Thu, May 22, 2025 at 12:21:36PM +0300, Elena Reshetova wrote: > 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 +++

[PATCH 2/3] kselftest/arm64: Fix test for streaming FPSIMD write in sve-ptrace

2025-05-23 Thread Mark Brown
Since f916dd32a943 ("arm64/fpsimd: ptrace: Mandate SVE payload for streaming-mode state") we do not support writing FPSIMD payload data when writing NT_ARM_SSVE but the sve-ptrace test has an explicit test for this being supported which was not updated to reflect the new behaviour. Fix the test to

[PATCH 3/3] kselftest/arm64: Specify SVE data when testing VL set in sve-ptrace

2025-05-23 Thread Mark Brown
Since f916dd32a943 ("arm64/fpsimd: ptrace: Mandate SVE payload for streaming-mode state") we reject attempts to write to the streaming mode regset even if there is no register data supplied, causing the tests for setting vector lengths and setting SVE_VL_INHERIT in sve-ptrace to spuriously fail. Se

[PATCH 1/3] kselftest/arm64: Fix check for setting new VLs in sve-ptrace

2025-05-23 Thread Mark Brown
The check that the new vector length we set was the expected one was typoed to an assignment statement which for some reason the compilers didn't spot, most likely due to the macros involved. Fixes: 0dca276ac4d2 ("selftests: arm64: Add test for the SVE ptrace interface") Signed-off-by: Mark Brown

[PATCH 0/3] kselftest/arm64: Update sve-ptrace for ABI changes

2025-05-23 Thread Mark Brown
n sve-ptrace tools/testing/selftests/arm64/fp/sve-ptrace.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- base-commit: 1c1abfd151c824698830ee900cc8d9f62e9a5fbb change-id: 20250523-kselftest-arm64-ssve-fixups-b68ae61c1ebf Best regards, -- Mark Brown

Re: [PATCH] selftests/filesystems: Fix build of anon_inode_test

2025-05-23 Thread Mark Brown
On Sun, May 18, 2025 at 03:01:34PM +0100, Mark Brown wrote: > The anon_inode_test test fails to build due to attempting to include > a nonexisting overlayfs/wrapper.h: > > anon_inode_test.c:10:10: fatal error: overlayfs/wrappers.h: No such file or > directory >10 | #include "overlayfs/wrapper

[PATCH bpf-next v1 2/2] selftests/bpf: Add test to cover ktls with bpf_msg_pop_data

2025-05-23 Thread Jiayuan Chen
The selftest can reproduce an issue where using bpf_msg_pop_data() in ktls causes errors on the receiving end. Signed-off-by: Jiayuan Chen --- .../selftests/bpf/prog_tests/sockmap_ktls.c | 91 +++ .../selftests/bpf/progs/test_sockmap_ktls.c | 4 + 2 files changed, 95 inserti

[PATCH bpf-next v1 1/2] bpf,ktls: Fix data corruption when using bpf_msg_pop_data() in ktls

2025-05-23 Thread Jiayuan Chen
When sending plaintext data, we initially calculated the corresponding ciphertext length. However, if we later reduced the plaintext data length via socket policy, we failed to recalculate the ciphertext length. This results in transmitting buffers containing uninitialized data during ciphertext t

[PATCH bpf-next v1 0/2] bpf,ktls: Fix data corruption caused by using bpf_msg_pop_data() in ktls

2025-05-23 Thread Jiayuan Chen
Cong reported an issue where running 'test_sockmap' in the current bpf-next tree results in an error [1]. The specific test case that triggered the error is a combined test involving ktls and bpf_msg_pop_data(). Root Cause: When sending plaintext data, we initially calculated the corresponding ci

Re: [PATCH v2] selftests: net: fix spelling and grammar mistakes

2025-05-23 Thread Simon Horman
On Fri, May 23, 2025 at 03:22:42AM +0100, Praveen Balakrishnan wrote: > Fix several spelling and grammatical mistakes in output messages from > the net selftests to improve readability. > > Only the message strings for the test output have been modified. No > changes to the functional logic of the

Re: [PATCH bpf-next/net v3 4/5] selftests/bpf: Add mptcp_subflow bpf_iter subtest

2025-05-23 Thread Matthieu Baerts
Hi Martin, On 21/05/2025 00:18, Martin KaFai Lau wrote: > On 5/19/25 3:04 AM, Matthieu Baerts wrote: +SEC("cgroup/getsockopt") +int iters_subflow(struct bpf_sockopt *ctx) +{ +    struct mptcp_subflow_context *subflow; +    struct bpf_sock *sk = ctx->sk; +    struct so

Re: [PATCH v2 35/62] objtool: Refactor add_jump_destinations()

2025-05-23 Thread Joe Lawrence
On 5/9/25 4:16 PM, Josh Poimboeuf wrote: > The add_jump_destinations() logic is a bit weird and convoluted after > being incrementally tweaked over the years. Refactor it to hopefully be > more logical and straightforward. > > Signed-off-by: Josh Poimboeuf > --- > tools/objtool/check.c

Re: [PATCH 1/9] tools/nolibc: move ioctl() to sys/ioctl.h

2025-05-23 Thread Mark Brown
On Fri, May 23, 2025 at 10:33:13AM +0200, Thomas Weißschuh wrote: > On 2025-05-21 19:49:39+0100, Mark Brown wrote: > > That seems to build with 869c788909b93a78ead1ca28c42b95eeb0779215 which > > is the current HEAD of: > > git://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git >

Re: [PATCH v3 3/3] rpmsg: ctrl: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-05-23 Thread Dan Carpenter
Hi Dawei, kernel test robot noticed the following build warnings: url: https://github.com/intel-lab-lkp/linux/commits/Dawei-Li/rpmsg-char-Reuse-eptdev-logic-for-anonymous-device/20250519-231006 base: 92a09c47464d040866cf2b4cd052bc60555185fb patch link: https://lore.kernel.org/r/20250519

Re: [PATCH v2 1/1] mm/memory_hotplug: PG_offline_skippable for offlining memory blocks with PageOffline pages

2025-05-23 Thread Oscar Salvador
On Tue, May 20, 2025 at 06:42:11PM +0200, David Hildenbrand wrote: > A long-term goal is supporting frozen PageOffline pages, and later > PageOffline pages that don't have a refcount at all. Some more work for > that is needed -- in particular around non-folio page migration and > memory ballooning

Re: [PATCH v2 1/1] mm/memory_hotplug: PG_offline_skippable for offlining memory blocks with PageOffline pages

2025-05-23 Thread Oscar Salvador
On Wed, May 21, 2025 at 03:44:32PM +0200, David Hildenbrand wrote: > No, the code is confusing. > > All pages are PageOffline. Only the ones that have not been onlined are *in > addition* PageDirty. > > The relevant bit is documented in page-flags.h: > > "When a memory block gets onlined, all pa

Re: [PATCH 1/9] tools/nolibc: move ioctl() to sys/ioctl.h

2025-05-23 Thread Thomas Weißschuh
On 2025-05-21 19:49:39+0100, Mark Brown wrote: > On Wed, May 21, 2025 at 03:45:42PM +0200, Thomas Weißschuh wrote: > > > Or you could run your testsuite with the new nolibc for-next branch > > which should be fixed now. > > That seems to build with 869c788909b93a78ead1ca28c42b95eeb0779215 which >

[PATCH v2] selftests: filesystems: fix "memebers" typo in mount-notify

2025-05-23 Thread Hendrik Hamerlinck
Corrects a spelling mistake "memebers" instead of "members" in tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c Signed-off-by: Hendrik Hamerlinck --- Changes since v1: Improved commit message to be consistent with other commit messages. .../selftests/filesystems/mount-noti

[PATCH v2] kselftest: x86: Improve MOV SS test result message

2025-05-23 Thread Brigham Campbell
Apparently, this test completes successfully when it completes execution without either causing a kernel panic or being killed by the kernel. This new test result message is more descriptive and grammatically correct. There are no changes in v2. I'm resending this patch because I addressed it to t