barrelfish
3 years agoproc_mgmt: bugfix for domains spawned from startd
Roni Häcki [Mon, 2 Oct 2017 13:47:58 +0000]
proc_mgmt: bugfix for domains spawned from startd

- Apps specified in menu.lst are now spawned using the proc_mgmt
- client side of proc_mgmt allocates cap slot as it should be
- Changed exit message to RPC

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoRemoving unused declarations
Lukas Humbel [Mon, 2 Oct 2017 09:33:14 +0000]
Removing unused declarations

Signed-off-by: Lukas Humbel <lukas.humbel@inf.ethz.ch>

3 years agoremove unsave uses of __builtin_return_address()
Reto Achermann [Mon, 2 Oct 2017 05:51:34 +0000]
remove unsave uses of __builtin_return_address()

calls to __builtin_return_address with values greather than 0 are
unsave. See https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00886.html

Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>

3 years agofixing compilation for release mode
Reto Achermann [Mon, 2 Oct 2017 05:50:57 +0000]
fixing compilation for release mode

Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>

3 years agoproc_mgmt: Hake file simplified
Roni Häcki [Fri, 29 Sep 2017 14:44:53 +0000]
proc_mgmt: Hake file simplified

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoproc_mgmt: adding tests
Roni Häcki [Fri, 29 Sep 2017 14:42:52 +0000]
proc_mgmt: adding tests

Still some more debugging required when the process exits, otherwise the test seems to
be working.

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoproc_mgmt: make sure that exit message is sent before things are
Roni Häcki [Fri, 29 Sep 2017 13:03:17 +0000]
proc_mgmt: make sure that exit message is sent before things are
cleaned up

This avoids getting stuck when a process is waiting for a process on the
same core to finish. In some cases the exit message was not sent by the
other process before the cleanup and it never reached the proc_mgmt

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoschedsim: fixed building of test
Roni Häcki [Thu, 28 Sep 2017 11:06:13 +0000]
schedsim: fixed building of test

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoarmv7,armv8: Add process manager to targets and menu.lsts
Simon Gerber [Thu, 31 Aug 2017 16:00:29 +0000]
armv7,armv8: Add process manager to targets and menu.lsts

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agoharness: xeon phi test did not contain proc_mgmt module
Roni Häcki [Wed, 27 Sep 2017 10:36:37 +0000]
harness: xeon phi test did not contain proc_mgmt module

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoMerge branch 'sockeye' into master
Daniel Schwyn [Tue, 26 Sep 2017 14:00:50 +0000]
Merge branch 'sockeye' into master

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoMerge remote-tracking branch 'remotes/upstream/master' into sockeye
Daniel Schwyn [Tue, 26 Sep 2017 13:49:15 +0000]
Merge remote-tracking branch 'remotes/upstream/master' into sockeye

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoflounder: moving receiving cap slots from a thread to a dispatcher
Adam Turowski [Tue, 26 Sep 2017 09:55:01 +0000]
flounder: moving receiving cap slots from a thread to a dispatcher

Signed-off-by: Adam Turowski <adam.turowski@inf.ethz.ch>

3 years agoFixup of some headers.
Adam Turowski [Fri, 22 Sep 2017 14:17:08 +0000]
Fixup of some headers.

Signed-off-by: Adam Turowski <adam.turowski@inf.ethz.ch>

3 years agoe10k: added missing dependency
Roni Häcki [Mon, 25 Sep 2017 14:56:50 +0000]
e10k: added missing dependency

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoMerge Razvan's process management code.
Simon Gerber [Tue, 26 Sep 2017 10:27:00 +0000]
Merge Razvan's process management code.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agoDecoding net: Fail on region resolution with non contiuous domain for address
Daniel Schwyn [Mon, 25 Sep 2017 12:51:47 +0000]
Decoding net: Fail on region resolution with non contiuous domain for address

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agonfs: reduced time until retransmit
Roni Häcki [Fri, 22 Sep 2017 13:12:26 +0000]
nfs: reduced time until retransmit

When there is a UPD/TCP checksum error the time it takes
until this is noticed by the NFS RPC layer is very long
resulting low performance

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agodevif: solarflare backend IP_FRAG error should not be treated as an
Roni Häcki [Fri, 22 Sep 2017 12:58:38 +0000]
devif: solarflare backend IP_FRAG error should not be treated as an
error ...

In the RX event if the bit for IP_FRAG is set, the packet should still
be forwareded to the network stack. It seems that this is not really an
error since it is also not handeled in the Linux driver.

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoSockeye TN: Use example environment for examples
Daniel Schwyn [Fri, 22 Sep 2017 09:57:47 +0000]
Sockeye TN: Use example environment for examples

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoharness: webserver tests added test using e10k/solarflare
Roni Häcki [Thu, 21 Sep 2017 14:41:39 +0000]
harness: webserver tests added test using e10k/solarflare

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agolibnet: fixed debugging mode
Roni Häcki [Thu, 21 Sep 2017 14:15:18 +0000]
libnet: fixed debugging mode

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agooctopus: skb queries increased buffer size
Roni Häcki [Thu, 21 Sep 2017 13:57:43 +0000]
octopus: skb queries increased buffer size

Sometimes tests seem to fail because the buffer length is 4097 bytes
large and we have maximum of 4096.

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoDecoding net: Cleanup core module
Daniel Schwyn [Thu, 21 Sep 2017 12:54:03 +0000]
Decoding net: Cleanup core module

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoharness: devif test only spawn required net_socket server
Roni Häcki [Wed, 20 Sep 2017 08:17:55 +0000]
harness: devif test only spawn required net_socket server

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoharness: added nfscat tests that use e10k and solarflare NICs
Roni Häcki [Wed, 20 Sep 2017 07:17:17 +0000]
harness: added nfscat tests that use e10k and solarflare NICs

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoflounder: proper token reading when a buffer is sent first
Adam Turowski [Tue, 19 Sep 2017 07:22:57 +0000]
flounder: proper token reading when a buffer is sent first

Signed-off-by: Adam Turowski <adam.turowski@inf.ethz.ch>

3 years agokaluga: starting net_socket server for each of the cards.
Roni Häcki [Mon, 18 Sep 2017 14:39:03 +0000]
kaluga: starting net_socket server for each of the cards.

For each of driver also start a net_socket server that manages the
default queue for a NIC for basic networking. e1000 does not have
multiple queues so there is no need to start the driver.

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agonet_sockets: change service so it can be used for all the NICS.
Roni Häcki [Mon, 18 Sep 2017 14:34:00 +0000]
net_sockets: change service so it can be used for all the NICS.

- net_sockets service now takes cardname as an arugment
- change all the tests and updated the device db

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agonet_sockets: client library checks all available net_socket services
Roni Häcki [Mon, 18 Sep 2017 14:08:41 +0000]
net_sockets: client library checks all available net_socket services

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoe10k/solarflare: no longer start network stack for default queue
Roni Häcki [Mon, 18 Sep 2017 14:07:32 +0000]
e10k/solarflare: no longer start network stack for default queue

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agolibnet: avoid failing setting up filter with e1000 like cardnames
Roni Häcki [Mon, 18 Sep 2017 14:00:53 +0000]
libnet: avoid failing setting up filter with e1000 like cardnames

e1000 cardname was of the form e1000:vendor:bus:device:function ..
where other cardnames were simply in the form of the name itself.

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agolibnet: bugfix when using interrupts
Roni Häcki [Mon, 18 Sep 2017 13:57:34 +0000]
libnet: bugfix when using interrupts

Small bug that actually "polled" for interrupts using
event_dispatch_non_block instead of event_dispatch

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agodevif: library fixed compilation with debugging flags enabled
Roni Häcki [Mon, 18 Sep 2017 13:55:59 +0000]
devif: library fixed compilation with debugging flags enabled

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agodevif: solarflare reading out all error codes from RX events
Roni Häcki [Mon, 18 Sep 2017 13:53:32 +0000]
devif: solarflare reading out all error codes from RX events

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoDecoding net: Refactor
Daniel Schwyn [Fri, 15 Sep 2017 12:08:16 +0000]
Decoding net: Refactor

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoSockeye TN: Adapt Prolog mapping to snake case
Daniel Schwyn [Fri, 15 Sep 2017 07:23:23 +0000]
Sockeye TN: Adapt Prolog mapping to snake case

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoProlog code style fixes
Daniel Schwyn [Thu, 14 Sep 2017 15:49:12 +0000]
Prolog code style fixes

