Re: [syzbot] [wpan?] WARNING in cfg802154_switch_netns (3)

2025-01-10 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:7b24f164cf00 Merge tag 'ipsec-next-2025-01-09' of git://gi.. git tree: net-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=168791df98 kernel config: https://syzkaller.appspot.com/x/.config?x=28dc37e

Re: [PATCH] vhost/scsi: Fix improper cleanup in vhost_scsi_set_endpoint()

2025-01-10 Thread Kuan-Wei Chiu
Hi Haoran, On Sat, Jan 11, 2025 at 11:34:18AM +0800, Haoran Zhang wrote: > Since commit 3f8ca2e115e55 ("vhost scsi: alloc cmds per vq instead of > session"), a bug can be triggered when the host sends a duplicate > VHOST_SCSI_SET_ENDPOINT ioctl command. > > In vhost_scsi_set_endpoint(), if the

[PATCH RFCv2 02/13] genirq/msi: Rename iommu_dma_compose_msi_msg() to msi_msg_set_msi_addr()

2025-01-10 Thread Nicolin Chen
From: Jason Gunthorpe The new function is used to take in a u64 MSI address and store it in the msi_msg. If the iommu has provided an alternative address then that is replaced instead. All callers have a tidy u64 already so this also consolidates the repeated low/high code into a small helper.

[PATCH] vhost/scsi: Fix improper cleanup in vhost_scsi_set_endpoint()

2025-01-10 Thread Haoran Zhang
Since commit 3f8ca2e115e55 ("vhost scsi: alloc cmds per vq instead of session"), a bug can be triggered when the host sends a duplicate VHOST_SCSI_SET_ENDPOINT ioctl command. In vhost_scsi_set_endpoint(), if the new `vhost_wwpn` matches the old tpg's tport_name but the tpg is still held by curr

[PATCH RFCv2 03/13] iommu: Make iommu_dma_prepare_msi() into a generic operation

2025-01-10 Thread Nicolin Chen
From: Jason Gunthorpe SW_MSI supports IOMMU to translate an MSI message before the MSI message is delivered to the interrupt controller. On such systems the iommu_domain must have a translation for the MSI message for interrupts to work. The IRQ subsystem will call into IOMMU to request that a p

[PATCH RFCv2 13/13] vfio/pci: Allow preset MSI IOVAs via VFIO_IRQ_SET_ACTION_PREPARE

2025-01-10 Thread Nicolin Chen
Add a new VFIO_IRQ_SET_ACTION_PREPARE to set VFIO_IRQ_SET_DATA_MSI_IOVA, giving user space an interface to forward to kernel the stage-1 IOVA (of a 2-stage translation: IOVA->IPA->PA) for an MSI doorbell address, since the ITS hardware needs to be programmed with the top level IOVA address, in orde

[PATCH RFCv2 12/13] vfio-iommufd: Provide another layer of msi_iova helpers

2025-01-10 Thread Nicolin Chen
As the bridge between iommufd core and vfio core, add a set of msi_iova helpers to call the new msi_iova helpers from the iommufd_device level. The next patch will use this bridging helpers in vfio-pci code. Signed-off-by: Nicolin Chen --- include/linux/vfio.h | 25 +

[PATCH RFCv2 11/13] iommufd/device: Allow setting IOVAs for MSI(x) vectors

2025-01-10 Thread Nicolin Chen
Add a resizable array "msi_iovas" to store the user space IOVAs for its vMSI(x) vectors. And use the corresponding IOVA for set the msi_desc in the iommufd_sw_msi(). This allows irqchip driver to program the correct MSI doorbell addresses (in case of requiring IOMMU translations). Provide a set of

[PATCH RFCv2 10/13] iommufd/selftes: Add coverage for IOMMU_OPTION_SW_MSI_START/SIZE

2025-01-10 Thread Nicolin Chen
Also add fail_nth coverage too. Signed-off-by: Nicolin Chen --- tools/testing/selftests/iommu/iommufd.c | 53 +++ .../selftests/iommu/iommufd_fail_nth.c| 14 + 2 files changed, 67 insertions(+) diff --git a/tools/testing/selftests/iommu/iommufd.c b/tools/testi

[PATCH RFCv2 09/13] iommufd: Add IOMMU_OPTION_SW_MSI_START/SIZE ioctls

