Re: [PATCH v1] kbuild: Allow building of samples with UML

2025-02-10 Thread Nicolas Schier
On Wed, Dec 18, 2024 at 12:51:23PM +0100, Mickaël Salaün wrote: > It's useful to build samples/* with UML and the only blocker is the > artificial incompatibility with CONFIG_HEADERS_INSTALL. > > Allow the headers_install target with ARCH=um, which then allow building > samples (and tests using th

Re: distro support for CONFIG_KUNIT: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-10 Thread David Gow
On Tue, 11 Feb 2025 at 04:20, Yury Norov wrote: > > On Mon, Feb 10, 2025 at 11:35:48AM -0800, John Hubbard wrote: > > On 2/9/25 11:54 PM, Geert Uytterhoeven wrote: > > > On Sat, 8 Feb 2025 at 18:53, Yury Norov wrote: > > > > On Fri, Feb 07, 2025 at 03:14:01PM -0500, Tamir Duberstein wrote: > > >

Re: [PATCHv3 net 0/2] bonding: fix incorrect mac address setting

2025-02-10 Thread Hangbin Liu
Hi Jay, On Sat, Feb 08, 2025 at 06:34:21AM +, Hangbin Liu wrote: > Please hold on this patch. Our QE reported that with bare NIC, the > backup NIC can't receive the NS messages even after joining the multicast > MAC group. But after remove the backup NIC from bond, the NIC interface > could rec

[Patch net 1/2] vsock/virtio: initialize rx_buf_nr and rx_buf_max_nr when resuming

2025-02-10 Thread Junnan Wu
When executing suspend to ram twice in a row, the `rx_buf_nr` and `rx_buf_max_nr` increase to three times vq->num_free. Then after virtqueue_get_buf and `rx_buf_nr` decreased in function virtio_transport_rx_work, the condition to fill rx buffer (rx_buf_nr < rx_buf_max_nr / 2) will never be met. It

[Patch net 2/2] vsock/virtio: Don't reset the created SOCKET during suspend to ram

2025-02-10 Thread Junnan Wu
Function virtio_vsock_vqs_del will be invoked in 2 cases virtio_vsock_remove() and virtio_vsock_freeze(). And when driver freeze, the connected socket will be set to TCP_CLOSE and it will cause that socket can not be unusable after resume. Refactor function virtio_vsock_vqs_del to differentiate t

[Patch net 0/2] vsock suspend/resume fix

2025-02-10 Thread Junnan Wu
CC all maintainers and reviews. Modify commits accroding to reviewers' comments. Re-organize the patches, cover letter, tag, Signed-Off, Co-worker etc. Junnan Wu (2): vsock/virtio: initialize rx_buf_nr and rx_buf_max_nr when resuming vsock/virtio: Don't reset the created SOCKET during suspend

Re: [PATCH 0/2] printf: convert self-test to KUnit

2025-02-10 Thread David Gow
On Mon, 10 Feb 2025 at 19:57, Rasmus Villemoes wrote: > > On Fri, Feb 07 2025, Tamir Duberstein wrote: > > > On Fri, Feb 7, 2025 at 5:01 AM Rasmus Villemoes > > wrote: > >> > >> On Thu, Feb 06 2025, Tamir Duberstein wrote: > >> > >> > >> I'll have to see the actual code, of course. In general,

Re: [PATCH v5 2/2] lib/prime_numbers: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
Ah, I see https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=for-next/move-kunit-tests&id=3e50ba8fc834cadead733e4feeb969fce2f3b6e1 now. On Mon, Feb 10, 2025 at 9:47 PM Tamir Duberstein wrote: > > On Mon, Feb 10, 2025 at 9:37 PM Kees Cook wrote: > > > > On Sat, Feb 08, 2025

Re: [PATCH v5 2/2] lib/prime_numbers: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
On Mon, Feb 10, 2025 at 9:37 PM Kees Cook wrote: > > On Sat, Feb 08, 2025 at 09:44:39PM -0500, Tamir Duberstein wrote: > > Extract a private header and convert the prime_numbers self-test to a > > KUnit test. I considered parameterizing the test using > > `KUNIT_CASE_PARAM` but didn't see how it w

Re: [PATCH v5 2/2] lib/prime_numbers: convert self-test to KUnit

2025-02-10 Thread Kees Cook
On Sat, Feb 08, 2025 at 09:44:39PM -0500, Tamir Duberstein wrote: > Extract a private header and convert the prime_numbers self-test to a > KUnit test. I considered parameterizing the test using > `KUNIT_CASE_PARAM` but didn't see how it was possible since the test > logic is entangled with the tes

Re: [RFC PATCH 15/39] KVM: guest_memfd: hugetlb: allocate and truncate from hugetlb

