From 0402b8b739da385d4117f5e1fd250cf273049346 Mon Sep 17 00:00:00 2001 From: Matej Hrica Date: Mon, 1 Jun 2026 16:59:14 +0200 Subject: [PATCH] tsi: forward protocol field in proxy create enabling DGRAM+ICMP ping Add protocol to struct tsi_proxy_create and struct tsi_sock so the host VMM can distinguish SOCK_DGRAM+IPPROTO_ICMP ("ping" socket) from plain UDP. Without this, TSI hijacks ping sockets but the host creates UDP sockets, breaking ICMP echo. This enables ping for implementations that use SOCK_DGRAM ping sockets (iputils on modern Fedora, Ubuntu, etc.). SOCK_RAW-based ping (busybox/alpine) is not supported as TSI only hijacks SOCK_STREAM and SOCK_DGRAM. Assisted-by: OpenCode:claude-opus-4.6 Signed-off-by: Matej Hrica --- ...01-krunfw-Don-t-panic-when-init-dies.patch | 6 +-- ...nfw-Ignore-run_cmd-on-orderly-reboot.patch | 4 +- ...ralize-recvmsg-and-drop-transport-dg.patch | 20 +++++----- ...vsock-refactor-transport-lookup-code.patch | 4 +- ...ck-support-multi-transport-datagrams.patch | 16 ++++---- .../0006-vsock-make-vsock-bind-reusable.patch | 4 +- ...add-VIRTIO_VSOCK_F_DGRAM-feature-bit.patch | 4 +- .../0008-virtio-vsock-support-dgrams.patch | 18 ++++----- ...-vsock-Add-support-for-SIOCINQ-ioctl.patch | 4 +- ...o-vsock-implement-has_data-for-DGRAM.patch | 14 +++---- ...-Socket-Impersonation-implementation.patch | 38 ++++++++++--------- ...i-allow-hijacking-sockets-tsi_hijack.patch | 8 ++-- ...-Unify-SCOPE_LOCAL_CPU-early-late-be.patch | 4 +- ...ctl-Introduce-PR_-SET-GET-_MEM_MODEL.patch | 8 ++-- ...PR_-GET-SET-_MEM_MODEL-for-always-TS.patch | 16 ++++---- ...scaffolding-to-add-ACTLR_EL1-to-thre.patch | 12 +++--- ...Apple-IMPDEF-TSO-memory-model-contro.patch | 14 +++---- ...virtio-Support-fence-passing-feature.patch | 20 +++++----- ...ocesses-to-use-compat-input-syscalls.patch | 12 +++--- .../0020-dax-Allow-block-size-PAGE_SIZE.patch | 4 +- ..._copy_user-fallback-path-for-remote-.patch | 4 +- patches/0022-virtgpu-gem-partial-map.patch | 4 +- patches/0023-virtgpu-mixed-page-size.patch | 4 +- ...-mark-DAX-inode-releases-as-blocking.patch | 4 +- ...tio-Fix-message-iterator-handling-on.patch | 4 +- ...tio-Allocate-nonlinear-SKBs-for-hand.patch | 4 +- ...ck-Allocate-nonlinear-SKBs-for-handl.patch | 6 +-- ...tio-cap-TX-credit-to-local-buffer-si.patch | 4 +- ...029-can-virtio-Add-virtio-CAN-driver.patch | 12 +++--- ...irtio_rtc-Add-module-and-driver-core.patch | 14 +++---- patches/0031-virtio_rtc-Add-PTP-clocks.patch | 12 +++--- ...Arm-Generic-Timer-cross-timestamping.patch | 8 ++-- ...0033-virtio_rtc-Add-RTC-class-driver.patch | 14 +++---- ...tc-Fix-compatibility-for-kernel-6.12.patch | 4 +- 34 files changed, 166 insertions(+), 162 deletions(-) diff --git a/patches/0001-krunfw-Don-t-panic-when-init-dies.patch b/patches/0001-krunfw-Don-t-panic-when-init-dies.patch index c492159..914e000 100644 --- a/patches/0001-krunfw-Don-t-panic-when-init-dies.patch +++ b/patches/0001-krunfw-Don-t-panic-when-init-dies.patch @@ -1,4 +1,4 @@ -From db20a79e5810bc9fc77655acde5c8e13e7942ba9 Mon Sep 17 00:00:00 2001 +From 0da747bedb82f4986ebe5103089d5041da049a51 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Thu, 2 Mar 2023 07:34:49 +0100 Subject: [PATCH 01/34] krunfw: Don't panic when init dies @@ -16,7 +16,7 @@ Signed-off-by: Sergio Lopez 2 files changed, 8 insertions(+) diff --git a/kernel/exit.c b/kernel/exit.c -index d465b36bcc86..f5fd756b9097 100644 +index d465b36bc..f5fd756b9 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -69,6 +69,8 @@ @@ -42,7 +42,7 @@ index d465b36bcc86..f5fd756b9097 100644 #ifdef CONFIG_POSIX_TIMERS hrtimer_cancel(&tsk->signal->real_timer); diff --git a/kernel/reboot.c b/kernel/reboot.c -index d6ee090eda94..f6947c5bd671 100644 +index d6ee090ed..f6947c5bd 100644 --- a/kernel/reboot.c +++ b/kernel/reboot.c @@ -278,10 +278,12 @@ void kernel_restart(char *cmd) diff --git a/patches/0002-krunfw-Ignore-run_cmd-on-orderly-reboot.patch b/patches/0002-krunfw-Ignore-run_cmd-on-orderly-reboot.patch index 7e8b8fd..25c494c 100644 --- a/patches/0002-krunfw-Ignore-run_cmd-on-orderly-reboot.patch +++ b/patches/0002-krunfw-Ignore-run_cmd-on-orderly-reboot.patch @@ -1,4 +1,4 @@ -From 2e7df3e03121c97e16bb72de31e8b5ba9908971a Mon Sep 17 00:00:00 2001 +From 9b7db54d469f94f121f71ec906e3b1eb6de87a97 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Mon, 16 May 2022 16:04:27 +0200 Subject: [PATCH 02/34] krunfw: Ignore run_cmd on orderly reboot @@ -12,7 +12,7 @@ Signed-off-by: Sergio Lopez 1 file changed, 4 insertions(+) diff --git a/kernel/reboot.c b/kernel/reboot.c -index f6947c5bd671..5925d8fcfbfa 100644 +index f6947c5bd..5925d8fcf 100644 --- a/kernel/reboot.c +++ b/kernel/reboot.c @@ -853,7 +853,11 @@ static int __orderly_reboot(void) diff --git a/patches/0003-vsock-dgram-generalize-recvmsg-and-drop-transport-dg.patch b/patches/0003-vsock-dgram-generalize-recvmsg-and-drop-transport-dg.patch index 1009700..583c1b0 100644 --- a/patches/0003-vsock-dgram-generalize-recvmsg-and-drop-transport-dg.patch +++ b/patches/0003-vsock-dgram-generalize-recvmsg-and-drop-transport-dg.patch @@ -1,4 +1,4 @@ -From 8ca8db16da5001752ca7d782a60d9af85e7899b7 Mon Sep 17 00:00:00 2001 +From ea8aef6718f96ca37e39e6f0c225661cf3c80c95 Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:28 +0000 Subject: [PATCH 03/34] vsock/dgram: generalize recvmsg and drop @@ -23,7 +23,7 @@ Signed-off-by: Bobby Eshleman 9 files changed, 137 insertions(+), 52 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c -index 78cc66fbb3dd..fee8d1380e95 100644 +index 78cc66fbb..fee8d1380 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -421,9 +421,11 @@ static struct virtio_transport vhost_transport = { @@ -40,7 +40,7 @@ index 78cc66fbb3dd..fee8d1380e95 100644 .stream_enqueue = virtio_transport_stream_enqueue, .stream_dequeue = virtio_transport_stream_dequeue, diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h -index 0c67543a45c8..06d5b15642ae 100644 +index 0c67543a4..06d5b1564 100644 --- a/include/linux/virtio_vsock.h +++ b/include/linux/virtio_vsock.h @@ -260,6 +260,9 @@ bool virtio_transport_stream_allow(u32 cid, u32 port); @@ -54,7 +54,7 @@ index 0c67543a45c8..06d5b15642ae 100644 int virtio_transport_connect(struct vsock_sock *vsk); diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h -index 70302c92d329..9ba6e2bcef94 100644 +index 70302c92d..9ba6e2bce 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h @@ -120,11 +120,20 @@ struct vsock_transport { @@ -81,7 +81,7 @@ index 70302c92d329..9ba6e2bcef94 100644 /* STREAM. */ /* TODO: stream_bind() */ diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c -index 282d97323324..fccb4761b8af 100644 +index 282d97323..fccb4761b 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1359,10 +1359,62 @@ static int vsock_dgram_connect(struct socket *sock, @@ -151,7 +151,7 @@ index 282d97323324..fccb4761b8af 100644 int vsock_dgram_recvmsg(struct socket *sock, struct msghdr *msg, diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c -index 56c232cf5b0f..cc0a6c3401d3 100644 +index 56c232cf5..cc0a6c340 100644 --- a/net/vmw_vsock/hyperv_transport.c +++ b/net/vmw_vsock/hyperv_transport.c @@ -557,8 +557,17 @@ static int hvs_dgram_bind(struct vsock_sock *vsk, struct sockaddr_vm *addr) @@ -186,7 +186,7 @@ index 56c232cf5b0f..cc0a6c3401d3 100644 .dgram_allow = hvs_dgram_allow, diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c -index b6569b0ca2bb..d1107b65445e 100644 +index b6569b0ca..d1107b654 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -552,9 +552,11 @@ static struct virtio_transport virtio_transport = { @@ -203,7 +203,7 @@ index b6569b0ca2bb..d1107b65445e 100644 .stream_dequeue = virtio_transport_stream_dequeue, .stream_enqueue = virtio_transport_stream_enqueue, diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c -index 9b1f9a83c711..3ef8ff2a8b3c 100644 +index 9b1f9a83c..3ef8ff2a8 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -1069,6 +1069,24 @@ int virtio_transport_dgram_bind(struct vsock_sock *vsk, @@ -232,7 +232,7 @@ index 9b1f9a83c711..3ef8ff2a8b3c 100644 { return false; diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c -index aca3132689cf..956109393596 100644 +index aca313268..956109393 100644 --- a/net/vmw_vsock/vmci_transport.c +++ b/net/vmw_vsock/vmci_transport.c @@ -1731,57 +1731,40 @@ static int vmci_transport_dgram_enqueue( @@ -331,7 +331,7 @@ index aca3132689cf..956109393596 100644 .stream_enqueue = vmci_transport_stream_enqueue, .stream_has_data = vmci_transport_stream_has_data, diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c -index 6e78927a598e..3d5e05d8950f 100644 +index 6e78927a5..3d5e05d89 100644 --- a/net/vmw_vsock/vsock_loopback.c +++ b/net/vmw_vsock/vsock_loopback.c @@ -66,9 +66,11 @@ static struct virtio_transport loopback_transport = { diff --git a/patches/0004-vsock-refactor-transport-lookup-code.patch b/patches/0004-vsock-refactor-transport-lookup-code.patch index bcc6798..a06f04b 100644 --- a/patches/0004-vsock-refactor-transport-lookup-code.patch +++ b/patches/0004-vsock-refactor-transport-lookup-code.patch @@ -1,4 +1,4 @@ -From 0530d4f1e7c9112d492330d74bab3426ef4f5cf6 Mon Sep 17 00:00:00 2001 +From cd2567c2893c26ddb909d18f91e2f1e8f140b701 Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:29 +0000 Subject: [PATCH 04/34] vsock: refactor transport lookup code @@ -14,7 +14,7 @@ Signed-off-by: Bobby Eshleman 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c -index fccb4761b8af..4a8f62e7520d 100644 +index fccb4761b..4a8f62e75 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -432,6 +432,22 @@ static void vsock_deassign_transport(struct vsock_sock *vsk) diff --git a/patches/0005-vsock-support-multi-transport-datagrams.patch b/patches/0005-vsock-support-multi-transport-datagrams.patch index 4101970..eccd8cd 100644 --- a/patches/0005-vsock-support-multi-transport-datagrams.patch +++ b/patches/0005-vsock-support-multi-transport-datagrams.patch @@ -1,4 +1,4 @@ -From 365643863f3166d827024d4b6067222a6453d015 Mon Sep 17 00:00:00 2001 +From 9cdf08429b6cbde858885db47b9d81c4fd4c50fa Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:30 +0000 Subject: [PATCH 05/34] vsock: support multi-transport datagrams @@ -57,7 +57,7 @@ Signed-off-by: Bobby Eshleman 7 files changed, 60 insertions(+), 36 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c -index fee8d1380e95..03b0e789d161 100644 +index fee8d1380..03b0e789d 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -421,7 +421,6 @@ static struct virtio_transport vhost_transport = { @@ -69,7 +69,7 @@ index fee8d1380e95..03b0e789d161 100644 .dgram_get_cid = virtio_transport_dgram_get_cid, .dgram_get_port = virtio_transport_dgram_get_port, diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h -index 06d5b15642ae..6c8791d3bc70 100644 +index 06d5b1564..6c8791d3b 100644 --- a/include/linux/virtio_vsock.h +++ b/include/linux/virtio_vsock.h @@ -257,8 +257,6 @@ void virtio_transport_notify_buffer_size(struct vsock_sock *vsk, u64 *val); @@ -82,7 +82,7 @@ index 06d5b15642ae..6c8791d3bc70 100644 int virtio_transport_dgram_get_cid(struct sk_buff *skb, unsigned int *cid); int virtio_transport_dgram_get_port(struct sk_buff *skb, unsigned int *port); diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c -index 4a8f62e7520d..c15d9a6f8b89 100644 +index 4a8f62e75..c15d9a6f8 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -448,6 +448,18 @@ vsock_connectible_lookup_transport(unsigned int cid, __u8 flags) @@ -238,7 +238,7 @@ index 4a8f62e7520d..c15d9a6f8b89 100644 /* sock map disallows redirection of non-TCP sockets with sk_state != diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c -index cc0a6c3401d3..4c6d705cc9e6 100644 +index cc0a6c340..4c6d705cc 100644 --- a/net/vmw_vsock/hyperv_transport.c +++ b/net/vmw_vsock/hyperv_transport.c @@ -552,11 +552,6 @@ static void hvs_destruct(struct vsock_sock *vsk) @@ -262,7 +262,7 @@ index cc0a6c3401d3..4c6d705cc9e6 100644 .dgram_get_port = hvs_dgram_get_port, .dgram_get_length = hvs_dgram_get_length, diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c -index d1107b65445e..e9828815e741 100644 +index d1107b654..e9828815e 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -551,7 +551,6 @@ static struct virtio_transport virtio_transport = { @@ -274,7 +274,7 @@ index d1107b65445e..e9828815e741 100644 .dgram_allow = virtio_transport_dgram_allow, .dgram_get_cid = virtio_transport_dgram_get_cid, diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c -index 3ef8ff2a8b3c..70eee056871c 100644 +index 3ef8ff2a8..70eee0568 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -1062,13 +1062,6 @@ bool virtio_transport_stream_allow(u32 cid, u32 port) @@ -292,7 +292,7 @@ index 3ef8ff2a8b3c..70eee056871c 100644 { return -EOPNOTSUPP; diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c -index 3d5e05d8950f..9e9e124f8d2b 100644 +index 3d5e05d89..9e9e124f8 100644 --- a/net/vmw_vsock/vsock_loopback.c +++ b/net/vmw_vsock/vsock_loopback.c @@ -65,7 +65,6 @@ static struct virtio_transport loopback_transport = { diff --git a/patches/0006-vsock-make-vsock-bind-reusable.patch b/patches/0006-vsock-make-vsock-bind-reusable.patch index a9f6a69..afb602a 100644 --- a/patches/0006-vsock-make-vsock-bind-reusable.patch +++ b/patches/0006-vsock-make-vsock-bind-reusable.patch @@ -1,4 +1,4 @@ -From cc6d6e946fdfd0e5aa2e1a9a1c6f4ecc199c2181 Mon Sep 17 00:00:00 2001 +From dc19a9346562235d5e58370b954f6de904860f06 Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:31 +0000 Subject: [PATCH 06/34] vsock: make vsock bind reusable @@ -12,7 +12,7 @@ Signed-off-by: Bobby Eshleman 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c -index c15d9a6f8b89..30517b362fcc 100644 +index c15d9a6f8..30517b362 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -235,11 +235,12 @@ static void __vsock_remove_connected(struct vsock_sock *vsk) diff --git a/patches/0007-virtio-vsock-add-VIRTIO_VSOCK_F_DGRAM-feature-bit.patch b/patches/0007-virtio-vsock-add-VIRTIO_VSOCK_F_DGRAM-feature-bit.patch index 0fa608a..b7925e2 100644 --- a/patches/0007-virtio-vsock-add-VIRTIO_VSOCK_F_DGRAM-feature-bit.patch +++ b/patches/0007-virtio-vsock-add-VIRTIO_VSOCK_F_DGRAM-feature-bit.patch @@ -1,4 +1,4 @@ -From 33ddfd0056365235338e46e289657fc1c1355bc2 Mon Sep 17 00:00:00 2001 +From f002441c13c5f155e858e0b9d16814b2604ccd29 Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:32 +0000 Subject: [PATCH 07/34] virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit @@ -12,7 +12,7 @@ Signed-off-by: Bobby Eshleman 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/virtio_vsock.h b/include/uapi/linux/virtio_vsock.h -index 64738838bee5..9c25f267bbc0 100644 +index 64738838b..9c25f267b 100644 --- a/include/uapi/linux/virtio_vsock.h +++ b/include/uapi/linux/virtio_vsock.h @@ -40,6 +40,7 @@ diff --git a/patches/0008-virtio-vsock-support-dgrams.patch b/patches/0008-virtio-vsock-support-dgrams.patch index c1cf39f..7bd5996 100644 --- a/patches/0008-virtio-vsock-support-dgrams.patch +++ b/patches/0008-virtio-vsock-support-dgrams.patch @@ -1,4 +1,4 @@ -From 2883434bdf71f2441c1d34788fb138c010533254 Mon Sep 17 00:00:00 2001 +From cafd874340bcce2fa2799543d12e8060710f7ce3 Mon Sep 17 00:00:00 2001 From: Bobby Eshleman Date: Sat, 10 Jun 2023 00:58:33 +0000 Subject: [PATCH 08/34] virtio/vsock: support dgrams @@ -36,7 +36,7 @@ Signed-off-by: Bobby Eshleman 8 files changed, 229 insertions(+), 59 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c -index 03b0e789d161..deaadc2503a2 100644 +index 03b0e789d..deaadc250 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -32,7 +32,8 @@ @@ -112,7 +112,7 @@ index 03b0e789d161..deaadc2503a2 100644 vq = &vsock->vqs[i]; mutex_lock(&vq->mutex); diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h -index 6c8791d3bc70..e3d7afa29894 100644 +index 6c8791d3b..e3d7afa29 100644 --- a/include/linux/virtio_vsock.h +++ b/include/linux/virtio_vsock.h @@ -257,7 +257,6 @@ void virtio_transport_notify_buffer_size(struct vsock_sock *vsk, u64 *val); @@ -133,7 +133,7 @@ index 6c8791d3bc70..e3d7afa29894 100644 +int virtio_transport_dgram_get_length(struct sk_buff *skb, size_t *len); #endif /* _LINUX_VIRTIO_VSOCK_H */ diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h -index 9ba6e2bcef94..5f93bb290a83 100644 +index 9ba6e2bce..5f93bb290 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h @@ -230,6 +230,7 @@ void vsock_for_each_connected_socket(struct vsock_transport *transport, @@ -145,7 +145,7 @@ index 9ba6e2bcef94..5f93bb290a83 100644 /**** TAP ****/ diff --git a/include/uapi/linux/virtio_vsock.h b/include/uapi/linux/virtio_vsock.h -index 9c25f267bbc0..27b4b2b8bf13 100644 +index 9c25f267b..27b4b2b8b 100644 --- a/include/uapi/linux/virtio_vsock.h +++ b/include/uapi/linux/virtio_vsock.h @@ -70,6 +70,7 @@ struct virtio_vsock_hdr { @@ -157,7 +157,7 @@ index 9c25f267bbc0..27b4b2b8bf13 100644 enum virtio_vsock_op { diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c -index 30517b362fcc..e949c9892c2c 100644 +index 30517b362..e949c9892 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -118,6 +118,7 @@ static int __vsock_bind(struct sock *sk, struct sockaddr_vm *addr); @@ -267,7 +267,7 @@ index 30517b362fcc..e949c9892c2c 100644 default: diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c -index e9828815e741..58d15edd296e 100644 +index e9828815e..58d15edd2 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -74,6 +74,7 @@ struct virtio_vsock { @@ -329,7 +329,7 @@ index e9828815e741..58d15edd296e 100644 static struct virtio_driver virtio_vsock_driver = { diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c -index 70eee056871c..b3ee9ce90b5d 100644 +index 70eee0568..b3ee9ce90 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -140,6 +140,35 @@ static void virtio_transport_init_hdr(struct sk_buff *skb, @@ -623,7 +623,7 @@ index 70eee056871c..b3ee9ce90b5d 100644 /* Release refcnt obtained when we fetched this socket out of the diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c -index 9e9e124f8d2b..b3066c854bb9 100644 +index 9e9e124f8..b3066c854 100644 --- a/net/vmw_vsock/vsock_loopback.c +++ b/net/vmw_vsock/vsock_loopback.c @@ -46,6 +46,7 @@ static int vsock_loopback_cancel_pkt(struct vsock_sock *vsk) diff --git a/patches/0009-vsock-Add-support-for-SIOCINQ-ioctl.patch b/patches/0009-vsock-Add-support-for-SIOCINQ-ioctl.patch index 22d9a25..ac7478b 100644 --- a/patches/0009-vsock-Add-support-for-SIOCINQ-ioctl.patch +++ b/patches/0009-vsock-Add-support-for-SIOCINQ-ioctl.patch @@ -1,4 +1,4 @@ -From 43fbbbc07f1ababcbfb305548aacdb5711dacf80 Mon Sep 17 00:00:00 2001 +From 32cb7650a5649f2baf76bd648a04ee56793a454e Mon Sep 17 00:00:00 2001 From: Xuewei Niu Date: Tue, 8 Jul 2025 14:36:12 +0800 Subject: [PATCH 09/34] vsock: Add support for SIOCINQ ioctl @@ -18,7 +18,7 @@ Signed-off-by: Sergio Lopez 1 file changed, 22 insertions(+) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c -index e949c9892c2c..23700ee6d732 100644 +index e949c9892..23700ee6d 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1545,6 +1545,28 @@ static int vsock_do_ioctl(struct socket *sock, unsigned int cmd, diff --git a/patches/0010-virtio-vsock-implement-has_data-for-DGRAM.patch b/patches/0010-virtio-vsock-implement-has_data-for-DGRAM.patch index 3edcd95..38dbc44 100644 --- a/patches/0010-virtio-vsock-implement-has_data-for-DGRAM.patch +++ b/patches/0010-virtio-vsock-implement-has_data-for-DGRAM.patch @@ -1,4 +1,4 @@ -From dcebe73b6fe14c1eb1c098c58dbcac9edc1df508 Mon Sep 17 00:00:00 2001 +From 5dc9e1c8c1a4553f806cc864263a87b0f0a33571 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Thu, 28 May 2026 11:43:46 +0200 Subject: [PATCH 10/34] virtio/vsock: implement has_data for DGRAM @@ -14,7 +14,7 @@ Signed-off-by: Sergio Lopez 6 files changed, 34 insertions(+), 1 deletion(-) diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h -index e3d7afa29894..34220effc4b0 100644 +index e3d7afa29..34220effc 100644 --- a/include/linux/virtio_vsock.h +++ b/include/linux/virtio_vsock.h @@ -215,6 +215,7 @@ ssize_t @@ -26,7 +26,7 @@ index e3d7afa29894..34220effc4b0 100644 s64 virtio_transport_stream_has_space(struct vsock_sock *vsk); u32 virtio_transport_seqpacket_has_data(struct vsock_sock *vsk); diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h -index 5f93bb290a83..45469aa8cf60 100644 +index 5f93bb290..45469aa8c 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h @@ -76,6 +76,7 @@ struct vsock_sock { @@ -46,7 +46,7 @@ index 5f93bb290a83..45469aa8cf60 100644 /* STREAM. */ /* TODO: stream_bind() */ diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c -index 23700ee6d732..ebd995fc6f5d 100644 +index 23700ee6d..ebd995fc6 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1007,6 +1007,15 @@ s64 vsock_stream_has_data(struct vsock_sock *vsk) @@ -79,7 +79,7 @@ index 23700ee6d732..ebd995fc6f5d 100644 ret = n_bytes; break; diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c -index 58d15edd296e..43eeeb32a318 100644 +index 58d15edd2..43eeeb32a 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -558,6 +558,7 @@ static struct virtio_transport virtio_transport = { @@ -91,7 +91,7 @@ index 58d15edd296e..43eeeb32a318 100644 .stream_dequeue = virtio_transport_stream_dequeue, .stream_enqueue = virtio_transport_stream_enqueue, diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c -index b3ee9ce90b5d..2cae5e2295b1 100644 +index b3ee9ce90..2cae5e229 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -907,6 +907,21 @@ int virtio_transport_dgram_get_length(struct sk_buff *skb, size_t *len) @@ -117,7 +117,7 @@ index b3ee9ce90b5d..2cae5e2295b1 100644 { struct virtio_vsock_sock *vvs = vsk->trans; diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c -index b3066c854bb9..09e6162030b0 100644 +index b3066c854..09e616203 100644 --- a/net/vmw_vsock/vsock_loopback.c +++ b/net/vmw_vsock/vsock_loopback.c @@ -71,6 +71,7 @@ static struct virtio_transport loopback_transport = { diff --git a/patches/0011-Transparent-Socket-Impersonation-implementation.patch b/patches/0011-Transparent-Socket-Impersonation-implementation.patch index f32738f..ea2437e 100644 --- a/patches/0011-Transparent-Socket-Impersonation-implementation.patch +++ b/patches/0011-Transparent-Socket-Impersonation-implementation.patch @@ -1,4 +1,4 @@ -From acc54e7a37c7bdf21f7d6da1cd1462c134484f37 Mon Sep 17 00:00:00 2001 +From 811fb49e396f27abeb6d6118191ce7bc4161ff6d Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Thu, 19 May 2022 22:38:26 +0200 Subject: [PATCH 11/34] Transparent Socket Impersonation implementation @@ -21,7 +21,7 @@ low overall footprint. TODO - implement remote [get|set]sockopt Co-authored-by: Matej Hrica - +Assisted-by: OpenCode:claude-opus-4.6 Signed-off-by: Sergio Lopez Signed-off-by: Matej Hrica --- @@ -31,18 +31,18 @@ Signed-off-by: Matej Hrica net/socket.c | 3 + net/tsi/Kconfig | 7 + net/tsi/Makefile | 4 + - net/tsi/af_tsi.c | 1577 +++++++++++++++++++++++++++ - net/tsi/af_tsi.h | 107 ++ + net/tsi/af_tsi.c | 1579 +++++++++++++++++++++++++++ + net/tsi/af_tsi.h | 109 ++ security/selinux/hooks.c | 8 +- security/selinux/include/classmap.h | 3 +- - 10 files changed, 1716 insertions(+), 3 deletions(-) + 10 files changed, 1720 insertions(+), 3 deletions(-) create mode 100644 net/tsi/Kconfig create mode 100644 net/tsi/Makefile create mode 100644 net/tsi/af_tsi.c create mode 100644 net/tsi/af_tsi.h diff --git a/include/linux/socket.h b/include/linux/socket.h -index c3322eb3d686..5ae7f94b3abc 100644 +index c3322eb3d..5ae7f94b3 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -240,8 +240,11 @@ struct ucred { @@ -69,7 +69,7 @@ index c3322eb3d686..5ae7f94b3abc 100644 /* Maximum queue length specifiable by listen. */ diff --git a/net/Kconfig b/net/Kconfig -index a629f92dc86b..91dfb9152b5b 100644 +index a629f92dc..91dfb9152 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -274,6 +274,7 @@ source "net/switchdev/Kconfig" @@ -81,7 +81,7 @@ index a629f92dc86b..91dfb9152b5b 100644 config PCPU_DEV_REFCNT bool "Use percpu variables to maintain network device refcount" diff --git a/net/Makefile b/net/Makefile -index 65bb8c72a35e..c1db937f3212 100644 +index 65bb8c72a..c1db937f3 100644 --- a/net/Makefile +++ b/net/Makefile @@ -79,3 +79,4 @@ obj-$(CONFIG_XDP_SOCKETS) += xdp/ @@ -90,7 +90,7 @@ index 65bb8c72a35e..c1db937f3212 100644 obj-$(CONFIG_NET_HANDSHAKE) += handshake/ +obj-$(CONFIG_TSI) += tsi/ diff --git a/net/socket.c b/net/socket.c -index a0f6f8b3376d..f317719ee75c 100644 +index a0f6f8b33..f317719ee 100644 --- a/net/socket.c +++ b/net/socket.c @@ -217,6 +217,9 @@ static const char * const pf_family_names[] = { @@ -105,7 +105,7 @@ index a0f6f8b3376d..f317719ee75c 100644 /* diff --git a/net/tsi/Kconfig b/net/tsi/Kconfig new file mode 100644 -index 000000000000..0f52ac6c9fa1 +index 000000000..0f52ac6c9 --- /dev/null +++ b/net/tsi/Kconfig @@ -0,0 +1,7 @@ @@ -118,7 +118,7 @@ index 000000000000..0f52ac6c9fa1 + TSI (Transparent Socket Impersonation). diff --git a/net/tsi/Makefile b/net/tsi/Makefile new file mode 100644 -index 000000000000..8b3cf74116a5 +index 000000000..8b3cf7411 --- /dev/null +++ b/net/tsi/Makefile @@ -0,0 +1,4 @@ @@ -128,10 +128,10 @@ index 000000000000..8b3cf74116a5 +tsi-y := af_tsi.o diff --git a/net/tsi/af_tsi.c b/net/tsi/af_tsi.c new file mode 100644 -index 000000000000..3d2bcd8d2ba4 +index 000000000..f5f0f9e23 --- /dev/null +++ b/net/tsi/af_tsi.c -@@ -0,0 +1,1577 @@ +@@ -0,0 +1,1579 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Transparent Socket Impersonation Driver @@ -417,6 +417,7 @@ index 000000000000..3d2bcd8d2ba4 + tpc.svm_port = tsk->svm_port = vm_addr.svm_port; + tpc.family = tsk->family; + tpc.type = type; ++ tpc.protocol = tsk->protocol; + + pr_debug("%s: type=%d\n", __func__, tpc.type); + @@ -1589,6 +1590,7 @@ index 000000000000..3d2bcd8d2ba4 + tsk->svm_peer_port = TSI_DEFAULT_PORT; + tsk->sendto_addr = NULL; + tsk->bound_addr = NULL; ++ tsk->protocol = protocol; + tsk->family = family; + + return 0; @@ -1711,10 +1713,10 @@ index 000000000000..3d2bcd8d2ba4 +MODULE_LICENSE("GPL v2"); diff --git a/net/tsi/af_tsi.h b/net/tsi/af_tsi.h new file mode 100644 -index 000000000000..b74966fd7ae3 +index 000000000..05d7a6735 --- /dev/null +++ b/net/tsi/af_tsi.h -@@ -0,0 +1,107 @@ +@@ -0,0 +1,109 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Transparent Socket Impersonation Driver @@ -1749,6 +1751,7 @@ index 000000000000..b74966fd7ae3 + u32 svm_port; + u16 family; + u16 type; ++ u16 protocol; +} __attribute__((packed)); + +struct tsi_connect_req { @@ -1814,6 +1817,7 @@ index 000000000000..b74966fd7ae3 + int bound_addr_len; + int sendto_addr_len; + u16 family; ++ u16 protocol; +}; + +struct tsi_proxy_release { @@ -1823,7 +1827,7 @@ index 000000000000..b74966fd7ae3 + +#endif diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c -index fc926d3cac6e..6e81037192c8 100644 +index fc926d3ca..6e8103719 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -1302,7 +1302,13 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc @@ -1842,7 +1846,7 @@ index fc926d3cac6e..6e81037192c8 100644 #endif } diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h -index 7229c9bf6c27..f08d24321603 100644 +index 7229c9bf6..f08d24321 100644 --- a/security/selinux/include/classmap.h +++ b/security/selinux/include/classmap.h @@ -173,6 +173,7 @@ const struct security_class_mapping secclass_map[] = { diff --git a/patches/0012-tsi-allow-hijacking-sockets-tsi_hijack.patch b/patches/0012-tsi-allow-hijacking-sockets-tsi_hijack.patch index 877a8b9..e8156fb 100644 --- a/patches/0012-tsi-allow-hijacking-sockets-tsi_hijack.patch +++ b/patches/0012-tsi-allow-hijacking-sockets-tsi_hijack.patch @@ -1,4 +1,4 @@ -From 7ba69a39a7184bd593b5c633ea870903fbedeb5d Mon Sep 17 00:00:00 2001 +From 92f853e298b631b1ed26db11dfdd4a2f604b73a3 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Thu, 19 May 2022 22:42:01 +0200 Subject: [PATCH 12/34] tsi: allow hijacking sockets (tsi_hijack) @@ -15,7 +15,7 @@ Signed-off-by: Sergio Lopez 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/net/socket.c b/net/socket.c -index f317719ee75c..0d3d172fceec 100644 +index f317719ee..0d3d172fc 100644 --- a/net/socket.c +++ b/net/socket.c @@ -115,6 +115,11 @@ unsigned int sysctl_net_busy_read __read_mostly; @@ -68,10 +68,10 @@ index f317719ee75c..0d3d172fceec 100644 pf = rcu_dereference(net_families[family]); err = -EAFNOSUPPORT; diff --git a/net/tsi/af_tsi.c b/net/tsi/af_tsi.c -index 3d2bcd8d2ba4..bd3dc75b3129 100644 +index f5f0f9e23..46e5d3859 100644 --- a/net/tsi/af_tsi.c +++ b/net/tsi/af_tsi.c -@@ -547,7 +547,7 @@ static int tsi_accept(struct socket *sock, struct socket *newsock, +@@ -548,7 +548,7 @@ static int tsi_accept(struct socket *sock, struct socket *newsock, struct socket *csocket; struct tsi_sock *tsk; struct tsi_sock *newtsk; diff --git a/patches/0013-arm64-cpufeature-Unify-SCOPE_LOCAL_CPU-early-late-be.patch b/patches/0013-arm64-cpufeature-Unify-SCOPE_LOCAL_CPU-early-late-be.patch index 88f91dc..5888d46 100644 --- a/patches/0013-arm64-cpufeature-Unify-SCOPE_LOCAL_CPU-early-late-be.patch +++ b/patches/0013-arm64-cpufeature-Unify-SCOPE_LOCAL_CPU-early-late-be.patch @@ -1,4 +1,4 @@ -From 13804d0a9d630bdca8ac1f4dea14d0261eaf9eb7 Mon Sep 17 00:00:00 2001 +From a73f8d68ef94474d05180673d2511b5bdb11239e Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Wed, 25 Sep 2024 16:35:34 +0200 Subject: [PATCH 13/34] arm64: cpufeature: Unify SCOPE_LOCAL_CPU early & late @@ -35,7 +35,7 @@ Signed-off-by: Asahi Lina 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c -index 5e68d65e675e..06ee74cc3dd9 100644 +index 5e68d65e6..06ee74cc3 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -3187,10 +3187,38 @@ static void update_cpu_capabilities(u16 scope_mask) diff --git a/patches/0014-prctl-Introduce-PR_-SET-GET-_MEM_MODEL.patch b/patches/0014-prctl-Introduce-PR_-SET-GET-_MEM_MODEL.patch index cfcdd1e..8469504 100644 --- a/patches/0014-prctl-Introduce-PR_-SET-GET-_MEM_MODEL.patch +++ b/patches/0014-prctl-Introduce-PR_-SET-GET-_MEM_MODEL.patch @@ -1,4 +1,4 @@ -From 8e65f9b0a12d8a2dbafcd6b61972ee6aac16e21c Mon Sep 17 00:00:00 2001 +From ba121a0cdaacd3d25ba36a26dbed795322d82cf0 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Thu, 11 Apr 2024 09:51:20 +0900 Subject: [PATCH 14/34] prctl: Introduce PR_{SET,GET}_MEM_MODEL @@ -43,7 +43,7 @@ Reviewed-by: Neal Gompa diff --git a/include/linux/memory_ordering_model.h b/include/linux/memory_ordering_model.h new file mode 100644 -index 000000000000..267a12ca6630 +index 000000000..267a12ca6 --- /dev/null +++ b/include/linux/memory_ordering_model.h @@ -0,0 +1,11 @@ @@ -59,7 +59,7 @@ index 000000000000..267a12ca6630 + +#endif diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h -index 35791791a879..36c278683cd6 100644 +index 35791791a..36c278683 100644 --- a/include/uapi/linux/prctl.h +++ b/include/uapi/linux/prctl.h @@ -328,4 +328,9 @@ struct prctl_mm_map { @@ -73,7 +73,7 @@ index 35791791a879..36c278683cd6 100644 + #endif /* _LINUX_PRCTL_H */ diff --git a/kernel/sys.c b/kernel/sys.c -index 35990f0796bc..3cb05c88a4b7 100644 +index 35990f079..3cb05c88a 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -45,6 +45,7 @@ diff --git a/patches/0015-arm64-Implement-PR_-GET-SET-_MEM_MODEL-for-always-TS.patch b/patches/0015-arm64-Implement-PR_-GET-SET-_MEM_MODEL-for-always-TS.patch index 93d0bee..a1c8a91 100644 --- a/patches/0015-arm64-Implement-PR_-GET-SET-_MEM_MODEL-for-always-TS.patch +++ b/patches/0015-arm64-Implement-PR_-GET-SET-_MEM_MODEL-for-always-TS.patch @@ -1,4 +1,4 @@ -From 70a9efbbe8fea5c2a167a3ecd1bb97fdba479c7a Mon Sep 17 00:00:00 2001 +From ac5e6d16ed792141785b036d06e35d39a5deec3e Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Thu, 11 Apr 2024 09:51:21 +0900 Subject: [PATCH 15/34] arm64: Implement PR_{GET,SET}_MEM_MODEL for always-TSO @@ -27,7 +27,7 @@ Reviewed-by: Neal Gompa create mode 100644 arch/arm64/kernel/cpufeature_impdef.c diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index f487c5e21e2f..8f97145095e0 100644 +index f487c5e21..8f9714509 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -2264,6 +2264,15 @@ config ARM64_DEBUG_PRIORITY_MASKING @@ -47,7 +47,7 @@ index f487c5e21e2f..8f97145095e0 100644 bool "Build a relocatable kernel image" if EXPERT select ARCH_HAS_RELR diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h -index 3d261cc123c1..c4379bde9a26 100644 +index 3d261cc12..c4379bde9 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -1038,6 +1038,10 @@ static inline bool cpu_has_lpa2(void) @@ -62,7 +62,7 @@ index 3d261cc123c1..c4379bde9a26 100644 #endif diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile -index 2b112f3b7510..2a11cdefbe04 100644 +index 2b112f3b7..2a11cdefb 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -33,7 +33,8 @@ obj-y := debug-monitors.o entry.o irq.o fpsimd.o \ @@ -76,7 +76,7 @@ index 2b112f3b7510..2a11cdefbe04 100644 obj-$(CONFIG_COMPAT) += sys32.o signal32.o \ sys_compat.o diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c -index 06ee74cc3dd9..e851e901bdaa 100644 +index 06ee74cc3..e851e901b 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1039,7 +1039,7 @@ static void init_cpu_ftr_reg(u32 sys_reg, u64 new) @@ -126,7 +126,7 @@ index 06ee74cc3dd9..e851e901bdaa 100644 * Detect broken pseudo-NMI. Must be called _before_ the call to diff --git a/arch/arm64/kernel/cpufeature_impdef.c b/arch/arm64/kernel/cpufeature_impdef.c new file mode 100644 -index 000000000000..de784a1fb49b +index 000000000..de784a1fb --- /dev/null +++ b/arch/arm64/kernel/cpufeature_impdef.c @@ -0,0 +1,38 @@ @@ -169,7 +169,7 @@ index 000000000000..de784a1fb49b + init_cpucap_indirect_list_from_array(arm64_impdef_features); +} diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c -index 2edf88c1c695..c753a0f6183b 100644 +index 2edf88c1c..c753a0f61 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -41,6 +41,7 @@ @@ -218,7 +218,7 @@ index 2edf88c1c695..c753a0f6183b 100644 #ifdef CONFIG_ARM64_TAGGED_ADDR_ABI diff --git a/arch/arm64/tools/cpucaps b/arch/arm64/tools/cpucaps -index eedb5acc21ed..bca63481e0cf 100644 +index eedb5acc2..bca63481e 100644 --- a/arch/arm64/tools/cpucaps +++ b/arch/arm64/tools/cpucaps @@ -53,6 +53,7 @@ HAS_STAGE2_FWB diff --git a/patches/0016-arm64-Introduce-scaffolding-to-add-ACTLR_EL1-to-thre.patch b/patches/0016-arm64-Introduce-scaffolding-to-add-ACTLR_EL1-to-thre.patch index 783c783..264e55a 100644 --- a/patches/0016-arm64-Introduce-scaffolding-to-add-ACTLR_EL1-to-thre.patch +++ b/patches/0016-arm64-Introduce-scaffolding-to-add-ACTLR_EL1-to-thre.patch @@ -1,4 +1,4 @@ -From ff6a8afce82d72c22b8e320232d959d70e16c306 Mon Sep 17 00:00:00 2001 +From 6e95795452b373515a9b4e822836a5f138dc9d5c Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Thu, 11 Apr 2024 09:51:22 +0900 Subject: [PATCH 16/34] arm64: Introduce scaffolding to add ACTLR_EL1 to thread @@ -24,7 +24,7 @@ Reviewed-by: Neal Gompa 5 files changed, 44 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index 8f97145095e0..8d587e0b21ef 100644 +index 8f9714509..8d587e0b2 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -430,6 +430,9 @@ config KASAN_SHADOW_OFFSET @@ -38,7 +38,7 @@ index 8f97145095e0..8d587e0b21ef 100644 menu "Kernel Features" diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h -index c4379bde9a26..1775e210f04f 100644 +index c4379bde9..1775e210f 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -915,6 +915,11 @@ static inline unsigned int get_vmid_bits(u64 mmfr1) @@ -54,7 +54,7 @@ index c4379bde9a26..1775e210f04f 100644 struct arm64_ftr_reg *get_arm64_ftr_reg(u32 sys_id); diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h -index 1438424f0064..ea4e32467068 100644 +index 1438424f0..ea4e32467 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -185,6 +185,9 @@ struct thread_struct { @@ -68,7 +68,7 @@ index 1438424f0064..ea4e32467068 100644 static inline unsigned int thread_get_vl(struct thread_struct *thread, diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c -index c753a0f6183b..f2bf5f7d6dbb 100644 +index c753a0f61..f2bf5f7d6 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -385,6 +385,11 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) @@ -118,7 +118,7 @@ index c753a0f6183b..f2bf5f7d6dbb 100644 /* * Complete any pending TLB or cache maintenance on this CPU in case diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c -index 8185979f0f11..4fcaaf9c7d2b 100644 +index 8185979f0..4fcaaf9c7 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -367,6 +367,14 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p) diff --git a/patches/0017-arm64-Implement-Apple-IMPDEF-TSO-memory-model-contro.patch b/patches/0017-arm64-Implement-Apple-IMPDEF-TSO-memory-model-contro.patch index 2afa841..74282c1 100644 --- a/patches/0017-arm64-Implement-Apple-IMPDEF-TSO-memory-model-contro.patch +++ b/patches/0017-arm64-Implement-Apple-IMPDEF-TSO-memory-model-contro.patch @@ -1,4 +1,4 @@ -From 9161539a310c798b58feba980796ac73021ec220 Mon Sep 17 00:00:00 2001 +From f1afeb25a09527e9319cabb47dd4fb0b54812613 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Thu, 11 Apr 2024 09:51:23 +0900 Subject: [PATCH 17/34] arm64: Implement Apple IMPDEF TSO memory model control @@ -27,7 +27,7 @@ Reviewed-by: Neal Gompa create mode 100644 arch/arm64/include/asm/apple_cpufeature.h diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index 8d587e0b21ef..befa467fd555 100644 +index 8d587e0b2..befa467fd 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -2269,6 +2269,8 @@ endif # ARM64_PSEUDO_NMI @@ -41,7 +41,7 @@ index 8d587e0b21ef..befa467fd555 100644 model, which can be useful to emulate other CPU architectures diff --git a/arch/arm64/include/asm/apple_cpufeature.h b/arch/arm64/include/asm/apple_cpufeature.h new file mode 100644 -index 000000000000..4370d91ffa3e +index 000000000..4370d91ff --- /dev/null +++ b/arch/arm64/include/asm/apple_cpufeature.h @@ -0,0 +1,15 @@ @@ -61,7 +61,7 @@ index 000000000000..4370d91ffa3e + +#endif diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h -index 1775e210f04f..6343a192aba1 100644 +index 1775e210f..6343a192a 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -917,7 +917,8 @@ static inline unsigned int get_vmid_bits(u64 mmfr1) @@ -75,7 +75,7 @@ index 1775e210f04f..6343a192aba1 100644 s64 arm64_ftr_safe_value(const struct arm64_ftr_bits *ftrp, s64 new, s64 cur); diff --git a/arch/arm64/kernel/cpufeature_impdef.c b/arch/arm64/kernel/cpufeature_impdef.c -index de784a1fb49b..3b0807bf90cd 100644 +index de784a1fb..3b0807bf9 100644 --- a/arch/arm64/kernel/cpufeature_impdef.c +++ b/arch/arm64/kernel/cpufeature_impdef.c @@ -3,9 +3,51 @@ @@ -149,7 +149,7 @@ index de784a1fb49b..3b0807bf90cd 100644 .desc = "TSO memory model (Fixed)", .capability = ARM64_HAS_TSO_FIXED, diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c -index f2bf5f7d6dbb..46f01d4e9fb7 100644 +index f2bf5f7d6..46f01d4e9 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -44,6 +44,7 @@ @@ -196,7 +196,7 @@ index f2bf5f7d6dbb..46f01d4e9fb7 100644 return 0; diff --git a/arch/arm64/tools/cpucaps b/arch/arm64/tools/cpucaps -index bca63481e0cf..8b809992a9ee 100644 +index bca63481e..8b809992a 100644 --- a/arch/arm64/tools/cpucaps +++ b/arch/arm64/tools/cpucaps @@ -53,6 +53,7 @@ HAS_STAGE2_FWB diff --git a/patches/0018-drm-virtio-Support-fence-passing-feature.patch b/patches/0018-drm-virtio-Support-fence-passing-feature.patch index 6cc58a5..922fe54 100644 --- a/patches/0018-drm-virtio-Support-fence-passing-feature.patch +++ b/patches/0018-drm-virtio-Support-fence-passing-feature.patch @@ -1,4 +1,4 @@ -From f20abbb6f9399941cba777bea3cb424d3a745f49 Mon Sep 17 00:00:00 2001 +From c113e86859ddb82e03558b73c1b4a0d1331f10bc Mon Sep 17 00:00:00 2001 From: Dmitry Osipenko Date: Sat, 7 Oct 2023 22:47:47 +0300 Subject: [PATCH 18/34] drm/virtio: Support fence-passing feature @@ -36,7 +36,7 @@ Signed-off-by: Dmitry Osipenko 9 files changed, 152 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c -index e5a2665e50ea..33b471dfe098 100644 +index e5a2665e5..33b471dfe 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -149,6 +149,7 @@ static unsigned int features[] = { @@ -48,7 +48,7 @@ index e5a2665e50ea..33b471dfe098 100644 static struct virtio_driver virtio_gpu_driver = { .feature_table = features, diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h -index 5dc8eeaf7123..50d8bbd01bc4 100644 +index 5dc8eeaf7..50d8bbd01 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -152,6 +152,7 @@ struct virtio_gpu_fence { @@ -105,7 +105,7 @@ index 5dc8eeaf7123..50d8bbd01bc4 100644 /* virtgpu_object.c */ void virtio_gpu_cleanup_object(struct virtio_gpu_object *bo); diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c b/drivers/gpu/drm/virtio/virtgpu_fence.c -index f28357dbde35..1fd3cfeca2f5 100644 +index f28357dbd..1fd3cfeca 100644 --- a/drivers/gpu/drm/virtio/virtgpu_fence.c +++ b/drivers/gpu/drm/virtio/virtgpu_fence.c @@ -27,9 +27,6 @@ @@ -145,7 +145,7 @@ index f28357dbde35..1fd3cfeca2f5 100644 void virtio_gpu_fence_event_process(struct virtio_gpu_device *vgdev, diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c -index e4f76f315550..894f3fd14c51 100644 +index e4f76f315..894f3fd14 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -524,7 +524,8 @@ static int virtio_gpu_resource_create_blob_ioctl(struct drm_device *dev, @@ -174,7 +174,7 @@ index e4f76f315550..894f3fd14c51 100644 ret = -EINVAL; goto out_unlock; diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c -index 7dfb2006c561..fa4e5542fe5b 100644 +index 7dfb2006c..fa4e5542f 100644 --- a/drivers/gpu/drm/virtio/virtgpu_kms.c +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c @@ -196,12 +196,16 @@ int virtio_gpu_init(struct virtio_device *vdev, struct drm_device *dev) @@ -197,7 +197,7 @@ index 7dfb2006c561..fa4e5542fe5b 100644 DRM_INFO("features: %ccontext_init\n", vgdev->has_context_init ? '+' : '-'); diff --git a/drivers/gpu/drm/virtio/virtgpu_submit.c b/drivers/gpu/drm/virtio/virtgpu_submit.c -index 7d34cf83f5f2..136ca6238ab0 100644 +index 7d34cf83f..136ca6238 100644 --- a/drivers/gpu/drm/virtio/virtgpu_submit.c +++ b/drivers/gpu/drm/virtio/virtgpu_submit.c @@ -25,6 +25,11 @@ struct virtio_gpu_submit_post_dep { @@ -364,7 +364,7 @@ index 7d34cf83f5f2..136ca6238ab0 100644 /* * Set up user-out data after submitting the job to optimize diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c -index 0d3d0d09f39b..96f0a42d313c 100644 +index 0d3d0d09f..96f0a42d3 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -1079,7 +1079,9 @@ void virtio_gpu_cmd_submit(struct virtio_gpu_device *vgdev, @@ -389,7 +389,7 @@ index 0d3d0d09f39b..96f0a42d313c 100644 virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence); } diff --git a/include/uapi/drm/virtgpu_drm.h b/include/uapi/drm/virtgpu_drm.h -index c2ce71987e9b..2bb2d3a0c7bd 100644 +index c2ce71987..2bb2d3a0c 100644 --- a/include/uapi/drm/virtgpu_drm.h +++ b/include/uapi/drm/virtgpu_drm.h @@ -52,10 +52,12 @@ extern "C" { @@ -414,7 +414,7 @@ index c2ce71987e9b..2bb2d3a0c7bd 100644 __u64 param; __u64 value; diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h -index bf2c9cabd207..ceb656264aa0 100644 +index bf2c9cabd..ceb656264 100644 --- a/include/uapi/linux/virtio_gpu.h +++ b/include/uapi/linux/virtio_gpu.h @@ -65,6 +65,11 @@ diff --git a/patches/0019-Enable-64-bit-processes-to-use-compat-input-syscalls.patch b/patches/0019-Enable-64-bit-processes-to-use-compat-input-syscalls.patch index 606642d..5d33e22 100644 --- a/patches/0019-Enable-64-bit-processes-to-use-compat-input-syscalls.patch +++ b/patches/0019-Enable-64-bit-processes-to-use-compat-input-syscalls.patch @@ -1,4 +1,4 @@ -From 6244f74ac041eac2f4b12ae99369830ff687d14b Mon Sep 17 00:00:00 2001 +From 38f2b7b394fe32c40fe97d3898f23cd26afe2a23 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Tue, 8 Oct 2024 11:24:25 +0200 Subject: [PATCH 19/34] Enable 64 bit processes to use compat input syscalls @@ -20,7 +20,7 @@ Signed-off-by: Sergio Lopez 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/input/input-compat.c b/drivers/input/input-compat.c -index 2ccd3eedbd67..abb8cfb99d6c 100644 +index 2ccd3eedb..abb8cfb99 100644 --- a/drivers/input/input-compat.c +++ b/drivers/input/input-compat.c @@ -14,7 +14,7 @@ @@ -51,7 +51,7 @@ index 2ccd3eedbd67..abb8cfb99d6c 100644 if (size != sizeof(struct ff_effect_compat)) diff --git a/drivers/input/input-compat.h b/drivers/input/input-compat.h -index 3b7bb12b023b..e78c0492ce0d 100644 +index 3b7bb12b0..e78c0492c 100644 --- a/drivers/input/input-compat.h +++ b/drivers/input/input-compat.h @@ -53,7 +53,7 @@ struct ff_effect_compat { @@ -64,7 +64,7 @@ index 3b7bb12b023b..e78c0492ce0d 100644 } diff --git a/include/linux/sched.h b/include/linux/sched.h -index 321e088f9ee7..ab0c01ce672a 100644 +index 321e088f9..ab0c01ce6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1603,6 +1603,11 @@ struct task_struct { @@ -80,7 +80,7 @@ index 321e088f9ee7..ab0c01ce672a 100644 /* * New fields for task_struct should be added above here, so that diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h -index 36c278683cd6..c2027aa99409 100644 +index 36c278683..c2027aa99 100644 --- a/include/uapi/linux/prctl.h +++ b/include/uapi/linux/prctl.h @@ -333,4 +333,9 @@ struct prctl_mm_map { @@ -94,7 +94,7 @@ index 36c278683cd6..c2027aa99409 100644 + #endif /* _LINUX_PRCTL_H */ diff --git a/kernel/sys.c b/kernel/sys.c -index 3cb05c88a4b7..3a5c9553236a 100644 +index 3cb05c88a..3a5c95532 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -2823,6 +2823,21 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, diff --git a/patches/0020-dax-Allow-block-size-PAGE_SIZE.patch b/patches/0020-dax-Allow-block-size-PAGE_SIZE.patch index e853037..b1f6c97 100644 --- a/patches/0020-dax-Allow-block-size-PAGE_SIZE.patch +++ b/patches/0020-dax-Allow-block-size-PAGE_SIZE.patch @@ -1,4 +1,4 @@ -From 100bc7b43a320b73d880781259576f928fb88178 Mon Sep 17 00:00:00 2001 +From 0dd81929b9a406c2a0f69a0b723217c56f4bb1cd Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Sun, 20 Oct 2024 01:23:41 +0900 Subject: [PATCH 20/34] dax: Allow block size > PAGE_SIZE @@ -22,7 +22,7 @@ Signed-off-by: Asahi Lina 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dax.c b/fs/dax.c -index 756400f2a625..cb155ec940d5 100644 +index 756400f2a..cb155ec94 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1032,7 +1032,7 @@ int dax_writeback_mapping_range(struct address_space *mapping, diff --git a/patches/0021-mm-Fix-__wp_page_copy_user-fallback-path-for-remote-.patch b/patches/0021-mm-Fix-__wp_page_copy_user-fallback-path-for-remote-.patch index 938f432..aa8e83c 100644 --- a/patches/0021-mm-Fix-__wp_page_copy_user-fallback-path-for-remote-.patch +++ b/patches/0021-mm-Fix-__wp_page_copy_user-fallback-path-for-remote-.patch @@ -1,4 +1,4 @@ -From f0d73a8b36caa430d70d245c21eb653063316c5d Mon Sep 17 00:00:00 2001 +From 24742a9049e2347004a0fca01aea453d4ff152e0 Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Mon, 21 Oct 2024 23:21:16 +0900 Subject: [PATCH 21/34] mm: Fix __wp_page_copy_user fallback path for remote mm @@ -58,7 +58,7 @@ Signed-off-by: Asahi Lina 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c -index 49ee03c4392e..45170cc2cd56 100644 +index 49ee03c43..45170cc2c 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3081,13 +3081,18 @@ static inline int __wp_page_copy_user(struct page *dst, struct page *src, diff --git a/patches/0022-virtgpu-gem-partial-map.patch b/patches/0022-virtgpu-gem-partial-map.patch index 58b1db4..cf811e2 100644 --- a/patches/0022-virtgpu-gem-partial-map.patch +++ b/patches/0022-virtgpu-gem-partial-map.patch @@ -1,4 +1,4 @@ -From 60dc05c78ee9cabbb2d638d9830263f082dee415 Mon Sep 17 00:00:00 2001 +From fc9a33f6d79694c4fcea19a37e66b10255a3f24b Mon Sep 17 00:00:00 2001 From: Sasha Finkelstein Date: Fri, 17 Jan 2025 12:34:23 +0100 Subject: [PATCH 22/34] virtgpu: gem partial map @@ -11,7 +11,7 @@ Signed-off-by: Sasha Finkelstein 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vram.c b/drivers/gpu/drm/virtio/virtgpu_vram.c -index 25df81c02783..64e2c6dbdd67 100644 +index 25df81c02..64e2c6dbd 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vram.c +++ b/drivers/gpu/drm/virtio/virtgpu_vram.c @@ -56,12 +56,11 @@ static int virtio_gpu_vram_mmap(struct drm_gem_object *obj, diff --git a/patches/0023-virtgpu-mixed-page-size.patch b/patches/0023-virtgpu-mixed-page-size.patch index 613c0f1..f889ac4 100644 --- a/patches/0023-virtgpu-mixed-page-size.patch +++ b/patches/0023-virtgpu-mixed-page-size.patch @@ -1,4 +1,4 @@ -From c458e379352be09c767341cdd5961edbde5f104b Mon Sep 17 00:00:00 2001 +From 6855f6efda40cbba39a5330613401090b22e98f5 Mon Sep 17 00:00:00 2001 From: Sasha Finkelstein Date: Fri, 17 Jan 2025 12:34:28 +0100 Subject: [PATCH 23/34] virtgpu: mixed page size @@ -12,7 +12,7 @@ Signed-off-by: Sasha Finkelstein 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vram.c b/drivers/gpu/drm/virtio/virtgpu_vram.c -index 64e2c6dbdd67..cbadcba2c773 100644 +index 64e2c6dbd..cbadcba2c 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vram.c +++ b/drivers/gpu/drm/virtio/virtgpu_vram.c @@ -137,6 +137,12 @@ bool virtio_gpu_is_vram(struct virtio_gpu_object *bo) diff --git a/patches/0024-fuse-mark-DAX-inode-releases-as-blocking.patch b/patches/0024-fuse-mark-DAX-inode-releases-as-blocking.patch index 7b0ce58..4f82f6d 100644 --- a/patches/0024-fuse-mark-DAX-inode-releases-as-blocking.patch +++ b/patches/0024-fuse-mark-DAX-inode-releases-as-blocking.patch @@ -1,4 +1,4 @@ -From e6906aec14c722b9feda60cddbbf3d8068e3ba20 Mon Sep 17 00:00:00 2001 +From 4ca862470e239e4003fcf540ad9bc690d25a63f9 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Sun, 18 Jan 2026 23:37:30 +0100 Subject: [PATCH 24/34] fuse: mark DAX inode releases as blocking @@ -51,7 +51,7 @@ Signed-off-by: Sergio Lopez 1 file changed, 6 insertions(+) diff --git a/fs/fuse/file.c b/fs/fuse/file.c -index 23afaadd5f3e..e59a08c71f12 100644 +index 23afaadd5..e59a08c71 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -116,6 +116,12 @@ static void fuse_file_put(struct fuse_file *ff, bool sync) diff --git a/patches/0025-Revert-vsock-virtio-Fix-message-iterator-handling-on.patch b/patches/0025-Revert-vsock-virtio-Fix-message-iterator-handling-on.patch index 769e10d..e9878fc 100644 --- a/patches/0025-Revert-vsock-virtio-Fix-message-iterator-handling-on.patch +++ b/patches/0025-Revert-vsock-virtio-Fix-message-iterator-handling-on.patch @@ -1,4 +1,4 @@ -From be0f0f9bd3a497111f28d833364ac7d95ac72703 Mon Sep 17 00:00:00 2001 +From 0a58e142cbc3f1014e5ab62322ae28130ebc34a6 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Tue, 10 Mar 2026 13:33:02 +0100 Subject: [PATCH 25/34] Revert "vsock/virtio: Fix message iterator handling on @@ -10,7 +10,7 @@ This reverts commit e6cee5d4a122ca9d6b7bb8fa09e498c60b9f208c. 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c -index 2cae5e2295b1..44da05eb62c7 100644 +index 2cae5e229..44da05eb6 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -106,15 +106,13 @@ static int virtio_transport_fill_skb(struct sk_buff *skb, diff --git a/patches/0026-Revert-vsock-virtio-Allocate-nonlinear-SKBs-for-hand.patch b/patches/0026-Revert-vsock-virtio-Allocate-nonlinear-SKBs-for-hand.patch index 4701632..9354eb3 100644 --- a/patches/0026-Revert-vsock-virtio-Allocate-nonlinear-SKBs-for-hand.patch +++ b/patches/0026-Revert-vsock-virtio-Allocate-nonlinear-SKBs-for-hand.patch @@ -1,4 +1,4 @@ -From 66e0500ef1da76ece09fcdc9f4630620c9e4d182 Mon Sep 17 00:00:00 2001 +From eef0d71035d9421c68de80e867c17e5530bbf960 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Tue, 10 Mar 2026 13:33:11 +0100 Subject: [PATCH 26/34] Revert "vsock/virtio: Allocate nonlinear SKBs for @@ -10,7 +10,7 @@ This reverts commit 69c5bf306115e6047e0d902f8c6551fff74a71ff. 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c -index 44da05eb62c7..3e731d94e834 100644 +index 44da05eb6..3e731d94e 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -111,8 +111,7 @@ static int virtio_transport_fill_skb(struct sk_buff *skb, diff --git a/patches/0027-Revert-vhost-vsock-Allocate-nonlinear-SKBs-for-handl.patch b/patches/0027-Revert-vhost-vsock-Allocate-nonlinear-SKBs-for-handl.patch index 4a83428..7a392b2 100644 --- a/patches/0027-Revert-vhost-vsock-Allocate-nonlinear-SKBs-for-handl.patch +++ b/patches/0027-Revert-vhost-vsock-Allocate-nonlinear-SKBs-for-handl.patch @@ -1,4 +1,4 @@ -From e81b5ec90b1a441493ccab02134137977a4a900d Mon Sep 17 00:00:00 2001 +From 9875ac8e6d3cca5f88f7e2c3f48794366e0cafe1 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Tue, 10 Mar 2026 13:33:20 +0100 Subject: [PATCH 27/34] Revert "vhost/vsock: Allocate nonlinear SKBs for @@ -11,7 +11,7 @@ This reverts commit 65e808a6023f883f298db734444a9c38e45af740. 2 files changed, 8 insertions(+), 32 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c -index deaadc2503a2..ad89ee3676db 100644 +index deaadc250..ad89ee367 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -352,7 +352,7 @@ vhost_vsock_alloc_skb(struct vhost_virtqueue *vq, @@ -37,7 +37,7 @@ index deaadc2503a2..ad89ee3676db 100644 return NULL; } diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h -index 34220effc4b0..357e0604c17c 100644 +index 34220effc..357e0604c 100644 --- a/include/linux/virtio_vsock.h +++ b/include/linux/virtio_vsock.h @@ -49,48 +49,22 @@ static inline void virtio_vsock_skb_clear_tap_delivered(struct sk_buff *skb) diff --git a/patches/0028-Revert-vsock-virtio-cap-TX-credit-to-local-buffer-si.patch b/patches/0028-Revert-vsock-virtio-cap-TX-credit-to-local-buffer-si.patch index 482fab7..e05d40a 100644 --- a/patches/0028-Revert-vsock-virtio-cap-TX-credit-to-local-buffer-si.patch +++ b/patches/0028-Revert-vsock-virtio-cap-TX-credit-to-local-buffer-si.patch @@ -1,4 +1,4 @@ -From 6c7dab60e089e894ce9e810c42e02676c5f9cc6b Mon Sep 17 00:00:00 2001 +From efd5fb5ad375627acd1db37ae2b0e13ac4f76ee4 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Tue, 10 Mar 2026 16:00:26 +0100 Subject: [PATCH 28/34] Revert "vsock/virtio: cap TX credit to local buffer @@ -10,7 +10,7 @@ This reverts commit c0e42fb0e054c2b2ec4ee80f48ccd256ae0227ce. 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c -index 3e731d94e834..bb8407b3d593 100644 +index 3e731d94e..bb8407b3d 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -850,15 +850,6 @@ virtio_transport_seqpacket_dequeue(struct vsock_sock *vsk, diff --git a/patches/0029-can-virtio-Add-virtio-CAN-driver.patch b/patches/0029-can-virtio-Add-virtio-CAN-driver.patch index e0dc5e3..d9eaaf7 100644 --- a/patches/0029-can-virtio-Add-virtio-CAN-driver.patch +++ b/patches/0029-can-virtio-Add-virtio-CAN-driver.patch @@ -1,4 +1,4 @@ -From 98691aa8c63a330e261d8c4690bbfe5fcc462f43 Mon Sep 17 00:00:00 2001 +From 6e476ca76c00a9a4cfc68947b1d556dc3919af3b Mon Sep 17 00:00:00 2001 From: Matias Ezequiel Vara Larsen Date: Fri, 8 May 2026 14:23:37 +0200 Subject: [PATCH 29/34] can: virtio: Add virtio CAN driver @@ -36,7 +36,7 @@ Signed-off-by: Matias Ezequiel Vara Larsen create mode 100644 include/uapi/linux/virtio_can.h diff --git a/MAINTAINERS b/MAINTAINERS -index d765c62c80ea..9ecb818f7ddb 100644 +index d765c62c8..9ecb818f7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -24464,6 +24464,15 @@ F: drivers/scsi/virtio_scsi.c @@ -56,7 +56,7 @@ index d765c62c80ea..9ecb818f7ddb 100644 M: Amit Shah L: virtualization@lists.linux.dev diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig -index cf989bea9aa3..851749f76d7c 100644 +index cf989bea9..851749f76 100644 --- a/drivers/net/can/Kconfig +++ b/drivers/net/can/Kconfig @@ -208,6 +208,18 @@ config CAN_TI_HECC @@ -79,7 +79,7 @@ index cf989bea9aa3..851749f76d7c 100644 tristate "Xilinx CAN" depends on ARCH_ZYNQ || ARM64 || MICROBLAZE || COMPILE_TEST diff --git a/drivers/net/can/Makefile b/drivers/net/can/Makefile -index a71db2cfe990..ddfe0df9b10b 100644 +index a71db2cfe..ddfe0df9b 100644 --- a/drivers/net/can/Makefile +++ b/drivers/net/can/Makefile @@ -32,6 +32,7 @@ obj-$(CONFIG_CAN_PEAK_PCIEFD) += peak_canfd/ @@ -92,7 +92,7 @@ index a71db2cfe990..ddfe0df9b10b 100644 subdir-ccflags-$(CONFIG_CAN_DEBUG_DEVICES) += -DDEBUG diff --git a/drivers/net/can/virtio_can.c b/drivers/net/can/virtio_can.c new file mode 100644 -index 000000000000..0344dd03bd82 +index 000000000..0344dd03b --- /dev/null +++ b/drivers/net/can/virtio_can.c @@ -0,0 +1,991 @@ @@ -1089,7 +1089,7 @@ index 000000000000..0344dd03bd82 +MODULE_DESCRIPTION("CAN bus driver for Virtio CAN controller"); diff --git a/include/uapi/linux/virtio_can.h b/include/uapi/linux/virtio_can.h new file mode 100644 -index 000000000000..08d7e3e78776 +index 000000000..08d7e3e78 --- /dev/null +++ b/include/uapi/linux/virtio_can.h @@ -0,0 +1,78 @@ diff --git a/patches/0030-virtio_rtc-Add-module-and-driver-core.patch b/patches/0030-virtio_rtc-Add-module-and-driver-core.patch index 844b312..c5eeb88 100644 --- a/patches/0030-virtio_rtc-Add-module-and-driver-core.patch +++ b/patches/0030-virtio_rtc-Add-module-and-driver-core.patch @@ -1,4 +1,4 @@ -From 4882237ee50eb5545ab67cc39181a19045d92fa9 Mon Sep 17 00:00:00 2001 +From 998a263db3e453b665fadd049c50cc7d2c003725 Mon Sep 17 00:00:00 2001 From: Peter Hilber Date: Fri, 9 May 2025 18:07:22 +0200 Subject: [PATCH 30/34] virtio_rtc: Add module and driver core @@ -34,7 +34,7 @@ Signed-off-by: Michael S. Tsirkin create mode 100644 include/uapi/linux/virtio_rtc.h diff --git a/MAINTAINERS b/MAINTAINERS -index 9ecb818f7ddb..ebf1a598394c 100644 +index 9ecb818f7..ebf1a5983 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -24620,6 +24620,13 @@ S: Maintained @@ -52,7 +52,7 @@ index 9ecb818f7ddb..ebf1a598394c 100644 M: Anton Yakovlev M: "Michael S. Tsirkin" diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig -index 42a48ac763ee..fd6b826af19a 100644 +index 42a48ac76..fd6b826af 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -188,4 +188,17 @@ config VIRTIO_DEBUG @@ -74,7 +74,7 @@ index 42a48ac763ee..fd6b826af19a 100644 + endif # VIRTIO_MENU diff --git a/drivers/virtio/Makefile b/drivers/virtio/Makefile -index 58b2b0489fc9..c41c4c0f9264 100644 +index 58b2b0489..c41c4c0f9 100644 --- a/drivers/virtio/Makefile +++ b/drivers/virtio/Makefile @@ -14,3 +14,5 @@ obj-$(CONFIG_VIRTIO_VDPA) += virtio_vdpa.o @@ -85,7 +85,7 @@ index 58b2b0489fc9..c41c4c0f9264 100644 +virtio_rtc-y := virtio_rtc_driver.o diff --git a/drivers/virtio/virtio_rtc_driver.c b/drivers/virtio/virtio_rtc_driver.c new file mode 100644 -index 000000000000..c87ee4e63424 +index 000000000..c87ee4e63 --- /dev/null +++ b/drivers/virtio/virtio_rtc_driver.c @@ -0,0 +1,786 @@ @@ -877,7 +877,7 @@ index 000000000000..c87ee4e63424 +MODULE_LICENSE("GPL"); diff --git a/drivers/virtio/virtio_rtc_internal.h b/drivers/virtio/virtio_rtc_internal.h new file mode 100644 -index 000000000000..9c249c15b68f +index 000000000..9c249c15b --- /dev/null +++ b/drivers/virtio/virtio_rtc_internal.h @@ -0,0 +1,24 @@ @@ -907,7 +907,7 @@ index 000000000000..9c249c15b68f +#endif /* _VIRTIO_RTC_INTERNAL_H_ */ diff --git a/include/uapi/linux/virtio_rtc.h b/include/uapi/linux/virtio_rtc.h new file mode 100644 -index 000000000000..6b3af4e9bbfb +index 000000000..6b3af4e9b --- /dev/null +++ b/include/uapi/linux/virtio_rtc.h @@ -0,0 +1,151 @@ diff --git a/patches/0031-virtio_rtc-Add-PTP-clocks.patch b/patches/0031-virtio_rtc-Add-PTP-clocks.patch index 18c0d3b..1a5008a 100644 --- a/patches/0031-virtio_rtc-Add-PTP-clocks.patch +++ b/patches/0031-virtio_rtc-Add-PTP-clocks.patch @@ -1,4 +1,4 @@ -From ebd63f2973abe020f0693072dba11294d957540b Mon Sep 17 00:00:00 2001 +From 63388c72d5e0b0df486c85500af42ab1de6ba3d1 Mon Sep 17 00:00:00 2001 From: Peter Hilber Date: Fri, 9 May 2025 18:07:23 +0200 Subject: [PATCH 31/34] virtio_rtc: Add PTP clocks @@ -57,7 +57,7 @@ Signed-off-by: Michael S. Tsirkin create mode 100644 drivers/virtio/virtio_rtc_ptp.c diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig -index fd6b826af19a..c98e43a1ee95 100644 +index fd6b826af..c98e43a1e 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -194,11 +194,33 @@ config VIRTIO_RTC @@ -96,7 +96,7 @@ index fd6b826af19a..c98e43a1ee95 100644 + endif # VIRTIO_MENU diff --git a/drivers/virtio/Makefile b/drivers/virtio/Makefile -index c41c4c0f9264..88d6fb8d4731 100644 +index c41c4c0f9..88d6fb8d4 100644 --- a/drivers/virtio/Makefile +++ b/drivers/virtio/Makefile @@ -16,3 +16,4 @@ obj-$(CONFIG_VIRTIO_DMA_SHARED_BUFFER) += virtio_dma_buf.o @@ -105,7 +105,7 @@ index c41c4c0f9264..88d6fb8d4731 100644 virtio_rtc-y := virtio_rtc_driver.o +virtio_rtc-$(CONFIG_VIRTIO_RTC_PTP) += virtio_rtc_ptp.o diff --git a/drivers/virtio/virtio_rtc_driver.c b/drivers/virtio/virtio_rtc_driver.c -index c87ee4e63424..7499908ee34c 100644 +index c87ee4e63..7499908ee 100644 --- a/drivers/virtio/virtio_rtc_driver.c +++ b/drivers/virtio/virtio_rtc_driver.c @@ -38,11 +38,16 @@ struct viortc_vq { @@ -270,7 +270,7 @@ index c87ee4e63424..7499908ee34c 100644 virtio_reset_device(vdev); vdev->config->del_vqs(vdev); diff --git a/drivers/virtio/virtio_rtc_internal.h b/drivers/virtio/virtio_rtc_internal.h -index 9c249c15b68f..2e589903d04f 100644 +index 9c249c15b..2e589903d 100644 --- a/drivers/virtio/virtio_rtc_internal.h +++ b/drivers/virtio/virtio_rtc_internal.h @@ -9,6 +9,7 @@ @@ -333,7 +333,7 @@ index 9c249c15b68f..2e589903d04f 100644 #endif /* _VIRTIO_RTC_INTERNAL_H_ */ diff --git a/drivers/virtio/virtio_rtc_ptp.c b/drivers/virtio/virtio_rtc_ptp.c new file mode 100644 -index 000000000000..f84599950cd4 +index 000000000..f84599950 --- /dev/null +++ b/drivers/virtio/virtio_rtc_ptp.c @@ -0,0 +1,347 @@ diff --git a/patches/0032-virtio_rtc-Add-Arm-Generic-Timer-cross-timestamping.patch b/patches/0032-virtio_rtc-Add-Arm-Generic-Timer-cross-timestamping.patch index 8acdd4e..a864de2 100644 --- a/patches/0032-virtio_rtc-Add-Arm-Generic-Timer-cross-timestamping.patch +++ b/patches/0032-virtio_rtc-Add-Arm-Generic-Timer-cross-timestamping.patch @@ -1,4 +1,4 @@ -From 22d1aeb70c898338e96f5db3573f4181a767238b Mon Sep 17 00:00:00 2001 +From 9c74c2c8d4aeed2a902585c7c5bf416fec616343 Mon Sep 17 00:00:00 2001 From: Peter Hilber Date: Fri, 9 May 2025 18:07:24 +0200 Subject: [PATCH 32/34] virtio_rtc: Add Arm Generic Timer cross-timestamping @@ -21,7 +21,7 @@ Signed-off-by: Michael S. Tsirkin create mode 100644 drivers/virtio/virtio_rtc_arm.c diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig -index c98e43a1ee95..57beef80dcc5 100644 +index c98e43a1e..57beef80d 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -221,6 +221,19 @@ config VIRTIO_RTC_PTP @@ -45,7 +45,7 @@ index c98e43a1ee95..57beef80dcc5 100644 endif # VIRTIO_MENU diff --git a/drivers/virtio/Makefile b/drivers/virtio/Makefile -index 88d6fb8d4731..dbd77f124ba9 100644 +index 88d6fb8d4..dbd77f124 100644 --- a/drivers/virtio/Makefile +++ b/drivers/virtio/Makefile @@ -17,3 +17,4 @@ obj-$(CONFIG_VIRTIO_DEBUG) += virtio_debug.o @@ -55,7 +55,7 @@ index 88d6fb8d4731..dbd77f124ba9 100644 +virtio_rtc-$(CONFIG_VIRTIO_RTC_ARM) += virtio_rtc_arm.o diff --git a/drivers/virtio/virtio_rtc_arm.c b/drivers/virtio/virtio_rtc_arm.c new file mode 100644 -index 000000000000..211299d72870 +index 000000000..211299d72 --- /dev/null +++ b/drivers/virtio/virtio_rtc_arm.c @@ -0,0 +1,23 @@ diff --git a/patches/0033-virtio_rtc-Add-RTC-class-driver.patch b/patches/0033-virtio_rtc-Add-RTC-class-driver.patch index 80c9f46..2a6b7de 100644 --- a/patches/0033-virtio_rtc-Add-RTC-class-driver.patch +++ b/patches/0033-virtio_rtc-Add-RTC-class-driver.patch @@ -1,4 +1,4 @@ -From 86616410154ce8baf16131ffc626174c32c79763 Mon Sep 17 00:00:00 2001 +From 208cdb5f56441a0c7601349b6f34b7bd7029b490 Mon Sep 17 00:00:00 2001 From: Peter Hilber Date: Fri, 9 May 2025 18:07:25 +0200 Subject: [PATCH 33/34] virtio_rtc: Add RTC class driver @@ -55,7 +55,7 @@ Signed-off-by: Michael S. Tsirkin create mode 100644 drivers/virtio/virtio_rtc_class.c diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig -index 57beef80dcc5..8279d6d5a1f1 100644 +index 57beef80d..8279d6d5a 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -195,7 +195,8 @@ config VIRTIO_RTC @@ -102,7 +102,7 @@ index 57beef80dcc5..8279d6d5a1f1 100644 endif # VIRTIO_MENU diff --git a/drivers/virtio/Makefile b/drivers/virtio/Makefile -index dbd77f124ba9..eefcfe90d6b8 100644 +index dbd77f124..eefcfe90d 100644 --- a/drivers/virtio/Makefile +++ b/drivers/virtio/Makefile @@ -18,3 +18,4 @@ obj-$(CONFIG_VIRTIO_RTC) += virtio_rtc.o @@ -112,7 +112,7 @@ index dbd77f124ba9..eefcfe90d6b8 100644 +virtio_rtc-$(CONFIG_VIRTIO_RTC_CLASS) += virtio_rtc_class.o diff --git a/drivers/virtio/virtio_rtc_class.c b/drivers/virtio/virtio_rtc_class.c new file mode 100644 -index 000000000000..05d6d28255cf +index 000000000..05d6d2825 --- /dev/null +++ b/drivers/virtio/virtio_rtc_class.c @@ -0,0 +1,262 @@ @@ -379,7 +379,7 @@ index 000000000000..05d6d28255cf + return viortc_class; +} diff --git a/drivers/virtio/virtio_rtc_driver.c b/drivers/virtio/virtio_rtc_driver.c -index 7499908ee34c..a57d5e06e19d 100644 +index 7499908ee..a57d5e06e 100644 --- a/drivers/virtio/virtio_rtc_driver.c +++ b/drivers/virtio/virtio_rtc_driver.c @@ -18,9 +18,12 @@ @@ -1068,7 +1068,7 @@ index 7499908ee34c..a57d5e06e19d 100644 .probe = viortc_probe, .remove = viortc_remove, diff --git a/drivers/virtio/virtio_rtc_internal.h b/drivers/virtio/virtio_rtc_internal.h -index 2e589903d04f..296afee6719b 100644 +index 2e589903d..296afee67 100644 --- a/drivers/virtio/virtio_rtc_internal.h +++ b/drivers/virtio/virtio_rtc_internal.h @@ -9,6 +9,8 @@ @@ -1143,7 +1143,7 @@ index 2e589903d04f..296afee6719b 100644 + #endif /* _VIRTIO_RTC_INTERNAL_H_ */ diff --git a/include/uapi/linux/virtio_rtc.h b/include/uapi/linux/virtio_rtc.h -index 6b3af4e9bbfb..85ee8f013661 100644 +index 6b3af4e9b..85ee8f013 100644 --- a/include/uapi/linux/virtio_rtc.h +++ b/include/uapi/linux/virtio_rtc.h @@ -9,6 +9,9 @@ diff --git a/patches/0034-virtio_rtc-Fix-compatibility-for-kernel-6.12.patch b/patches/0034-virtio_rtc-Fix-compatibility-for-kernel-6.12.patch index 0e8b812..4b01aea 100644 --- a/patches/0034-virtio_rtc-Fix-compatibility-for-kernel-6.12.patch +++ b/patches/0034-virtio_rtc-Fix-compatibility-for-kernel-6.12.patch @@ -1,4 +1,4 @@ -From 2b9731591960d97b4672968ceb5a91fa3bdf117b Mon Sep 17 00:00:00 2001 +From 3ba7596fc21627e3111e538e942f0bc8da2b781b Mon Sep 17 00:00:00 2001 From: Dorinda Bassey Date: Wed, 29 Apr 2026 11:35:00 +0200 Subject: [PATCH 34/34] virtio_rtc: Fix compatibility for kernel 6.12 @@ -17,7 +17,7 @@ Signed-off-by: Dorinda Bassey 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_rtc_driver.c b/drivers/virtio/virtio_rtc_driver.c -index a57d5e06e19d..bc303c32dab3 100644 +index a57d5e06e..bc303c32d 100644 --- a/drivers/virtio/virtio_rtc_driver.c +++ b/drivers/virtio/virtio_rtc_driver.c @@ -575,7 +575,7 @@ static int viortc_msg_xfer(struct viortc_vq *vq, struct viortc_msg *msg,