Re: [net PATCH 1/2] selftests: net: lib: fix broken ping with coreutils ping util

2024-12-03 Thread Vladimir Oltean
On Mon, Dec 02, 2024 at 10:29:31PM +0100, Christian Marangi wrote: > > Also I just notice msend suffer the very same problem... > > > > root@OpenWrt:~# ip vrf exec vlan1 msend -g ff2e::0102:0304 -I lan1 -c 1 > > Now sending to multicast group: [ff2e::0102:0304]: > > sendto: Address family not

Re: [PATCH v6 11/18] gendwarfksyms: Add symtypes output

2024-12-03 Thread Petr Pavlu
On 11/21/24 21:42, Sami Tolvanen wrote: > Add support for producing genksyms-style symtypes files. Process > die_map to find the longest expansions for each type, and use symtypes > references in type definitions. The basic file format is similar to > genksyms, with two notable exceptions: > > 1

Re: [PATCH v6 12/18] gendwarfksyms: Add symbol versioning

2024-12-03 Thread Petr Pavlu
On 11/21/24 21:42, Sami Tolvanen wrote: > Calculate symbol versions from the fully expanded type strings in > type_map, and output the versions in a genksyms-compatible format. > > Signed-off-by: Sami Tolvanen Reviewed-by: Petr Pavlu -- Thanks, Petr

Re: [PATCH v2 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2024-12-03 Thread Björn Töpel
Celeste Liu writes: > From: Charlie Jenkins > > This test checks that orig_a0 allows a syscall argument to be modified, > and that changing a0 does not change the syscall argument. > > Cc: sta...@vger.kernel.org > Co-developed-by: Quan Zhou > Signed-off-by: Quan Zhou > Co-developed-by: Celeste

Re: [PATCH v2 1/2] riscv/ptrace: add new regset to access original a0 register

2024-12-03 Thread Björn Töpel
Celeste Liu writes: > The orig_a0 is missing in struct user_regs_struct of riscv, and there is > no way to add it without breaking UAPI. (See Link tag below) > > Like NT_ARM_SYSTEM_CALL do, we add a new regset name NT_RISCV_ORIG_A0 to > access original a0 register from userspace via ptrace API. >

Re: [PATCH] dt-bindings: power: rpmpd: Fix comment for SM6375

2024-12-03 Thread Marijn Suijten
On 2024-12-03 08:52:59, Luca Weiss wrote: > On Mon Dec 2, 2024 at 9:00 PM CET, Dmitry Baryshkov wrote: > > On Mon, Dec 02, 2024 at 04:45:02PM +0100, Luca Weiss wrote: > > > During an earlier commit, the comment from SM6350 was copied without > > > modifying. Adjust the comment to reflect the define

Re: [PATCH] dt-bindings: power: rpmpd: Fix comment for SM6375

2024-12-03 Thread Marijn Suijten
On 2024-12-03 13:58:51, Marijn Suijten wrote: > On 2024-12-03 08:52:59, Luca Weiss wrote: > > On Mon Dec 2, 2024 at 9:00 PM CET, Dmitry Baryshkov wrote: > > > On Mon, Dec 02, 2024 at 04:45:02PM +0100, Luca Weiss wrote: > > > > During an earlier commit, the comment from SM6350 was copied without > >

[RESEND v3 1/1] selftests/futex: Create test for robust list

2024-12-03 Thread André Almeida
Create a test for the robust list mechanism. Test the following uAPI operations: - Creating a robust mutex where the lock waiter is wake by the kernel when the lock owner died - Setting a robust list to the current task - Getting a robust list from the current task - Getting a robust list from a

Re: [PATCH net-next v12 07/22] ovpn: implement basic TX path (UDP)

2024-12-03 Thread Antonio Quartulli
On 02/12/2024 16:07, Antonio Quartulli wrote: [...] +/** + * ovpn_udp_output - transmit skb using udp-tunnel + * @peer: the destination peer + * @cache: dst cache + * @sk: the socket to send the packet over + * @skb: the packet to send + * + * rcu_read_lock should be held on entry. + * On return,

Re: [PATCH 2/2] sched: Move task_mm_cid_work to RCU callback

2024-12-03 Thread Joel Fernandes
On Mon, Dec 2, 2024 at 9:34 AM Mathieu Desnoyers wrote: > > += CC RCU maintainers, reviewers and list. > += RSEQ maintainers. > > On 2024-12-02 09:07, Gabriele Monaco wrote: > > Currently, the task_mm_cid_work function is called in a task work > > triggered by a scheduler tick. This can delay the

[PATCH net v8 1/3] vsock/test: fix failures due to wrong SO_RCVLOWAT parameter

2024-12-03 Thread Konstantin Shkolnyy
This happens on 64-bit big-endian machines. SO_RCVLOWAT requires an int parameter. However, instead of int, the test uses unsigned long in one place and size_t in another. Both are 8 bytes long on 64-bit machines. The kernel, having received the 8 bytes, doesn't test for the exact size of the param

[PATCH net v8 2/3] vsock/test: fix parameter types in SO_VM_SOCKETS_* calls

2024-12-03 Thread Konstantin Shkolnyy
Change parameters of SO_VM_SOCKETS_* to unsigned long long as documented in the vm_sockets.h, because the corresponding kernel code requires them to be at least 64-bit, no matter what architecture. Otherwise they are too small on 32-bit machines. Fixes: 5c338112e48a ("test/vsock: rework message bo

Re: [PATCH net-next v12 13/22] ovpn: implement peer lookup logic

2024-12-03 Thread Antonio Quartulli
On 02/12/2024 16:07, Antonio Quartulli wrote: [...] +#define ovpn_get_hash_slot(_key, _key_len, _tbl) ({\ + typeof(_tbl) *__tbl = &(_tbl); \ + jhash(_key, _key_len, 0) % HASH_SIZE(*__tbl); \ +}) + +#define ovpn_get_hash_head(_tbl, _key, _key_len) ({

Re: [PATCH net-next v12 09/22] ovpn: implement packet processing

2024-12-03 Thread Antonio Quartulli
On 03/12/2024 15:58, Paolo Abeni wrote: On 12/2/24 16:07, Antonio Quartulli wrote: @@ -286,6 +292,31 @@ struct ovpn_peer *ovpn_peer_get_by_dst(struct ovpn_priv *ovpn, return peer; } +/** + * ovpn_peer_check_by_src - check that skb source is routed via peer + * @ovpn: the openvpn i

Re: [PATCH net-next v12 11/22] ovpn: implement TCP transport

2024-12-03 Thread Paolo Abeni
On 12/2/24 16:07, Antonio Quartulli wrote: > +void ovpn_tcp_socket_detach(struct socket *sock) > +{ > + struct ovpn_socket *ovpn_sock; > + struct ovpn_peer *peer; > + > + if (!sock) > + return; > + > + rcu_read_lock(); > + ovpn_sock = rcu_dereference_sk_user_data(soc

[PATCH net v8 0/3] vsock/test: fix wrong setsockopt() parameters

2024-12-03 Thread Konstantin Shkolnyy
Parameters were created using wrong C types, which caused them to be of wrong size on some architectures, causing problems. The problem with SO_RCVLOWAT was found on s390 (big endian), while x86-64 didn't show it. After the fix, all tests pass on s390. Then Stefano Garzarella pointed out that SO_V

Re: [PATCH] selftests/net: call sendmmsg via udpgso_bench.sh

2024-12-03 Thread Willem de Bruijn
Kenjiro Nakayama wrote: > Currently, sendmmsg is implemented in udpgso_bench_tx.c, > but it is not called by any test script. > > This patch adds a test for sendmmsg in udpgso_bench.sh. > This allows for basic API testing and benchmarking > comparisons with GSO. The change looks fine to me, but t

Re: [RFC PATCH v2 1/2] KVM: guest_memfd: add generic population via write

2024-12-03 Thread Mike Day
On 11/29/24 06:39, Nikita Kalyazin wrote: +#if defined(CONFIG_KVM_GENERIC_PRIVATE_MEM) && !defined(CONFIG_KVM_AMD_SEV) Another option is to use the confidential computing (coco) attributes to keep the write operation limited to clear-text guests (diff against patch 1/2): There are a couple of

Re: [PATCH net-next v12 08/22] ovpn: implement basic RX path (UDP)

2024-12-03 Thread Antonio Quartulli
On 03/12/2024 15:34, Paolo Abeni wrote: [...] +static void ovpn_netdev_write(struct ovpn_peer *peer, struct sk_buff *skb) +{ + unsigned int pkt_len; + int ret; + + /* we can't guarantee the packet wasn't corrupted before entering the +* VPN, therefore we give other layer

Re: [PATCH] dt-bindings: power: rpmpd: Fix comment for SM6375

2024-12-03 Thread Luca Weiss
On Mon Dec 2, 2024 at 9:00 PM CET, Dmitry Baryshkov wrote: > On Mon, Dec 02, 2024 at 04:45:02PM +0100, Luca Weiss wrote: > > During an earlier commit, the comment from SM6350 was copied without > > modifying. Adjust the comment to reflect the defines. > > > > Signed-off-by: Luca Weiss > > Fixes t

Re: [PATCH v6 02/18] gendwarfksyms: Add address matching

2024-12-03 Thread Petr Pavlu
On 11/21/24 21:42, Sami Tolvanen wrote: > The compiler may choose not to emit type information in DWARF for all > aliases, but it's possible for each alias to be exported separately. > To ensure we find type information for the aliases as well, read > {section, address} tuples from the symbol table

[PATCH v2 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2024-12-03 Thread Celeste Liu
From: Charlie Jenkins This test checks that orig_a0 allows a syscall argument to be modified, and that changing a0 does not change the syscall argument. Cc: sta...@vger.kernel.org Co-developed-by: Quan Zhou Signed-off-by: Quan Zhou Co-developed-by: Celeste Liu Signed-off-by: Celeste Liu Sign

[PATCH v2 0/2] riscv/ptrace: add new regset to access original a0 register

2024-12-03 Thread Celeste Liu
The orig_a0 is missing in struct user_regs_struct of riscv, and there is no way to add it without breaking UAPI. (See Link tag below) Like NT_ARM_SYSTEM_CALL do, we add a new regset name NT_RISCV_ORIG_A0 to access original a0 register from userspace via ptrace API. Link: https://lore.kernel.org/

Re: [RFC PATCH 1/2] x86, lib, xenpv: Add WBNOINVD helper functions

2024-12-03 Thread Xin Li
On 12/2/2024 10:47 PM, Juergen Gross wrote: P.S.: As the paravirt maintainer I would have preferred to be Cc-ed in the   initial patch mail. Looks that Kevin didn't run './scripts/get_maintainer.pl'? Thanks! Xin

[PATCH v1 1/2] iommufd/fault: Fix out_fput in iommufd_fault_alloc()

2024-12-03 Thread Nicolin Chen
As fput() calls the file->f_op->release op, where fault obj and ictx are getting released, there is no need to release these two after fput() one more time, which would result in imbalanced refcounts: refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 48 PID: 2369 at lib/refcount.c:31

[PATCH v1 0/2] iommufd: Fix a small bug in fault.c

2024-12-03 Thread Nicolin Chen
There are a few patches in vIRQ series that rework the fault.c file. So, we should fix this before that bigger series touches the same code. And add missing coverage for IOMMU_FAULT_QUEUE_ALLOC in iommufd_fail_nth. Thanks! Nicolin Nicolin Chen (2): iommufd/fault: Fix out_fput in iommufd_fault_

Re: [PATCH v1 1/2] iommufd/fault: Fix out_fput in iommufd_fault_alloc()

2024-12-03 Thread Yi Liu
On 2024/12/3 16:02, Nicolin Chen wrote: As fput() calls the file->f_op->release op, where fault obj and ictx are getting released, there is no need to release these two after fput() one more time, which would result in imbalanced refcounts: refcount_t: decrement hit 0; leaking memory. WARNI

Re: [PATCH v6] acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl

2024-12-03 Thread Suraj Sonawane
On 12/2/24 21:56, Ira Weiny wrote: Suraj Sonawane wrote: On 11/18/24 21:56, Suraj Sonawane wrote: [snip] drivers/acpi/nfit/core.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 5429ec9ef..a5d47819b 100

[PATCH v2 1/2] riscv/ptrace: add new regset to access original a0 register

2024-12-03 Thread Celeste Liu
The orig_a0 is missing in struct user_regs_struct of riscv, and there is no way to add it without breaking UAPI. (See Link tag below) Like NT_ARM_SYSTEM_CALL do, we add a new regset name NT_RISCV_ORIG_A0 to access original a0 register from userspace via ptrace API. Link: https://lore.kernel.org/

Re: [PATCH v2 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2024-12-03 Thread Andrew Jones
On Tue, Dec 03, 2024 at 05:30:05PM +0800, Celeste Liu wrote: > From: Charlie Jenkins > > This test checks that orig_a0 allows a syscall argument to be modified, > and that changing a0 does not change the syscall argument. > > Cc: sta...@vger.kernel.org > Co-developed-by: Quan Zhou > Signed-off-

Re: [PATCH] dt-bindings: power: rpmpd: Fix comment for SM6375

2024-12-03 Thread Dmitry Baryshkov
On Tue, Dec 03, 2024 at 08:52:59AM +0100, Luca Weiss wrote: > On Mon Dec 2, 2024 at 9:00 PM CET, Dmitry Baryshkov wrote: > > On Mon, Dec 02, 2024 at 04:45:02PM +0100, Luca Weiss wrote: > > > During an earlier commit, the comment from SM6350 was copied without > > > modifying. Adjust the comment to

[PATCH v1 2/2] iommufd/selftest: Cover IOMMU_FAULT_QUEUE_ALLOC in iommufd_fail_nth

2024-12-03 Thread Nicolin Chen
This was missing in the series introducing the fault object. Thus, add it. Signed-off-by: Nicolin Chen --- tools/testing/selftests/iommu/iommufd_fail_nth.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/testing/selftests/iommu/iommufd_fail_nth.c b/tools/testing/selfte

Re: [PATCH net-next v12 13/22] ovpn: implement peer lookup logic

2024-12-03 Thread Sabrina Dubroca
2024-12-03, 15:58:17 +0100, Antonio Quartulli wrote: > On 02/12/2024 16:07, Antonio Quartulli wrote: > [...] > > +#define ovpn_get_hash_slot(_key, _key_len, _tbl) ({\ > > + typeof(_tbl) *__tbl = &(_tbl); \ > > + jhash(_key, _key_len, 0) % HASH_SIZE(*__tbl); \ > > +})

Re: [PATCH net-next v12 09/22] ovpn: implement packet processing

2024-12-03 Thread Paolo Abeni
On 12/2/24 16:07, Antonio Quartulli wrote: > @@ -286,6 +292,31 @@ struct ovpn_peer *ovpn_peer_get_by_dst(struct ovpn_priv > *ovpn, > return peer; > } > > +/** > + * ovpn_peer_check_by_src - check that skb source is routed via peer > + * @ovpn: the openvpn instance to search > + * @skb: th

Re: [PATCH v1 0/2] iommufd: Fix a small bug in fault.c

2024-12-03 Thread Jason Gunthorpe
On Tue, Dec 03, 2024 at 12:02:53AM -0800, Nicolin Chen wrote: > There are a few patches in vIRQ series that rework the fault.c file. So, > we should fix this before that bigger series touches the same code. > > And add missing coverage for IOMMU_FAULT_QUEUE_ALLOC in iommufd_fail_nth. > > Thanks!

Re: [PATCH] rpmsg_ns: Work around TI non-standard message

2024-12-03 Thread Richard Weinberger
Andrew, Am Dienstag, 3. Dezember 2024, 16:19:31 CET schrieb Andrew Davis: > On 10/15/24 1:00 PM, Richard Weinberger wrote: > > Am Dienstag, 15. Oktober 2024, 19:56:08 CEST schrieb Mathieu Poirier: > In my opinion the real fix here is to get TI to use the standard message > announcement s

Re: [PATCH] rpmsg_ns: Work around TI non-standard message

2024-12-03 Thread Andrew Davis
On 10/15/24 1:00 PM, Richard Weinberger wrote: Am Dienstag, 15. Oktober 2024, 19:56:08 CEST schrieb Mathieu Poirier: In my opinion the real fix here is to get TI to use the standard message announcement structure. The ->desc field doesn't seem to be that useful since it gets discarted. This i

Re: [PATCH net-next] selftests: net: cleanup busy_poller.c

2024-12-03 Thread Joe Damato
On Mon, Dec 02, 2024 at 09:14:58PM -0800, Stanislav Fomichev wrote: > On 12/03, Joe Damato wrote: > > Fix various integer type conversions by using strtoull and a temporary > > variable which is bounds checked before being casted into the > > appropriate cfg_* variable for use by the test program.

Re: [PATCH net-next] selftests: net: cleanup busy_poller.c

2024-12-03 Thread Joe Damato
On Tue, Dec 03, 2024 at 08:26:11AM -0800, Joe Damato wrote: > On Mon, Dec 02, 2024 at 09:14:58PM -0800, Stanislav Fomichev wrote: > > On 12/03, Joe Damato wrote: > > > Fix various integer type conversions by using strtoull and a temporary > > > variable which is bounds checked before being casted i

Re: [PATCH] rpmsg: char: Export alias for RPMSG ID rpmsg-raw from table

2024-12-03 Thread Andrew Davis
On 8/11/24 4:59 PM, Mathieu Poirier wrote: Hi Andrew, On Mon, Jul 29, 2024 at 11:45:27AM -0500, Andrew Davis wrote: Module aliases are used by userspace to identify the correct module to load for a detected hardware. The currently supported RPMSG device IDs for this module include "rpmsg-raw",

Re: [PATCH v15 2/8] remoteproc: Add TEE support

2024-12-03 Thread Mathieu Poirier
Good morning, On Thu, Nov 28, 2024 at 09:42:09AM +0100, 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 secure part this driver offers a client > interface to load a

Re: [PATCH v2 2/2] kunit: enable hardware acceleration when available

2024-12-03 Thread Tamir Duberstein
On Tue, Nov 5, 2024 at 2:51 PM Tamir Duberstein wrote: > > This behavior is at least somewhat intentional[0]. I have filed a bug > with qemu[1]. If someone can conceive of a way to achieve this, I'd be > delighted to send a v3. > > [cut] > > Link: https://gitlab.com/qemu-project/qemu/-/issues/2656

Re: [PATCH bpf-next] tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind

2024-12-03 Thread Marco Leogrande
On Mon, Dec 2, 2024 at 4:15 PM Stanislav Fomichev wrote: > Do you see this failing in your CI or in the BPF CI? I see this failing in our internal CI, in around 1% to 2% of the CI runs. > It seems ok > to add wait_for_port here, but the likelihood of the issue seems > minuscule. There is a bunch

Re: [PATCH net-next v12 08/22] ovpn: implement basic RX path (UDP)

2024-12-03 Thread Paolo Abeni
On 12/2/24 16:07, Antonio Quartulli wrote: > diff --git a/drivers/net/ovpn/io.c b/drivers/net/ovpn/io.c > index > 2a3dbc723813a14070159318097755cc7ea3f216..1bbbaae8639477b67626731c3bd14810a65dfdcd > 100644 > --- a/drivers/net/ovpn/io.c > +++ b/drivers/net/ovpn/io.c > @@ -9,15 +9,78 @@ > > #inc

[PATCH net v8 3/3] vsock/test: verify socket options after setting them

2024-12-03 Thread Konstantin Shkolnyy
Replace setsockopt() calls with calls to functions that follow setsockopt() with getsockopt() and check that the returned value and its size are the same as have been set. (Except in vsock_perf.) Signed-off-by: Konstantin Shkolnyy Reviewed-by: Stefano Garzarella --- tools/testing/vsock/control.

Re: [PATCH] selftests: acct: Add ksft_exit_fail if not running as root

2024-12-03 Thread Shuah Khan
On 11/15/24 12:17, Shivam Chaudhary wrote: If the selftest is not running as root, it should fail and give an appropriate warning to the user. This patch adds ksft_exit_fail_msg() if the test is not running as root. This change introduces a problem - skip is the right exit code when a test requ

Re: [PATCH -v2 1/7] module: Convert symbol namespace to string literal

2024-12-03 Thread Mark Brown
On Tue, Dec 03, 2024 at 07:20:05PM +, Mark Brown wrote: > On Mon, Dec 02, 2024 at 11:33:58AM -0800, Linus Torvalds wrote: > > If we have these kinds of big scripted things, right after the merge > > window tends to be the best time to do them. The conflict potential of > > leaving it hanging i

[PATCH RFT v13 8/8] selftests/clone3: Test shadow stack support

2024-12-03 Thread Mark Brown
Add basic test coverage for specifying the shadow stack for a newly created thread via clone3(), including coverage of the newly extended argument structure. We check that a user specified shadow stack can be provided, and that invalid combinations of parameters are rejected. In order to facilita

Re: [PATCH v5 1/2] selftests: tmpfs: Add Test-fail if not run as root

2024-12-03 Thread Shuah Khan
On 11/12/24 07:30, Shivam Chaudhary wrote: Add 'ksft_exit_fail_msg()', if not run as root, with an appropriate Warning. This should be a skip - not a fail. Add 'ksft_print_header()' and 'ksft_set_plan()' to structure test outputs more effectively. Test logs: Before Change: - Without root

Re: [PATCH v5 0/2] kselftest: tmpfs: Add ksft macros and skip if no root

2024-12-03 Thread Shuah Khan
On 11/12/24 07:30, Shivam Chaudhary wrote: This version 5 patch series replace direct error handling methods with ksft macros, which provide better reporting.Currently, when the tmpfs test runs, it does not display any output if it passes,and if it fails (particularly when not run as root),it sim

Re: [PATCH v5 2/2] selftests: tmpfs: Add kselftest support to tmpfs

2024-12-03 Thread Shuah Khan
On 11/12/24 07:30, Shivam Chaudhary wrote: Replace direct error handling with 'ksft_test_result_*', 'ksft_exit_fail_msg' macros for better reporting. Don't fail the test - skip is the right exit code in this case. Test logs: Before change: - Without root error: unshare, errno 1 - With ro

Re: [PATCH -v2 1/7] module: Convert symbol namespace to string literal

2024-12-03 Thread Masahiro Yamada
On Wed, Dec 4, 2024 at 7:06 AM Mark Brown wrote: > > On Tue, Dec 03, 2024 at 07:20:05PM +, Mark Brown wrote: > > On Mon, Dec 02, 2024 at 11:33:58AM -0800, Linus Torvalds wrote: > > > > If we have these kinds of big scripted things, right after the merge > > > window tends to be the best time t

Re: [PATCH for-next v3] selftests/zram: gitignore output file

2024-12-03 Thread Shuah Khan
On 11/22/24 00:49, Li Zhijian wrote: After `make run_tests`, the git status complains: Untracked files: (use "git add ..." to include in what will be committed) zram/err.log This file will be cleaned up when execute 'make clean' Cc: Shuah Khan Signed-off-by: Li Zhijian --- Hello

Re: [PATCH net-next v2 4/5] virtio_ring: add 'flushed' as an argument to virtqueue_reset()

2024-12-03 Thread Jason Wang
On Tue, Dec 3, 2024 at 3:31 PM Koichiro Den wrote: > > When virtqueue_reset() has actually recycled all unused buffers, > additional work may be required in some cases. Relying solely on its > return status is fragile, so introduce a new argument 'flushed' to > explicitly indicate whether it has r

Re: [PATCH net-next v2 1/5] virtio_net: correct netdev_tx_reset_queue() invocation point

2024-12-03 Thread Jason Wang
On Tue, Dec 3, 2024 at 3:31 PM Koichiro Den wrote: > > When virtnet_close is followed by virtnet_open, some TX completions can > possibly remain unconsumed, until they are finally processed during the > first NAPI poll after the netdev_tx_reset_queue(), resulting in a crash > [1]. Commit b96ed2c97

Re: [PATCH net-next v2 2/5] virtio_ring: add 'flushed' as an argument to virtqueue_resize()

2024-12-03 Thread Jason Wang
On Tue, Dec 3, 2024 at 3:31 PM Koichiro Den wrote: > > When virtqueue_resize() has actually recycled all unused buffers, > additional work may be required in some cases. Relying solely on its > return status is fragile, so introduce a new argument 'flushed' to > explicitly indicate whether it has

Re: [PATCH net-next v2 3/5] virtio_net: add missing netdev_tx_reset_queue() to virtnet_tx_resize()

2024-12-03 Thread Jason Wang
On Tue, Dec 3, 2024 at 3:32 PM Koichiro Den wrote: > > virtnet_tx_resize() flushes remaining tx skbs, so DQL counters need to > be reset. > > Fixes: c8bd1f7f3e61 ("virtio_net: add support for Byte Queue Limits") > Cc: # v6.11+ > Signed-off-by: Koichiro Den > --- Acked-by: Jason Wang Thanks

Re: [PATCH v2] vdpa/vp_vdpa: implement kick_vq_with_data callback

2024-12-03 Thread Jason Wang
On Tue, Dec 3, 2024 at 10:37 AM Yuxue Liu yuxue@jaguarmicro.com wrote: > > From: Yuxue Liu > > Implement the kick_vq_with_data vDPA callback. > On kick, we pass the next available data to the hardware by writing it in > the kick offset. > > Signed-off-by: Yuxue Liu > --- > v2: fix build erro

[PATCH net-next v2] selftests/net: call sendmmsg via udpgso_bench.sh

2024-12-03 Thread Kenjiro Nakayama
Currently, sendmmsg is implemented in udpgso_bench_tx.c, but it is not called by any test script. This patch adds a test for sendmmsg in udpgso_bench.sh. This allows for basic API testing and benchmarking comparisons with GSO. Signed-off-by: Kenjiro Nakayama --- tools/testing/selftests/net/udpg

Re: [PATCH v6 1/2] selftests/resctrl: Adjust effective L3 cache size with SNC enabled

2024-12-03 Thread Reinette Chatre
Hi Maciej, On 12/2/24 3:08 AM, Maciej Wieczor-Retman wrote: > diff --git a/tools/testing/selftests/resctrl/resctrlfs.c > b/tools/testing/selftests/resctrl/resctrlfs.c > index d38d6dd90be4..50561993d37c 100644 > --- a/tools/testing/selftests/resctrl/resctrlfs.c > +++ b/tools/testing/selftests/res

Re: [PATCH v6 2/2] selftests/resctrl: Discover SNC kernel support and adjust messages

2024-12-03 Thread Reinette Chatre
Hi Maciej, On 12/2/24 3:08 AM, Maciej Wieczor-Retman wrote: > diff --git a/tools/testing/selftests/resctrl/resctrlfs.c > b/tools/testing/selftests/resctrl/resctrlfs.c > index 50561993d37c..d0a5c0f78397 100644 > --- a/tools/testing/selftests/resctrl/resctrlfs.c > +++ b/tools/testing/selftests/res

Re: [RFC PATCH 1/2] x86, lib, xenpv: Add WBNOINVD helper functions

2024-12-03 Thread Kevin Loughlin
On Tue, Dec 3, 2024 at 12:11 AM Xin Li wrote: > > On 12/2/2024 10:47 PM, Juergen Gross wrote: > > P.S.: As the paravirt maintainer I would have preferred to be Cc-ed in the > >initial patch mail. > > Looks that Kevin didn't run './scripts/get_maintainer.pl'? Woops, my bad. I somehow ended

Re: [PATCH] selftests: lsm: Refactor `flags_overset_lsm_set_self_attr` test

2024-12-03 Thread Paul Moore
On Tue, Dec 3, 2024 at 7:00 PM Shuah Khan wrote: > > kselftest patches usually go through subsystem trees because of the > merge problems you mentioned. I take them through kselftest tree > if subsystem maintainers want me to. Some do and I pick them up. > > I pick up patches if I don't see respon

Re: [PATCH -v2 1/7] module: Convert symbol namespace to string literal

2024-12-03 Thread Mark Brown
On Mon, Dec 02, 2024 at 11:33:58AM -0800, Linus Torvalds wrote: > On Mon, 2 Dec 2024 at 07:15, Peter Zijlstra wrote: > > > > Perhaps we can ask Linus to run this now, before -next fills up again ? > > Sure. I did an unasked-for scripted 'remove_new' removal right after > rc1 for the same reason.

[PATCH net-next v3 5/7] virtio_net: ensure netdev_tx_reset_queue is called on tx ring resize

2024-12-03 Thread Koichiro Den
virtnet_tx_resize() flushes remaining tx skbs, requiring DQL counters to be reset when flushing has actually occurred. Add virtnet_sq_free_unused_buf_done() as a callback for virtqueue_reset() to handle this. Fixes: c8bd1f7f3e61 ("virtio_net: add support for Byte Queue Limits") Cc: # v6.11+ Signe

[PATCH net-next v3 7/7] virtio_net: ensure netdev_tx_reset_queue is called on bind xsk for tx

2024-12-03 Thread Koichiro Den
virtnet_sq_bind_xsk_pool() flushes tx skbs and then resets tx queue, so DQL counters need to be reset when flushing has actually occurred, Add virtnet_sq_free_unused_buf_done() as a callback for virtqueue_resize() to handle this. Fixes: 21a4e3ce6dc7 ("virtio_net: xsk: bind/unbind xsk for tx") Sign

Re: [PATCH net-next v2 4/5] virtio_ring: add 'flushed' as an argument to virtqueue_reset()

2024-12-03 Thread Koichiro Den
On Wed, Dec 04, 2024 at 10:49:02AM +0800, Jason Wang wrote: > On Tue, Dec 3, 2024 at 3:31 PM Koichiro Den > wrote: > > > > When virtqueue_reset() has actually recycled all unused buffers, > > additional work may be required in some cases. Relying solely on its > > return status is fragile, so int

[PATCH net-next v3 1/7] virtio_net: correct netdev_tx_reset_queue() invocation point

2024-12-03 Thread Koichiro Den
When virtnet_close is followed by virtnet_open, some TX completions can possibly remain unconsumed, until they are finally processed during the first NAPI poll after the netdev_tx_reset_queue(), resulting in a crash [1]. Commit b96ed2c97c79 ("virtio_net: move netdev_tx_reset_queue() call before RX

[PATCH net-next v3 0/7] virtio_net: correct netdev_tx_reset_queue() invocation points

2024-12-03 Thread Koichiro Den
When virtnet_close is followed by virtnet_open, some TX completions can possibly remain unconsumed, until they are finally processed during the first NAPI poll after the netdev_tx_reset_queue(), resulting in a crash [1]. Commit b96ed2c97c79 ("virtio_net: move netdev_tx_reset_queue() call before RX

[PATCH net-next v3 2/7] virtio_net: replace vq2rxq with vq2txq where appropriate

2024-12-03 Thread Koichiro Den
While not harmful, using vq2rxq where it's always sq appears odd. Replace it with the more appropriate vq2txq for clarity and correctness. Fixes: 89f86675cb03 ("virtio_net: xsk: tx: support xmit xsk buffer") Signed-off-by: Koichiro Den --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 inser

[PATCH net-next v3 4/7] virtio_ring: add a func argument 'recycle_done' to virtqueue_resize()

2024-12-03 Thread Koichiro Den
When virtqueue_resize() has actually recycled all unused buffers, additional work may be required in some cases. Relying solely on its return status is fragile, so introduce a new function argument 'recycle_done', which is invoked when the recycle really occurs. Cc: # v6.11+ Signed-off-by: Koichi

[PATCH net-next v3 6/7] virtio_ring: add a func argument 'recycle_done' to virtqueue_reset()

2024-12-03 Thread Koichiro Den
When virtqueue_reset() has actually recycled all unused buffers, additional work may be required in some cases. Relying solely on its return status is fragile, so introduce a new function argument 'recycle_done', which is invoked when it really occurs. Signed-off-by: Koichiro Den --- drivers/net

[PATCH net-next v3 3/7] virtio_net: introduce virtnet_sq_free_unused_buf_done()

2024-12-03 Thread Koichiro Den
This will be used in the following commits, to ensure DQL reset occurs iff. all unused buffers are actually recycled. Cc: # v6.11+ Signed-off-by: Koichiro Den --- drivers/net/virtio_net.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_

Re: [PATCH net-next v12 17/22] ovpn: implement peer add/get/dump/delete via netlink

2024-12-03 Thread Paolo Abeni
On 12/2/24 16:07, Antonio Quartulli wrote: > +/** > + * ovpn_nl_peer_modify - modify the peer attributes according to the > incoming msg > + * @peer: the peer to modify > + * @info: generic netlink info from the user request > + * @attrs: the attributes from the user request > + * > + * Return: a

Re: [PATCH v15 3/8] remoteproc: Introduce load_fw and release_fw optional operation

2024-12-03 Thread Mathieu Poirier
On Thu, Nov 28, 2024 at 09:42:10AM +0100, Arnaud Pouliquen wrote: > This patch updates the rproc_ops structures to include two new optional > operations. > > - The load_fw() op is responsible for loading the remote processor > non-ELF firmware image before starting the boot sequence. This ops will

Re: [PATCH for-next v3] selftests/zram: gitignore output file

2024-12-03 Thread Zhijian Li (Fujitsu)
On 04/12/2024 09:21, Shuah Khan wrote: > On 11/22/24 00:49, Li Zhijian wrote: >> After `make run_tests`, the git status complains: >> Untracked files: >> (use "git add ..." to include in what will be committed) >> zram/err.log >> >> This file will be cleaned up when execute 'make cl

Re: [PATCH] selftests: lsm: Refactor `flags_overset_lsm_set_self_attr` test

2024-12-03 Thread Shuah Khan
On 11/26/24 20:38, Paul Moore wrote: On Thu, Nov 14, 2024 at 11:25 AM Shuah Khan wrote: On 11/12/24 11:28, Amit Vadhavana wrote: - Remove unnecessary `tctx` variable, use `ctx` directly. - Simplified code with no functional changes. I would rephrase the short to simply say Remove unused var

Re: [PATCH v2] selftests/vDSO: support DT_GNU_HASH

2024-12-03 Thread Shuah Khan
On 11/27/24 04:44, Xi Ruoyao wrote: On Thu, 2024-09-19 at 09:37 -0600, Shuah Khan wrote: On 9/15/24 00:49, Fangrui Song wrote: glibc added support for DT_GNU_HASH in 2006 and DT_HASH has been obsoleted for more than one decade in many Linux distributions. Many vDSOs support DT_GNU_HASH. This p

Re: [PATCH] selftests: arm coresight: sysfsmode testing

2024-12-03 Thread Shuah Khan
On 11/29/24 01:38, Linu Cherian wrote: Add sysfs mode selftest for ARM Coresight hardware tracer. Please add details on what this test does in here. Include the output from the test? Does this test have dependencies on config? If it does, does this test detect and skip if config isn't enabled?

[PATCH RFT v13 2/8] Documentation: userspace-api: Add shadow stack API documentation

2024-12-03 Thread Mark Brown
There are a number of architectures with shadow stack features which we are presenting to userspace with as consistent an API as we can (though there are some architecture specifics). Especially given that there are some important considerations for userspace code interacting directly with the feat

[PATCH RFT v13 0/8] fork: Support shadow stacks in clone3()

2024-12-03 Thread Mark Brown
The kernel has recently added support for shadow stacks, currently x86 only using their CET feature but both arm64 and RISC-V have equivalent features (GCS and Zicfiss respectively), I am actively working on GCS[1]. With shadow stacks the hardware maintains an additional stack containing only the

[PATCH RFT v13 4/8] fork: Add shadow stack support to clone3()

2024-12-03 Thread Mark Brown
Unlike with the normal stack there is no API for configuring the the shadow stack for a new thread, instead the kernel will dynamically allocate a new shadow stack with the same size as the normal stack. This appears to be due to the shadow stack series having been in development since before the m

[PATCH RFT v13 3/8] selftests: Provide helper header for shadow stack testing

2024-12-03 Thread Mark Brown
While almost all users of shadow stacks should be relying on the dynamic linker and libc to enable the feature there are several low level test programs where it is useful to enable without any libc support, allowing testing without full system enablement. This low level testing is helpful during b

[PATCH RFT v13 5/8] selftests/clone3: Remove redundant flushes of output streams

2024-12-03 Thread Mark Brown
Since there were widespread issues with output not being flushed the kselftest framework was modified to explicitly set the output streams unbuffered in commit 58e2847ad2e6 ("selftests: line buffer test program's stdout") so there is no need to explicitly flush in the clone3 tests. Reviewed-by: Ke

[PATCH RFT v13 1/8] arm64/gcs: Return a success value from gcs_alloc_thread_stack()

2024-12-03 Thread Mark Brown
Currently as a result of templating from x86 code gcs_alloc_thread_stack() returns a pointer as an unsigned int however on arm64 we don't actually use this pointer value as anything other than a pass/fail flag. Simplify the interface to just return an int with 0 on success and a negative error code

[PATCH RFT v13 6/8] selftests/clone3: Factor more of main loop into test_clone3()

2024-12-03 Thread Mark Brown
In order to make it easier to add more configuration for the tests and more support for runtime detection of when tests can be run pass the structure describing the tests into test_clone3() rather than picking the arguments out of it and have that function do all the per-test work. No functional c

[PATCH RFT v13 7/8] selftests/clone3: Allow tests to flag if -E2BIG is a valid error code

2024-12-03 Thread Mark Brown
The clone_args structure is extensible, with the syscall passing in the length of the structure. Inside the kernel we use copy_struct_from_user() to read the struct but this has the unfortunate side effect of silently accepting some overrun in the structure size providing the extra data is all zero