You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm not sure if this is the right place to file this - this is a spec issue, is this upstream for the spec?
RLERROR transmits the numeric errno, which isn't consistent across all Linux architectures. For instance, errno 95 is EOPNOTSUPP on most architectures including x86_64, but is, e.g., ENOTSOCK on MIPS. So if I'm running a MIPS guest connecting to qemu's 9p server on an x86_64 host, and I mount with 9p2000.L, executing any file gives me "Socket operation on non-socket" because the kernel wants to look up the security.capability xattr, and the server is returning errno 95.
Adding if (err == -95) err = -EOPNOTSUPP; to two spots in the Linux 9p client causes it to start working, but I'm not sure that's the right solution. (So does mounting with 9p2000.u.)
I see that the FreeBSD support commit in diod also needed to hard-code errno 95. Probably one approach would be to specify that errnos are interpreted following Linux's include/uapi/asm-generic/errno.h, which is used on most architectures, and require those that don't (Linux alpha, mips, parisc, sparc, and other OSes like FreeBSD) to translate them to/from the asm-generic version.
The text was updated successfully, but these errors were encountered:
I have written a rust client for diod at https://github.com/andrewchambers/p92000-rust - I found this issue too so just created my own errno definitions based on the generic error codes.
I think the protocol.md spec should probably clarify this point.
Hi, I'm not sure if this is the right place to file this - this is a spec issue, is this upstream for the spec?
RLERROR transmits the numeric errno, which isn't consistent across all Linux architectures. For instance, errno 95 is EOPNOTSUPP on most architectures including x86_64, but is, e.g., ENOTSOCK on MIPS. So if I'm running a MIPS guest connecting to qemu's 9p server on an x86_64 host, and I mount with 9p2000.L, executing any file gives me "Socket operation on non-socket" because the kernel wants to look up the
security.capability
xattr, and the server is returning errno 95.Adding
if (err == -95) err = -EOPNOTSUPP;
to two spots in the Linux 9p client causes it to start working, but I'm not sure that's the right solution. (So does mounting with 9p2000.u.)I see that the FreeBSD support commit in diod also needed to hard-code errno 95. Probably one approach would be to specify that errnos are interpreted following Linux's include/uapi/asm-generic/errno.h, which is used on most architectures, and require those that don't (Linux alpha, mips, parisc, sparc, and other OSes like FreeBSD) to translate them to/from the asm-generic version.
The text was updated successfully, but these errors were encountered: