[PATCH net v4] selftests: net: no_forwarding: fix VID for $swp2 in one_bridge_two_pvids() test

2024-09-29 Thread Kacper Ludwinski
Currently, the second bridge command overwrites the first one. Fix this by adding this VID to the interface behind $swp2. The one_bridge_two_pvids() test intends to check that there is no leakage of traffic between bridge ports which have a single VLAN - the PVID VLAN. Because of a typo, port $sw

Re: [PATCH v2] selftest: remoteproc: Add basic test for start/stop sequence

2024-09-29 Thread Bjorn Andersson
On Fri, Sep 27, 2024 at 04:51:32PM GMT, Wasim Nazir wrote: > This test includes: > 1) Start/stop test for each rproc instance sequencially > 2) Start/stop test for all rproc instances concurrently > This fails to describe the purpose of the patch. Provide a proper commit mesasge. In part

[PATCH] selftests/bpf: Add __init and __exit to the functions bpf_test_no_cfi_init()/bpf_test_no_cfi_exit()

2024-09-29 Thread Yaxiong Tian
From: Yaxiong Tian To save some running memory,Add __init and __exit to the module load/unload functions. Signed-off-by: Yaxiong Tian --- tools/testing/selftests/bpf/bpf_test_no_cfi/bpf_test_no_cfi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftest

[PATCH v2] selftests/powerpc: Remove the path after initialization.

2024-09-29 Thread zhangjiao2
From: zhang jiao If there were no anamolies noted, then we can simply remove the log file and return. Signed-off-by: zhang jiao --- v1->v2: Remove the path after initialization. tools/testing/selftests/powerpc/mm/tlbie_test.c | 10 +- 1 file changed, 5 insertions(+), 5 deletio

Re: [PATCH 0/1] Add KUnit tests for lib/crc16.c

2024-09-29 Thread Vinicius Peixoto
Hi David, On 9/25/24 08:26, David Laight wrote: From: Vinicius Peixoto Sent: 23 September 2024 00:27 Hi all, This patch was developed during a hackathon organized by LKCAMP [1], with the objective of writing KUnit tests, both to introduce people to the kernel development process and to learn

Re: [PATCH 0/1] Add KUnit tests for lib/crc16.c

2024-09-29 Thread Vinicius Peixoto
Hi David, On 9/26/24 13:21, David Laight wrote: ... The checksums for the randomly-generated test cases were calculated using a reference implementation [1] and this test compares them against the values yielded by the kernel's implementation. I'd just use a naïve implementation - doesn't rea

update core.c

2024-09-29 Thread Okan Tümüklü
1:The control flow was simplified by using else if statements instead of goto structure. 2:Error conditions are handled more clearly. 3:The device_unlock call at the end of the function is guaranteed in all cases. Github request : https://github.com/torvalds/linux/pull/967 // SPDX-License-Identi

Re: [PATCH v2] selftests/damon/access_memory_even: remove unused variables

2024-09-29 Thread SeongJae Park
From: s...@kernel.org On Mon, 23 Sep 2024 21:08:45 -0700 SeongJae Park wrote: > Hi Ba, > > > Thank you for revising this patch following my comment. > > On Tue, 24 Sep 2024 10:14:26 +0800 Ba Jing > wrote: > > > By reading the code, I found these variables are never > > referenced in the code.

Re: [PATCH v2] vhost/vsock: specify module version

2024-09-29 Thread Michael S. Tsirkin
On Sun, Sep 29, 2024 at 08:21:03PM +0200, Alexander Mikhalitsyn wrote: > Add an explicit MODULE_VERSION("0.0.1") specification for the vhost_vsock > module. > > It is useful because it allows userspace to check if vhost_vsock is there > when it is > configured as a built-in. > > This is what we

Re: [PATCH] vhost/vsock: specify module version

2024-09-29 Thread Aleksandr Mikhalitsyn
On Sun, Sep 29, 2024 at 7:48 PM Michael S. Tsirkin wrote: > > On Sun, Sep 29, 2024 at 07:35:35PM +0200, Aleksandr Mikhalitsyn wrote: > > On Sun, Sep 29, 2024 at 6:56 PM Michael S. Tsirkin wrote: > > > > > > On Thu, Sep 26, 2024 at 06:16:40PM +0200, Alexander Mikhalitsyn wrote: > > > > Add an expl

[PATCH v2] vhost/vsock: specify module version

2024-09-29 Thread Alexander Mikhalitsyn
Add an explicit MODULE_VERSION("0.0.1") specification for the vhost_vsock module. It is useful because it allows userspace to check if vhost_vsock is there when it is configured as a built-in. This is what we have *without* this change and when vhost_vsock is configured as a module and loaded:

Re: [PATCH] vhost/vsock: specify module version