2025-01-10 Thread Nicolin Chen
For systems that require MSI pages to be mapped into the IOMMU translation the IOMMU driver provides an IOMMU_RESV_SW_MSI range, which is the default recommended IOVA window to place these mappings. However, there is nothing special about this address. And to support the RMR trick in VMM for nested

[PATCH RFCv2 07/13] iommufd: Implement sw_msi support natively

2025-01-10 Thread Nicolin Chen
From: Jason Gunthorpe iommufd has a model where the iommu_domain can be changed while the VFIO device is attached. In this case the MSI should continue to work. This corner case has not worked because the dma-iommu implementation of sw_msi is tied to a single domain. Implement the sw_msi mapping

[PATCH RFCv2 08/13] iommu: Turn iova_cookie to dma-iommu private pointer

2025-01-10 Thread Nicolin Chen
Now, iommufd has its own iommufd_sw_msi using iommufd_hwpt, the iommufd owned domain's private pointer. Similarly, iova_cookie can be seen as a dma-iommu owned domain's private pointer. So, move iova_cookie into the union. Signed-off-by: Nicolin Chen --- include/linux/iommu.h | 2 +- 1 file chan

[PATCH RFCv2 06/13] iommufd: Make attach_handle generic

2025-01-10 Thread Nicolin Chen
"attach_handle" was added exclusively for the iommufd_fault_iopf_handler() used by IOPF/PRI use cases, along with the "fault_data". Now, the iommufd version of sw_msi function will resue the attach_handle and fault_data for a non-fault case. Move the attach_handle part out of the fault.c file to m

[PATCH RFCv2 05/13] iommu: Turn fault_data to iommufd private pointer

2025-01-10 Thread Nicolin Chen
A "fault_data" was added exclusively for the iommufd_fault_iopf_handler() used by IOPF/PRI use cases, along with the attach_handle. Now, the iommufd version of sw_msi function will resue the attach_handle and fault_data for a non-fault case. Rename "fault_data" to "iommufd_hwpt" so as not to confi

[PATCH RFCv2 04/13] irqchip: Have CONFIG_IRQ_MSI_IOMMU be selected by the irqchips that need it

2025-01-10 Thread Nicolin Chen
From: Jason Gunthorpe Currently IRQ_MSI_IOMMU is selected if DMA_IOMMU is available to provide an implementation for iommu_dma_prepare/compose_msi_msg(). However it makes more sense for the irqchips that call prepare/compose to select it and that will trigger all the additional code and data to b

[PATCH RFCv2 01/13] genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie

2025-01-10 Thread Nicolin Chen
From: Jason Gunthorpe All the iommu cases simply want to override the MSI page's address with the IOVA that was mapped through the iommu. This doesn't need a cookie pointer, we just need to store the IOVA and its page size in the msi_desc. Instead provide msi_desc_set_iommu_msi_iova() which allo

[PATCH RFCv2 00/13] iommu: Add MSI mapping support with nested SMMU

2025-01-10 Thread Nicolin Chen
[ Background ] On ARM GIC systems and others, the target address of the MSI is translated by the IOMMU. For GIC, the MSI address page is called "ITS" page. When the IOMMU is disabled, the MSI address is programmed to the physical location of the GIC ITS page (e.g. 0x2020). When the IOMMU is ena

Re: [PATCH bpf-next v2 2/3] selftests/bpf: Migrate test_xdp_redirect.sh to xdp_do_redirect.c

2025-01-10 Thread Martin KaFai Lau
On 1/10/25 1:21 AM, Bastien Curutchet (eBPF Foundation) wrote: +static void ping_test(struct test_data *data) +{ + struct test_xdp_redirect *skel = NULL; + struct xdp_dummy *skel_dummy = NULL; + struct nstoken *nstoken = NULL; + int i, ret; + + skel_dummy = xdp_dummy

Re: [PATCH bpf-next v2 0/3] selftests: bpf: Migrate test_xdp_redirect.sh to test_progs

2025-01-10 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Martin KaFai Lau : On Fri, 10 Jan 2025 10:21:08 +0100 you wrote: > Hi all, > > This patch series continues the work to migrate the *.sh tests into > prog_tests. > > test_xdp_redirect.sh tests the XDP redirections done through > bpf_

Re: [PATCH 3/6] syscall.h: introduce syscall_set_nr()

2025-01-10 Thread Dmitry V. Levin
On Fri, Jan 10, 2025 at 08:37:46AM +0100, Sven Schnelle wrote: > "Dmitry V. Levin" writes: > > > 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

Re: [PATCH] selftests/net/forwarding: teamd command not found

2025-01-10 Thread Jakub Kicinski
On Fri, 10 Jan 2025 15:35:23 +0100 Alessandro Zanni wrote: > On Fri, Jan 10, 2025 at 04:09:07AM +, Hangbin Liu wrote: > > On Fri, Jan 10, 2025 at 01:07:44AM +0100, Alessandro Zanni wrote: > > > Running "make kselftest TARGETS=net/forwarding" results in several > > > occurrences of the same er

Re: [PATCH] selftests/net/forwarding: teamd command not found

2025-01-10 Thread Hangbin Liu
On Fri, Jan 10, 2025 at 03:35:23PM +0100, Alessandro Zanni wrote: > On Fri, Jan 10, 2025 at 04:09:07AM +, Hangbin Liu wrote: > > On Fri, Jan 10, 2025 at 01:07:44AM +0100, Alessandro Zanni wrote: > > > Running "make kselftest TARGETS=net/forwarding" results in several > > > occurrences of the sa

[PATCH 2/2] selftests/mm: add tests for splitting pmd THPs to all lower orders.

2025-01-10 Thread Zi Yan
Kernel already supports splitting a folio to any lower order. Test it. Signed-off-by: Zi Yan --- tools/testing/selftests/mm/split_huge_page_test.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/

[PATCH 1/2] selftests/mm: use selftests framework to print test result.

2025-01-10 Thread Zi Yan
Otherwise the number of tests does not match the reality. Fixes: 391e86971161 ("mm: selftest to verify zero-filled pages are mapped to zeropage") Signed-off-by: Zi Yan --- .../selftests/mm/split_huge_page_test.c | 34 +++ 1 file changed, 12 insertions(+), 22 deletions(-)

Re: [PATCH net-next 1/3] virtio_net: Prepare for NAPI to queue mapping

2025-01-10 Thread Gerhard Engleder
On 10.01.25 21:26, Joe Damato wrote: Slight refactor to prepare the code for NAPI to queue mapping. No functional changes. Signed-off-by: Joe Damato --- drivers/net/virtio_net.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/

Re: [PATCH net v2 5/5] vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]

2025-01-10 Thread Hyunwoo Kim
On Fri, Jan 10, 2025 at 09:35:11AM +0100, Stefano Garzarella wrote: > Recent reports have shown how we sometimes call vsock_*_has_data() > when a vsock socket has been de-assigned from a transport (see attached > links), but we shouldn't. > > Previous commits should have solved the real problems,

Re: [PATCH bpf-next] bpf: veristat: Document verifier log dumping capability

2025-01-10 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Thu, 9 Jan 2025 16:42:29 -0700 you wrote: > `-l2 -v` is a useful combination of flags to dump the entire > verification log. This is helpful when making changes to the verifier, > as you can see what it thinks pro

Re: [PATCH net v2 3/5] vsock/virtio: cancel close work in the destructor

2025-01-10 Thread Hyunwoo Kim
On Fri, Jan 10, 2025 at 09:35:09AM +0100, Stefano Garzarella wrote: > During virtio_transport_release() we can schedule a delayed work to > perform the closing of the socket before destruction. > > The destructor is called either when the socket is really destroyed > (reference counter to zero), o

Re: [PATCH net v2 1/5] vsock/virtio: discard packets if the transport changes

2025-01-10 Thread Hyunwoo Kim
On Fri, Jan 10, 2025 at 09:35:07AM +0100, Stefano Garzarella wrote: > If the socket has been de-assigned or assigned to another transport, > we must discard any packets received because they are not expected > and would cause issues when we access vsk->transport. > > A possible scenario is describ

Re: [PATCH bpf-next] bpf: veristat: Document verifier log dumping capability

2025-01-10 Thread Andrii Nakryiko
On Thu, Jan 9, 2025 at 3:42 PM Daniel Xu wrote: > > `-l2 -v` is a useful combination of flags to dump the entire > verification log. This is helpful when making changes to the verifier, > as you can see what it thinks program one instruction at a time. > > This was more or less a hidden feature be

Re: [PATCH 2/3] libbpf: Remove powerpc prefix from syscall function names

2025-01-10 Thread Andrii Nakryiko
On Fri, Jan 10, 2025 at 2:49 AM Saket Kumar Bhaskar wrote: > > On Thu, Nov 21, 2024 at 04:00:13PM -0800, Andrii Nakryiko wrote: > > On Wed, Nov 20, 2024 at 6:52 AM Saket Kumar Bhaskar > > wrote: > > > > > > On Fri, Nov 08, 2024 at 10:43:54AM -0800, Andrii Nakryiko wrote: > > > > On Sun, Nov 3, 2

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

2025-01-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 v17 03/25] ovpn: add basic interface creation/destruction/management routines

2025-01-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 v17 23/25] ovpn: notify userspace when a peer is deleted

2025-01-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 v17 20/25] ovpn: implement peer add/get/dump/delete via netlink

2025-01-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 | 630 - driver

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

2025-01-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 v17 24/25] ovpn: add basic ethtool support

2025-01-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 v17 19/25] ovpn: add support for peer floating

2025-01-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 | 4 + drivers/net/ovpn/peer.c | 243 +

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

2025-01-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 v17 17/25] ovpn: implement keepalive mechanism

2025-01-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 | 77 + drivers/net/ovp

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

2025-01-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 v17 15/25] ovpn: implement multi-peer support

2025-01-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/ovpnstruct

[PATCH net-next v17 16/25] ovpn: implement peer lookup logic

2025-01-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 v17 14/25] ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg

2025-01-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 v17 12/25] ovpn: implement TCP transport

2025-01-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 v17 13/25] skb: implement skb_send_sock_locked_with_flags()

2025-01-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 v17 09/25] ovpn: implement packet processing

2025-01-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 v17 11/25] ipv6: export inet6_stream_ops via EXPORT_SYMBOL_GPL

2025-01-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 v17 10/25] ovpn: store tunnel and transport statistics

2025-01-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 v17 08/25] ovpn: implement basic RX path (UDP)

2025-01-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 v17 07/25] ovpn: implement basic TX path (UDP)

2025-01-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 v17 06/25] ovpn: introduce the ovpn_socket object

2025-01-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 v17 05/25] ovpn: introduce the ovpn_peer object

2025-01-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 v17 04/25] ovpn: keep carrier always on for MP interfaces

2025-01-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 v17 02/25] ovpn: add basic netlink support

2025-01-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 v17 00/25] Introducing OpenVPN Data Channel Offload

2025-01-10 Thread Antonio Quartulli
Notable changes since v16: * fixed usage of netdev tracker by removing dev_tracker member from ovpn_priv and adding it to ovpn_peer and ovpn_socket as those are the objects really holding a ref to the netdev * switched ovpn_get_dev_from_attrs() to GFP_ATOMIC to prevent sleep under rcu_read_lo

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

2025-01-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 net-next 3/3] virtio_net: Map NAPIs to queues

2025-01-10 Thread Gerhard Engleder
On 10.01.25 21:26, Joe Damato wrote: Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping can be accessed by user apps. $ ethtool -i ens4 | grep driver driver: virtio_net $ sudo ethtool -L ens4 combined 4 $ ./tools/net/ynl/pyynl/cli.py \ --spec Documentation/netlink/s

Re: [PATCH net-next 2/3] virtio_net: Hold RTNL for NAPI to queue mapping

2025-01-10 Thread Gerhard Engleder
On 10.01.25 21:26, Joe Damato wrote: Prepare for NAPI to queue mapping by holding RTNL in code paths where NAPIs will be mapped to queue IDs and RTNL is not currently held. Signed-off-by: Joe Damato --- drivers/net/virtio_net.c | 17 ++--- 1 file changed, 14 insertions(+), 3 de

Re: [sos-linux-ext-patches] [PATCH v4 2/8] KVM: selftests: SEV-SNP test for KVM_SEV_INIT2

2025-01-10 Thread Pratik Rajesh Sampat
On 1/9/25 11:52 PM, Nikunj A. Dadhania wrote: > > > On 11/15/2024 5:10 AM, Pratik R. Sampat wrote: >> Add the X86_FEATURE_SNP CPU feature to the architectural definition for >> the SEV-SNP VM type to exercise the KVM_SEV_INIT2 call. Ensure that the >> SNP test is skipped in scenarios where CPU

Re: [sos-linux-ext-patches] [PATCH v4 1/8] KVM: SEV: Disable SEV-SNP on FW validation failure

2025-01-10 Thread Pratik Rajesh Sampat
Hi Nikunj, On 1/9/25 11:21 PM, Nikunj A. Dadhania wrote: > > > On 11/15/2024 5:10 AM, Pratik R. Sampat wrote: >> On incompatible firmware versions, SEV-SNP support is pulled and the >> setup is not performed. However, the platform and subsequently the KVM >> capability may continue to advertize

[PATCH net-next 3/3] virtio_net: Map NAPIs to queues

2025-01-10 Thread Joe Damato
Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping can be accessed by user apps. $ ethtool -i ens4 | grep driver driver: virtio_net $ sudo ethtool -L ens4 combined 4 $ ./tools/net/ynl/pyynl/cli.py \ --spec Documentation/netlink/specs/netdev.yaml \ --dump queue-g

[PATCH net-next 2/3] virtio_net: Hold RTNL for NAPI to queue mapping

2025-01-10 Thread Joe Damato
Prepare for NAPI to queue mapping by holding RTNL in code paths where NAPIs will be mapped to queue IDs and RTNL is not currently held. Signed-off-by: Joe Damato --- drivers/net/virtio_net.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio

[PATCH net-next 1/3] virtio_net: Prepare for NAPI to queue mapping

2025-01-10 Thread Joe Damato
Slight refactor to prepare the code for NAPI to queue mapping. No functional changes. Signed-off-by: Joe Damato --- drivers/net/virtio_net.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 7646ddd9bef7..cff1

[PATCH net-next 0/3] virtio_net: Link queues to NAPIs

2025-01-10 Thread Joe Damato
Greetings: Recently [1], Jakub mentioned that there were a few drivers that are not yet mapping queues to NAPIs. While I don't have any of the other hardware mentioned, I do happen to have a virtio_net laying around ;) I've attempted to link queues to NAPIs, taking care to hold RTNL when it seem

Re: [PATCH RFC 2/2] module: Introduce hash-based integrity checking

2025-01-10 Thread Luis Chamberlain
On Thu, Jan 09, 2025 at 11:52:27AM +0100, Arnout Engelen wrote: > On Fri, 3 Jan 2025 17:37:52 -0800, Luis Chamberlain wrote: > > What distro which is using module signatures would switch > > to this as an alternative instead? > > In NixOS, we disable MODULE_SIG by default (because we value > repro

Re: [PATCH 01/16] selftests/mm: remove argc and argv unused parameters

2025-01-10 Thread David Laight
On Thu, 9 Jan 2025 22:38:27 +0500 Muhammad Usama Anjum wrote: > Remove the following warnings by removing unused argc and argv > parameters: > In function ‘main’: > warning: unused parameter ‘argc’ [-Wunused-parameter] > 158 | int main(int argc, char *argv[]) > | ^~~~

Re: [PATCH v8 00/18] Implement DWARF modversions

2025-01-10 Thread Masahiro Yamada
On Sat, Jan 4, 2025 at 5:45 AM Sami Tolvanen wrote: > > Hi, > > Here's v8 of the DWARF modversions series. The main motivation is > modversions support for Rust, which is important for distributions > like Android that are about to ship Rust kernel modules. Per Luis' > request [1], v2 dropped the

Re: [PATCH] selftests: livepatch: test if ftrace can trace a livepatched function

2025-01-10 Thread Filipe Xavier
Em 07/01/2025 13:23, Joe Lawrence escreveu: On Thu, Jan 02, 2025 at 03:42:10PM -0300, Filipe Xavier wrote: This new test makes sure that ftrace can trace a function that was introduced by a livepatch. Hi Filipe, Thanks for adding a test! Aside: another similar test could verify that the ori

Re: [PATCH] rseq/selftests: Fix riscv rseq_offset_deref_addv inline asm

2025-01-10 Thread Mathieu Desnoyers
On 2025-01-02 23:03, Stafford Horne wrote: When working on OpenRISC support for restartable sequences I noticed and fixed these two issues with the riscv support bits. 1 The 'inc' argument to RSEQ_ASM_OP_R_DEREF_ADDV was being implicitly passed to the macro. Fix this by adding 'inc' to th

Re: [PATCH 3/3] rseq/selftests: Add support for OpenRISC

2025-01-10 Thread Mathieu Desnoyers
On 2025-01-10 05:22, Stafford Horne wrote: Add support for OpenRISC in the rseq selftests. OpenRISC is 32-bit only. Tested this with: Compiler: gcc version 14.2.0 (GCC) Binutils: GNU assembler version 2.43.1 (or1k-smh-linux-gnu) using BFD version (GNU Binutils) 2.43.1.20241207

Re: [PATCH] dt-bindings: remoteproc: qcom,sm6115-pas: Use recommended MBN firmware format in DTS example

2025-01-10 Thread Rob Herring (Arm)
On Wed, 08 Jan 2025 13:02:21 +0100, Krzysztof Kozlowski wrote: > All Qualcomm firmwares uploaded to linux-firmware are in MBN format, > instead of split MDT. No functional changes, just correct the DTS > example so people will not rely on unaccepted files. > > Signed-off-by: Krzysztof Kozlowski

Re: [PATCH v2 1/3] selftests/mm: virtual_address_range: mmap() without PROT_WRITE

2025-01-10 Thread Dev Jain
On 10/01/25 6:35 pm, Thomas Weißschuh wrote: When mapping a larger chunk than physical memory is available with PROT_WRITE and overcommit is disabled, the mapping will fail. This will prevent the test from running on systems with less then ~1GiB of memory and triggering an inscrutinable test f

Re: [PATCH v2 3/3] selftests/mm: virtual_address_range: Avoid reading VVAR mappings

2025-01-10 Thread David Hildenbrand
On 10.01.25 14:05, Thomas Weißschuh wrote: The virtual_address_range selftest reads from the start of each mapping listed in /proc/self/maps. However not all mappings are valid to be arbitrarily accessed. For example the vvar data used for virtual clocks on x86 [vvar_vclock] can only be accessed

Re: [PATCH v2 2/3] selftests/mm: virtual_address_range: Unmap chunks after validation

2025-01-10 Thread David Hildenbrand
On 10.01.25 14:05, Thomas Weißschuh wrote: For each accessed chunk a PTE is created. More than 1GiB of PTEs is used in this way. Remove each PTE after validating a chunk to reduce peak memory usage. It is important to only unmap memory that previously mmap()ed, as unmapping other mappings like t

Re: [PATCH v2 1/3] selftests/mm: virtual_address_range: mmap() without PROT_WRITE

2025-01-10 Thread David Hildenbrand
On 10.01.25 14:05, Thomas Weißschuh wrote: When mapping a larger chunk than physical memory is available with PROT_WRITE and overcommit is disabled, the mapping will fail. This will prevent the test from running on systems with less then ~1GiB of memory and triggering an inscrutinable test failur

Re: [PATCH] virtio: console: Replace deprecated kmap_atomic with kmap_local_page

2025-01-10 Thread Ira Weiny
David Reaver wrote: > kmap_atomic() is deprecated and should be replaced with kmap_local_page() > [1][2]. kmap_local_page() is faster in kernels with HIGHMEM enabled, can > take page faults, and allows preemption. Thanks for taking these on! It is good to see some progress here. > > According t

Re: [PATCH v8 00/20] Refactor TI K3 DSP and M4 Drivers

2025-01-10 Thread Beleswar Prasad Padhi
Hi Andrew, On 08/01/25 20:33, Andrew Davis wrote: On 1/3/25 4:12 AM, Beleswar Padhi wrote: This series refactors a lot of functions & callbacks from ti_k3_dsp_remoteproc.c and ti_k3_m4_remoteproc.c drivers. This is the third and final series as part of the refactoring of K3 remoteproc drivers.

Re: [PATCH] selftests/net/forwarding: teamd command not found

2025-01-10 Thread Alessandro Zanni
On Fri, Jan 10, 2025 at 04:09:07AM +, Hangbin Liu wrote: > On Fri, Jan 10, 2025 at 01:07:44AM +0100, Alessandro Zanni wrote: > > Running "make kselftest TARGETS=net/forwarding" results in several > > occurrences of the same error: > > ./lib.sh: line 787: teamd: command not found > > > > Since

Re: [PATCH v2 0/3] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read()

2025-01-10 Thread Greg Kroah-Hartman
On Thu, Jan 09, 2025 at 12:23:01AM -0800, Christoph Hellwig wrote: > On Thu, Jan 09, 2025 at 09:12:03AM +0100, Greg Kroah-Hartman wrote: > > > Hey, when I duplicated the method to convert sysfs over to a proper > > > seq_file based approach that avoids buffer overflows you basically > > > came up w

[PATCH v2 2/3] selftests/mm: virtual_address_range: Unmap chunks after validation

2025-01-10 Thread Thomas Weißschuh
For each accessed chunk a PTE is created. More than 1GiB of PTEs is used in this way. Remove each PTE after validating a chunk to reduce peak memory usage. It is important to only unmap memory that previously mmap()ed, as unmapping other mappings like the stack, heap or executable mappings will cr

[PATCH v2 3/3] selftests/mm: virtual_address_range: Avoid reading VVAR mappings

2025-01-10 Thread Thomas Weißschuh
The virtual_address_range selftest reads from the start of each mapping listed in /proc/self/maps. However not all mappings are valid to be arbitrarily accessed. For example the vvar data used for virtual clocks on x86 [vvar_vclock] can only be accessed if 1) the kernel configuration enables virtua

