public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH 0/4] Assorted test fixes for i386/i686 and OpenSSH 9.8
@ 2024-08-19 23:14 Stefano Brivio
  2024-08-19 23:14 ` [PATCH 1/4] test/lib/setup: Transform i686 kernel architecture name into QEMU name (i386) Stefano Brivio
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Stefano Brivio @ 2024-08-19 23:14 UTC (permalink / raw)
  To: passt-dev; +Cc: David Gibson

Stefano Brivio (4):
  test/lib/setup: Transform i686 kernel architecture name into QEMU name
    (i386)
  test/passt.mbuto: Run sshd from vsock proxy with absolute path
  test/passt.mbuto: Install sshd-session OpenSSH's split process
  test: Duplicate existing recvfrom() valgrind suppression for recv()

 test/lib/setup     | 10 ++++++----
 test/passt.mbuto   |  5 +++--
 test/valgrind.supp |  9 +++++++++
 3 files changed, 18 insertions(+), 6 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/4] test/lib/setup: Transform i686 kernel architecture name into QEMU name (i386)
  2024-08-19 23:14 [PATCH 0/4] Assorted test fixes for i386/i686 and OpenSSH 9.8 Stefano Brivio
@ 2024-08-19 23:14 ` Stefano Brivio
  2024-08-20  0:45   ` David Gibson
  2024-08-19 23:14 ` [PATCH 2/4] test/passt.mbuto: Run sshd from vsock proxy with absolute path Stefano Brivio
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Stefano Brivio @ 2024-08-19 23:14 UTC (permalink / raw)
  To: passt-dev; +Cc: David Gibson

It's qemu-system-i386, but uname -m reports i686. I didn't test i486
and i586.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 test/lib/setup | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/lib/setup b/test/lib/setup
index 9b39b9f..58371bd 100755
--- a/test/lib/setup
+++ b/test/lib/setup
@@ -17,6 +17,8 @@ INITRAMFS="${BASEPATH}/mbuto.img"
 VCPUS="$( [ $(nproc) -ge 8 ] && echo 6 || echo $(( $(nproc) / 2 + 1 )) )"
 __mem_kib="$(sed -n 's/MemTotal:[ ]*\([0-9]*\) kB/\1/p' /proc/meminfo)"
 VMEM="$((${__mem_kib} / 1024 / 4))"
+QEMU_ARCH="$(uname -m)"
+[ "${QEMU_ARCH}" = "i686" ] && QEMU_ARCH=i386
 
 # setup_build() - Set up pane layout for build tests
 setup_build() {
@@ -53,7 +55,7 @@ setup_passt() {
 	wait_for [ -f "${STATESETUP}/passt.pid" ]
 
 	GUEST_CID=94557
-	context_run_bg qemu 'qemu-system-$(uname -m)'			   \
+	context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}"		   \
 		' -machine accel=kvm'                                      \
 		' -m '${VMEM}' -cpu host -smp '${VCPUS}                    \
 		' -kernel ' "/boot/vmlinuz-$(uname -r)"			   \
@@ -148,7 +150,7 @@ setup_passt_in_ns() {
 	wait_for [ -f "${STATESETUP}/passt.pid" ]
 
 	GUEST_CID=94557
-	context_run_bg qemu 'qemu-system-$(uname -m)'			   \
+	context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}"		   \
 		' -machine accel=kvm'                                      \
 		' -M accel=kvm:tcg'                                        \
 		' -m '${VMEM}' -cpu host -smp '${VCPUS}                    \
@@ -220,7 +222,7 @@ setup_two_guests() {
 	wait_for [ -f "${STATESETUP}/passt_2.pid" ]
 
 	GUEST_1_CID=94557
-	context_run_bg qemu_1 'qemu-system-$(uname -m)'			     \
+	context_run_bg qemu_1 'qemu-system-'"${QEMU_ARCH}"		     \
 		' -M accel=kvm:tcg'                                          \
 		' -m '${VMEM}' -cpu host -smp '${VCPUS}                      \
 		' -kernel ' "/boot/vmlinuz-$(uname -r)"			     \
@@ -233,7 +235,7 @@ setup_two_guests() {
 		" -device vhost-vsock-pci,guest-cid=$GUEST_1_CID"
 
 	GUEST_2_CID=94558
-	context_run_bg qemu_2 'qemu-system-$(uname -m)'			     \
+	context_run_bg qemu_2 'qemu-system-'"${QEMU_ARCH}"		     \
 		' -M accel=kvm:tcg'                                          \
 		' -m '${VMEM}' -cpu host -smp '${VCPUS}                      \
 		' -kernel ' "/boot/vmlinuz-$(uname -r)"			     \
-- 
@@ -17,6 +17,8 @@ INITRAMFS="${BASEPATH}/mbuto.img"
 VCPUS="$( [ $(nproc) -ge 8 ] && echo 6 || echo $(( $(nproc) / 2 + 1 )) )"
 __mem_kib="$(sed -n 's/MemTotal:[ ]*\([0-9]*\) kB/\1/p' /proc/meminfo)"
 VMEM="$((${__mem_kib} / 1024 / 4))"
+QEMU_ARCH="$(uname -m)"
+[ "${QEMU_ARCH}" = "i686" ] && QEMU_ARCH=i386
 
 # setup_build() - Set up pane layout for build tests
 setup_build() {
@@ -53,7 +55,7 @@ setup_passt() {
 	wait_for [ -f "${STATESETUP}/passt.pid" ]
 
 	GUEST_CID=94557
-	context_run_bg qemu 'qemu-system-$(uname -m)'			   \
+	context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}"		   \
 		' -machine accel=kvm'                                      \
 		' -m '${VMEM}' -cpu host -smp '${VCPUS}                    \
 		' -kernel ' "/boot/vmlinuz-$(uname -r)"			   \
@@ -148,7 +150,7 @@ setup_passt_in_ns() {
 	wait_for [ -f "${STATESETUP}/passt.pid" ]
 
 	GUEST_CID=94557
-	context_run_bg qemu 'qemu-system-$(uname -m)'			   \
+	context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}"		   \
 		' -machine accel=kvm'                                      \
 		' -M accel=kvm:tcg'                                        \
 		' -m '${VMEM}' -cpu host -smp '${VCPUS}                    \
@@ -220,7 +222,7 @@ setup_two_guests() {
 	wait_for [ -f "${STATESETUP}/passt_2.pid" ]
 
 	GUEST_1_CID=94557
-	context_run_bg qemu_1 'qemu-system-$(uname -m)'			     \
+	context_run_bg qemu_1 'qemu-system-'"${QEMU_ARCH}"		     \
 		' -M accel=kvm:tcg'                                          \
 		' -m '${VMEM}' -cpu host -smp '${VCPUS}                      \
 		' -kernel ' "/boot/vmlinuz-$(uname -r)"			     \
@@ -233,7 +235,7 @@ setup_two_guests() {
 		" -device vhost-vsock-pci,guest-cid=$GUEST_1_CID"
 
 	GUEST_2_CID=94558
-	context_run_bg qemu_2 'qemu-system-$(uname -m)'			     \
+	context_run_bg qemu_2 'qemu-system-'"${QEMU_ARCH}"		     \
 		' -M accel=kvm:tcg'                                          \
 		' -m '${VMEM}' -cpu host -smp '${VCPUS}                      \
 		' -kernel ' "/boot/vmlinuz-$(uname -r)"			     \
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/4] test/passt.mbuto: Run sshd from vsock proxy with absolute path
  2024-08-19 23:14 [PATCH 0/4] Assorted test fixes for i386/i686 and OpenSSH 9.8 Stefano Brivio
  2024-08-19 23:14 ` [PATCH 1/4] test/lib/setup: Transform i686 kernel architecture name into QEMU name (i386) Stefano Brivio
@ 2024-08-19 23:14 ` Stefano Brivio
  2024-08-20  0:45   ` David Gibson
  2024-08-19 23:14 ` [PATCH 3/4] test/passt.mbuto: Install sshd-session OpenSSH's split process Stefano Brivio
  2024-08-19 23:14 ` [PATCH 4/4] test: Duplicate existing recvfrom() valgrind suppression for recv() Stefano Brivio
  3 siblings, 1 reply; 12+ messages in thread
From: Stefano Brivio @ 2024-08-19 23:14 UTC (permalink / raw)
  To: passt-dev; +Cc: David Gibson

...OpenSSH >= 9.8 otherwise complains that:

  sshd requires execution with an absolute path

Link: https://bugs.gentoo.org/936041
Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078429
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 test/passt.mbuto | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/passt.mbuto b/test/passt.mbuto
index 436eecc..4abaafc 100755
--- a/test/passt.mbuto
+++ b/test/passt.mbuto
@@ -78,7 +78,7 @@ EOF
 EOF
 	chmod 600 /root/.ssh/authorized_keys
 	chmod 700 /root
-	socat VSOCK-LISTEN:22,fork EXEC:"sshd -i -e" 2> /var/log/vsock-ssh.log &
+	socat VSOCK-LISTEN:22,fork EXEC:"/sbin/sshd -i -e" 2> /var/log/vsock-ssh.log &
 	sh +m
 '
 
-- 
@@ -78,7 +78,7 @@ EOF
 EOF
 	chmod 600 /root/.ssh/authorized_keys
 	chmod 700 /root
-	socat VSOCK-LISTEN:22,fork EXEC:"sshd -i -e" 2> /var/log/vsock-ssh.log &
+	socat VSOCK-LISTEN:22,fork EXEC:"/sbin/sshd -i -e" 2> /var/log/vsock-ssh.log &
 	sh +m
 '
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/4] test/passt.mbuto: Install sshd-session OpenSSH's split process
  2024-08-19 23:14 [PATCH 0/4] Assorted test fixes for i386/i686 and OpenSSH 9.8 Stefano Brivio
  2024-08-19 23:14 ` [PATCH 1/4] test/lib/setup: Transform i686 kernel architecture name into QEMU name (i386) Stefano Brivio
  2024-08-19 23:14 ` [PATCH 2/4] test/passt.mbuto: Run sshd from vsock proxy with absolute path Stefano Brivio
@ 2024-08-19 23:14 ` Stefano Brivio
  2024-08-20  0:46   ` David Gibson
  2024-08-26  6:41   ` David Gibson
  2024-08-19 23:14 ` [PATCH 4/4] test: Duplicate existing recvfrom() valgrind suppression for recv() Stefano Brivio
  3 siblings, 2 replies; 12+ messages in thread
From: Stefano Brivio @ 2024-08-19 23:14 UTC (permalink / raw)
  To: passt-dev; +Cc: David Gibson

OpenSSH now ships a per-session binary, sshd-session, with sshd
acting as mere listener. It's typically not found in $PATH, so specify
the whole path at which it's commonly installed in $PROGS.

Link: https://www.openssh.com/releasenotes.html#9.8p1
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 test/passt.mbuto | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/passt.mbuto b/test/passt.mbuto
index 4abaafc..61865e8 100755
--- a/test/passt.mbuto
+++ b/test/passt.mbuto
@@ -13,7 +13,8 @@
 PROGS="${PROGS:-ash,dash,bash ip mount ls insmod mkdir ln cat chmod lsmod
        modprobe find grep mknod mv rm umount jq iperf3 dhclient hostname
        sed tr chown sipcalc cut socat dd strace ping tail killall sleep sysctl
-       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp}"
+       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp
+       /usr/lib/openssh/sshd-session}"
 
 KMODS="${KMODS:- virtio_net virtio_pci vmw_vsock_virtio_transport}"
 
-- 
@@ -13,7 +13,8 @@
 PROGS="${PROGS:-ash,dash,bash ip mount ls insmod mkdir ln cat chmod lsmod
        modprobe find grep mknod mv rm umount jq iperf3 dhclient hostname
        sed tr chown sipcalc cut socat dd strace ping tail killall sleep sysctl
-       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp}"
+       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp
+       /usr/lib/openssh/sshd-session}"
 
 KMODS="${KMODS:- virtio_net virtio_pci vmw_vsock_virtio_transport}"
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/4] test: Duplicate existing recvfrom() valgrind suppression for recv()
  2024-08-19 23:14 [PATCH 0/4] Assorted test fixes for i386/i686 and OpenSSH 9.8 Stefano Brivio
                   ` (2 preceding siblings ...)
  2024-08-19 23:14 ` [PATCH 3/4] test/passt.mbuto: Install sshd-session OpenSSH's split process Stefano Brivio
@ 2024-08-19 23:14 ` Stefano Brivio
  2024-08-20  0:46   ` David Gibson
  3 siblings, 1 reply; 12+ messages in thread
From: Stefano Brivio @ 2024-08-19 23:14 UTC (permalink / raw)
  To: passt-dev; +Cc: David Gibson

Some architectures, including i686, actually have a recv() system
call, not just a recvfrom(), and we need to cover the recv() with
MSG_TRUNC into a NULL buffer for them as well.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 test/valgrind.supp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/valgrind.supp b/test/valgrind.supp
index a158394..735b5f6 100644
--- a/test/valgrind.supp
+++ b/test/valgrind.supp
@@ -6,3 +6,12 @@
    ...
    fun:tcp_sock_consume
 }
+
+# same as above, for architectures with the recv() system call (at least i686):
+{
+   passt_recv_MSG_TRUNC_into_NULL_buffer
+   Memcheck:Param
+   socketcall.recv(buf)
+   ...
+   fun:tcp_sock_consume
+}
-- 
@@ -6,3 +6,12 @@
    ...
    fun:tcp_sock_consume
 }
+
+# same as above, for architectures with the recv() system call (at least i686):
+{
+   passt_recv_MSG_TRUNC_into_NULL_buffer
+   Memcheck:Param
+   socketcall.recv(buf)
+   ...
+   fun:tcp_sock_consume
+}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] test/lib/setup: Transform i686 kernel architecture name into QEMU name (i386)
  2024-08-19 23:14 ` [PATCH 1/4] test/lib/setup: Transform i686 kernel architecture name into QEMU name (i386) Stefano Brivio
@ 2024-08-20  0:45   ` David Gibson
  0 siblings, 0 replies; 12+ messages in thread
From: David Gibson @ 2024-08-20  0:45 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: passt-dev

[-- Attachment #1: Type: text/plain, Size: 2842 bytes --]

On Tue, Aug 20, 2024 at 01:14:31AM +0200, Stefano Brivio wrote:
> It's qemu-system-i386, but uname -m reports i686. I didn't test i486
> and i586.
> 
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  test/lib/setup | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/test/lib/setup b/test/lib/setup
> index 9b39b9f..58371bd 100755
> --- a/test/lib/setup
> +++ b/test/lib/setup
> @@ -17,6 +17,8 @@ INITRAMFS="${BASEPATH}/mbuto.img"
>  VCPUS="$( [ $(nproc) -ge 8 ] && echo 6 || echo $(( $(nproc) / 2 + 1 )) )"
>  __mem_kib="$(sed -n 's/MemTotal:[ ]*\([0-9]*\) kB/\1/p' /proc/meminfo)"
>  VMEM="$((${__mem_kib} / 1024 / 4))"
> +QEMU_ARCH="$(uname -m)"
> +[ "${QEMU_ARCH}" = "i686" ] && QEMU_ARCH=i386
>  
>  # setup_build() - Set up pane layout for build tests
>  setup_build() {
> @@ -53,7 +55,7 @@ setup_passt() {
>  	wait_for [ -f "${STATESETUP}/passt.pid" ]
>  
>  	GUEST_CID=94557
> -	context_run_bg qemu 'qemu-system-$(uname -m)'			   \
> +	context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}"		   \
>  		' -machine accel=kvm'                                      \
>  		' -m '${VMEM}' -cpu host -smp '${VCPUS}                    \
>  		' -kernel ' "/boot/vmlinuz-$(uname -r)"			   \
> @@ -148,7 +150,7 @@ setup_passt_in_ns() {
>  	wait_for [ -f "${STATESETUP}/passt.pid" ]
>  
>  	GUEST_CID=94557
> -	context_run_bg qemu 'qemu-system-$(uname -m)'			   \
> +	context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}"		   \
>  		' -machine accel=kvm'                                      \
>  		' -M accel=kvm:tcg'                                        \
>  		' -m '${VMEM}' -cpu host -smp '${VCPUS}                    \
> @@ -220,7 +222,7 @@ setup_two_guests() {
>  	wait_for [ -f "${STATESETUP}/passt_2.pid" ]
>  
>  	GUEST_1_CID=94557
> -	context_run_bg qemu_1 'qemu-system-$(uname -m)'			     \
> +	context_run_bg qemu_1 'qemu-system-'"${QEMU_ARCH}"		     \
>  		' -M accel=kvm:tcg'                                          \
>  		' -m '${VMEM}' -cpu host -smp '${VCPUS}                      \
>  		' -kernel ' "/boot/vmlinuz-$(uname -r)"			     \
> @@ -233,7 +235,7 @@ setup_two_guests() {
>  		" -device vhost-vsock-pci,guest-cid=$GUEST_1_CID"
>  
>  	GUEST_2_CID=94558
> -	context_run_bg qemu_2 'qemu-system-$(uname -m)'			     \
> +	context_run_bg qemu_2 'qemu-system-'"${QEMU_ARCH}"		     \
>  		' -M accel=kvm:tcg'                                          \
>  		' -m '${VMEM}' -cpu host -smp '${VCPUS}                      \
>  		' -kernel ' "/boot/vmlinuz-$(uname -r)"			     \

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/4] test/passt.mbuto: Run sshd from vsock proxy with absolute path
  2024-08-19 23:14 ` [PATCH 2/4] test/passt.mbuto: Run sshd from vsock proxy with absolute path Stefano Brivio
@ 2024-08-20  0:45   ` David Gibson
  0 siblings, 0 replies; 12+ messages in thread
From: David Gibson @ 2024-08-20  0:45 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

On Tue, Aug 20, 2024 at 01:14:32AM +0200, Stefano Brivio wrote:
> ...OpenSSH >= 9.8 otherwise complains that:
> 
>   sshd requires execution with an absolute path
> 
> Link: https://bugs.gentoo.org/936041
> Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078429
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  test/passt.mbuto | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/passt.mbuto b/test/passt.mbuto
> index 436eecc..4abaafc 100755
> --- a/test/passt.mbuto
> +++ b/test/passt.mbuto
> @@ -78,7 +78,7 @@ EOF
>  EOF
>  	chmod 600 /root/.ssh/authorized_keys
>  	chmod 700 /root
> -	socat VSOCK-LISTEN:22,fork EXEC:"sshd -i -e" 2> /var/log/vsock-ssh.log &
> +	socat VSOCK-LISTEN:22,fork EXEC:"/sbin/sshd -i -e" 2> /var/log/vsock-ssh.log &
>  	sh +m
>  '
>  

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/4] test/passt.mbuto: Install sshd-session OpenSSH's split process
  2024-08-19 23:14 ` [PATCH 3/4] test/passt.mbuto: Install sshd-session OpenSSH's split process Stefano Brivio
@ 2024-08-20  0:46   ` David Gibson
  2024-08-26  6:41   ` David Gibson
  1 sibling, 0 replies; 12+ messages in thread
From: David Gibson @ 2024-08-20  0:46 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1408 bytes --]

On Tue, Aug 20, 2024 at 01:14:33AM +0200, Stefano Brivio wrote:
> OpenSSH now ships a per-session binary, sshd-session, with sshd
> acting as mere listener. It's typically not found in $PATH, so specify
> the whole path at which it's commonly installed in $PROGS.
> 
> Link: https://www.openssh.com/releasenotes.html#9.8p1
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  test/passt.mbuto | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/test/passt.mbuto b/test/passt.mbuto
> index 4abaafc..61865e8 100755
> --- a/test/passt.mbuto
> +++ b/test/passt.mbuto
> @@ -13,7 +13,8 @@
>  PROGS="${PROGS:-ash,dash,bash ip mount ls insmod mkdir ln cat chmod lsmod
>         modprobe find grep mknod mv rm umount jq iperf3 dhclient hostname
>         sed tr chown sipcalc cut socat dd strace ping tail killall sleep sysctl
> -       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp}"
> +       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp
> +       /usr/lib/openssh/sshd-session}"
>  
>  KMODS="${KMODS:- virtio_net virtio_pci vmw_vsock_virtio_transport}"
>  

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 4/4] test: Duplicate existing recvfrom() valgrind suppression for recv()
  2024-08-19 23:14 ` [PATCH 4/4] test: Duplicate existing recvfrom() valgrind suppression for recv() Stefano Brivio
@ 2024-08-20  0:46   ` David Gibson
  0 siblings, 0 replies; 12+ messages in thread
From: David Gibson @ 2024-08-20  0:46 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]

On Tue, Aug 20, 2024 at 01:14:34AM +0200, Stefano Brivio wrote:
> Some architectures, including i686, actually have a recv() system
> call, not just a recvfrom(), and we need to cover the recv() with
> MSG_TRUNC into a NULL buffer for them as well.
> 
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  test/valgrind.supp | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/test/valgrind.supp b/test/valgrind.supp
> index a158394..735b5f6 100644
> --- a/test/valgrind.supp
> +++ b/test/valgrind.supp
> @@ -6,3 +6,12 @@
>     ...
>     fun:tcp_sock_consume
>  }
> +
> +# same as above, for architectures with the recv() system call (at least i686):
> +{
> +   passt_recv_MSG_TRUNC_into_NULL_buffer
> +   Memcheck:Param
> +   socketcall.recv(buf)
> +   ...
> +   fun:tcp_sock_consume
> +}

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/4] test/passt.mbuto: Install sshd-session OpenSSH's split process
  2024-08-19 23:14 ` [PATCH 3/4] test/passt.mbuto: Install sshd-session OpenSSH's split process Stefano Brivio
  2024-08-20  0:46   ` David Gibson
@ 2024-08-26  6:41   ` David Gibson
  2024-08-26  7:55     ` Stefano Brivio
  1 sibling, 1 reply; 12+ messages in thread