2025-02-10 Thread Ackerley Tng
Jun Miao writes: > Hi Ackerley, > Due to actual customer requirements(such as ByteDance), I have added > support for NUMA policy based on your foundation. > Standing on the shoulders of giants, please correct me if there is > anyting wrong. > > --- Thanks Jun.miao > > Hi Jun, Thank you for y

[PATCH AUTOSEL 6.12 19/19] selftests: always check mask returned by statmount(2)

2025-02-10 Thread Sasha Levin
From: Miklos Szeredi [ Upstream commit 2cc02059fbc79306b53a44b1f1aaa3c76598 ] STATMOUNT_MNT_OPTS can actually be missing if there are no options. This is a change of behavior since 75ead69a7173 ("fs: don't let statmount return empty strings"). The other checks shouldn't actually trigger, b

[PATCH AUTOSEL 6.13 21/21] selftests: always check mask returned by statmount(2)

2025-02-10 Thread Sasha Levin
From: Miklos Szeredi [ Upstream commit 2cc02059fbc79306b53a44b1f1aaa3c76598 ] STATMOUNT_MNT_OPTS can actually be missing if there are no options. This is a change of behavior since 75ead69a7173 ("fs: don't let statmount return empty strings"). The other checks shouldn't actually trigger, b

[PATCH AUTOSEL 6.13 16/21] kbuild: keep symbols for symbol_get() even with CONFIG_TRIM_UNUSED_KSYMS

2025-02-10 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit 4c56eb33e603c3b9eb4bd24efbfdd0283c1c37e4 ] Linus observed that the symbol_request(utf8_data_table) call fails when CONFIG_UNICODE=y and CONFIG_TRIM_UNUSED_KSYMS=y. symbol_get() relies on the symbol data being present in the ksymtab for symbol lookups. How

Re: [syzbot] [net?] [virt?] general protection fault in vsock_stream_has_data

2025-02-10 Thread syzbot
syzbot suspects this issue was fixed by commit: commit df137da9d6d166e87e40980e36eb8e0bc90483ef Author: Stefano Garzarella Date: Fri Jan 10 08:35:09 2025 + vsock/virtio: cancel close work in the destructor bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=12bb31b058 sta

Re: [PATCH RFC v2 rcu] Fix get_state_synchronize_rcu_full() GP-start detection

2025-02-10 Thread Joel Fernandes
On Mon, Feb 10, 2025 at 7:28 PM Joel Fernandes wrote: > > On Mon, Jan 27, 2025 at 1:45 PM Joel Fernandes wrote: > > > > On Mon, Jan 27, 2025 at 11:49 AM Paul E. McKenney > > wrote: > > > > > > On Sun, Jan 26, 2025 at 09:58:11PM -0500, Joel Fernandes wrote: > > > > On Sun, Jan 26, 2025 at 9:55 P

[PATCH net-next v19 21/26] ovpn: implement key add/get/del/swap via netlink

2025-02-10 Thread Antonio Quartulli
This change introduces the netlink commands needed to add, get, delete and swap keys for a specific peer. Userspace is expected to use these commands to create, inspect (non sensitive data only), destroy and rotate session keys for a specific peer. Signed-off-by: Antonio Quartulli --- drivers/n

[PATCH net-next v19 25/26] testing/selftests: add test tool and scripts for ovpn module

2025-02-10 Thread Antonio Quartulli
The ovpn-cli tool can be compiled and used as selftest for the ovpn kernel module. [NOTE: it depends on libmedtls for decoding base64-encoded keys] ovpn-cli implements the netlink and RTNL APIs and can thus be integrated in any script for more automated testing. Along with the tool, 4 scripts ar

[PATCH net-next v19 00/26] Introducing OpenVPN Data Channel Offload

2025-02-10 Thread Antonio Quartulli
All minor and major reported problems have been finally addressed. Big thanks to Sabrina, who took the time to guide me through converting the peer socket to an RCU pointer. This patchset comes with an extra patch for .mailmap to remove my @openvpn.net address from the file, otherwise git won't al

[PATCH net-next v19 23/26] ovpn: notify userspace when a peer is deleted

2025-02-10 Thread Antonio Quartulli
Whenever a peer is deleted, send a notification to userspace so that it can react accordingly. This is most important when a peer is deleted due to ping timeout, because it all happens in kernelspace and thus userspace has no direct way to learn about it. Signed-off-by: Antonio Quartulli --- dr

[PATCH net-next v19 26/26] mailmap: remove unwanted entry for Antonio Quartulli

2025-02-10 Thread Antonio Quartulli
anto...@openvpn.net is still used for sending patches under the OpenVPN Inc. umbrella, therefore this address should not be re-mapped. Cc: Andrew Morton Signed-off-by: Antonio Quartulli --- .mailmap | 1 - 1 file changed, 1 deletion(-) diff --git a/.mailmap b/.mailmap index ae0adc499f4acba5b6

