bug-hurd
[Top][All Lists]
Advanced

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

Re: Almost working pci-arbiter with rumpdisk


From: Damien Zammit
Subject: Re: Almost working pci-arbiter with rumpdisk
Date: Sun, 21 Feb 2021 17:00:32 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

Hi,

On 21/2/21 12:24 pm, Samuel Thibault wrote:
> Ah, possibly. Perhaps you could make libnetfs to accept any access when
> auth/proc are not available

Done this!

> ? once libpciaccess gets a port on pci-arbiter's root, it can use
> file_name_lookup_under to open directories and files in it. libnetfs
> will want to check permissions, but it could be made to accept anything
> when auth/proc are not available yet.

Not sure why, but my rump code calling into libpciaccess using hurd method
hangs on trying to openport the root pcifs: 

Here is part of enum_devices in my libpciaccess:

    mach_print("enum_devices\n");
    if (pci_port == MACH_PORT_NULL) {
        mach_print("enum_devices: pci_port is null\n");
        dir = opendir(parent);
        if (!dir)
            return errno;
    } else {
        mach_print("enum_devices: pci_port is not null\n");
        root = file_name_lookup_under (pci_port, parent, O_DIRECTORY | O_RDONLY 
| O_EXEC, 0);
        if (root == MACH_PORT_NULL) {
            mach_print("enum_devices: root is null\n");
            return errno;
        } else {
            mach_print("enum_devices: root is not null\n");
            mach_print("openport...");
            fd = openport (root, O_DIRECTORY | O_RDONLY | O_EXEC);
            if (fd < 0)
                return errno;
            mach_print("openport done\n");
            dir = fdopendir(fd);
            if (!dir)
                return errno;
            mach_print("fdopendir done\n");
        }
    }

I see:

pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
PCI device_open (irq)
PCI not pci, fallback to kernel
pciaccess: hurd got device master port
PCI device_open (pci)
PCI opening...
PCI open success
enum_devices
enum_devices: pci_port is not null
netfs_S_dir_lookup!
dir_lookup 1
dir_lookup 2
dir_lookup 3
dir_lookup 4
dir_lookup 5
dir_lookup 6
dir_lookup 7
dir_lookup 8
dir_lookup end
enum_devices: root is not null
openport...

rumpdisk.static crashed

Damien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]