From: David Gibson @ 2024-08-26  6:41 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1598 bytes --]

On Tue, Aug 20, 2024 at 01:14:33AM +0200, Stefano Brivio wrote:
> OpenSSH now ships a per-session binary, sshd-session, with sshd
> acting as mere listener. It's typically not found in $PATH, so specify
> the whole path at which it's commonly installed in $PROGS.
> 
> Link: https://www.openssh.com/releasenotes.html#9.8p1
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>

Oops.  I reviewed by sight, but didn't test.

This breaks completely if you still have an older ssh without
sshd-session.  That includes running on Fedora 40 as of today.

I'm not immediately sure how to fix this within mbuto's constraints.

> ---
>  test/passt.mbuto | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/test/passt.mbuto b/test/passt.mbuto
> index 4abaafc..61865e8 100755
> --- a/test/passt.mbuto
> +++ b/test/passt.mbuto
> @@ -13,7 +13,8 @@
>  PROGS="${PROGS:-ash,dash,bash ip mount ls insmod mkdir ln cat chmod lsmod
>         modprobe find grep mknod mv rm umount jq iperf3 dhclient hostname
>         sed tr chown sipcalc cut socat dd strace ping tail killall sleep sysctl
> -       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp}"
> +       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp
> +       /usr/lib/openssh/sshd-session}"
>  
>  KMODS="${KMODS:- virtio_net virtio_pci vmw_vsock_virtio_transport}"
>  

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/4] test/passt.mbuto: Install sshd-session OpenSSH's split process
  2024-08-26  6:41   ` David Gibson
@ 2024-08-26  7:55     ` Stefano Brivio
  2024-08-26  8:21       ` David Gibson
  0 siblings, 1 reply; 12+ messages in thread
From: Stefano Brivio @ 2024-08-26  7:55 UTC (permalink / raw)
  To: David Gibson; +Cc: passt-dev

On Mon, 26 Aug 2024 16:41:23 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Tue, Aug 20, 2024 at 01:14:33AM +0200, Stefano Brivio wrote:
> > OpenSSH now ships a per-session binary, sshd-session, with sshd
> > acting as mere listener. It's typically not found in $PATH, so specify
> > the whole path at which it's commonly installed in $PROGS.
> > 
> > Link: https://www.openssh.com/releasenotes.html#9.8p1
> > Signed-off-by: Stefano Brivio <sbrivio@redhat.com>  
> 
> Oops.  I reviewed by sight, but didn't test.
> 
> This breaks completely if you still have an older ssh without
> sshd-session.  That includes running on Fedora 40 as of today.

Oops, I forgot to check this on Fedora 40, and I see it's actually at
/usr/libexec/openssh/sshd-session on Fedora Rawhide.

> I'm not immediately sure how to fix this within mbuto's constraints.

Well, the profile files are shell scripts as well, so we can just look
for sshd-session in both places, and add it to $PROGS only if we find
it. I can test and send a patch in a bit.

> > ---
> >  test/passt.mbuto | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/test/passt.mbuto b/test/passt.mbuto
> > index 4abaafc..61865e8 100755
> > --- a/test/passt.mbuto
> > +++ b/test/passt.mbuto
> > @@ -13,7 +13,8 @@
> >  PROGS="${PROGS:-ash,dash,bash ip mount ls insmod mkdir ln cat chmod lsmod
> >         modprobe find grep mknod mv rm umount jq iperf3 dhclient hostname
> >         sed tr chown sipcalc cut socat dd strace ping tail killall sleep sysctl
> > -       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp}"
> > +       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp
> > +       /usr/lib/openssh/sshd-session}"
> >  
> >  KMODS="${KMODS:- virtio_net virtio_pci vmw_vsock_virtio_transport}"
> >    
> 

-- 
Stefano


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/4] test/passt.mbuto: Install sshd-session OpenSSH's split process
  2024-08-26  7:55     ` Stefano Brivio