2024-09-29 Thread Michael S. Tsirkin
On Sun, Sep 29, 2024 at 07:35:35PM +0200, Aleksandr Mikhalitsyn wrote: > On Sun, Sep 29, 2024 at 6:56 PM Michael S. Tsirkin wrote: > > > > On Thu, Sep 26, 2024 at 06:16:40PM +0200, Alexander Mikhalitsyn wrote: > > > Add an explicit MODULE_VERSION("0.0.1") specification > > > for a vhost_vsock modu

Re: [PATCH] vhost/vsock: specify module version

2024-09-29 Thread Michael S. Tsirkin
On Sun, Sep 29, 2024 at 07:35:35PM +0200, Aleksandr Mikhalitsyn wrote: > On Sun, Sep 29, 2024 at 6:56 PM Michael S. Tsirkin wrote: > > > > On Thu, Sep 26, 2024 at 06:16:40PM +0200, Alexander Mikhalitsyn wrote: > > > Add an explicit MODULE_VERSION("0.0.1") specification > > > for a vhost_vsock modu

Re: [PATCH] vhost/vsock: specify module version

2024-09-29 Thread Aleksandr Mikhalitsyn
On Sun, Sep 29, 2024 at 6:56 PM Michael S. Tsirkin wrote: > > On Thu, Sep 26, 2024 at 06:16:40PM +0200, Alexander Mikhalitsyn wrote: > > Add an explicit MODULE_VERSION("0.0.1") specification > > for a vhost_vsock module. It is useful because it allows > > userspace to check if vhost_vsock is there

Re: [PATCH v1 2/2] Documentation: RCU: Refer to ptr_eq()

2024-09-29 Thread Paul E. McKenney
On Sun, Sep 29, 2024 at 12:09:54PM -0400, Mathieu Desnoyers wrote: > On 2024-09-29 17:51, Paul E. McKenney wrote: > > On Sun, Sep 29, 2024 at 07:16:08AM -0400, Mathieu Desnoyers wrote: > > > Refer to ptr_eq() in the rcu_dereference() documentation. > > > > > > ptr_eq() is a mechanism that preserve

Re: [GIT PULL] Kselftest fixes update for Linux 6.12-rc1

2024-09-29 Thread pr-tracker-bot
The pull request you sent on Sat, 28 Sep 2024 11:52:08 -0600: > git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest > tags/linux_kselftest-next-6.12-rc1-fixes has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/e7ebdb5161bcb98cb27b7490459419e38dee5b9a Than

Re: [PATCH] vhost/vsock: specify module version

2024-09-29 Thread Michael S. Tsirkin
On Thu, Sep 26, 2024 at 06:16:40PM +0200, Alexander Mikhalitsyn wrote: > Add an explicit MODULE_VERSION("0.0.1") specification > for a vhost_vsock module. It is useful because it allows > userspace to check if vhost_vsock is there when it is > configured as a built-in. > > Without this change, the

Re: [PATCH v1 2/2] Documentation: RCU: Refer to ptr_eq()

2024-09-29 Thread Mathieu Desnoyers
On 2024-09-29 17:51, Paul E. McKenney wrote: On Sun, Sep 29, 2024 at 07:16:08AM -0400, Mathieu Desnoyers wrote: Refer to ptr_eq() in the rcu_dereference() documentation. ptr_eq() is a mechanism that preserves address dependencies when comparing pointers, and should be favored when comparing a p

Re: [PATCH v1 2/2] Documentation: RCU: Refer to ptr_eq()

2024-09-29 Thread Paul E. McKenney
On Sun, Sep 29, 2024 at 07:16:08AM -0400, Mathieu Desnoyers wrote: > Refer to ptr_eq() in the rcu_dereference() documentation. > > ptr_eq() is a mechanism that preserves address dependencies when > comparing pointers, and should be favored when comparing a pointer > obtained from rcu_dereference()

Re: [PATCH v1 0/2] Introduce ptr_eq() to preserve address dependency

2024-09-29 Thread Alan Stern
On Sun, Sep 29, 2024 at 07:16:06AM -0400, Mathieu Desnoyers wrote: > Introduce ptr_eq() to compare two addresses while preserving the address > dependencies for later use of the address. It should be used when > comparing an address returned by rcu_dereference(). Both patches are now much better.

Re: [PATCH] livepatch: introduce 'stack_order' sysfs interface to klp_patch

2024-09-29 Thread zhang warden
Hi, Miroslav! > On Sep 27, 2024, at 22:11, Miroslav Benes wrote: > > > How do you prepare your patches? > > "---" delimiter is missing here. I seem to found out what cause this problem. I seemed to use 'git format-patch' with '-p' option which will make my patch have no diff state. Sorry f

[PATCH V3 1/1] livepatch: Add "stack_order" sysfs attribute

2024-09-29 Thread Wardenjohn
Add "stack_order" sysfs attribute which holds the order in which a live patch module was loaded into the system. A user can then determine an active live patched version of a function. cat /sys/kernel/livepatch/livepatch_1/stack_order -> 1 means that livepatch_1 is the first live patch applied c

[PATCH V3 0/1] livepatch: Add "stack_order" sysfs attribute

2024-09-29 Thread Wardenjohn
As previous discussion, maintainers think that patch-level sysfs interface is the only acceptable way to maintain the information of the order that klp_patch is applied to the system. However, the previous patch introduce klp_ops into klp_func is a optimization methods of the patch introducing

[PATCH v1 2/2] Documentation: RCU: Refer to ptr_eq()

2024-09-29 Thread Mathieu Desnoyers
Refer to ptr_eq() in the rcu_dereference() documentation. ptr_eq() is a mechanism that preserves address dependencies when comparing pointers, and should be favored when comparing a pointer obtained from rcu_dereference() against another pointer. Signed-off-by: Mathieu Desnoyers Cc: Greg Kroah-H

[PATCH v1 1/2] compiler.h: Introduce ptr_eq() to preserve address dependency

2024-09-29 Thread Mathieu Desnoyers
Compiler CSE and SSA GVN optimizations can cause the address dependency of addresses returned by rcu_dereference to be lost when comparing those pointers with either constants or previously loaded pointers. Introduce ptr_eq() to compare two addresses while preserving the address dependencies for l

[PATCH v1 0/2] Introduce ptr_eq() to preserve address dependency

2024-09-29 Thread Mathieu Desnoyers
Introduce ptr_eq() to compare two addresses while preserving the address dependencies for later use of the address. It should be used when comparing an address returned by rcu_dereference(). Thanks, Mathieu Cc: Greg Kroah-Hartman Cc: Sebastian Andrzej Siewior Cc: "Paul E. McKenney" Cc: Will D

[PATCH] x86/sgx: Use vmalloc_array() instead of vmalloc()

2024-09-29 Thread Thorsten Blum
Use vmalloc_array() instead of vmalloc() to calculate the number of bytes to allocate. Signed-off-by: Thorsten Blum --- arch/x86/kernel/cpu/sgx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c index 9ace844

Re: [PATCH 1/2] compiler.h: Introduce ptr_eq() to preserve address dependency

2024-09-29 Thread Mathieu Desnoyers
On 2024-09-29 01:24, Gary Guo wrote: Cc: Nikita Popov Cc: l...@lists.linux.dev On Sat, 28 Sep 2024 09:51:27 -0400 Mathieu Desnoyers wrote: Compiler CSE and SSA GVN optimizations can cause the address dependency of addresses returned by rcu_dereference to be lost when comparing those pointers

[PATCH v2 -next] selftests/bpf: Use ARRAY_SIZE for array length

2024-09-29 Thread Jiapeng Chong
Use of macro ARRAY_SIZE to calculate array size minimizes the redundant code and improves code reusability. ./tools/testing/selftests/bpf/prog_tests/core_reloc_raw.c:98:34-35: WARNING: Use ARRAY_SIZE. ./tools/testing/selftests/bpf/prog_tests/core_reloc_raw.c:93:29-30: WARNING: Use ARRAY_SIZE. ./

[PATCH] selftest: hid: add missing run-hid-tools-tests.sh

2024-09-29 Thread Yun Lu
The HID test cases actually run tests using the run-hid-tools-tests.sh script. However, if installed with "make install", the run-hid-tools-tests.sh script will not be copied over, resulting in the following error message. make -C tools/testing/selftests/ TARGETS=hid install \ INSTALL_

Re: [PATCH v2 00/19] iommufd: Add VIOMMU infrastructure (Part-1)

2024-09-29 Thread Yi Liu
On 2024/9/27 20:20, Jason Gunthorpe wrote: On Fri, Sep 27, 2024 at 08:12:20PM +0800, Yi Liu wrote: Perhaps calling it a slice sounds more accurate, as I guess all the confusion comes from the name "vIOMMU" that might be thought to be a user space object/instance that likely holds all virtual stu

Re: [PATCH v2 00/19] iommufd: Add VIOMMU infrastructure (Part-1)

2024-09-29 Thread Yi Liu
On 2024/9/28 04:44, Nicolin Chen wrote: On Fri, Sep 27, 2024 at 08:12:20PM +0800, Yi Liu wrote: On 2024/9/27 14:32, Nicolin Chen wrote: On Fri, Sep 27, 2024 at 01:54:45PM +0800, Yi Liu wrote: Baolu told me that Intel may have the same: different domain IDs on different IOMMUs; multiple IOMMU i