- snake case for atoms/predicates/modules/file names

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoMerge remote-tracking branch 'upstream/master' into sockeye
Daniel Schwyn [Tue, 12 Sep 2017 11:29:25 +0000]
Merge remote-tracking branch 'upstream/master' into sockeye

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoSockeye TN: Use examples from OMAP4460
Daniel Schwyn [Tue, 12 Sep 2017 09:29:01 +0000]
Sockeye TN: Use examples from OMAP4460

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoSockeye TN: Update info about Prolog mapping
Daniel Schwyn [Tue, 12 Sep 2017 07:53:45 +0000]
Sockeye TN: Update info about Prolog mapping

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoSockeye TN: Update info about node types
Daniel Schwyn [Mon, 11 Sep 2017 16:08:19 +0000]
Sockeye TN: Update info about node types

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoSKB: Adapt decoding net scripts to use struct notation
Daniel Schwyn [Mon, 11 Sep 2017 15:05:36 +0000]
SKB: Adapt decoding net scripts to use struct notation

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoSockeye: Use ECLiPSe struct notation in generated code
Daniel Schwyn [Mon, 11 Sep 2017 15:04:45 +0000]
Sockeye: Use ECLiPSe struct notation in generated code

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoSockeye: Add node type for cores
Daniel Schwyn [Mon, 11 Sep 2017 12:08:35 +0000]
Sockeye: Add node type for cores

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agoKaluga: Fix bug with new driver model code
Daniel Schwyn [Thu, 7 Sep 2017 14:14:05 +0000]
Kaluga: Fix bug with new driver model code

The driver domain ID was incremented too late, resulting in a race condition.

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

3 years agowebserver: check error when initalizing net_sockets client
Roni Häcki [Wed, 6 Sep 2017 14:28:28 +0000]
webserver: check error when initalizing net_sockets client

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agolibnet: also show cardname when dhcp is done
Roni Häcki [Wed, 6 Sep 2017 14:25:55 +0000]
libnet: also show cardname when dhcp is done

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agolibet: HW filter flag fixed
Roni Häcki [Tue, 5 Sep 2017 08:55:09 +0000]
libet: HW filter flag fixed

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agolibnet: HW filter disable/enable on queue creation
Roni Häcki [Mon, 4 Sep 2017 08:02:24 +0000]
libnet: HW filter disable/enable on queue creation

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agolibnet: ARP resending more robust with periodic events
Roni Häcki [Fri, 1 Sep 2017 14:50:45 +0000]
libnet: ARP resending more robust with periodic events

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agokaluga: waiting for all spawnds to be up before starting drivers/apps
Roni Häcki [Fri, 1 Sep 2017 11:34:21 +0000]
kaluga: waiting for all spawnds to be up before starting drivers/apps

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agokernel: capabilities: treat full object retypes with identical source and dest types...
Simon Gerber [Thu, 31 Aug 2017 14:03:53 +0000]
kernel: capabilities: treat full object retypes with identical source and dest types as copy

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agoMerge branch 'master' of ssh://code.systems.ethz.ch:8006/source/barrelfish
Razvan Damachi [Thu, 31 Aug 2017 14:42:27 +0000]
Merge branch 'master' of ssh://code.systems.ethz.ch:8006/source/barrelfish

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoTidy up the process management test.
Razvan Damachi [Wed, 30 Aug 2017 10:30:50 +0000]
Tidy up the process management test.

The test now spawns 1 client on core 3, executing 'spawn on core 7' requests.
After 150 requests, the client exists successfully (before it used to loop).

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoClean up and document the process management code.
Razvan Damachi [Sun, 27 Aug 2017 13:47:02 +0000]
Clean up and document the process management code.

* clean up benchmarking code from spawnd and the process manager;
* document the process management functions in usr/proc_mgmt;
* remove dangling prints from lib/barrelfish/domain.c and threads.c.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoChange 'exit' from RPC to message in if/proc_mgmt.if.
Razvan Damachi [Fri, 25 Aug 2017 14:31:12 +0000]
Change 'exit' from RPC to message in if/proc_mgmt.if.

Having 'exit' as an RPC caused a bug where the client's capabilities were
revoked while it was waiting for a response to RPC exit, causing the UMP
driver to throw a cap_transfer error in the client's monitor.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoPreallocate an L2 cnode and fill it with domain caps in proc_mgmt.
Razvan Damachi [Fri, 25 Aug 2017 12:50:06 +0000]
Preallocate an L2 cnode and fill it with domain caps in proc_mgmt.

Instead of repyting domain capabilities individually, the process manager now
preallocates an L2 cnode and fills it with 256 domain capabilities at a time.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoFix typo in if/proc_mgmt.if
Razvan Damachi [Sun, 20 Aug 2017 18:22:28 +0000]
Fix typo in if/proc_mgmt.if

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoFix bug in libdomain/domain_cap_hash()
Razvan Damachi [Sun, 20 Aug 2017 18:18:49 +0000]
Fix bug in libdomain/domain_cap_hash()

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoDIRTY benchmark commit
Razvan Damachi [Wed, 2 Aug 2017 14:41:12 +0000]
DIRTY benchmark commit

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoChange proc_mgmt/pending_clients.h to use reply queues instead of hashtables.
Razvan Damachi [Thu, 13 Jul 2017 17:50:59 +0000]
Change proc_mgmt/pending_clients.h to use reply queues instead of hashtables.

The process manager now enqueues a new client to send a reply to for every
request it sends to a spawnd. This happens for every spawnd instance (the
process manager has a "send" queue and a "receive" queue for every spawnd
instance it knows of -- the latter is now used for pending clients).

Whenever a new reply from spawnd is received, the process manager now pops the
next expected client to reply to from the receive queue, instead of retrieving
it from a hashtable. This approach is faster, as it does not rely on asking the
monitor to identify caps in order to retrieve pending clients from hashtables.

However, this approach assumes:
1) that spawnd is single-threaded & event-based;
2) that Flounder messages arrive in-order (Barrelfish seems to guarantee this).

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoAdd extra layer of queuing above the Flounder UMP one.
Razvan Damachi [Thu, 13 Jul 2017 14:16:22 +0000]
Add extra layer of queuing above the Flounder UMP one.

The process manager now handles its own high-level queues, over the ones
provided by Flounder for UMP transmission. This is meant so that when many
clients have requests that the process manager needs to forward to the same
spawnd instance, "register_send" does not return an "already registered" error.

The queuing implementation follows the one in usr/monitor/queue.c.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoRemove the mutex-based event queuing in the process manager.
Razvan Damachi [Tue, 4 Jul 2017 15:19:16 +0000]
Remove the mutex-based event queuing in the process manager.

The process manager now simply registers for sends for different spawnds, as
opposed to mutex-based event enquing, as it is (meant to be) single-threaded.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoFix a bug where pending cleanup clients wouldn't be added on exit calls.
Razvan Damachi [Tue, 4 Jul 2017 14:54:49 +0000]
Fix a bug where pending cleanup clients wouldn't be added on exit calls.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoAdd per-spawnd message queues to the process manager.
Razvan Damachi [Sun, 2 Jul 2017 14:25:53 +0000]
Add per-spawnd message queues to the process manager.

The process manager will now enqueue requests to be sent to spawnds. There is
one queue per spawnd server that the process manager is connected to. The
change is meant so that if multiple clients send requests meant to be served
by the same spawnd (e.g. spawn multiple domains on the same core), the process
manager will not return an error if the target spawnd's Flounder queue is full,
but instead queue up the requests to be sent later.

In order to accommodate for this change, the spawn API exposed to the process
manager now features a specific reply for each request type. The proces
manager handles every reply type separately, meaning that every client can now
send up to 1 request of each type exposed by the proc_mgmt API, up from a max
of 1 request of any type at any given time.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoBreak the spawnd kill API into kill + cleanup.
Razvan Damachi [Tue, 27 Jun 2017 10:14:28 +0000]
Break the spawnd kill API into kill + cleanup.

Kill just revokes the DCB, thus removing it from the run queue. Cleanup then
revokes the victim dispatcher's root cnode.

The change is meant to fix the problem where killing the main dispatcher of a
domain or having it naturally exit main() would cause the other dispatchers to
pagefault. This used to happen because dispatchers of the same domain share
their vspace, hence when kill & cleanup were performed together the vspace
of all dispatchers would be revoked as soon as the first dispatcher exited or
was killed.

The process manager attempts to fix the issue by first sending a kill message
to each spawnd running dispatchers for a domain, in order to dequeue the DCBs.
Then, only when all DCBs have been dequeued, a cleanup message is sent to each
spawnd to further clean up the victim's cspace.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoHave the spawn interface for the process manager require cap_procmng.
Razvan Damachi [Mon, 26 Jun 2017 12:07:22 +0000]
Have the spawn interface for the process manager require cap_procmng.

The process manager now sends cap_procmng with spawn requests. Spawnd then
identifies the capability and only proceeds with obliging the request if the
latter is indeed of ObjType_ProcessManager.

The idea behind this change is that, even if spawnd does not register with the
nameservice anymore (hence its iref is not publicly retrievable), a malicious
domain could still attempt to bypass process management spawn validation by
brute-force sending spawn requests to a range of irefs. If one of those irefs
happened to belong to a spawnd, then the latter would assume the spawn request
to be valid. Having the spawn API require cap_procmng ensures that only
requests issued by the process manager and entities it trusts will be obliged.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoExtract a through-monitor-only cap_identify call from debug_cap_identify.
Razvan Damachi [Mon, 26 Jun 2017 11:58:56 +0000]
Extract a through-monitor-only cap_identify call from debug_cap_identify.

The function debug_cap_identify in debug.c used to try to identify the given
capref by first invoking the kernel, then performing an RPC with the monitor,
if the kernel invocation failed. The kernel invocation was there for domains
that hold the cap_kernel, which is necessary for the invocation to succeed.
Therefore, having the invocation there for domains which do not hold cap_kernel
is redundant, incurring unnecessary extra work.

A monitor_cap_identify_remote function is now part of monitor_client.c, through
which callers can identify caprefs through the monitor directly. The old
debug_cap_identify function in debug.c now resorts to this new function if the
kernel invocation fails.

Moreover, userspace apps such as the process manager or spawnd need to identify
caps involved in their RPCs (e.g. domain caps), however they do not hold the
cap_kernel reference. They can thus now use the new function to query the
monitor directly, without attempting to drop in the local kernel first.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoImplement "wait" in the process manager + fix bug in kill reply handler.
Razvan Damachi [Thu, 22 Jun 2017 08:08:30 +0000]
Implement "wait" in the process manager + fix bug in kill reply handler.

On receiving a kill reply from some spawnd, the process manager will re-add the
pending client to the hash table if it expects to receive further such replies
for the same domain, i.e. if there are still spawnds running it.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoImplement kill() and exit() in the process manager.
Razvan Damachi [Wed, 21 Jun 2017 17:11:41 +0000]
Implement kill() and exit() in the process manager.

On the server side, both calls are handled similarly: the process manager sends
a kill request to all spawnds running a dispatcher for the victim domain. On the
client side, they are different calls.

The general-purpose domain exit protocol now attempts to use the proc mgmt API
exit call (in lib/barrelfish/init.c). If this fails, the protocol will fall
back to exiting via a direct spawn_exit() call, like before. The use-case where
exiting via the process manager is expected to fail is when the domain was not
spawned through the process manager in the first place, such as is the case
with the special domains spawned by the monitor on the bootstrap core, as well
as the monitors themselves.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoImplement kill_request_handler in spawnd, using domain caps.
Razvan Damachi [Wed, 21 Jun 2017 12:30:56 +0000]
Implement kill_request_handler in spawnd, using domain caps.

Domain cap hashing is now used by spawnd in a manner similar to the process
manager's, for looking up domains to kill as per incoming kill(domain_cap)
requests.

Note that with the new API and implementation, spawnd no longer tracks domain
exit code or waiters (although some backwards-compatibility is attempted), this
task being now attributed to the process manager (to be implemented).

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoAdd spawn, spawn_with_caps and span calls to the Process Manager API.
Razvan Damachi [Tue, 20 Jun 2017 15:14:58 +0000]
Add spawn, spawn_with_caps and span calls to the Process Manager API.

The process manager keeps local domain state and forwards valid requests to
spawnds, acting as a proxy for spawning & spanning. Requests are validated as
per the Span-Stop-Cleanup state machine at https://goo.gl/6JuJj2.

Spawnd has been enriched with several asynchronous API calls, in order for
the process manager to serve requests non-blockingly. Specifically, clients of
the process management service issue RPCs to the process manager server
(blockingly), but the latter forwards requests to spawnd asynchronously, hence
it is able to serve multiple clients at the same time.

The client code for spanning uses libbarrelfish/domain.h to create the new
dispatcher for the remote core.

Bug: if the first dispatcher exits main(), dispatchers spanned on other cores
will pagefault.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoCreate "ProcessManager" and "Domain" capabilities.
Razvan Damachi [Mon, 12 Jun 2017 13:37:42 +0000]
Create "ProcessManager" and "Domain" capabilities.

The ProcessManager capability is created by the CPU driver at startup and given
to init, where it will be passed on to the monitor and then the process manager
subsequently.

The Domain capability is an ID-like cap retypeable from the ProcessManager cap
above. The process management server can hence use the ProcessManager cap to
create Domain caps and give them to spawnd instances, to facilitate identifying
domains locally and globally.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoRefactor process manager to enable spawnd discovery.
Razvan Damachi [Fri, 9 Jun 2017 14:27:55 +0000]
Refactor process manager to enable spawnd discovery.

The process manager now allocates a special LMP endpoint for monitor.0 and
gives said endpoint to monitor.0 as part of the export_cb. After monitor.0
spawns spawnd, it uses that endpoint to send the new spawnd's iref to the
process manager. The latter then binds with spawnd, to keep track of its state.

For app cores, a similar workflow applies, except inter-monitor communication
is now performed. Namely, the new app core's monitor sends the new app core's
spawnd to monitor.0, which forwards it to the process manager. The latter then
binds with the app core's spawnd just the same.

Diagrams for the discovery protocol can be found at https://goo.gl/eJE37u.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoFirst outline of a process management service server.
Razvan Damachi [Thu, 1 Jun 2017 15:35:31 +0000]
First outline of a process management service server.

Right now, the server only has an "alloc_ep" call which the monitor will be
able to use to request connection for spawnd (for all monitors, all spawnds).
The server is not yet run by the monitor, but that should happen somewhere
along the initialization steps on the BSP core.

Signed-off-by: Razvan Damachi <razvan.damachi@gmail.com>

3 years agoharness: devif test gethostip sometimes fails, fallback added.
Roni Häcki [Thu, 31 Aug 2017 12:50:18 +0000]
harness: devif test gethostip sometimes fails, fallback added.

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agodevif: added dst MAC lookup to UDP queue init
Roni Häcki [Wed, 30 Aug 2017 13:05:12 +0000]
devif: added dst MAC lookup to UDP queue init

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agolibnet: added functionality to request ARP lookup sent from default q
Roni Häcki [Wed, 30 Aug 2017 12:58:02 +0000]
libnet: added functionality to request ARP lookup sent from default q

In some cases we require the need to look up a MAC address from
another core than where the default networking queue is running.
This sends a message to the network stack started by the driver
and forces an ARP lookup request and waits for its completion
using Octopus.

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agokernel: caps_mark_revoke: fix assertions after marking copies
Simon Gerber [Tue, 29 Aug 2017 15:14:49 +0000]
kernel: caps_mark_revoke: fix assertions after marking copies

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agokernel: capabilities: wrap check_caps_create_arguments() in #ifndef NDEBUG because...
Simon Gerber [Tue, 29 Aug 2017 14:15:00 +0000]
kernel: capabilities: wrap check_caps_create_arguments() in #ifndef NDEBUG because it is only called from assert()

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agoharness: machines: define custom buildall targets for armv7/armv8 machines
Simon Gerber [Tue, 29 Aug 2017 14:14:14 +0000]
harness: machines: define custom buildall targets for armv7/armv8 machines

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agoharness: fix release build to ignore unused variables
Simon Gerber [Tue, 29 Aug 2017 14:13:44 +0000]
harness: fix release build to ignore unused variables

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agokernel: caps_mark_revoke: fix marking of cap copies for revoke
Simon Gerber [Tue, 29 Aug 2017 13:38:00 +0000]
kernel: caps_mark_revoke: fix marking of cap copies for revoke