@ 2024-08-26  8:21       ` David Gibson
  0 siblings, 0 replies; 12+ messages in thread
From: David Gibson @ 2024-08-26  8:21 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: passt-dev

[-- Attachment #1: Type: text/plain, Size: 2302 bytes --]

On Mon, Aug 26, 2024 at 09:55:50AM +0200, Stefano Brivio wrote:
> On Mon, 26 Aug 2024 16:41:23 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > On Tue, Aug 20, 2024 at 01:14:33AM +0200, Stefano Brivio wrote:
> > > OpenSSH now ships a per-session binary, sshd-session, with sshd
> > > acting as mere listener. It's typically not found in $PATH, so specify
> > > the whole path at which it's commonly installed in $PROGS.
> > > 
> > > Link: https://www.openssh.com/releasenotes.html#9.8p1
> > > Signed-off-by: Stefano Brivio <sbrivio@redhat.com>  
> > 
> > Oops.  I reviewed by sight, but didn't test.
> > 
> > This breaks completely if you still have an older ssh without
> > sshd-session.  That includes running on Fedora 40 as of today.
> 
> Oops, I forgot to check this on Fedora 40, and I see it's actually at
> /usr/libexec/openssh/sshd-session on Fedora Rawhide.

Yeah, I thought it'd probably end up in libexec on Red Hat-ish distros.

> > I'm not immediately sure how to fix this within mbuto's constraints.
> 
> Well, the profile files are shell scripts as well, so we can just look
> for sshd-session in both places, and add it to $PROGS only if we find
> it. I can test and send a patch in a bit.
> 
> > > ---
> > >  test/passt.mbuto | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/test/passt.mbuto b/test/passt.mbuto
> > > index 4abaafc..61865e8 100755
> > > --- a/test/passt.mbuto
> > > +++ b/test/passt.mbuto
> > > @@ -13,7 +13,8 @@
> > >  PROGS="${PROGS:-ash,dash,bash ip mount ls insmod mkdir ln cat chmod lsmod
> > >         modprobe find grep mknod mv rm umount jq iperf3 dhclient hostname
> > >         sed tr chown sipcalc cut socat dd strace ping tail killall sleep sysctl
> > > -       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp}"
> > > +       nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp
> > > +       /usr/lib/openssh/sshd-session}"
> > >  
> > >  KMODS="${KMODS:- virtio_net virtio_pci vmw_vsock_virtio_transport}"
> > >    
> > 
> 

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-08-26  8:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-19 23:14 [PATCH 0/4] Assorted test fixes for i386/i686 and OpenSSH 9.8 Stefano Brivio
2024-08-19 23:14 ` [PATCH 1/4] test/lib/setup: Transform i686 kernel architecture name into QEMU name (i386) Stefano Brivio
2024-08-20  0:45   ` David Gibson
2024-08-19 23:14 ` [PATCH 2/4] test/passt.mbuto: Run sshd from vsock proxy with absolute path Stefano Brivio
2024-08-20  0:45   ` David Gibson
2024-08-19 23:14 ` [PATCH 3/4] test/passt.mbuto: Install sshd-session OpenSSH's split process Stefano Brivio
2024-08-20  0:46   ` David Gibson
2024-08-26  6:41   ` David Gibson
2024-08-26  7:55     ` Stefano Brivio
2024-08-26  8:21       ` David Gibson
2024-08-19 23:14 ` [PATCH 4/4] test: Duplicate existing recvfrom() valgrind suppression for recv() Stefano Brivio
2024-08-20  0:46   ` David Gibson

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).