mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-14 16:26:30 +00:00
This patch changes the way of how the client-selected sub directory is communicated to the server. The former opaque session argument is now passed as last label element, which allows for the flexible tweaking of this argument by init's session-routing and label-rewriting mechansims. In particular, it alleviates the need for creating chroot component instances. This change requires the following four adaptations at the configuration level: - Each file-system session request must now carry a path starting with / as last session arguments. Hence, <vfs> <fs> nodes that feature a 'label' attributes must extend the attribute value with " -> /". For <fs> nodes with no label attribute, "/" is used as last label argument by default. - For matching session-routing rules at init's configuration, the matching of full labels should be replaced by 'label_prefix' matches, excluding the last (path) argument. - Wherever a label of a file-system session is rewritten by using init's 'label' attribute of a <parent> or <child> target node, the new attribute 'identity' should be used instead. This replaces the identity part of the label while preserving the client's directory argument. - Analogously to the matching of session-routing rules, server-side policy-selection rules that formerly matched a concrete 'label' must be changed to match a 'label_prefix' instead. As a good practice, 'label_prefix' values should end with " ->" if possible, which clearly delimits the identity part of the label used by the matching. Issue #5445
125 lines
3.2 KiB
Plaintext
125 lines
3.2 KiB
Plaintext
<config>
|
|
<parent-provides>
|
|
<service name="ROM"/>
|
|
<service name="PD"/>
|
|
<service name="RM"/>
|
|
<service name="CPU"/>
|
|
<service name="LOG"/>
|
|
<service name="File_system"/>
|
|
<service name="Timer"/>
|
|
<service name="Terminal"/>
|
|
</parent-provides>
|
|
|
|
<default-route> <any-service> <parent/> <any-child/> </any-service> </default-route>
|
|
|
|
<default caps="100"/>
|
|
|
|
<start name="depot_ro" ram="2M">
|
|
<binary name="chroot"/>
|
|
<provides> <service name="File_system"/> </provides>
|
|
<config>
|
|
<default-policy path="/depot" writeable="no"/>
|
|
</config>
|
|
<route>
|
|
<service name="File_system">
|
|
<parent label="used"/>
|
|
</service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="vfs" caps="150" ram="12M">
|
|
<provides><service name="File_system"/></provides>
|
|
<config>
|
|
<vfs>
|
|
<dir name="depot"> <fs label="depot"/> </dir>
|
|
<dir name="debug"> <ram/> </dir>
|
|
<tar name="gdb.tar"/>
|
|
</vfs>
|
|
<policy label_prefix="vfs_rom" root="/"/>
|
|
<policy label_prefix="gdb_support -> debug" root="/debug" writeable="yes"/>
|
|
<default-policy root="/" writeable="no"/>
|
|
</config>
|
|
<route>
|
|
<service name="File_system" label_prefix="depot ->">
|
|
<child name="depot_ro"/>
|
|
</service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="gdb_support" ram="16M">
|
|
<config>
|
|
<vfs>
|
|
<dir name="config"> <fs label="config"/> </dir>
|
|
<dir name="debug"> <fs label="debug"/> </dir>
|
|
</vfs>
|
|
</config>
|
|
<route>
|
|
<service name="File_system" label_prefix="config ->">
|
|
<parent identity="system_config"/>
|
|
</service>
|
|
<service name="File_system" label_prefix="debug ->">
|
|
<child name="vfs"/>
|
|
</service>
|
|
<service name="ROM" label="build_info">
|
|
<parent label="build_info"/>
|
|
</service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="vfs_rom" ram="16M">
|
|
<binary name="cached_fs_rom"/>
|
|
<provides> <service name="ROM"/> </provides>
|
|
<config/>
|
|
<route>
|
|
<service name="File_system"> <child name="vfs"/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="gdb" caps="1000" ram="1G">
|
|
<binary name="/bin/genode-x86-gdb"/>
|
|
<config>
|
|
<vfs>
|
|
<dir name="dev">
|
|
<log/>
|
|
<inline name="rtc">2018-01-01 00:01</inline>
|
|
<terminal name="monitor" label="monitor"/>
|
|
<terminal name="tty" label="ui"/>
|
|
</dir>
|
|
<dir name="pipe"> <pipe/> </dir>
|
|
<fs/>
|
|
</vfs>
|
|
<libc stdin="/dev/tty"
|
|
stdout="/dev/tty"
|
|
stderr="/dev/tty"
|
|
pipe="/pipe"
|
|
rtc="/dev/rtc"/>
|
|
<arg value="genode-x86-gdb"/>
|
|
<arg value="-ex"/> <arg value="set non-stop on"/>
|
|
<arg value="-ex"/> <arg value="target extended-remote /dev/monitor"/>
|
|
</config>
|
|
<route>
|
|
<service name="File_system">
|
|
<child name="vfs"/>
|
|
</service>
|
|
<service name="ROM" label_suffix=".lib.so">
|
|
<parent/>
|
|
</service>
|
|
<service name="ROM" label_last="/bin/genode-x86-gdb">
|
|
<child name="vfs_rom"/>
|
|
</service>
|
|
<service name="Terminal" label="monitor">
|
|
<parent label="monitor"/>
|
|
</service>
|
|
<service name="Terminal" label="ui">
|
|
<parent label="ui"/>
|
|
</service>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
</config>
|