Also add some comments explaining what the function is doing.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agolibskb: include sys/types.h (instead of sys/param.h) to get u_char and co.
Simon Gerber [Tue, 29 Aug 2017 13:01:53 +0000]
libskb: include sys/types.h (instead of sys/param.h) to get u_char and co.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agovmkitmon/arrakismon: do not include sys/param.h
Simon Gerber [Tue, 29 Aug 2017 13:00:59 +0000]
vmkitmon/arrakismon: do not include sys/param.h

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agohake: x86_64: re-enable -Werror for cpu driver
Simon Gerber [Tue, 29 Aug 2017 12:59:37 +0000]
hake: x86_64: re-enable -Werror for cpu driver

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agox86_64: kernel: do *not* include machine/param.h
Simon Gerber [Tue, 29 Aug 2017 12:59:11 +0000]
x86_64: kernel: do *not* include machine/param.h

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agoharness: vmkit test added net_socket module
Roni Häcki [Tue, 29 Aug 2017 09:16:08 +0000]
harness: vmkit test added net_socket module

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agodevif: fixed some printfs that seem to cause compilation errors with automated tests
Roni Häcki [Tue, 29 Aug 2017 07:54:12 +0000]
devif: fixed some printfs that seem to cause compilation errors with automated tests

Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

3 years agoomap44xx: sdma: remove redundant redefinitions of MIN()
Simon Gerber [Tue, 29 Aug 2017 07:16:42 +0000]
omap44xx: sdma: remove redundant redefinitions of MIN()

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agolibmdb: wrap function that is only used with assertions enabled in #ifndef NDEBUG
Simon Gerber [Tue, 29 Aug 2017 06:34:06 +0000]
libmdb: wrap function that is only used with assertions enabled in #ifndef NDEBUG

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agoUse min/max macros from bitmacros.h instead of including sys/param.h
Simon Gerber [Tue, 29 Aug 2017 06:33:22 +0000]
Use min/max macros from bitmacros.h instead of including sys/param.h

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agomonitor: capops: move: reformat some function definitions
Simon Gerber [Mon, 28 Aug 2017 14:06:34 +0000]
monitor: capops: move: reformat some function definitions

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agomonitor: capops: copy: add DEBUG_CAPOPS and clearer messages in forwarding path
Simon Gerber [Mon, 28 Aug 2017 14:05:51 +0000]
monitor: capops: copy: add DEBUG_CAPOPS and clearer messages in forwarding path

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agomonitor: capops: copy: properly zero copy state structs on allocation
Simon Gerber [Mon, 28 Aug 2017 14:01:20 +0000]
monitor: capops: copy: properly zero copy state structs on allocation

This change fixes an issue where the owning core was trying to delete stale
caprefs when forwarding a lot of capability copy operations in a short span of
time.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agomonitor: capops: ownership xfer, delete, retype, revoke: delete temp capabilities...
Simon Gerber [Mon, 28 Aug 2017 13:58:08 +0000]
monitor: capops: ownership xfer, delete, retype, revoke: delete temp capabilities when operations done

The monitor domain did not cleanup root cnode capabilities which it receives
on a temporary basis during some of the distributed capability operations.
Depending on operation order this led to a steadily growing number of
capabilities on some cores.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agolibbarrelfish: pinned: reserve 128MB for pinned slabs, up from 4MB
Simon Gerber [Mon, 31 Jul 2017 14:13:43 +0000]
libbarrelfish: pinned: reserve 128MB for pinned slabs, up from 4MB

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agolibbarrelfish: pinned: refill slabs in 64 page chunks instead of page by page
Simon Gerber [Mon, 31 Jul 2017 14:13:08 +0000]
libbarrelfish: pinned: refill slabs in 64 page chunks instead of page by page

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

3 years agoT381: x86_64: properly handle racy page table allocations in pmap code
Simon Gerber [Mon, 31 Jul 2017 14:11:31 +0000]
T381: x86_64: properly handle racy page table allocations in pmap code

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>