From 5a1cef6381b76ad41e0b9ef2143d310f57006266 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 24 Nov 2016 15:28:32 +0100 Subject: [PATCH] Make label prefixing more strict This patch unconditionally applies the labeling of sessions and thereby removes the most common use case of 'Child_policy::filter_session_args'. Furthermore, the patch removes an ambiguity of the session labels of sessions created by the parent of behalf of its child, e.g., the PD session created as part of 'Child' now has the label "" whereas an unlabeled PD-session request originating from the child has the label " -> ". This way, the routing-policy of 'Child_policy::resolve_session_request' can differentiate both cases. As a consequence, the stricter labeling must now be considered wherever a precise label was specified as a key for a session route or a server- side policy selection. The simplest way to adapt those cases is to use a 'label_prefix' instead of the 'label' attribute. Alternatively, the 'label' attribute may used by appending " -> " (note the whitespace). Fixes #2171 --- repos/base-linux/run/lx_fs.run | 2 +- repos/base/include/base/child.h | 8 +- repos/base/include/base/session_label.h | 16 ++-- repos/base/run/platform_drv.inc | 16 ++-- repos/base/src/core/main.cc | 17 ---- repos/base/src/lib/base/child.cc | 8 +- repos/base/src/test/rm_fault/main.cc | 9 -- repos/dde_linux/run/intel_fb.run | 4 +- repos/dde_linux/run/linux_nic_panda.run | 6 +- repos/dde_rump/README | 2 +- repos/dde_rump/run/rump_ext2.run | 2 +- repos/dde_rump/run/rump_iso.run | 2 +- repos/demo/include/launchpad/launchpad.h | 7 -- repos/gems/run/cpu_load_display.run | 2 +- repos/gems/run/cpu_sampler_noux.run | 2 +- repos/gems/run/http_blk.run | 4 +- repos/gems/run/launcher.run | 10 +-- repos/gems/run/menu_view.run | 2 +- repos/gems/run/mixer_gui_qt_test.run | 8 +- repos/gems/run/nano3d.run | 2 +- repos/gems/run/nit_fader.run | 2 +- repos/gems/run/tcp_terminal.run | 2 +- repos/gems/run/terminal_log.run | 2 +- repos/gems/run/terminal_mux.run | 4 +- repos/gems/run/wm.run | 6 +- .../src/app/floating_window_layouter/README | 4 +- repos/gems/src/server/file_terminal/README | 4 +- repos/gems/src/server/tcp_terminal/README | 4 +- repos/libports/run/acpica.run | 4 +- repos/libports/run/eglgears.run | 2 +- repos/libports/run/libc_block.run | 2 +- repos/libports/run/libc_ffat_fs.run | 2 +- repos/libports/run/libc_filesystem_test.inc | 2 +- repos/libports/run/nic_router.run | 22 ++--- repos/libports/run/qt5_common.inc | 6 +- repos/libports/run/qt5_textedit.run | 8 +- repos/libports/run/test-nicbridge_static.run | 2 +- repos/libports/run/test-nicbridge_static2.run | 2 +- repos/libports/src/app/acpica/README | 2 +- repos/libports/src/server/fuse_fs/README | 2 +- repos/os/include/cli_monitor/child.h | 8 -- repos/os/include/init/child.h | 3 - repos/os/include/init/child_policy.h | 38 -------- repos/os/include/os/slave.h | 25 ++---- repos/os/run/ahci_bench.run | 2 +- repos/os/run/ahci_blk.run | 2 +- repos/os/run/demo.run | 4 +- repos/os/run/fault_detection.run | 2 +- repos/os/run/fs_log.run | 2 +- repos/os/run/kdb_uart_drv.run | 2 +- repos/os/run/loader.run | 2 +- repos/os/run/mixer.run | 2 +- repos/os/run/panda_uart4_echo.run | 2 +- repos/os/run/part_blk.run | 4 +- repos/os/run/rom_to_file.run | 2 +- repos/os/run/trace.run | 2 +- repos/os/run/uart.run | 4 +- repos/os/run/vmm.run | 2 +- repos/os/src/drivers/ahci/README | 4 +- repos/os/src/drivers/platform/spec/x86/README | 10 +-- repos/os/src/drivers/uart/README | 6 +- repos/os/src/server/fs_log/README | 2 +- repos/os/src/server/loader/child.h | 8 -- repos/os/src/server/nic_bridge/README | 2 +- repos/os/src/server/nitpicker/README | 6 +- repos/os/src/server/part_blk/README | 4 +- repos/os/src/server/trace_fs/README | 2 +- repos/os/src/test/bomb/main.cc | 9 +- repos/os/src/test/fault_detection/main.cc | 9 -- repos/os/src/test/resource_yield/main.cc | 89 +++++++++++-------- repos/ports-foc/run/l4linux.run | 2 +- repos/ports-foc/run/l4linux_ahci_bench.run | 2 +- repos/ports-foc/run/l4linux_netperf.inc | 2 +- repos/ports-foc/run/linux_panda.run | 6 +- repos/ports/doc/gdb.txt | 2 +- repos/ports/run/arora.run | 2 +- repos/ports/run/debug_nitpicker.run | 4 +- repos/ports/run/dosbox.run | 8 +- repos/ports/run/gdb_monitor.run | 2 +- repos/ports/run/gdb_monitor_interactive.run | 2 +- repos/ports/run/gdb_monitor_target_config.run | 2 +- repos/ports/run/libc_noux.run | 2 +- repos/ports/run/netperf.inc | 4 +- repos/ports/run/noux_gdb_dynamic.run | 4 +- repos/ports/run/noux_net_netcat.run | 4 +- repos/ports/run/noux_signals.run | 2 +- repos/ports/run/noux_terminal_fs.run | 2 +- repos/ports/run/noux_two_terminal_fs.run | 2 +- repos/ports/run/seoul.inc | 4 +- repos/ports/run/vbox_auto_win7_share.run | 2 +- repos/ports/run/vbox_pointer.run | 12 +-- repos/ports/run/vbox_win.inc | 6 +- repos/ports/run/virtualbox_auto.inc | 10 +-- .../arora/demo/nitpicker_plugin/config.plugin | 2 +- repos/ports/src/app/gdb_monitor/app_child.h | 53 +++++------ repos/ports/src/app/vbox_pointer/README | 6 +- repos/ports/src/noux/child_policy.h | 8 -- 97 files changed, 254 insertions(+), 375 deletions(-) diff --git a/repos/base-linux/run/lx_fs.run b/repos/base-linux/run/lx_fs.run index b6f950585..d64db11a4 100644 --- a/repos/base-linux/run/lx_fs.run +++ b/repos/base-linux/run/lx_fs.run @@ -35,7 +35,7 @@ install_config { - + diff --git a/repos/base/include/base/child.h b/repos/base/include/base/child.h index b3a4ba5ab..461b2ca19 100644 --- a/repos/base/include/base/child.h +++ b/repos/base/include/base/child.h @@ -297,16 +297,16 @@ class Genode::Child : protected Rpc_object, }; Env_connection _ram { _policy, - _id_space, Parent::Env::ram() }; + _id_space, Parent::Env::ram(), _policy.name() }; Env_connection _pd { _policy, - _id_space, Parent::Env::pd() }; + _id_space, Parent::Env::pd(), _policy.name() }; Env_connection _cpu { _policy, - _id_space, Parent::Env::cpu() }; + _id_space, Parent::Env::cpu(), _policy.name() }; Env_connection _log { _policy, - _id_space, Parent::Env::log() }; + _id_space, Parent::Env::log(), _policy.name() }; Env_connection _binary { _policy, _id_space, Parent::Env::binary(), _policy.binary_name() }; diff --git a/repos/base/include/base/session_label.h b/repos/base/include/base/session_label.h index 3972091f7..04f8f5cae 100644 --- a/repos/base/include/base/session_label.h +++ b/repos/base/include/base/session_label.h @@ -42,9 +42,11 @@ struct Genode::Session_label : String<160> if (full_len < _separator_len()) return full; - for (unsigned i = full_len - _separator_len(); i > 0; --i) + unsigned i = full_len - _separator_len(); + do { if (!strcmp(_separator(), full + i, _separator_len())) return full + i + _separator_len(); + } while (i-- > 0); return Session_label(Cstring(full)); } @@ -91,16 +93,8 @@ namespace Genode { inline Session_label prefixed_label(String const &prefix, String const &label) { - if (!prefix.valid() || prefix == "") - return Session_label(label.string()); - - if (!label.valid() || label == "") - return Session_label(prefix.string()); - - char buf[Session_label::capacity()]; - snprintf(buf, sizeof(buf), "%s -> %s", prefix.string(), label.string()); - - return Session_label(Cstring(buf)); + String const prefixed_label(prefix, " -> ", label); + return Session_label(prefixed_label); } } diff --git a/repos/base/run/platform_drv.inc b/repos/base/run/platform_drv.inc index d2b409579..6c4512ccd 100644 --- a/repos/base/run/platform_drv.inc +++ b/repos/base/run/platform_drv.inc @@ -33,14 +33,14 @@ proc platform_drv_policy {} { if ([have_spec x86]) { return { - - - - - - - - + + + + + + + + diff --git a/repos/base/src/core/main.cc b/repos/base/src/core/main.cc index adbf96c70..5d6ce3633 100644 --- a/repos/base/src/core/main.cc +++ b/repos/base/src/core/main.cc @@ -158,23 +158,6 @@ class Core_child : public Child_policy ** Child-policy interface ** ****************************/ - void filter_session_args(Service::Name const &, char *args, size_t args_len) override - { - using namespace Genode; - - char label_buf[Parent::Session_args::MAX_SIZE]; - Arg_string::find_arg(args, "label").string(label_buf, sizeof(label_buf), ""); - - char value_buf[Parent::Session_args::MAX_SIZE]; - Genode::snprintf(value_buf, sizeof(value_buf), - "\"%s%s%s\"", - "init", - Genode::strcmp(label_buf, "") == 0 ? "" : " -> ", - label_buf); - - Arg_string::set_arg(args, args_len, "label", value_buf); - } - Name name() const { return "init"; } Service &resolve_session_request(Service::Name const &name, diff --git a/repos/base/src/lib/base/child.cc b/repos/base/src/lib/base/child.cc index 096d06bc1..0f8928541 100644 --- a/repos/base/src/lib/base/child.cc +++ b/repos/base/src/lib/base/child.cc @@ -188,8 +188,14 @@ Session_capability Child::session(Parent::Client::Id id, char argbuf[Parent::Session_args::MAX_SIZE]; - /* filter session arguments according to the child policy */ strncpy(argbuf, args.string(), sizeof(argbuf)); + + /* prefix session label */ + Session_label const orig_label(label_from_args(argbuf)); + Arg_string::set_arg_string(argbuf, sizeof(argbuf), "label", + prefixed_label(_policy.name(), orig_label).string()); + + /* filter session arguments according to the child policy */ _policy.filter_session_args(name.string(), argbuf, sizeof(argbuf)); /* filter session affinity */ diff --git a/repos/base/src/test/rm_fault/main.cc b/repos/base/src/test/rm_fault/main.cc index 890bf21e8..560f7b29e 100644 --- a/repos/base/src/test/rm_fault/main.cc +++ b/repos/base/src/test/rm_fault/main.cc @@ -128,15 +128,6 @@ class Test_child_policy : public Child_policy return *service; } - - void filter_session_args(Service::Name const &, - char *args, size_t args_len) - { - /* prefix session label */ - Session_label const orig(label_from_args(args)); - Arg_string::set_arg_string(args, args_len, "label", - prefixed_label(name(), orig).string()); - } }; diff --git a/repos/dde_linux/run/intel_fb.run b/repos/dde_linux/run/intel_fb.run index 04378fc42..76af3b548 100644 --- a/repos/dde_linux/run/intel_fb.run +++ b/repos/dde_linux/run/intel_fb.run @@ -68,8 +68,8 @@ append config { - - + + diff --git a/repos/dde_linux/run/linux_nic_panda.run b/repos/dde_linux/run/linux_nic_panda.run index 33470dc33..cbc00a32e 100644 --- a/repos/dde_linux/run/linux_nic_panda.run +++ b/repos/dde_linux/run/linux_nic_panda.run @@ -70,9 +70,9 @@ set config { - - - + + + diff --git a/repos/dde_rump/README b/repos/dde_rump/README index 209696e05..7fe111b6b 100644 --- a/repos/dde_rump/README +++ b/repos/dde_rump/README @@ -43,7 +43,7 @@ Here is an example snippet that configures the server: ! ! ! -! +! ! The server is looking for a service that provides a Genode block session. If diff --git a/repos/dde_rump/run/rump_ext2.run b/repos/dde_rump/run/rump_ext2.run index 985b63149..7dc1b1f0b 100644 --- a/repos/dde_rump/run/rump_ext2.run +++ b/repos/dde_rump/run/rump_ext2.run @@ -60,7 +60,7 @@ append config { - + diff --git a/repos/dde_rump/run/rump_iso.run b/repos/dde_rump/run/rump_iso.run index 26ec0ca6b..59c6fe01b 100644 --- a/repos/dde_rump/run/rump_iso.run +++ b/repos/dde_rump/run/rump_iso.run @@ -54,7 +54,7 @@ append config { - + diff --git a/repos/demo/include/launchpad/launchpad.h b/repos/demo/include/launchpad/launchpad.h index 12268fcc7..d6b5e3e2c 100644 --- a/repos/demo/include/launchpad/launchpad.h +++ b/repos/demo/include/launchpad/launchpad.h @@ -62,7 +62,6 @@ class Launchpad_child : public Genode::Child_policy, Genode::Session_requester _session_requester; - Init::Child_policy_enforce_labeling _labeling_policy { _name.string() }; Init::Child_policy_provide_rom_file _config_policy; Genode::Child _child; @@ -182,12 +181,6 @@ class Launchpad_child : public Genode::Child_policy, throw Genode::Parent::Service_denied(); } - void filter_session_args(Genode::Service::Name const &service, - char *args, Genode::size_t args_len) override - { - _labeling_policy.filter_session_args(service.string(), args, args_len); - } - void announce_service(Genode::Service::Name const &service_name) override { if (_find_service(_child_services, service_name)) { diff --git a/repos/gems/run/cpu_load_display.run b/repos/gems/run/cpu_load_display.run index 5ea55f513..af4055a7b 100644 --- a/repos/gems/run/cpu_load_display.run +++ b/repos/gems/run/cpu_load_display.run @@ -108,7 +108,7 @@ append config { - + diff --git a/repos/gems/run/cpu_sampler_noux.run b/repos/gems/run/cpu_sampler_noux.run index 9bff1c53e..6db36350c 100644 --- a/repos/gems/run/cpu_sampler_noux.run +++ b/repos/gems/run/cpu_sampler_noux.run @@ -141,7 +141,7 @@ append config { - + diff --git a/repos/gems/run/http_blk.run b/repos/gems/run/http_blk.run index 6c89e01aa..e1716f2ca 100644 --- a/repos/gems/run/http_blk.run +++ b/repos/gems/run/http_blk.run @@ -91,8 +91,8 @@ append config { - - + + } diff --git a/repos/gems/run/launcher.run b/repos/gems/run/launcher.run index f271f15c4..6b832f749 100644 --- a/repos/gems/run/launcher.run +++ b/repos/gems/run/launcher.run @@ -80,10 +80,10 @@ append config { - + - - + + @@ -157,8 +157,8 @@ append config { - - + + diff --git a/repos/gems/run/menu_view.run b/repos/gems/run/menu_view.run index 4d794b3c4..30e537f17 100644 --- a/repos/gems/run/menu_view.run +++ b/repos/gems/run/menu_view.run @@ -53,7 +53,7 @@ append config { - + diff --git a/repos/gems/run/mixer_gui_qt_test.run b/repos/gems/run/mixer_gui_qt_test.run index 8f3b173ed..b6b1e5be4 100644 --- a/repos/gems/run/mixer_gui_qt_test.run +++ b/repos/gems/run/mixer_gui_qt_test.run @@ -94,8 +94,8 @@ append config { - - + + @@ -115,8 +115,8 @@ append config { - - + + diff --git a/repos/gems/run/nano3d.run b/repos/gems/run/nano3d.run index b9f86a7d8..cf626bb9a 100644 --- a/repos/gems/run/nano3d.run +++ b/repos/gems/run/nano3d.run @@ -61,7 +61,7 @@ append config { - + diff --git a/repos/gems/run/nit_fader.run b/repos/gems/run/nit_fader.run index a363cca37..5212e7d0a 100644 --- a/repos/gems/run/nit_fader.run +++ b/repos/gems/run/nit_fader.run @@ -52,7 +52,7 @@ append config { - + diff --git a/repos/gems/run/tcp_terminal.run b/repos/gems/run/tcp_terminal.run index 9833d8a8c..992db2903 100644 --- a/repos/gems/run/tcp_terminal.run +++ b/repos/gems/run/tcp_terminal.run @@ -61,7 +61,7 @@ set config { - + diff --git a/repos/gems/run/terminal_log.run b/repos/gems/run/terminal_log.run index db1d33d27..1c2d10b5f 100644 --- a/repos/gems/run/terminal_log.run +++ b/repos/gems/run/terminal_log.run @@ -85,7 +85,7 @@ append config { - + diff --git a/repos/gems/run/terminal_mux.run b/repos/gems/run/terminal_mux.run index 8d2c0157d..1b8b5b04a 100644 --- a/repos/gems/run/terminal_mux.run +++ b/repos/gems/run/terminal_mux.run @@ -58,11 +58,11 @@ append config { # on Fiasco.OC the kdb_uart_drv is always UART 0 append_if [have_spec foc] config { - } + } # on all other kernels, direct terminal_mux to UART 1 (Qemu stdio, see below) append_if [expr ![have_spec foc]] config { - } + } append config { diff --git a/repos/gems/run/wm.run b/repos/gems/run/wm.run index 518023f5f..f0059ab52 100644 --- a/repos/gems/run/wm.run +++ b/repos/gems/run/wm.run @@ -104,7 +104,7 @@ append config { - + @@ -138,8 +138,8 @@ append config { - - + + diff --git a/repos/gems/src/app/floating_window_layouter/README b/repos/gems/src/app/floating_window_layouter/README index 1e5063b47..6c111eadb 100644 --- a/repos/gems/src/app/floating_window_layouter/README +++ b/repos/gems/src/app/floating_window_layouter/README @@ -17,8 +17,8 @@ a given window label, the window's initial position and its maximized state can be defined as follows: ! -! -! +! +! ! diff --git a/repos/gems/src/server/file_terminal/README b/repos/gems/src/server/file_terminal/README index ed0f19d41..443e4cf32 100644 --- a/repos/gems/src/server/file_terminal/README +++ b/repos/gems/src/server/file_terminal/README @@ -2,8 +2,8 @@ File terminal is a service that provides a terminal-session interface and redirects the terminal input and output to a file. ! -! -! h +! +! h ! ! ! diff --git a/repos/gems/src/server/tcp_terminal/README b/repos/gems/src/server/tcp_terminal/README index ad10bd530..d230f62e0 100644 --- a/repos/gems/src/server/tcp_terminal/README +++ b/repos/gems/src/server/tcp_terminal/README @@ -4,8 +4,8 @@ to be used for each client is defined in as session policy in the config node of the TCP server: ! -! -! +! +! ! For an example of how to use the TCP terminal, please refer to the run script diff --git a/repos/libports/run/acpica.run b/repos/libports/run/acpica.run index db5b0c049..696afc6d1 100644 --- a/repos/libports/run/acpica.run +++ b/repos/libports/run/acpica.run @@ -25,8 +25,8 @@ source ${genode_dir}/repos/base/run/platform_drv.inc # override default platform driver policy proc platform_drv_policy {} { return { - - } + + } } # add routing information to dynamically generate change of 'system' ROM diff --git a/repos/libports/run/eglgears.run b/repos/libports/run/eglgears.run index e1a3a9679..473044ec8 100644 --- a/repos/libports/run/eglgears.run +++ b/repos/libports/run/eglgears.run @@ -67,7 +67,7 @@ append config { - + diff --git a/repos/libports/run/libc_block.run b/repos/libports/run/libc_block.run index 7be5ba91b..29329c8d4 100644 --- a/repos/libports/run/libc_block.run +++ b/repos/libports/run/libc_block.run @@ -75,7 +75,7 @@ append_if $use_ahci_drv config { - + } diff --git a/repos/libports/run/libc_ffat_fs.run b/repos/libports/run/libc_ffat_fs.run index de1d756f1..fc6201874 100644 --- a/repos/libports/run/libc_ffat_fs.run +++ b/repos/libports/run/libc_ffat_fs.run @@ -79,7 +79,7 @@ append_if $use_ahci_drv config { - + } diff --git a/repos/libports/run/libc_filesystem_test.inc b/repos/libports/run/libc_filesystem_test.inc index 4dd8ee930..833069a5f 100644 --- a/repos/libports/run/libc_filesystem_test.inc +++ b/repos/libports/run/libc_filesystem_test.inc @@ -105,7 +105,7 @@ append_if $use_ahci config { } append_if $use_ahci config " - " + " append_if $use_ahci config { } diff --git a/repos/libports/run/nic_router.run b/repos/libports/run/nic_router.run index 344b7f408..154229400 100644 --- a/repos/libports/run/nic_router.run +++ b/repos/libports/run/nic_router.run @@ -89,39 +89,39 @@ append config { - + - + - + - + - + - + - + @@ -136,10 +136,10 @@ append config { - - - - + + + + diff --git a/repos/libports/run/qt5_common.inc b/repos/libports/run/qt5_common.inc index ff4ec2729..34f4a8dfb 100644 --- a/repos/libports/run/qt5_common.inc +++ b/repos/libports/run/qt5_common.inc @@ -73,7 +73,7 @@ proc qt5_start_nodes { feature_arg } { - + @@ -111,8 +111,8 @@ proc qt5_start_nodes { feature_arg } { - - + + diff --git a/repos/libports/run/qt5_textedit.run b/repos/libports/run/qt5_textedit.run index d1af39afa..9b0607382 100644 --- a/repos/libports/run/qt5_textedit.run +++ b/repos/libports/run/qt5_textedit.run @@ -54,7 +54,7 @@ append_if $use_ahci_driver config { - + } @@ -70,8 +70,8 @@ append_if [have_spec linux] config { - - + + } @@ -81,7 +81,7 @@ append_if [expr ![have_spec linux]] config { - + } diff --git a/repos/libports/run/test-nicbridge_static.run b/repos/libports/run/test-nicbridge_static.run index db7c560cc..b20de89a5 100644 --- a/repos/libports/run/test-nicbridge_static.run +++ b/repos/libports/run/test-nicbridge_static.run @@ -54,7 +54,7 @@ append config { - + diff --git a/repos/libports/run/test-nicbridge_static2.run b/repos/libports/run/test-nicbridge_static2.run index aea9cad39..c31b36f99 100644 --- a/repos/libports/run/test-nicbridge_static2.run +++ b/repos/libports/run/test-nicbridge_static2.run @@ -54,7 +54,7 @@ append config { - + diff --git a/repos/libports/src/app/acpica/README b/repos/libports/src/app/acpica/README index 346cb9fa0..7415ac507 100644 --- a/repos/libports/src/app/acpica/README +++ b/repos/libports/src/app/acpica/README @@ -71,7 +71,7 @@ Excerpt of important parts of the acpica configuration ! ! ... ! -! +! ! ... ! ! diff --git a/repos/libports/src/server/fuse_fs/README b/repos/libports/src/server/fuse_fs/README index db68b4c5f..61280185e 100644 --- a/repos/libports/src/server/fuse_fs/README +++ b/repos/libports/src/server/fuse_fs/README @@ -21,6 +21,6 @@ used: ! ! ! -! +! ! ! diff --git a/repos/os/include/cli_monitor/child.h b/repos/os/include/cli_monitor/child.h index 1e2ff80cd..227a60621 100644 --- a/repos/os/include/cli_monitor/child.h +++ b/repos/os/include/cli_monitor/child.h @@ -63,7 +63,6 @@ class Child_base : public Genode::Child_policy enum { ENTRYPOINT_STACK_SIZE = 12*1024 }; Genode::Rpc_entrypoint _entrypoint; - Init::Child_policy_enforce_labeling _labeling_policy; Genode::Child_policy_dynamic_rom_file _config_policy; /** @@ -111,7 +110,6 @@ class Child_base : public Genode::Child_policy _ref_ram_cap(ref_ram_cap), _ref_ram(ref_ram), _ram_quota(ram_quota), _ram_limit(ram_limit), _entrypoint(&pd_session, ENTRYPOINT_STACK_SIZE, _label.string(), false), - _labeling_policy(_label.string()), _config_policy("config", _entrypoint, &ref_ram), _yield_response_sigh_cap(yield_response_sig_cap), _exit_sig_cap(exit_sig_cap), @@ -292,12 +290,6 @@ class Child_base : public Genode::Child_policy return *new (Genode::env()->heap()) Parent_service(_parent_services, name); } - void filter_session_args(Genode::Service::Name const &service, - char *args, Genode::size_t args_len) override - { - _labeling_policy.filter_session_args(service.string(), args, args_len); - } - void yield_response() { if (_withdraw_on_yield_response) { diff --git a/repos/os/include/init/child.h b/repos/os/include/init/child.h index 774efc90c..b813756d0 100644 --- a/repos/os/include/init/child.h +++ b/repos/os/include/init/child.h @@ -493,7 +493,6 @@ class Init::Child : Genode::Child_policy, /** * Policy helpers */ - Init::Child_policy_enforce_labeling _labeling_policy; Init::Child_policy_handle_cpu_priorities _priority_policy; Init::Child_policy_provide_rom_file _config_policy; Init::Child_policy_redirect_rom_file _configfile_policy; @@ -542,7 +541,6 @@ class Init::Child : Genode::Child_policy, _child_services(child_services), _config(_env.ram(), _env.rm(), start_node), _session_requester(_entrypoint, _env.ram(), _env.rm()), - _labeling_policy(_name.unique), _priority_policy(_resources.prio_levels_log2, _resources.priority), _config_policy("config", _config.dataspace(), &_entrypoint), _configfile_policy("config", _config.filename()), @@ -758,7 +756,6 @@ class Init::Child : Genode::Child_policy, void filter_session_args(Service::Name const &service, char *args, Genode::size_t args_len) override { - _labeling_policy. filter_session_args(service.string(), args, args_len); _priority_policy. filter_session_args(service.string(), args, args_len); _configfile_policy. filter_session_args(service.string(), args, args_len); _ram_session_policy.filter_session_args(service.string(), args, args_len); diff --git a/repos/os/include/init/child_policy.h b/repos/os/include/init/child_policy.h index 928b0a14f..929c4b632 100644 --- a/repos/os/include/init/child_policy.h +++ b/repos/os/include/init/child_policy.h @@ -28,7 +28,6 @@ namespace Init { class Child_policy_ram_phys; - class Child_policy_enforce_labeling; class Child_policy_handle_cpu_priorities; class Child_policy_provide_rom_file; class Child_policy_provide_dynamic_rom; @@ -81,43 +80,6 @@ class Init::Child_policy_ram_phys }; -/** - * Policy for prepending the child name to the 'label' argument - * - * By applying this policy, the identity of the child becomes imprinted - * with each session request. - */ -class Init::Child_policy_enforce_labeling -{ - const char *_name; - - public: - - Child_policy_enforce_labeling(const char *name) : _name(name) { } - - /** - * Filter arguments of session request - * - * This method modifies the 'label' argument and leaves all other - * session arguments intact. - */ - void filter_session_args(const char *, char *args, - Genode::size_t args_len) - { - using namespace Genode; - - Session_label const old_label = label_from_args(args); - if (old_label == "") { - Arg_string::set_arg_string(args, args_len, "label", _name); - } else { - Session_label const name(_name); - Session_label const new_label = prefixed_label(name, old_label); - Arg_string::set_arg_string(args, args_len, "label", new_label.string()); - } - } -}; - - class Init::Child_policy_handle_cpu_priorities { /* priority parameters */ diff --git a/repos/os/include/os/slave.h b/repos/os/include/os/slave.h index 8b02b73ae..9468cf01c 100644 --- a/repos/os/include/os/slave.h +++ b/repos/os/include/os/slave.h @@ -61,15 +61,14 @@ class Genode::Slave::Policy : public Child_policy private: - Label const _label; - Binary_name const _binary_name; - Ram_session_client _ram; - Genode::Parent_service _binary_service; - size_t _ram_quota; - Parent_services _parent_services; - Rpc_entrypoint &_ep; - Init::Child_policy_enforce_labeling _labeling_policy; - Child_policy_dynamic_rom_file _config_policy; + Label const _label; + Binary_name const _binary_name; + Ram_session_client _ram; + Genode::Parent_service _binary_service; + size_t _ram_quota; + Parent_services _parent_services; + Rpc_entrypoint &_ep; + Child_policy_dynamic_rom_file _config_policy; bool _service_permitted(Service::Name const &service_name) const { @@ -106,7 +105,7 @@ class Genode::Slave::Policy : public Child_policy : _label(label), _binary_name(binary_name), _ram(ram_cap), _binary_service(Rom_session::service_name()), - _ram_quota(ram_quota), _ep(ep), _labeling_policy(_label.string()), + _ram_quota(ram_quota), _ep(ep), _config_policy("config", _ep, &_ram), _session_requester(ep, _ram, rm) { @@ -185,12 +184,6 @@ class Genode::Slave::Policy : public Child_policy Id_space &server_id_space() override { return _session_requester.id_space(); } - - void filter_session_args(Service::Name const &service, - char *args, size_t args_len) - { - _labeling_policy.filter_session_args(service.string(), args, args_len); - } }; diff --git a/repos/os/run/ahci_bench.run b/repos/os/run/ahci_bench.run index ec931c510..33621b369 100644 --- a/repos/os/run/ahci_bench.run +++ b/repos/os/run/ahci_bench.run @@ -57,7 +57,7 @@ append config { - + diff --git a/repos/os/run/ahci_blk.run b/repos/os/run/ahci_blk.run index dd60f297c..8118a772b 100644 --- a/repos/os/run/ahci_blk.run +++ b/repos/os/run/ahci_blk.run @@ -56,7 +56,7 @@ append config { - + diff --git a/repos/os/run/demo.run b/repos/os/run/demo.run index aa89d9d9c..a95690c98 100644 --- a/repos/os/run/demo.run +++ b/repos/os/run/demo.run @@ -148,8 +148,8 @@ append config { - - + + diff --git a/repos/os/run/fault_detection.run b/repos/os/run/fault_detection.run index d7ded0350..65ff0a4ca 100644 --- a/repos/os/run/fault_detection.run +++ b/repos/os/run/fault_detection.run @@ -49,7 +49,7 @@ install_config { - + diff --git a/repos/os/run/fs_log.run b/repos/os/run/fs_log.run index 4f13d9dfa..76bcd055a 100644 --- a/repos/os/run/fs_log.run +++ b/repos/os/run/fs_log.run @@ -39,7 +39,7 @@ set config { - + diff --git a/repos/os/run/kdb_uart_drv.run b/repos/os/run/kdb_uart_drv.run index 718231858..e3fe36742 100644 --- a/repos/os/run/kdb_uart_drv.run +++ b/repos/os/run/kdb_uart_drv.run @@ -51,7 +51,7 @@ set config { - + diff --git a/repos/os/run/loader.run b/repos/os/run/loader.run index 0d96f9e7b..e3c16a893 100644 --- a/repos/os/run/loader.run +++ b/repos/os/run/loader.run @@ -77,7 +77,7 @@ append config { - + diff --git a/repos/os/run/mixer.run b/repos/os/run/mixer.run index dd7285852..c993019f1 100644 --- a/repos/os/run/mixer.run +++ b/repos/os/run/mixer.run @@ -63,7 +63,7 @@ append config { - + diff --git a/repos/os/run/panda_uart4_echo.run b/repos/os/run/panda_uart4_echo.run index 3f2f97777..0795b9fee 100644 --- a/repos/os/run/panda_uart4_echo.run +++ b/repos/os/run/panda_uart4_echo.run @@ -44,7 +44,7 @@ set config { - + diff --git a/repos/os/run/part_blk.run b/repos/os/run/part_blk.run index b1d10a616..474a45313 100644 --- a/repos/os/run/part_blk.run +++ b/repos/os/run/part_blk.run @@ -68,8 +68,8 @@ install_config { - - + + diff --git a/repos/os/run/rom_to_file.run b/repos/os/run/rom_to_file.run index b7a49dca7..74b037ba3 100644 --- a/repos/os/run/rom_to_file.run +++ b/repos/os/run/rom_to_file.run @@ -49,7 +49,7 @@ install_config { - + diff --git a/repos/os/run/trace.run b/repos/os/run/trace.run index 76b7d665a..376e04d33 100644 --- a/repos/os/run/trace.run +++ b/repos/os/run/trace.run @@ -41,7 +41,7 @@ append config { - + } diff --git a/repos/os/run/uart.run b/repos/os/run/uart.run index 7dc0a73eb..02427441a 100644 --- a/repos/os/run/uart.run +++ b/repos/os/run/uart.run @@ -45,8 +45,8 @@ set config { - - + + diff --git a/repos/os/run/vmm.run b/repos/os/run/vmm.run index df55057ac..d0af78c2e 100644 --- a/repos/os/run/vmm.run +++ b/repos/os/run/vmm.run @@ -48,7 +48,7 @@ install_config { - + diff --git a/repos/os/src/drivers/ahci/README b/repos/os/src/drivers/ahci/README index e112014ba..3fe71114a 100644 --- a/repos/os/src/drivers/ahci/README +++ b/repos/os/src/drivers/ahci/README @@ -19,9 +19,9 @@ which client can access a certain device: ! ! ! -! +! ! -! +! ! ! diff --git a/repos/os/src/drivers/platform/spec/x86/README b/repos/os/src/drivers/platform/spec/x86/README index 1508c437d..40cb9442c 100644 --- a/repos/os/src/drivers/platform/spec/x86/README +++ b/repos/os/src/drivers/platform/spec/x86/README @@ -26,7 +26,7 @@ explicitly configured by the triple 'bus', 'device', 'function': ! ! ... ! -! +! ! ! ! @@ -39,7 +39,7 @@ or more fuzzy by a device class alias: ! ! ... ! -! +! ! ! ! @@ -51,7 +51,7 @@ Non PCI devices, as the PS2 controller are named by a "device" node in the polic ! ! ! -! +! ! ! ! -! +! ! ... ! ! @@ -171,7 +171,7 @@ The driver provides for the PS2 controller the IO_PORT and IRQ resources. ! ! ! -! +! ! - ! - ! + ! + ! + ! ! If the 'detect_size' attribute is set to "yes", the UART driver will diff --git a/repos/os/src/server/fs_log/README b/repos/os/src/server/fs_log/README index 4ec875018..db41b850b 100644 --- a/repos/os/src/server/fs_log/README +++ b/repos/os/src/server/fs_log/README @@ -17,7 +17,7 @@ the file "/log". ! ! ! -! +! ! ! ! diff --git a/repos/os/src/server/loader/child.h b/repos/os/src/server/loader/child.h index 5e1d84247..1f67a1756 100644 --- a/repos/os/src/server/loader/child.h +++ b/repos/os/src/server/loader/child.h @@ -50,8 +50,6 @@ namespace Loader { Service &_local_cpu_service; Service &_local_pd_service; - Init::Child_policy_enforce_labeling _labeling_policy; - Genode::Child _child; public: @@ -76,7 +74,6 @@ namespace Loader { _local_rom_service(local_rom_service), _local_cpu_service(local_cpu_service), _local_pd_service(local_pd_service), - _labeling_policy(_label.string()), _child(_env.rm(), _env.ep().rpc_ep(), *this) { } @@ -100,11 +97,6 @@ namespace Loader { ref_ram().transfer_quota(ram_cap, _ram_quota); } - void filter_session_args(Service::Name const &service, char *args, size_t args_len) override - { - _labeling_policy.filter_session_args(service.string(), args, args_len); - } - Service &resolve_session_request(Service::Name const &name, Session_state::Args const &args) override { diff --git a/repos/os/src/server/nic_bridge/README b/repos/os/src/server/nic_bridge/README index ff6207d2d..c7eb0b90a 100644 --- a/repos/os/src/server/nic_bridge/README +++ b/repos/os/src/server/nic_bridge/README @@ -26,7 +26,7 @@ address to a client with the session label "lighttpd". ! ! ... ! -! +! ! ! diff --git a/repos/os/src/server/nitpicker/README b/repos/os/src/server/nitpicker/README index cb07c4825..95daa9a34 100644 --- a/repos/os/src/server/nitpicker/README +++ b/repos/os/src/server/nitpicker/README @@ -19,9 +19,9 @@ expressed via '' nodes as illustrated by the following example: ! ! ... -! -! -! +! +! +! ! ... ! diff --git a/repos/os/src/server/part_blk/README b/repos/os/src/server/part_blk/README index 9ebb01169..bd1742c1d 100644 --- a/repos/os/src/server/part_blk/README +++ b/repos/os/src/server/part_blk/README @@ -46,8 +46,8 @@ Configuration snippet with two clients and an (hypothetical) IDE driver: ! ! -! -! +! +! ! ! ! diff --git a/repos/os/src/server/trace_fs/README b/repos/os/src/server/trace_fs/README index 5f24a44a3..f5dcd307a 100644 --- a/repos/os/src/server/trace_fs/README +++ b/repos/os/src/server/trace_fs/README @@ -37,7 +37,7 @@ To use the trace_fs, a configuration similar to the following may be used: ! ! ! -! diff --git a/repos/os/src/test/bomb/main.cc b/repos/os/src/test/bomb/main.cc index 1cf57139c..c96076970 100644 --- a/repos/os/src/test/bomb/main.cc +++ b/repos/os/src/test/bomb/main.cc @@ -44,8 +44,7 @@ class Bomb_child : public Child_policy Registry > &_parent_services; - Init::Child_policy_enforce_labeling _labeling_policy { _label.string() }; - Child_policy_dynamic_rom_file _config_policy { "config", _ep, &_env.ram() }; + Child_policy_dynamic_rom_file _config_policy { "config", _ep, &_env.ram() }; Child _child { _env.rm(), _ep, *this }; @@ -87,12 +86,6 @@ class Bomb_child : public Child_policy Ram_session &ref_ram() override { return _env.ram(); } Ram_session_capability ref_ram_cap() const override { return _env.ram_session_cap(); } - void filter_session_args(Service::Name const &, - char *args, size_t args_len) override - { - _labeling_policy.filter_session_args(nullptr, args, args_len); - } - Service &resolve_session_request(Service::Name const &service_name, Session_state::Args const &args) override { diff --git a/repos/os/src/test/fault_detection/main.cc b/repos/os/src/test/fault_detection/main.cc index 8b8725814..2a99c2444 100644 --- a/repos/os/src/test/fault_detection/main.cc +++ b/repos/os/src/test/fault_detection/main.cc @@ -134,15 +134,6 @@ class Test_child : public Genode::Child_policy throw Parent::Service_denied(); } - - void filter_session_args(Service::Name const &, - char *args, size_t args_len) override - { - /* prefix session label */ - Session_label const orig(label_from_args(args)); - Arg_string::set_arg_string(args, args_len, "label", - prefixed_label(name(), orig).string()); - } }; diff --git a/repos/os/src/test/resource_yield/main.cc b/repos/os/src/test/resource_yield/main.cc index 158218763..4f89684ef 100644 --- a/repos/os/src/test/resource_yield/main.cc +++ b/repos/os/src/test/resource_yield/main.cc @@ -182,7 +182,7 @@ Child::Child(Genode::Env &env, Genode::Xml_node config) * The parent grants resource requests as long as it has free resources. * Once in a while, it politely requests the child to yield resources. */ -class Parent : Genode::Slave::Policy +class Parent { private: @@ -190,10 +190,6 @@ class Parent : Genode::Slave::Policy typedef Genode::size_t size_t; - enum { SLAVE_QUOTA = 10*1024*1024 }; - - Genode::Child _child = { _env.rm(), _env.ep().rpc_ep(), *this }; - Timer::Connection _timer { _env }; Genode::Lock _yield_blockade; @@ -254,40 +250,7 @@ class Parent : Genode::Slave::Policy } } - Genode::Signal_handler _timeout_handler { - _env.ep(), *this, &Parent::_handle_timeout }; - - public: - - class Insufficient_yield { }; - - /** - * Constructor - */ - Parent(Genode::Env &env) - : - Genode::Slave::Policy(Label(), "test-resource_yield", env.ep().rpc_ep(), - env.rm(), env.ram_session_cap(), SLAVE_QUOTA), - _env(env) - { - configure(""); - - _timer.sigh(_timeout_handler); - _init(); - } - - - /**************************** - ** Slave_policy interface ** - ****************************/ - - char const **_permitted_services() const - { - static char const *services[] = { "RAM", "PD", "CPU", "ROM", "LOG", "Timer" }; - return services; - } - - void yield_response() + void _yield_response() { Genode::log("got yield response"); _state = YIELD_GOT_RESPONSE; @@ -308,6 +271,54 @@ class Parent : Genode::Slave::Policy _env.parent().exit(0); } } + + Genode::Signal_handler _timeout_handler { + _env.ep(), *this, &Parent::_handle_timeout }; + + struct Policy : Genode::Slave::Policy + { + Parent &_parent; + + enum { SLAVE_QUOTA = 10*1024*1024 }; + + char const **_permitted_services() const override + { + static char const *services[] = { "RAM", "PD", "CPU", "ROM", "LOG", "Timer" }; + return services; + } + + void yield_response() override + { + _parent._yield_response(); + } + + Policy(Parent &parent, Genode::Env &env) + : + Genode::Slave::Policy(Label("child"), "test-resource_yield", + env.ep().rpc_ep(), env.rm(), + env.ram_session_cap(), SLAVE_QUOTA), + _parent(parent) + { + configure(""); + } + }; + + Policy _policy { *this, _env }; + + Genode::Child _child { _env.rm(), _env.ep().rpc_ep(), _policy }; + + public: + + class Insufficient_yield { }; + + /** + * Constructor + */ + Parent(Genode::Env &env) : _env(env) + { + _timer.sigh(_timeout_handler); + _init(); + } }; diff --git a/repos/ports-foc/run/l4linux.run b/repos/ports-foc/run/l4linux.run index 6d4e61edc..796139d15 100644 --- a/repos/ports-foc/run/l4linux.run +++ b/repos/ports-foc/run/l4linux.run @@ -59,7 +59,7 @@ set config { - + } append_platform_drv_config diff --git a/repos/ports-foc/run/l4linux_ahci_bench.run b/repos/ports-foc/run/l4linux_ahci_bench.run index 933a7d3ff..cf25a4b6a 100644 --- a/repos/ports-foc/run/l4linux_ahci_bench.run +++ b/repos/ports-foc/run/l4linux_ahci_bench.run @@ -54,7 +54,7 @@ set config { - + diff --git a/repos/ports-foc/run/l4linux_netperf.inc b/repos/ports-foc/run/l4linux_netperf.inc index ca40789fd..b8ea3fd1b 100644 --- a/repos/ports-foc/run/l4linux_netperf.inc +++ b/repos/ports-foc/run/l4linux_netperf.inc @@ -101,7 +101,7 @@ append config { - + diff --git a/repos/ports-foc/run/linux_panda.run b/repos/ports-foc/run/linux_panda.run index 73f3d3c9c..f72fce352 100644 --- a/repos/ports-foc/run/linux_panda.run +++ b/repos/ports-foc/run/linux_panda.run @@ -70,9 +70,9 @@ set config { - - - + + + diff --git a/repos/ports/doc/gdb.txt b/repos/ports/doc/gdb.txt index d8f274cfb..0af3f9c7d 100644 --- a/repos/ports/doc/gdb.txt +++ b/repos/ports/doc/gdb.txt @@ -210,7 +210,7 @@ For using an UART, add the following start entry to the scenario: ! ! ! -! +! ! ! This entry will start the UART driver and defines the policy of which UART to diff --git a/repos/ports/run/arora.run b/repos/ports/run/arora.run index 9073812dd..a9a495c14 100644 --- a/repos/ports/run/arora.run +++ b/repos/ports/run/arora.run @@ -65,7 +65,7 @@ append config { - + diff --git a/repos/ports/run/debug_nitpicker.run b/repos/ports/run/debug_nitpicker.run index 942f0f03a..5ec795c3b 100644 --- a/repos/ports/run/debug_nitpicker.run +++ b/repos/ports/run/debug_nitpicker.run @@ -60,7 +60,7 @@ set config { - + @@ -71,7 +71,7 @@ set config { - + diff --git a/repos/ports/run/dosbox.run b/repos/ports/run/dosbox.run index ac1511b3a..34345ce7e 100644 --- a/repos/ports/run/dosbox.run +++ b/repos/ports/run/dosbox.run @@ -14,10 +14,10 @@ source ${genode_dir}/repos/base/run/platform_drv.inc # override default platform driver policy proc platform_drv_policy {} { return { - - - - } + + + + } } append_platform_drv_build_components diff --git a/repos/ports/run/gdb_monitor.run b/repos/ports/run/gdb_monitor.run index 4d810ed85..e022e1401 100644 --- a/repos/ports/run/gdb_monitor.run +++ b/repos/ports/run/gdb_monitor.run @@ -59,7 +59,7 @@ set config { - + diff --git a/repos/ports/run/gdb_monitor_interactive.run b/repos/ports/run/gdb_monitor_interactive.run index 7f7afc354..c930e6431 100644 --- a/repos/ports/run/gdb_monitor_interactive.run +++ b/repos/ports/run/gdb_monitor_interactive.run @@ -46,7 +46,7 @@ set config { - + diff --git a/repos/ports/run/gdb_monitor_target_config.run b/repos/ports/run/gdb_monitor_target_config.run index 0622fa522..da0ad102b 100644 --- a/repos/ports/run/gdb_monitor_target_config.run +++ b/repos/ports/run/gdb_monitor_target_config.run @@ -45,7 +45,7 @@ set config { - + diff --git a/repos/ports/run/libc_noux.run b/repos/ports/run/libc_noux.run index 5b459da08..2549979fb 100644 --- a/repos/ports/run/libc_noux.run +++ b/repos/ports/run/libc_noux.run @@ -40,7 +40,7 @@ append config { - + diff --git a/repos/ports/run/netperf.inc b/repos/ports/run/netperf.inc index 5447f0433..7f6de9320 100644 --- a/repos/ports/run/netperf.inc +++ b/repos/ports/run/netperf.inc @@ -131,7 +131,7 @@ append_if $use_nic_bridge config { } append_if [expr $use_nic_bridge && [have_spec linux]] config " - " + " append_if $use_nic_bridge config { @@ -174,7 +174,7 @@ append_if $use_wifi_driver config { - + } diff --git a/repos/ports/run/noux_gdb_dynamic.run b/repos/ports/run/noux_gdb_dynamic.run index dd5e5df45..76bc6d819 100644 --- a/repos/ports/run/noux_gdb_dynamic.run +++ b/repos/ports/run/noux_gdb_dynamic.run @@ -77,11 +77,11 @@ append config { # on Fiasco.OC the kdb_uart_drv is always UART 0 append_if [have_spec foc] config { - } + } # on all other kernels, direct terminal_mux to UART 1 (Qemu stdio, see below) append_if [expr ![have_spec foc]] config { - } + } append config { diff --git a/repos/ports/run/noux_net_netcat.run b/repos/ports/run/noux_net_netcat.run index 808734a38..629567651 100644 --- a/repos/ports/run/noux_net_netcat.run +++ b/repos/ports/run/noux_net_netcat.run @@ -70,7 +70,7 @@ append_if [have_include "power_on/qemu"] config { - + } @@ -84,7 +84,7 @@ append config { - + diff --git a/repos/ports/run/noux_signals.run b/repos/ports/run/noux_signals.run index d9c10b46e..fdfce8ad5 100644 --- a/repos/ports/run/noux_signals.run +++ b/repos/ports/run/noux_signals.run @@ -35,7 +35,7 @@ append config { - + diff --git a/repos/ports/run/noux_terminal_fs.run b/repos/ports/run/noux_terminal_fs.run index 4a4c23be3..28fff0bf3 100644 --- a/repos/ports/run/noux_terminal_fs.run +++ b/repos/ports/run/noux_terminal_fs.run @@ -90,7 +90,7 @@ append config { - + } diff --git a/repos/ports/run/noux_two_terminal_fs.run b/repos/ports/run/noux_two_terminal_fs.run index 8f88c22bb..1aced473b 100644 --- a/repos/ports/run/noux_two_terminal_fs.run +++ b/repos/ports/run/noux_two_terminal_fs.run @@ -90,7 +90,7 @@ append config { - + } diff --git a/repos/ports/run/seoul.inc b/repos/ports/run/seoul.inc index fc9021d1b..81b0b0c88 100644 --- a/repos/ports/run/seoul.inc +++ b/repos/ports/run/seoul.inc @@ -289,8 +289,8 @@ append_if $use_fancy_stuff config { - - + + diff --git a/repos/ports/run/vbox_auto_win7_share.run b/repos/ports/run/vbox_auto_win7_share.run index cd1dff0e2..7eb8d8414 100644 --- a/repos/ports/run/vbox_auto_win7_share.run +++ b/repos/ports/run/vbox_auto_win7_share.run @@ -148,7 +148,7 @@ set config_of_app { - + diff --git a/repos/ports/run/vbox_pointer.run b/repos/ports/run/vbox_pointer.run index 25c2d66db..281f39b87 100644 --- a/repos/ports/run/vbox_pointer.run +++ b/repos/ports/run/vbox_pointer.run @@ -89,9 +89,9 @@ set config { - - - + + + @@ -186,9 +186,9 @@ set config { - - - + + + diff --git a/repos/ports/run/vbox_win.inc b/repos/ports/run/vbox_win.inc index 0a92d8a1c..c1e4c6fb8 100644 --- a/repos/ports/run/vbox_win.inc +++ b/repos/ports/run/vbox_win.inc @@ -137,8 +137,8 @@ append config_of_app { - - + + @@ -149,7 +149,7 @@ append config_of_app { for { set i 1} { $i <= $use_vms } { incr i} { append config_of_app " - " + " } append config_of_app { diff --git a/repos/ports/run/virtualbox_auto.inc b/repos/ports/run/virtualbox_auto.inc index 734002fc7..b8e200665 100644 --- a/repos/ports/run/virtualbox_auto.inc +++ b/repos/ports/run/virtualbox_auto.inc @@ -77,7 +77,7 @@ append config { - + @@ -88,9 +88,9 @@ append config { } append_if [expr $use_rumpfs] config { - } + } append_if [expr !$use_rumpfs] config { - } + } append config { } @@ -102,7 +102,7 @@ append_if [expr $use_rumpfs] config { } append_if [expr $use_rumpfs && $use_ram_fs && $use_overlay_from_disk] config { - } + } append_if [expr $use_rumpfs] config { @@ -130,7 +130,7 @@ append_if [expr $use_ram_fs] config { } for { set i 1} { $i <= ${use_vms} } { incr i} { append_if [expr $use_ram_fs] config " - from_ram_fs\" root=\"/ram${i}\" writeable=\"yes\"/>" + from_ram_fs\" root=\"/ram${i}\" writeable=\"yes\"/>" } append_if [expr $use_ram_fs] config { diff --git a/repos/ports/src/app/arora/demo/nitpicker_plugin/config.plugin b/repos/ports/src/app/arora/demo/nitpicker_plugin/config.plugin index 7645b1587..11b3bad13 100644 --- a/repos/ports/src/app/arora/demo/nitpicker_plugin/config.plugin +++ b/repos/ports/src/app/arora/demo/nitpicker_plugin/config.plugin @@ -26,7 +26,7 @@ - + diff --git a/repos/ports/src/app/gdb_monitor/app_child.h b/repos/ports/src/app/gdb_monitor/app_child.h index 2b40cc4a5..f1d2c5dc1 100644 --- a/repos/ports/src/app/gdb_monitor/app_child.h +++ b/repos/ports/src/app/gdb_monitor/app_child.h @@ -44,8 +44,6 @@ class Gdb_monitor::App_child : public Child_policy enum { STACK_SIZE = 4*1024*sizeof(long) }; - Init::Child_policy_enforce_labeling _labeling_policy; - Genode::Env &_env; Genode::Ram_session_capability _ref_ram_cap { _env.ram_session_cap() }; @@ -245,32 +243,28 @@ class Gdb_monitor::App_child : public Child_policy /** * Constructor - * - * \param root_ep entrypoint serving the root interfaces of the - * services provided by the child and announced - * towards the parent of GDB monitor */ - App_child(Genode::Env &env, - const char *unique_name, - Genode::Pd_session &pd, - Genode::Region_map &rm, - Genode::size_t ram_quota, - Signal_receiver *signal_receiver, - Xml_node target_node) - : _labeling_policy(unique_name), - _env(env), - _unique_name(unique_name), - _rm(rm), - _ram_quota(ram_quota), - _entrypoint(&pd, STACK_SIZE, "GDB monitor entrypoint"), - _child_config(env.ram(), rm, target_node), - _config_policy("config", _child_config.dataspace(), &_entrypoint), - _unresolved_page_fault_dispatcher(*signal_receiver, - *this, - &App_child::_dispatch_unresolved_page_fault), - _cpu_factory(_env, _entrypoint, Genode::env()->heap(), _pd.core_pd_cap(), - signal_receiver, &_genode_child_resources), - _rom_factory(env, _entrypoint) + App_child(Genode::Env &env, + const char *unique_name, + Genode::Pd_session &pd, + Genode::Region_map &rm, + Genode::size_t ram_quota, + Signal_receiver *signal_receiver, + Xml_node target_node) + : + _env(env), + _unique_name(unique_name), + _rm(rm), + _ram_quota(ram_quota), + _entrypoint(&pd, STACK_SIZE, "GDB monitor entrypoint"), + _child_config(env.ram(), rm, target_node), + _config_policy("config", _child_config.dataspace(), &_entrypoint), + _unresolved_page_fault_dispatcher(*signal_receiver, + *this, + &App_child::_dispatch_unresolved_page_fault), + _cpu_factory(_env, _entrypoint, Genode::env()->heap(), _pd.core_pd_cap(), + signal_receiver, &_genode_child_resources), + _rom_factory(env, _entrypoint) { _genode_child_resources.region_map_component(&_pd.region_map()); _pd.region_map().fault_handler(_unresolved_page_fault_dispatcher); @@ -308,11 +302,6 @@ class Gdb_monitor::App_child : public Child_policy _ref_ram.transfer_quota(cap, _ram_quota); } - void filter_session_args(Service::Name const&, char *args, Genode::size_t args_len) override - { - _labeling_policy.filter_session_args(0, args, args_len); - } - Service &resolve_session_request(Genode::Service::Name const &service_name, Genode::Session_state::Args const &args) override { diff --git a/repos/ports/src/app/vbox_pointer/README b/repos/ports/src/app/vbox_pointer/README index 886f880f2..68b0939e1 100644 --- a/repos/ports/src/app/vbox_pointer/README +++ b/repos/ports/src/app/vbox_pointer/README @@ -9,9 +9,9 @@ defined for labels or domains of the sessions. ! ! ! -! -! -! +! +! +! ! ! diff --git a/repos/ports/src/noux/child_policy.h b/repos/ports/src/noux/child_policy.h index 01e886cbd..9d6a41336 100644 --- a/repos/ports/src/noux/child_policy.h +++ b/repos/ports/src/noux/child_policy.h @@ -39,7 +39,6 @@ namespace Noux { Name const _name; Binary_name const _binary_name; - Init::Child_policy_enforce_labeling _labeling_policy; Init::Child_policy_provide_rom_file _args_policy; Init::Child_policy_provide_rom_file _env_policy; Init::Child_policy_provide_rom_file _config_policy; @@ -93,7 +92,6 @@ namespace Noux { : _name(name), _binary_name(binary_name), - _labeling_policy(_name.string()), _args_policy( "args", args_ds, &entrypoint), _env_policy( "env", env_ds, &entrypoint), _config_policy("config", config_ds, &entrypoint), @@ -160,12 +158,6 @@ namespace Noux { throw Parent::Service_denied(); } - void filter_session_args(Genode::Service::Name const &service, - char *args, Genode::size_t args_len) override - { - _labeling_policy.filter_session_args(service.string(), args, args_len); - } - void exit(int exit_value) override { _exit_value = exit_value;