summaryrefslogtreecommitdiff
path: root/open_issues/running_rump_for_slash.mdwn
blob: 52c97b5ddd5a250592956eff244198d07622ac50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[[!meta copyright="Copyright © 2019 Free Software
Foundation, Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]

[[!tag open_issue_hurd]]

I have been thinking about how to get rump running for the / filesystem.

Looking at how things go between ext2fs and exec: in grub.cfg we have
roughly:

    module ext2fs --exec-server-task='${exec-task}' '$(task-create)' '$(task-resume)'
    module exec '$(exec-task=task-create)'

i.e. the kernel is told to create two tasks, to pass a reference to
the exec task to the ext2fs task, and to let only the ext2fs task to
run.  What happens then is in `diskfs_start_bootstrap`, which calls
`start_execserver`, which uses `task_set_special_port` to set the
`TASK_BOOTSTRAP_PORT` special port to a send right to ext2fs, and resumes
the exec task. I.e. basically ext2fs tells exec where it is so that exec
can start the userland with `/` available.

I'm thinking that the same can be used for the rump translator,
something like:

    module rump --fs-server-task='${fs-task}' '$(task-create)' '$(task-resume)'
    module ext2fs --exec-server-task='${exec-task}' '$(fs-task=task-create)'
    module exec '$(exec-task=task-create)'

and we'd make rump's initialization use `task_set_special_port` to set
the `TASK_BOOTSTRAP_PORT` special port of ext2fs to a send right to rump,
and resume it. When ext2fs sees that this port is set, it would use it
instead of the gnumach-provided `_hurd_device_master` port to open
devices.

And we can nest this yet more for the pci-arbiter:

    module pci-arbiter --disk-server-task='${disk-task}' '$(task-create)' '$(task-resume)'
    module rump --fs-server-task='${fs-task}' '$(disk-task=task-create)'
    module ext2fs --exec-server-task='${exec-task}' '$(fs-task=task-create)'
    module exec '$(exec-task=task-create)'

and we'd make `pci-arbiter`'s initialization use `task_set_special_port`
to set the `TASK_BOOTSTRAP_PORT` special port of rump to a send right to
pci-arbiter and resume it. When `libpciaccess` sees that this port is set,
it would use it instead of looking up `/server/bus/pci`.