Skip to content

RLERROR doesn't work across architectures #35

@geofft

Description

@geofft

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions