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 b6f950585f..d64db11a46 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 b3a4ba5ab7..461b2ca198 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 3972091f7b..04f8f5cae3 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 d2b4095797..6c4512ccda 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 adbf96c701..5d6ce36339 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 096d06bc12..0f89285414 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 890bf21e8a..560f7b29eb 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 04378fc42f..76af3b5483 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 33470dc331..cbc00a32ed 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 209696e050..7fe111b6bf 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 985b631494..7dc1b1f0b3 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 26ec0ca6b5..59c6fe01bd 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 12268fcc7c..d6b5e3e2c4 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 5ea55f5137..af4055a7bd 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 9bff1c53e4..6db36350c4 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 6c89e01aae..e1716f2ca0 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 f271f15c42..6b832f7490 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 4d794b3c43..30e537f172 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 8f3b173edd..b6b1e5be45 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 b9f86a7d8f..cf626bb9a4 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 a363cca374..5212e7d0a8 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 9833d8a8cf..992db29039 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 db1d33d273..1c2d10b5f6 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 8d2c0157d3..1b8b5b04a9 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 518023f5f7..f0059ab528 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 1e5063b47e..6c111eadbe 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 ed0f19d41f..443e4cf324 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 ad10bd5306..d230f62e09 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 db5b0c049a..696afc6d15 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 e1a3a9679e..473044ec8a 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 7be5ba91b2..29329c8d40 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 de1d756f1c..fc62018747 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 4dd8ee9304..833069a5f0 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 344b7f4087..154229400f 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 ff4ec27297..34f4a8dfb6 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 d1af39afa2..9b0607382d 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 db7c560cc5..b20de89a51 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 aea9cad390..c31b36f998 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 346cb9fa01..7415ac5079 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 db68b4c5fd..61280185e5 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 1e2ff80cdd..227a606218 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 774efc90c2..b813756d02 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 928b0a14fb..929c4b6326 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 8b02b73ae9..9468cf01c9 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 ec931c5102..33621b369e 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 dd60f297c8..8118a772b6 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 aa89d9d9c5..a95690c984 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 d7ded03505..65ff0a4cab 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 4f13d9dfad..76bcd055a9 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 718231858f..e3fe367423 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 0d96f9e7b8..e3c16a8939 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 dd72858525..c993019f15 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 3f2f97777e..0795b9fee1 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 b1d10a616a..474a45313e 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 b7a49dca7b..74b037ba3f 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 76b7d665ac..376e04d338 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 7dc0a73eb4..02427441aa 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 df55057acc..d0af78c2ef 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 e112014ba8..3fe71114a0 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 1508c437d4..40cb9442cc 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 4ec8750187..db41b850b1 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 5e1d842470..1f67a1756e 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 ff6207d2d7..c7eb0b90a6 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 cb07c4825a..95daa9a343 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 9ebb01169e..bd1742c1d0 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 5f24a44a3c..f5dcd307af 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 1cf57139c3..c96076970c 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 8b87258141..2a99c24447 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 1582187633..4f89684ef9 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 6d4e61edcc..796139d15a 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 933a7d3ffe..cf25a4b6ad 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 ca40789fd9..b8ea3fd1b3 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 73f3d3c9c5..f72fce3528 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 d8f274cfb1..0af3f9c7d1 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 9073812dd8..a9a495c148 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 942f0f03a6..5ec795c3b3 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 ac1511b3ac..34345ce7e6 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 4d810ed852..e022e14013 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 7f7afc354d..c930e6431f 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 0622fa5228..da0ad102bf 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 5b459da08d..2549979fb6 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 5447f0433a..7f6de93205 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 dd5e5df452..76bc6d8196 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 808734a38f..6295676517 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 d9c10b46e1..fdfce8ad5f 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 4a4c23be38..28fff0bf3f 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 8f88c22bbc..1aced473bb 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 fc9021d1b7..81b0b0c887 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 cd1dff0e21..7eb8d84144 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 25c2d66db0..281f39b87b 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 0a92d8a1ca..c1e4c6fb83 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 734002fc78..b8e2006657 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 7645b15870..11b3bad131 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 2b40cc4a56..f1d2c5dc11 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 886f880f24..68b0939e11 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 01e886cbda..9d6a413361 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;