[PATCH v2 0/3] selftests/mm: virtual_address_range: Reduce memory usage and avoid VVAR access

2025-01-10 Thread Thomas Weißschuh
The selftest started failing since commit e93d2521b27f ("x86/vdso: Split virtual clock pages into dedicated mapping") was merged. While debugging I stumbled upon some memory usage optimizations. With these test now runs on a VM with only 60MiB of memory. Signed-off-by: Thomas Weißschuh --- Chang

[PATCH v2 1/3] selftests/mm: virtual_address_range: mmap() without PROT_WRITE

2025-01-10 Thread Thomas Weißschuh
When mapping a larger chunk than physical memory is available with PROT_WRITE and overcommit is disabled, the mapping will fail. This will prevent the test from running on systems with less then ~1GiB of memory and triggering an inscrutinable test failure. As the mappings are never written to anywa

Re: [RFC PATCH v2 2/2] selftests/memfd: Add tests for F_SEAL_FUTURE_EXEC

2025-01-10 Thread Alice Ryhl
On Fri, Dec 27, 2024 at 2:52 AM Isaac J. Manjarres wrote: > > Add tests to ensure that F_SEAL_FUTURE_EXEC behaves as expected. > > Signed-off-by: Isaac J. Manjarres Reviewed-by: Alice Ryhl

Re: [PATCH net v2 4/5] vsock: reset socket state when de-assigning the transport

2025-01-10 Thread Stefano Garzarella
On Fri, Jan 10, 2025 at 11:56:28AM +0100, Luigi Leonardi wrote: On Fri, Jan 10, 2025 at 09:35:10AM +0100, Stefano Garzarella wrote: Transport's release() and destruct() are called when de-assigning the vsock transport. These callbacks can touch some socket state like sock flags, sk_state, and pe

Re: [PATCH] landlock: ptrace_test: remove unused macros

2025-01-10 Thread Mickaël Salaün
Thanks! This is now merged in my next tree. On Mon, Nov 18, 2024 at 12:24:07PM +0800, Ba Jing wrote: > After reviewing the code, it was found that these macros are never > referenced in the code. Just remove them. > > Signed-off-by: Ba Jing > --- > tools/testing/selftests/landlock/ptrace_test.

Re: [PATCH net v2 3/5] vsock/virtio: cancel close work in the destructor

2025-01-10 Thread Luigi Leonardi
On Fri, Jan 10, 2025 at 09:35:09AM +0100, Stefano Garzarella wrote: During virtio_transport_release() we can schedule a delayed work to perform the closing of the socket before destruction. The destructor is called either when the socket is really destroyed (reference counter to zero), or it can

Re: [PATCH net v2 4/5] vsock: reset socket state when de-assigning the transport

2025-01-10 Thread Luigi Leonardi
On Fri, Jan 10, 2025 at 09:35:10AM +0100, Stefano Garzarella wrote: Transport's release() and destruct() are called when de-assigning the vsock transport. These callbacks can touch some socket state like sock flags, sk_state, and peer_shutdown. Since we are reassigning the socket to a new transp

Re: [PATCH 2/3] libbpf: Remove powerpc prefix from syscall function names

2025-01-10 Thread Saket Kumar Bhaskar
On Thu, Nov 21, 2024 at 04:00:13PM -0800, Andrii Nakryiko wrote: > On Wed, Nov 20, 2024 at 6:52 AM Saket Kumar Bhaskar > wrote: > > > > On Fri, Nov 08, 2024 at 10:43:54AM -0800, Andrii Nakryiko wrote: > > > On Sun, Nov 3, 2024 at 9:00 PM Saket Kumar Bhaskar > > > wrote: > > > > > > > > Since co

[PATCH] selftests/bpf: Fix test_xdp_adjust_tail_grow2 selftest on powerpc

