NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-mips/59355: mips64: rump.netstat can't talk to rump_server



>Number:         59355
>Category:       port-mips
>Synopsis:       mips64: rump.netstat can't talk to rump_server
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-mips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 26 05:20:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, ...
>Organization:
The N32BSD Rumination
>Environment:
>Description:
On mips64, rump_server is built as n32, just like most userland executables.

But rump.netstat is built as n64, just like netstat and a handful of other userland executables that use kvm to examine n64ish kernel guts.

And rump doesn't know anything about non-native process emul, so an n32 rump_server will interpret the client's syscalls as n32 syscalls, and an n64 rump.netstat will send n64 syscalls to the server.

It ends up in something like this (not sure exactly why):

  9271   9271 rump.netstat 0.000120998 CALL  read(3,0xfff866c000,8)
  9271   9271 rump.netstat 0.000021728 GIO   fd 3 read 8 bytes
       "\0\0\0\^D\M^?\M^?wX"
  9271   9271 rump.netstat 0.000004170 RET   read 8, 24/0x18
  9271   9271 rump.netstat 0.000006962 CALL  sendmsg(3,0xffffff71b0,0x400)
  9271   9271 rump.netstat 0.000006094 MISC  msghdr: [name=0x0, namelen=0, iov=0xffffff7480, iovlen=2, control=0x0, controllen=0, flags=4000000]
  9271   9271 rump.netstat 0.000030478 RET   sendmsg -1 errno 14 Bad address
  9271   9271 rump.netstat 0.000049254 CALL  __kevent100(4,0,0,0xffffff7240,8,0)

And it hangs, so the tests that involve rump.netstat all time out.
>How-To-Repeat:
cd /usr/tests/net/if_gif
atf-run | atf-report
>Fix:
Yes, please!

Maybe the rump server should be taught to handle non-native emul:

https://nxr.netbsd.org/xref/src/sys/rump/kern/lib/libsysproxy/sysproxy.c?r=1.10#84

Might require inventing some way for the client and server to negotiate process emul choice.

Or, maybe rump.netstat should be built as n32 (the kvm parts won't work anyway with an n32 rump_server), but that might be annoying to work into the same Makefile as netstat.

Or, maybe rump_server should be built as n64, but that cause the opposite problem for various other things that do not involve rump.netstat.



Home | Main Index | Thread Index | Old Index