[PATCH net-next v19 22/26] ovpn: kill key and notify userspace in case of IV exhaustion

2025-02-10 Thread Antonio Quartulli
IV wrap-around is cryptographically dangerous for a number of ciphers, therefore kill the key and inform userspace (via netlink) should the IV space go exhausted. Userspace has two ways of deciding when the key has to be renewed before exhausting the IV space: 1) time based approach: after X se

[PATCH net-next v19 24/26] ovpn: add basic ethtool support

2025-02-10 Thread Antonio Quartulli
Implement support for basic ethtool functionality. Note that ovpn is a virtual device driver, therefore various ethtool APIs are just not meaningful and thus not implemented. Signed-off-by: Antonio Quartulli Reviewed-by: Andrew Lunn --- drivers/net/ovpn/main.c | 15 +++ 1 file chan

[PATCH net-next v19 20/26] ovpn: implement peer add/get/dump/delete via netlink

2025-02-10 Thread Antonio Quartulli
This change introduces the netlink command needed to add, delete and retrieve/dump known peers. Userspace is expected to use these commands to handle known peer lifecycles. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/netlink.c | 676 - driver

[PATCH net-next v19 19/26] ovpn: add support for peer floating

2025-02-10 Thread Antonio Quartulli
A peer connected via UDP may change its IP address without reconnecting (float). Add support for detecting and updating the new peer IP/port in case of floating. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/io.c | 8 ++ drivers/net/ovpn/peer.c | 243

[PATCH net-next v19 17/26] ovpn: implement keepalive mechanism

2025-02-10 Thread Antonio Quartulli
OpenVPN supports configuring a periodic keepalive packet. message to allow the remote endpoint detect link failures. This change implements the keepalive sending and timer expiring logic. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/io.c | 74 + drivers/net/ovpn/

[PATCH net-next v19 18/26] ovpn: add support for updating local UDP endpoint

2025-02-10 Thread Antonio Quartulli
In case of UDP links, the local endpoint used to communicate with a given peer may change without a connection restart. Add support for learning the new address in case of change. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/peer.c | 45 + dr

[PATCH net-next v19 15/26] ovpn: implement multi-peer support

2025-02-10 Thread Antonio Quartulli
With this change an ovpn instance will be able to stay connected to multiple remote endpoints. This functionality is strictly required when running ovpn on an OpenVPN server. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/main.c | 67 ++- drivers/net/ovpn/ovpnpriv.h

[PATCH net-next v19 16/26] ovpn: implement peer lookup logic

2025-02-10 Thread Antonio Quartulli
In a multi-peer scenario there are a number of situations when a specific peer needs to be looked up. We may want to lookup a peer by: 1. its ID 2. its VPN destination IP 3. its transport IP/port couple For each of the above, there is a specific routing table referencing all peers for fast look u

[PATCH net-next v19 12/26] ovpn: implement TCP transport

2025-02-10 Thread Antonio Quartulli
With this change ovpn is allowed to communicate to peers also via TCP. Parsing of incoming messages is implemented through the strparser API. Note that ovpn redefines sk_prot and sk_socket->ops for the TCP socket used to communicate with the peer. For this reason it needs to access inet6_stream_op

[PATCH net-next v19 14/26] ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg

2025-02-10 Thread Antonio Quartulli
Userspace may want to pass the MSG_NOSIGNAL flag to tcp_sendmsg() in order to avoid generating a SIGPIPE. To pass this flag down the TCP stack a new skb sending API accepting a flags argument is introduced. Cc: Eric Dumazet Cc: Paolo Abeni Signed-off-by: Antonio Quartulli --- drivers/net/ovpn

[PATCH net-next v19 13/26] skb: implement skb_send_sock_locked_with_flags()

2025-02-10 Thread Antonio Quartulli
When sending an skb over a socket using skb_send_sock_locked(), it is currently not possible to specify any flag to be set in msghdr->msg_flags. However, we may want to pass flags the user may have specified, like MSG_NOSIGNAL. Extend __skb_send_sock() with a new argument 'flags' and add a new in

[PATCH net-next v19 11/26] ipv6: export inet6_stream_ops via EXPORT_SYMBOL_GPL

2025-02-10 Thread Antonio Quartulli
inet6_stream_ops is currently non-static and also declared in include/net/ipv6.h, however, it is not exported for usage in non-builtin modules. Export inet6_stream_ops via EXPORT_SYMBOL_GPL in order to make it available to non-builtin modules. Cc: David Ahern Cc: Eric Dumazet Cc: Jakub Kicinski

[PATCH net-next v19 09/26] ovpn: implement packet processing

2025-02-10 Thread Antonio Quartulli
This change implements encryption/decryption and encapsulation/decapsulation of OpenVPN packets. Support for generic crypto state is added along with a wrapper for the AEAD crypto kernel API. Signed-off-by: Antonio Quartulli --- drivers/net/Kconfig| 4 + drivers/net/ovpn/Makefile

[PATCH net-next v19 10/26] ovpn: store tunnel and transport statistics

2025-02-10 Thread Antonio Quartulli
Byte/packet counters for in-tunnel and transport streams are now initialized and updated as needed. To be exported via netlink. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/Makefile | 1 + drivers/net/ovpn/io.c | 12 +++- drivers/net/ovpn/peer.c | 2 ++ drivers/net/ovpn

[PATCH net-next v19 07/26] ovpn: implement basic TX path (UDP)

2025-02-10 Thread Antonio Quartulli
Packets sent over the ovpn interface are processed and transmitted to the connected peer, if any. Implementation is UDP only. TCP will be added by a later patch. Note: no crypto/encapsulation exists yet. Packets are just captured and sent. Signed-off-by: Antonio Quartulli --- drivers/net/Kconf

[PATCH net-next v19 08/26] ovpn: implement basic RX path (UDP)

2025-02-10 Thread Antonio Quartulli
Packets received over the socket are forwarded to the user device. Implementation is UDP only. TCP will be added by a later patch. Note: no decryption/decapsulation exists yet, packets are forwarded as they arrive without much processing. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/i

[PATCH net-next v19 05/26] ovpn: introduce the ovpn_peer object

2025-02-10 Thread Antonio Quartulli
An ovpn_peer object holds the whole status of a remote peer (regardless whether it is a server or a client). This includes status for crypto, tx/rx buffers, napi, etc. Only support for one peer is introduced (P2P mode). Multi peer support is introduced with a later patch. Along with the ovpn_pee

[PATCH net-next v19 06/26] ovpn: introduce the ovpn_socket object

2025-02-10 Thread Antonio Quartulli
This specific structure is used in the ovpn kernel module to wrap and carry around a standard kernel socket. ovpn takes ownership of passed sockets and therefore an ovpn specific objects is attached to them for status tracking purposes. Initially only UDP support is introduced. TCP will come in a

[PATCH net-next v19 04/26] ovpn: keep carrier always on for MP interfaces

2025-02-10 Thread Antonio Quartulli
An ovpn interface configured in MP mode will keep carrier always on and let the user decide when to bring it administratively up and down. This way a MP node (i.e. a server) will keep its interface always up and running, even when no peer is connected. Signed-off-by: Antonio Quartulli --- drive

[PATCH net-next v19 03/26] ovpn: add basic interface creation/destruction/management routines

2025-02-10 Thread Antonio Quartulli
Add basic infrastructure for handling ovpn interfaces. Tested-by: Donald Hunter Signed-off-by: Antonio Quartulli --- Documentation/netlink/specs/rt_link.yaml | 16 + drivers/net/ovpn/Makefile| 1 + drivers/net/ovpn/io.c| 22 ++ drivers/net/ovpn/io

[PATCH net-next v19 02/26] ovpn: add basic netlink support

2025-02-10 Thread Antonio Quartulli
This commit introduces basic netlink support with family registration/unregistration functionalities and stub pre/post-doit. More importantly it introduces the YAML uAPI description along with its auto-generated files: - include/uapi/linux/ovpn.h - drivers/net/ovpn/netlink-gen.c - drivers/net/ovpn

[PATCH net-next v19 01/26] net: introduce OpenVPN Data Channel Offload (ovpn)

2025-02-10 Thread Antonio Quartulli
OpenVPN is a userspace software existing since around 2005 that allows users to create secure tunnels. So far OpenVPN has implemented all operations in userspace, which implies several back and forth between kernel and user land in order to process packets (encapsulate/decapsulate, encrypt/decrypt

Re: [PATCH RFC v2 rcu] Fix get_state_synchronize_rcu_full() GP-start detection

2025-02-10 Thread Joel Fernandes
On Mon, Jan 27, 2025 at 1:45 PM Joel Fernandes wrote: > > On Mon, Jan 27, 2025 at 11:49 AM Paul E. McKenney wrote: > > > > On Sun, Jan 26, 2025 at 09:58:11PM -0500, Joel Fernandes wrote: > > > On Sun, Jan 26, 2025 at 9:55 PM Joel Fernandes > > > wrote: > > > > > > > > On Sun, Jan 26, 2025 at 9:

Re: Re: Re: [PATCH 2/2] libbpf: BPF programs dynamic loading and attaching

2025-02-10 Thread Andrii Nakryiko
On Fri, Feb 7, 2025 at 5:13 PM Martin Kelly wrote: > > On Wed, 2025-02-05 at 14:33 -0800, Andrii Nakryiko wrote: > > > > > > > > > > I see two ways forward for you. Either you can break apart your > > > > > BPF > > > > > object of ~100 BPF programs into more independent BPF objects > > > > > > > (

Re: distro support for CONFIG_KUNIT: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-10 Thread John Hubbard
On 2/10/25 3:10 PM, Nico Pache wrote: ... Fedora has it. CS-10 has it (-> RHEL-10): redhat/configs/common/generic/CONFIG_KUNIT:CONFIG_KUNIT=m https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/blob/main/redhat/configs/common/generic/CONFIG_KUNIT?ref_type=heads CS-9 has it (

Re: [PATCH v1 08/13] iommufd/device: Move sw_msi_start from igroup to idev

2025-02-10 Thread Nicolin Chen
On Sun, Feb 09, 2025 at 02:41:52PM -0400, Jason Gunthorpe wrote: > On Sat, Feb 08, 2025 at 01:02:41AM -0800, Nicolin Chen wrote: > > @@ -433,8 +433,8 @@ static int iommufd_group_setup_msi(struct iommufd_group > > *igroup, > > list_for_each_entry(cur, &ictx->sw_msi_list, sw_msi_item) { > >

Re: [RFC PATCH v2 2/4] perf: arm_pmuv3: Introduce module param to partition the PMU

2025-02-10 Thread Colton Lewis
Hi Oliver, thanks for the review. Oliver Upton writes: Hi Colton, On Sat, Feb 08, 2025 at 02:01:09AM +, 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 count

Re: distro support for CONFIG_KUNIT: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-10 Thread Nico Pache
On Mon, Feb 10, 2025 at 12:46 PM David Hildenbrand wrote: > > On 10.02.25 20:35, John Hubbard wrote: > > On 2/9/25 11:54 PM, Geert Uytterhoeven wrote: > >> On Sat, 8 Feb 2025 at 18:53, Yury Norov wrote: > >>> On Fri, Feb 07, 2025 at 03:14:01PM -0500, Tamir Duberstein wrote: > On 7/27/24 12:3

Re: [RFC PATCH v2 4/4] KVM: arm64: Make guests see only counters they can access

2025-02-10 Thread Colton Lewis
Hi Oliver, thanks for the review. Oliver Upton writes: On Sat, Feb 08, 2025 at 02:01:11AM +, Colton Lewis wrote: The ARM architecture specifies that when MDCR_EL2.HPMN is set, EL1 and EL0, which includes KVM guests, should read that value for PMCR.N. Signed-off-by: Colton Lewis ---

Re: distro support for CONFIG_KUNIT: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
On Mon, Feb 10, 2025 at 3:20 PM Yury Norov wrote: > > On Mon, Feb 10, 2025 at 11:35:48AM -0800, John Hubbard wrote: > > On 2/9/25 11:54 PM, Geert Uytterhoeven wrote: > > > On Sat, 8 Feb 2025 at 18:53, Yury Norov wrote: > > > > On Fri, Feb 07, 2025 at 03:14:01PM -0500, Tamir Duberstein wrote: > >

Re: [PATCH v3 2/2] media: i2c: dw9719: Add of_match table

2025-02-10 Thread kernel test robot
Hi André, kernel test robot noticed the following build warnings: [auto build test WARNING on 8f6629c004b193d23612641c3607e785819e97ab] url: https://github.com/intel-lab-lkp/linux/commits/Andr-Apitzsch-via-B4-Relay/dt-bindings-media-i2c-Add-DW9719-and-DW9761-VCM/20250210-055506 base

Re: distro support for CONFIG_KUNIT: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-10 Thread Yury Norov
On Mon, Feb 10, 2025 at 11:35:48AM -0800, John Hubbard wrote: > On 2/9/25 11:54 PM, Geert Uytterhoeven wrote: > > On Sat, 8 Feb 2025 at 18:53, Yury Norov wrote: > > > On Fri, Feb 07, 2025 at 03:14:01PM -0500, Tamir Duberstein wrote: > > > > On 7/27/24 12:35 AM, Shuah Khan wrote: > ... > > > > The

Re: [PATCH 3/9] vhost-scsi: cache log buffer in I/O queue vhost_scsi_cmd

2025-02-10 Thread Mike Christie
On 2/7/25 12:41 PM, Dongli Zhang wrote: > The vhost-scsi I/O queue uses vhost_scsi_cmd. Pre-allocate the log buffer > during vhost_scsi_cmd allocation, and free it when vhost_scsi_cmd is > reclaimed. > > The cached log buffer will be uses in upcoming patches to log write > descriptors for the I/O

Re: distro support for CONFIG_KUNIT: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-10 Thread David Hildenbrand
On 10.02.25 20:35, John Hubbard wrote: On 2/9/25 11:54 PM, Geert Uytterhoeven wrote: On Sat, 8 Feb 2025 at 18:53, Yury Norov wrote: On Fri, Feb 07, 2025 at 03:14:01PM -0500, Tamir Duberstein wrote: On 7/27/24 12:35 AM, Shuah Khan wrote: ... The crux of the argument seems to be that the conf

[PATCH net-next v6 3/3] selftests: drv-net: Test queue xsk attribute

2025-02-10 Thread Joe Damato
Test that queues which are used for AF_XDP have the xsk nest attribute. The attribute is currently empty, but its existence means the AF_XDP is being used for the queue. Signed-off-by: Joe Damato Suggested-by: Jakub Kicinski --- v3: - Change comment style of helper C program to avoid kdoc wa

[PATCH net-next v6 0/3] netdev-genl: Add an xsk attribute to queues

2025-02-10 Thread Joe Damato
Greetings Welcome to v6. Added ifdefs to patch 2 and built with CONFIG_XDP_SOCKETS both enabled and disabled to confirm it builds cleanly. No other changes. This is an attempt to followup on something Jakub asked me about [1], adding an xsk attribute to queues and more clearly documenting which q

distro support for CONFIG_KUNIT: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-10 Thread John Hubbard
On 2/9/25 11:54 PM, Geert Uytterhoeven wrote: On Sat, 8 Feb 2025 at 18:53, Yury Norov wrote: On Fri, Feb 07, 2025 at 03:14:01PM -0500, Tamir Duberstein wrote: On 7/27/24 12:35 AM, Shuah Khan wrote: ... The crux of the argument seems to be that the config help text is taken to describe the au

[PATCH v6 2/2] scanf: break kunit into test cases

2025-02-10 Thread Tamir Duberstein
Use `suite_init` and move some tests into `scanf_test_cases`. This gives us nicer output in the event of a failure. Reviewed-by: David Gow Signed-off-by: Tamir Duberstein --- lib/scanf_kunit.c | 88 ++- 1 file changed, 48 insertions(+), 40 del

[PATCH v6 1/2] scanf: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
Convert the scanf() self-test to a KUnit test. In the interest of keeping the patch reasonably-sized this doesn't refactor the tests into proper parameterized tests - it's all one big test case. Acked-by: Petr Mladek Reviewed-by: David Gow Signed-off-by: Tamir Duberstein --- MAINTAINERS

[PATCH v6 0/2] scanf: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
ng: $ tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 scanf Signed-off-by: Tamir Duberstein --- Changes in v6: - s/at boot/at runtime/ for consistency with the printf series. - Go back to kmalloc. (Geert Uytterhoeven) - Link to v5: https://lore.kernel.org/r/20250210-scan

Re: [PATCH v5 2/2] scanf: break kunit into test cases

2025-02-10 Thread Tamir Duberstein
On Mon, Feb 10, 2025 at 11:27 AM Geert Uytterhoeven wrote: > > > [...] > > > > -static char *test_buffer; > > -static char *fmt_buffer; > > +static char test_buffer[BUF_SIZE]; > > +static char fmt_buffer[BUF_SIZE]; > > Why? This wastes 2 KiB of memory when the test is not running. It's a fair poi

Re: [PATCH v5 2/2] scanf: break kunit into test cases

2025-02-10 Thread Geert Uytterhoeven
Hi Tamir, On Mon, 10 Feb 2025 at 16:00, Tamir Duberstein wrote: > Use `suite_init` and move some tests into `scanf_test_cases`. This > gives us nicer output in the event of a failure. > > Reviewed-by: David Gow > Signed-off-by: Tamir Duberstein Thanks for your patch! > --- a/lib/scanf_kunit.c

Re: [PATCH v3 bpf 1/2] bpf: skip non exist keys in generic_map_lookup_batch

2025-02-10 Thread Yan Zhai
Hi Brian, Jiri thanks for the comments. On Mon, Feb 10, 2025 at 8:47 AM Brian Vazquez wrote: > > On Mon, Feb 10, 2025 at 4:19 AM Jiri Olsa wrote: > > > > On Sun, Feb 09, 2025 at 11:22:35PM -0800, Yan Zhai wrote: > > > The generic_map_lookup_batch currently returns EINTR if it fails with > > > E

[PATCH] selftests/landlock: add binaries to gitignore

2025-02-10 Thread Bharadwaj Raju
Building the test creates binaries 'wait-pipe' and 'sandbox-and-launch' which need to be gitignore'd. Signed-off-by: Bharadwaj Raju --- tools/testing/selftests/landlock/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/landlock/.gitignore b/tools/testing/s

[PATCH] ww_mutex: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
Convert this unit test to a KUnit test. Signed-off-by: Tamir Duberstein --- I tested this using: $ tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 ww_mutex On success: ; [12:48:16] == ww_mutex (5 subtests) === ; [12:48:16] =

Re: [PATCH v2] blackhole_dev: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
On Sat, Feb 8, 2025 at 2:26 PM Tamir Duberstein wrote: > > Convert this very simple smoke test to a KUnit test. > > Add a missing `htons` call that was spotted[0] by kernel test robot > after initial conversion to KUnit. > > Link: > https://lore.kernel.org/oe-kbuild-all/202502090223.qcymbjwt-...

Re: [PATCH v5 1/2] scanf: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
On Mon, Feb 10, 2025 at 10:00 AM Tamir Duberstein wrote: > > Convert the scanf() self-test to a KUnit test. > > In the interest of keeping the patch reasonably-sized this doesn't > refactor the tests into proper parameterized tests - it's all one big > test case. > > Acked-by: Petr Mladek > Revie

[PATCH v6 3/3] rseq/selftests: Add test for mm_cid compaction

2025-02-10 Thread Gabriele Monaco
A task in the kernel (task_mm_cid_work) runs somewhat periodically to compact the mm_cid for each process. Add a test to validate that it runs correctly and timely. The test spawns 1 thread pinned to each CPU, then each thread, including the main one, runs in short bursts for some time. During thi

Re: [PATCH v5 3/3] rseq/selftests: Add test for mm_cid compaction

2025-02-10 Thread Gabriele Monaco
On Mon, 2025-02-10 at 15:53 +0100, Mathieu Desnoyers wrote: > On 2025-02-10 08:57, Gabriele Monaco wrote: > > A task in the kernel (task_mm_cid_work) runs somewhat periodically > > to > > compact the mm_cid for each process. Add a test to validate that it > > runs > > correctly and timely. > >

Re: [PATCH v2 1/2] printf: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
On Mon, Feb 10, 2025 at 9:52 AM Geert Uytterhoeven wrote: > > Hi Tamir, > > On Mon, 10 Feb 2025 at 15:37, Tamir Duberstein wrote: > > On Mon, Feb 10, 2025 at 8:01 AM Rasmus Villemoes > > wrote: > > > > > > On Fri, Feb 07 2025, Tamir Duberstein wrote: > > > > > > [...] > > > > > > If/when you do

[PATCH v5 2/2] scanf: break kunit into test cases

2025-02-10 Thread Tamir Duberstein
Use `suite_init` and move some tests into `scanf_test_cases`. This gives us nicer output in the event of a failure. Reviewed-by: David Gow Signed-off-by: Tamir Duberstein --- lib/scanf_kunit.c | 98 +-- 1 file changed, 44 insertions(+), 54 del

[PATCH v5 1/2] scanf: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
Convert the scanf() self-test to a KUnit test. In the interest of keeping the patch reasonably-sized this doesn't refactor the tests into proper parameterized tests - it's all one big test case. Acked-by: Petr Mladek Reviewed-by: David Gow Signed-off-by: Tamir Duberstein --- MAINTAINERS

[PATCH v5 0/2] scanf: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
This is one of just 3 remaining "Test Module" kselftests (the others being bitmap and printf), the rest having been converted to KUnit. In addition to the enclosed patch, please consider this an RFC on the removal of the "Test Module" kselftest machinery. I tested this using: $ tools/testing/kuni

Re: [PATCH v5 3/3] rseq/selftests: Add test for mm_cid compaction

2025-02-10 Thread Mathieu Desnoyers
On 2025-02-10 08:57, Gabriele Monaco wrote: A task in the kernel (task_mm_cid_work) runs somewhat periodically to compact the mm_cid for each process. Add a test to validate that it runs correctly and timely. The test spawns 1 thread pinned to each CPU, then each thread, including the main one,

Re: [PATCH v2 1/2] printf: convert self-test to KUnit

2025-02-10 Thread Geert Uytterhoeven
Hi Tamir, On Mon, 10 Feb 2025 at 15:37, Tamir Duberstein wrote: > On Mon, Feb 10, 2025 at 8:01 AM Rasmus Villemoes > wrote: > > > > On Fri, Feb 07 2025, Tamir Duberstein wrote: > > > > [...] > > > > If/when you do re-roll a v3, can you split the defconfig changes off to > > a separate patch? It

Re: [PATCH v3 bpf 1/2] bpf: skip non exist keys in generic_map_lookup_batch

2025-02-10 Thread Brian Vazquez
On Mon, Feb 10, 2025 at 4:19 AM Jiri Olsa wrote: > > On Sun, Feb 09, 2025 at 11:22:35PM -0800, Yan Zhai wrote: > > The generic_map_lookup_batch currently returns EINTR if it fails with > > ENOENT and retries several times on bpf_map_copy_value. The next batch > > would start from the same location

Re: [PATCH v2 1/2] printf: convert self-test to KUnit

2025-02-10 Thread Tamir Duberstein
On Mon, Feb 10, 2025 at 8:01 AM Rasmus Villemoes wrote: > > On Fri, Feb 07 2025, Tamir Duberstein wrote: > > [...] > > If/when you do re-roll a v3, can you split the defconfig changes off to > a separate patch? It's a little annoying to scroll through all those > mechanical one-liner diffs to get

Re: [PATCH v5 4/5] rust: str: add radix prefixed integer parsing functions

2025-02-10 Thread Andreas Hindborg
"Andreas Hindborg" writes: > Add the trait `ParseInt` for parsing string representations of integers > where the string representations are optionally prefixed by a radix > specifier. Implement the trait for the primitive integer types. > > Signed-off-by: Andreas Hindborg > --- There is a bug i

Re: [PATCH v2 1/2] printf: convert self-test to KUnit

2025-02-10 Thread Rasmus Villemoes
On Fri, Feb 07 2025, Tamir Duberstein wrote: > Convert the printf() self-test to a KUnit test. > > In the interest of keeping the patch reasonably-sized this doesn't > refactor the tests into proper parameterized tests - it's all one big > test case. > > Acked-by: Geert Uytterhoeven # m68k > Sig

Re: [PATCH 0/2] printf: convert self-test to KUnit

2025-02-10 Thread Rasmus Villemoes
On Fri, Feb 07 2025, Tamir Duberstein wrote: > On Fri, Feb 7, 2025 at 5:01 AM Rasmus Villemoes > wrote: >> >> On Thu, Feb 06 2025, Tamir Duberstein wrote: >> >> >> I'll have to see the actual code, of course. In general, I find reading >> code using those KUNIT macros quite hard, because I'm no

[PATCH v5 4/7] syscall.h: introduce syscall_set_nr()

2025-02-10 Thread Dmitry V. Levin
Similar to syscall_set_arguments() that complements syscall_get_arguments(), introduce syscall_set_nr() that complements syscall_get_nr(). syscall_set_nr() is going to be needed along with syscall_set_arguments() on all HAVE_ARCH_TRACEHOOK architectures to implement PTRACE_SET_SYSCALL_INFO API. S

Re: [PATCH v3 2/2] media: i2c: dw9719: Add of_match table

2025-02-10 Thread Sakari Ailus
Hi André, On Sun, Feb 09, 2025 at 10:51:58PM +0100, André Apitzsch via B4 Relay wrote: > + .of_match_table = of_match_ptr(dw9719_of_table), Please drop of_match_ptr(), that fixes the problem. -- Sakari Ailus

Re: [PATCH v3 2/2] media: i2c: dw9719: Add of_match table

2025-02-10 Thread kernel test robot
Hi André, kernel test robot noticed the following build warnings: [auto build test WARNING on 8f6629c004b193d23612641c3607e785819e97ab] url: https://github.com/intel-lab-lkp/linux/commits/Andr-Apitzsch-via-B4-Relay/dt-bindings-media-i2c-Add-DW9719-and-DW9761-VCM/20250210-055506 base

[PATCH v1 1/1] virtio_console: Get rid of unneeded temporary variable

2025-02-10 Thread Andy Shevchenko
When compiling a kernel with GCC using `make W=1` with CONFIG_WERROR=y (which is default nowadays), the build fails: drivers/char/virtio_console.c:1427:9: note: ‘snprintf’ output between 9 and 27 bytes into a destination of size 16 Indeed, GCC can't see the limits of the variables that are in us

Re: [PATCH v3 1/2] dt-bindings: media: i2c: Add DW9719 and DW9761 VCM

2025-02-10 Thread Sakari Ailus
Hi André, Thanks for the update. On Sun, Feb 09, 2025 at 10:51:57PM +0100, André Apitzsch via B4 Relay wrote: > From: André Apitzsch > > Document Dongwoon DW9719 and DW9761 VCM devicetree bindings. > > Signed-off-by: André Apitzsch > --- > .../bindings/media/i2c/dongwoon,dw9719.yaml|

Re: [PATCH v3 bpf 1/2] bpf: skip non exist keys in generic_map_lookup_batch

2025-02-10 Thread Jiri Olsa
On Sun, Feb 09, 2025 at 11:22:35PM -0800, Yan Zhai wrote: > The generic_map_lookup_batch currently returns EINTR if it fails with > ENOENT and retries several times on bpf_map_copy_value. The next batch > would start from the same location, presuming it's a transient issue. > This is incorrect if a

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-10 Thread Weinan Liu
On Fri, Feb 7, 2025 at 4:16 AM Puranjay Mohan wrote: > > Yes, I think we should, but others people could add more to this. > > I have been testing this series with Kpatch and created a PR that works > with this unwinder: https://github.com/dynup/kpatch/pull/1439 > > For the modules, I think we n