Re: [PATCH/RFC] kunit/rtc: Add real support for very slow tests

2025-03-28 Thread David Gow
Hi Geert, Thanks for sending this out: I think this raises some good questions about exactly how to handle long running tests (particularly on older/slower hardware). I've put a few notes below, but, tl;dr: I think these are all good changes, even if there's more we can do to better scale to slow

Re: [PATCH 1/4] x86/sgx: Add total number of EPC pages

2025-03-28 Thread Jarkko Sakkinen
On Fri, Mar 28, 2025 at 08:07:24AM +, Reshetova, Elena wrote: > > Yes but obviously I cannot promise that I'll accept this as it is > > until I see the final version > > Are you saying you prefer *this version with spinlock* vs. > simpler version that utilizes the fact that sgx_nr_free_pages

Re: [PATCH 4/4] x86/sgx: Implement ENCLS[EUPDATESVN] and opportunistically call it during first EPC page alloc

2025-03-28 Thread Jarkko Sakkinen
On Fri, Mar 28, 2025 at 08:27:51AM +, Reshetova, Elena wrote: > > > On Thu, Mar 27, 2025 at 03:42:30PM +, Reshetova, Elena wrote: > > > > > > > + case SGX_NO_UPDATE: > > > > > > > + pr_debug("EUPDATESVN was successful, but CPUSVN > > was not > > > > > > updated, " > > > > > > > +

RE: [PATCH 1/4] x86/sgx: Add total number of EPC pages

2025-03-28 Thread Reshetova, Elena
> On Fri, Mar 28, 2025 at 08:07:24AM +, Reshetova, Elena wrote: > > > Yes but obviously I cannot promise that I'll accept this as it is > > > until I see the final version > > > > Are you saying you prefer *this version with spinlock* vs. > > simpler version that utilizes the fact that sgx_nr

Re: [PATCH v3 2/3] openrisc: Introduce new utility functions to flush and invalidate caches

2025-03-28 Thread Sahil Siddiq
Hi, Thank you for the review. On 3/26/25 10:41 PM, Stafford Horne wrote: On Mon, Mar 24, 2025 at 01:25:43AM +0530, Sahil Siddiq wrote: According to the OpenRISC architecture manual, the dcache and icache may not be present. When these caches are present, the invalidate and flush registers may

Re: [PATCH] virtio: console: Make resizing compliant with virtio spec

2025-03-28 Thread Halil Pasic
On Thu, 20 Mar 2025 15:09:57 +0100 Halil Pasic wrote: > > I already implemented it in my patch v2 (just waiting for Amit to > > confirm the new commit message). But if you want to split it you can > > create a seperate patch for it as well (I don't really mind either > > way). > > Your v2 has

[PATCH v4 3/3] openrisc: Add cacheinfo support

2025-03-28 Thread Sahil Siddiq
Add cacheinfo support for OpenRISC. Currently, a few CPU cache attributes pertaining to OpenRISC processors are exposed along with other unrelated CPU attributes in the procfs file system (/proc/cpuinfo). However, a few cache attributes remain unexposed. Provide a mechanism that the generic cache

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

2025-03-28 Thread Jarkko Sakkinen
On Fri, Mar 28, 2025 at 02:57:41PM +0200, Elena Reshetova wrote: > SGX architecture introduced a new instruction called EUPDATESVN > to Ice Lake. It allows updating security SVN version, given that EPC > is completely empty. The latter is required for security reasons > in order to reason that encl

Re: [PATCH] selftests/run_kselftest.sh: Use readlink if realpath is not available

2025-03-28 Thread Shuah Khan
On 3/18/25 10:05, Yosry Ahmed wrote: 'realpath' is not always available, fallback to 'readlink -f' if is not available. They seem to work equally well in this context. Can you add more specifics on "realpath" is not always available," No issues with the patch itself. I would like to know the

[PATCH v4 1/3] openrisc: Refactor struct cpuinfo_or1k to reduce duplication

2025-03-28 Thread Sahil Siddiq
The "cpuinfo_or1k" structure currently has identical data members for different cache components. Remove these fields out of struct cpuinfo_or1k and into its own struct. This reduces duplication while keeping cpuinfo_or1k extensible so more cache descriptors can be added in the future. Also add a

[PATCH v4 2/3] openrisc: Introduce new utility functions to flush and invalidate caches

2025-03-28 Thread Sahil Siddiq
According to the OpenRISC architecture manual, the dcache and icache may not be present. When these caches are present, the invalidate and flush registers may be absent. The current implementation does not perform checks to verify their presence before utilizing cache registers, or invalidating and

Re: [PATCH v4 2/3] openrisc: Introduce new utility functions to flush and invalidate caches

2025-03-28 Thread Stafford Horne
On Sat, Mar 29, 2025 at 01:56:31AM +0530, Sahil Siddiq wrote: > According to the OpenRISC architecture manual, the dcache and icache may > not be present. When these caches are present, the invalidate and flush > registers may be absent. The current implementation does not perform > checks to verif

[GIT PULL] remoteproc updates for v6.15

2025-03-28 Thread Bjorn Andersson
The following changes since commit a64dcfb451e254085a7daee5fe51bf22959d52d3: Linux 6.14-rc2 (2025-02-09 12:45:03 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git tags/rproc-v6.15 for you to fetch changes up to e917b73234b

[PATCH v4 0/3] openrisc: Add cacheinfo support and introduce new utility functions

2025-03-28 Thread Sahil Siddiq
Hi, The main purpose of this series is to expose CPU cache attributes for OpenRISC in sysfs using the cacheinfo API. The core implementation to achieve this is in patch #3. Patch #1 and #2 add certain enhancements to simplify the implementation of cacheinfo support. Patch #1 removes duplication o

[PATCH net 0/4] mptcp: misc. fixes for 6.15-rc0

2025-03-28 Thread Matthieu Baerts (NGI0)
/mptcp_connect.c | 11 +++ 3 files changed, 16 insertions(+), 11 deletions(-) --- base-commit: 2ea396448f26d0d7d66224cb56500a6789c7ed07 change-id: 20250328-net-mptcp-misc-fixes-6-15-98bfbeaa15ac Best regards, -- Matthieu Baerts (NGI0)

[PATCH net 1/4] mptcp: fix NULL pointer in can_accept_new_subflow

2025-03-28 Thread Matthieu Baerts (NGI0)
From: Gang Yan When testing valkey benchmark tool with MPTCP, the kernel panics in 'mptcp_can_accept_new_subflow' because subflow_req->msk is NULL. Call trace: mptcp_can_accept_new_subflow (./net/mptcp/subflow.c:63 (discriminator 4)) (P) subflow_syn_recv_sock (./net/mptcp/subflow.c:854) t

[PATCH net 2/4] selftests: mptcp: fix incorrect fd checks in main_loop

2025-03-28 Thread Matthieu Baerts (NGI0)
From: Cong Liu Fix a bug where the code was checking the wrong file descriptors when opening the input files. The code was checking 'fd' instead of 'fd_in', which could lead to incorrect error handling. Fixes: 05be5e273c84 ("selftests: mptcp: add disconnect tests") Cc: sta...@vger.kernel.org Fix

[PATCH net 3/4] selftests: mptcp: close fd_in before returning in main_loop

2025-03-28 Thread Matthieu Baerts (NGI0)
From: Geliang Tang The file descriptor 'fd_in' is opened when cfg_input is configured, but not closed in main_loop(), this patch fixes it. Fixes: 05be5e273c84 ("selftests: mptcp: add disconnect tests") Cc: sta...@vger.kernel.org Co-developed-by: Cong Liu Signed-off-by: Cong Liu Signed-off-by:

[GIT PULL] hwspinlock updates for v6.15

2025-03-28 Thread Bjorn Andersson
The following changes since commit a64dcfb451e254085a7daee5fe51bf22959d52d3: Linux 6.14-rc2 (2025-02-09 12:45:03 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git tags/hwlock-v6.15 for you to fetch changes up to fec04edb74

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

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

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

2025-03-28 Thread Elena Reshetova
Changes since v1 following review by Jarkko: - first and second patch are squashed together and a better explanation of the change is added into the commit message - third and fourth patch are also combined for better understanding of error code purposes used in 4th patch - implementation

Re: [PATCH 0/3] Avoid calling WARN_ON() on allocation failure in cfg802154_switch_netns()

2025-03-28 Thread Miquel Raynal
Hello Ivan, On 28/03/2025 at 04:04:24 +03, Ivan Abramov wrote: > This series was inspired by Syzkaller report on warning in > cfg802154_switch_netns(). Thanks for the series, lgtm. Reviewed-by: Miquel Raynal Miquèl

RE: [PATCH 1/4] x86/sgx: Add total number of EPC pages

2025-03-28 Thread Reshetova, Elena
> oN Thu, Mar 27, 2025 at 03:29:53PM +, Reshetova, Elena wrote: > > > > > On Mon, Mar 24, 2025 at 12:12:41PM +, Reshetova, Elena wrote: > > > > > On Fri, Mar 21, 2025 at 02:34:40PM +0200, Elena Reshetova wrote: > > > > > > In order to successfully execute ENCLS[EUPDATESVN], EPC must be > >

[PATCH v8 4/8] vhost: Introduce vhost_worker_ops in vhost_worker

2025-03-28 Thread Cindy Lu
Abstract vhost worker operations (create/stop/wakeup) into an ops structure to prepare for kthread mode support. Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 63 ++- drivers/vhost/vhost.h | 11 2 files changed, 56 insertions(+), 18 deletion

[PATCH] selftests/mm: Fix loss of information warnings

2025-03-28 Thread Siddarth G
Cppcheck reported a style warning: int result is assigned to long long variable. If the variable is long long to avoid loss of information, then you have loss of information. Changing the type of page_size from 'unsigned int' to 'unsigned long long' was considered. But that might cause new convers

Re: [PATCH v2] selftests/ptrace/get_syscall_info: fix for MIPS n32

2025-03-28 Thread Shuah Khan
On 1/15/25 16:37, Dmitry V. Levin wrote: MIPS n32 is one of two ILP32 architectures supported by the kernel that have 64-bit syscall arguments (another one is x32). When this test passed 32-bit arguments to syscall(), they were sign-extended in libc, PTRACE_GET_SYSCALL_INFO reported these sign-e

Re: [PATCH net-next v2] vsock/test: Add test for null ptr deref when transport changes

2025-03-28 Thread Stefano Garzarella
On Wed, Mar 26, 2025 at 05:21:03PM +0100, Stefano Garzarella wrote: On Wed, Mar 26, 2025 at 04:14:20PM +0100, Luigi Leonardi wrote: Hi Michal, On Wed, Mar 19, 2025 at 01:27:35AM +0100, Michal Luczaj wrote: On 3/14/25 10:27, Luigi Leonardi wrote: Add a new test to ensure that when the transpor

Re: [PATCH/RFC] kunit/rtc: Add real support for very slow tests

2025-03-28 Thread Geert Uytterhoeven
Hi David, On Fri, 28 Mar 2025 at 09:07, David Gow wrote: > Thanks for sending this out: I think this raises some good questions > about exactly how to handle long running tests (particularly on > older/slower hardware). > > I've put a few notes below, but, tl;dr: I think these are all good > chan

Re: [ANNOUNCE] kmod 34.2

2025-03-28 Thread Lucas De Marchi
kmod 34.2 is out: https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-34.2.tar.xz https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-34.2.tar.sign The tarballs generated for kmod-34 and kmod-34.1 were not very compatible for distros still on autotools. Hint: v35 will not

[GIT PULL] Modules changes for v6.15-rc1

2025-03-28 Thread Petr Pavlu
The following changes since commit 80e54e84911a923c40d7bee33a34c1b4be148d7a: Linux 6.14-rc6 (2025-03-09 13:45:25 -1000) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git/ tags/modules-6.15-rc1 for you to fetch changes up to 897c0b4e2713

Re: [PATCH V2] remoteproc: core: Clear table_sz when rproc_shutdown

2025-03-28 Thread Mathieu Poirier
On Fri, Mar 28, 2025 at 12:50:12PM +0800, Peng Fan wrote: > On Thu, Mar 27, 2025 at 11:46:33AM -0600, Mathieu Poirier wrote: > >Hi, > > > >On Wed, Mar 26, 2025 at 10:02:14AM +0800, Peng Fan (OSS) wrote: > >> From: Peng Fan > >> > >> There is case as below could trigger kernel dump: > >> Use U-Boo

[PATCH net] vsock: avoid timeout during connect() if the socket is closing

2025-03-28 Thread Stefano Garzarella
From: Stefano Garzarella When a peer attempts to establish a connection, vsock_connect() contains a loop that waits for the state to be TCP_ESTABLISHED. However, the other peer can be fast enough to accept the connection and close it immediately, thus moving the state to TCP_CLOSING. When this h

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

2025-03-28 Thread Jarkko Sakkinen
On Fri, Mar 28, 2025 at 07:50:43PM +0200, Jarkko Sakkinen wrote: > On Fri, Mar 28, 2025 at 02:57:41PM +0200, Elena Reshetova wrote: > > SGX architecture introduced a new instruction called EUPDATESVN > > to Ice Lake. It allows updating security SVN version, given that EPC > > is completely empty. T

Re: [PATCH v3 1/7] dt-bindings: input: syna,rmi4: document syna,pdt-fallback-desc

2025-03-28 Thread David Heidelberg
On 26/03/2025 11:26, Caleb Connolly wrote: On 3/26/25 07:57, Krzysztof Kozlowski wrote: On 25/03/2025 14:23, Caleb Connolly wrote: On 3/25/25 08:36, Krzysztof Kozlowski wrote: On 24/03/2025 19:00, David Heidelberg wrote: On 10/03/2025 10:45, Krzysztof Kozlowski wrote: On Sat, Mar 08, 202

Re: bug report for linux-6.14/tools/testing/selftests/mm/pagemap_ioctl.c

2025-03-28 Thread Shuah Khan
On 3/26/25 13:25, David Binderman wrote: Hello there, Static analyser cppcheck says: linux-6.14/tools/testing/selftests/mm/pagemap_ioctl.c:1061:11: style: int result is assigned to long long variable. If the variable is long long to avoid loss of information, then you have loss of informatio

Re: [PATCH] selftests/nolibc: drop unnecessary sys/io.h include

2025-03-28 Thread Shuah Khan
On 3/24/25 16:01, Thomas Weißschuh wrote: The include of sys/io.h is not necessary anymore since commit 67eb617a8e1e ("selftests/nolibc: simplify call to ioperm"). It's existence is also problematic as the header does not exist on all architectures. Reported-by: Sebastian Andrzej Siewior Signed

[PATCH v8 0/8] vhost: Add support of kthread API

2025-03-28 Thread Cindy Lu
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. This aligns with containerization principles. However, this change has caused confusion for some legacy userspace applications. Therefore, we are reintrod

[PATCH v8 7/8] vhost: Add check for inherit_owner status

2025-03-28 Thread Cindy Lu
The VHOST_NEW_WORKER requires the inherit_owner setting to be true. So we need to add a check for this. Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index ff930c2e5b78..fb0c7fb43f78 1006

[PATCH v8 8/8] vhost: Add a KConfig knob to enable IOCTL VHOST_FORK_FROM_OWNER

2025-03-28 Thread Cindy Lu
Introduce a new config knob `CONFIG_VHOST_ENABLE_FORK_OWNER_IOCTL`, to control the availability of the `VHOST_FORK_FROM_OWNER` ioctl. When CONFIG_VHOST_ENABLE_FORK_OWNER_IOCTL is set to n, the ioctl is disabled, and any attempt to use it will result in failure. Signed-off-by: Cindy Lu --- driver

[PATCH v8 3/8] vhost: Add the cgroup related function

2025-03-28 Thread Cindy Lu
Add back the previously removed cgroup function to support the kthread The biggest change for this part is in vhost_attach_cgroups() and vhost_attach_task_to_cgroups(). The old function was remove in commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads") Signed-off-by: Cindy Lu --- d

[PATCH v8 5/8] vhost: Reintroduce kthread mode support in vhost

2025-03-28 Thread Cindy Lu
This commit restores the previously removed functions kthread wake/stop/create, and use ops structure vhost_worker_ops to manage worker wakeup, stop and creation. The function vhost_worker_create initializes these ops pointers based on the value of inherit_owner The old function was remove in comm

[PATCH v8 6/8] vhost: uapi to control task mode (owner vs kthread)

2025-03-28 Thread Cindy Lu
Add a new UAPI to configure the vhost device to use the kthread mode The userspace application can use IOCTL VHOST_FORK_FROM_OWNER to choose between owner and kthread mode if necessary This setting must be applied before VHOST_SET_OWNER, as the worker will be created in the VHOST_SET_OWNER function

[PATCH v8 2/8] vhost: Reintroduce vhost_worker to support kthread

2025-03-28 Thread Cindy Lu
Add the previously removed function vhost_worker() back to support the kthread and rename it to vhost_run_work_kthread_list. The old function vhost_worker was change to support task in commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads") change to xarray in commit 1cdaafa1b8b4 ("vhost

[PATCH v8 1/8] vhost: Add a new parameter in vhost_dev to allow user select kthread

2025-03-28 Thread Cindy Lu
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 app, Therefore, we are reintroducing kthread API support. Introduce a new parameter to enable users to choose between kthread and task mode

Re: Symbol too long for allsyms warnings on KSYM_NAME_LEN

2025-03-28 Thread Arnd Bergmann
On Thu, Mar 27, 2025, at 14:58, Peter Zijlstra wrote: > On Thu, Mar 27, 2025 at 09:38:46AM +0100, Arnd Bergmann wrote: >> My randconfig builds sometimes (around one in every 700 configs) run >> into this warning on x86: >> >> Symbol >> __pfx_sg1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2

Re: [PATCH 1/4] x86/sgx: Add total number of EPC pages

2025-03-28 Thread Jarkko Sakkinen
On Fri, Mar 28, 2025 at 10:42:18AM +0200, Jarkko Sakkinen wrote: > In your code example you had a loop inside spinlock, which was based on > a return code of an opcode, i.e. potentially infinite loop. > > I'd like to remind you that the hardware I have is NUC7 from 2018 so > you really have to nai

Re: [PATCH net-next v24 00/23] Introducing OpenVPN Data Channel Offload

2025-03-28 Thread Antonio Quartulli
Hi Sabrina, do you plan to drop more comments at the patchset at this point? I have gone through all requested changes and I'll just get the patches ready for submission once net-next is open again. Thanks a lot! Cheers, On 18/03/2025 02:40, Antonio Quartulli wrote: Notable changes since v

RE: [PATCH 4/4] x86/sgx: Implement ENCLS[EUPDATESVN] and opportunistically call it during first EPC page alloc

2025-03-28 Thread Reshetova, Elena
> On Thu, Mar 27, 2025 at 03:42:30PM +, Reshetova, Elena wrote: > > > > > > + case SGX_NO_UPDATE: > > > > > > + pr_debug("EUPDATESVN was successful, but CPUSVN > was not > > > > > updated, " > > > > > > + "because current SVN was not newer than > > > > > CPUSVN.\n

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

2025-03-28 Thread James Clark
On 13/02/2025 6:03 pm, Colton Lewis wrote: For PMUv3, the register MDCR_EL2.HPMN partitiones the PMU counters into two ranges where counters 0..HPMN-1 are accessible by EL1 and, if allowed, EL0 while counters HPMN..N are only accessible by EL2. Introduce a module parameter in KVM to set this

[PATCH net 4/4] selftests: mptcp: ignore mptcp_diag binary

2025-03-28 Thread Matthieu Baerts (NGI0)
A new binary is now generated by the MPTCP selftests: mptcp_diag. Like the other binaries from this directory, there is no need to track this in Git, it should then be ignored. Fixes: 00f5e338cf7e ("selftests: mptcp: Add a tool to get specific msk_info") Reviewed-by: Mat Martineau Signed-off-by:

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

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