2025-01-10 Thread Saket Kumar Bhaskar
On powerpc cache line size is 128 bytes, so skb_shared_info must be aligned accordingly. Signed-off-by: Saket Kumar Bhaskar --- tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c | 2 ++ tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_grow.c | 2 ++ 2 files changed, 4 insertion

[PATCH 3/3] rseq/selftests: Add support for OpenRISC

2025-01-10 Thread Stafford Horne
Add support for OpenRISC in the rseq selftests. OpenRISC is 32-bit only. Tested this with: Compiler: gcc version 14.2.0 (GCC) Binutils: GNU assembler version 2.43.1 (or1k-smh-linux-gnu) using BFD version (GNU Binutils) 2.43.1.20241207 Linux: Linux buildroot 6.13.0-rc2-5-g1

[PATCH 2/3] openrisc: Add support for restartable sequences

2025-01-10 Thread Stafford Horne
Implement support for restartable sequences on OpenRISC by doing: - Select HAVE_RSEQ in Kconfig - Call rseq_syscall() on return to userspace when CONFIG_DEBUG_RSEQ is enabled. - Call rseq_signal_deliver() to fixup the pre-signal stack frame when a signal is delivered on top of a restartabl

[PATCH 1/3] openrisc: Add HAVE_REGS_AND_STACK_ACCESS_API support

2025-01-10 Thread Stafford Horne
From: Michael Jeanson Support for HAVE_REGS_AND_STACK_ACCESS_API needed for restartable sequences. The implementation has been copied from riscv and tested with the restartable sequences self tests. Note, pt-regs members are 'long' on openrisc which require casts for the api, someday we should

[PATCH 0/3] Add OpenRISC restartable sequences support

2025-01-10 Thread Stafford Horne
This series adds restartable sequences support to OpenRISC. This came after discussions with Michael on the libc-alpha list where he added some preliminary rseq support [1]. The changes use mostly the riscv port as a template. The patches were tested with selftests on qemu using my glibc branch

Re: [PATCH] rseq/selftests: Fix riscv rseq_offset_deref_addv inline asm

2025-01-10 Thread Stafford Horne
On Thu, Jan 09, 2025 at 06:29:01PM -0800, Charlie Jenkins wrote: > On Fri, Jan 03, 2025 at 04:03:26AM +, Stafford Horne wrote: > > When working on OpenRISC support for restartable sequences I noticed > > and fixed these two issues with the riscv support bits. > > > > 1 The 'inc' argument to R

Re: [PATCH net v2 5/5] vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]

2025-01-10 Thread Luigi Leonardi
On Fri, Jan 10, 2025 at 09:35:11AM +0100, Stefano Garzarella wrote: Recent reports have shown how we sometimes call vsock_*_has_data() when a vsock socket has been de-assigned from a transport (see attached links), but we shouldn't. Previous commits should have solved the real problems, but we m

[PATCH bpf-next v2 2/3] selftests/bpf: Migrate test_xdp_redirect.sh to xdp_do_redirect.c

2025-01-10 Thread Bastien Curutchet (eBPF Foundation)
test_xdp_redirect.sh can't be used by the BPF CI. Migrate test_xdp_redirect.sh into a new test case in xdp_do_redirect.c. It uses the same network topology and the same BPF programs located in progs/test_xdp_redirect.c and progs/xdp_dummy.c. Remove test_xdp_redirect.sh and its Makefile entry. Sig

[PATCH bpf-next v2 0/3] selftests: bpf: Migrate test_xdp_redirect.sh to test_progs

2025-01-10 Thread Bastien Curutchet (eBPF Foundation)
Hi all, This patch series continues the work to migrate the *.sh tests into prog_tests. test_xdp_redirect.sh tests the XDP redirections done through bpf_redirect(). These XDP redirections are already tested by prog_tests/xdp_do_redirect.c but IMO it doesn't cover the exact same code path because

[PATCH bpf-next v2 3/3] selftests/bpf: Migrate test_xdp_redirect.c to test_xdp_do_redirect.c

2025-01-10 Thread Bastien Curutchet (eBPF Foundation)
prog_tests/xdp_do_redirect.c is the only user of the BPF programs located in progs/test_xdp_do_redirect.c and progs/test_xdp_redirect.c. There is no need to keep both files with such close names. Move test_xdp_redirect.c contents to test_xdp_do_redirect.c and remove progs/test_xdp_redirect.c Sign

  1   2   >