modus
Menu
On this page

Grants of the root service

The root service starts the processes and gives each one only the handles of its start grant set.

What a process receives at its start

What a process receives, by name. A process that is not here receives a ring to the compositor and nothing else.

The comment above Grant in src/library/modus/contract/start_grant/start_grant.odin.

PlaceGrantWhat the root service gives
0Root_RingStart and stop processes.
1InspectThe machine, with the right Inspect.
2StopThe machine, with the right Stop.
3ImageRead the boot image.
4Log_RecordsRead the records of the log.
5ServeA service: other processes call its exports through connections.
6TerminalThe process has no surface: it writes records to a terminal, and reads keys from it.
7StoreA private store in the storage service: a connection to it names the process, with a limit of blocks.
8Acts_For_PrincipalThe process acts for the principal of its session: a service shows it what it holds for all callers.
9Data_DiskA block service of the data disk, with the right Read, and its block ring.
10Scratch_DiskA block service of the disk of the measures, with the right Read, and its block ring.
11ReplacementsRead the replacement table of the machine.
12ReplaceChange the replacement table of the machine (Root_Command.Replace).
13NetworkAn endpoint in the network service, with the grant of endpoint_of: datagrams, or segments of TCP.
14Network_DeviceThe frame service of the network device, with the right Read, and its frame ring, and a control ring from the root service.
15ConnectA ring to the root service that serves Connect and Disconnect only, to the services of its start grant set (start_grant_sets in src/modules/system/root/start_grant_sets.odin).
16ScheduleThe machine, with the right Schedule: change the scheduling strategy of the machine.
17SettingsThe settings page with Write (modus:contract/settings): the one writer of the settings of the machine.
18ClockThe date page with Write and the two ports of the real-time clock (modus:contract/date): the one writer of the date.
19History_StoreA store of its own in the storage service for the line history of the process, apart from its private store (Root_Command.Connect_History).
20EventsThe machine, with the right Events: give the event table of the machine (kernel events of every process).
21PrincipalsA ring to the root service for Principal_Record, Principal_Unlock and Machine_Key only: the process that keeps the records of the named principals. See: Principals
22Debug_ImageThe debug image, read-only: the names of the procedures and the source lines of a stop report (src/modules/system/root/debug_image.odin).
23DebuggerA ring to the root service for Debug only: the service that debugs a process on behalf of a caller of its connections (Root_Command.Debug).
24PaletteThe palette provider of the desktop: the entry table with Write and the ring to the compositor (Root_Command.Palette_Provide).
25System_PartA part of the system that the root service starts by itself, with handles that no other grant names: the screen and the input ring (the compositor), a device (a device service), the text of another process (a terminal). No process asks for it and no caller holds it.
26TpmThe ring and the region of the TPM service (modus:contract/tpm_service): seal a key to the measure of the system, and unseal it. The process that keeps the machine key. See: Principals
27Versions_EraseEnd the versions of an object of its private store, with zeros over their blocks (isolated.CALLER_ERASES_VERSIONS): the process that keeps a secret that an earlier version must not keep. See: Storage: The erase of versions
28CountersThe machine, with the right Counters: count the events of the processor for the code of its own threads. See: Architecture: The counters of a thread
29Remote_ClientsThe client table, read-only (modus:contract/remote, Client_Table), and a Connect for one of its rows that acts for the principal of that row: the process that takes calls from another machine. See: Principals: The client keys of remote
30Sound_DeviceThe sound service of the sound device, with the right Read, and its stream ring (modus:contract/timed_stream): the one process that plays sound. See: Sound
31Start_PolicyA root ring for Start, Stop, Machine_Usable and Wire (the wiring rows of a start list only), and the machine parts page, read-only: the one process that starts the machine. It has no window and nothing else. See: The start policy in the repository
32Screen_CaptureThe capture face and the input face of the compositor on the ring of its window: a copy of the screen, and keys and a pointer that go to the desktop, while the bar shows the mark of a viewer. See: The remote display in the repository
33PlansA root ring for Plan_Roles only, and Connect to the services of its start grant set: the holder of the role Plans, which gives the core the roles of the plan of principal 0 that the principal accepted. See: Declarations in the repository

Read from src/library/modus/contract/start_grant/start_grant.odin.

What the root service records and can revoke

The grants that the root service records for each process, and that it can revoke while the process runs (the command Revoke). Each grant is a handle of the context, or a connection that the root service made; a revocation ends each handle and each mapping that came from it.

A recorded grant is not a start grant (modus:contract/start_grant). A start grant says what the start grant set of a process gives, and its name has capital letters (Inspect). A recorded grant says which handle the root service gave, and its name is in lower case (machine): the console types it. Several start grants are one recorded grant: Inspect, Stop, Schedule and Events are rights of the one handle machine.

The comment above Root_Grant in src/library/modus/system/grants.odin.

BitGrantName in the consoleWhat it gives
0LoglogWrite on the log.
1MachinemachineThe machine, with the rights of the start grant set.
2ImageimageRead the boot image.
3Log_Recordslog_recordsRead the records of the log.
4StorestoreA private store in the storage service.
5NetworknetworkAn endpoint of datagrams in the network service, with one remote.
6Acts_For_Principalacts_for_principalTo act for the principal of its session in each service that the process is connected to (isolated.CALLER_ACTS_FOR_PRINCIPAL).
7HistoryhistoryThe store of the line history of the console in the storage service (Root_Command.Connect_History).
8DebugdebugThe handle of another process with the right Debug, for each process that the command Debug named (Root_Command.Debug).
9PalettepaletteThe entry table and the ring of the palette provider (Root_Command.Palette_Provide): the commands of the process show in the palette of the desktop.
10WiringswiringsThe wirings that the process asked for (Root_Command.Wire, and the wiring list of Start): their rings are paid from its budget. A revocation ends each of them with the end word Revoked.

Read from src/library/modus/system/grants.odin.

The grants of each process

One row for each process of the boot image: its start grants, each a link to its row in the first table of this page, and the other terms of its start grant set. A build stops when a process has no row.

ProcessGrantsOther termsWhy, as the root service says
store_blocks = 3, log_gives = true

The console is the shell of the machine, and its commands need each grant:

  • Root_Ring: start, stop, grants, revoke, connect and the commands of the principals ask this service.
  • Inspect: memory, locks and process_modules read the reports of the machine.
  • Stop: shutdown stops the machine.
  • Image: load and isolate map the modules of the boot image.
  • Debug_Image: a stop report names the procedures and the source lines.
  • Replacements and Replace: replacements reads the replacement table, replace changes it.
  • Terminal: the console has no surface of its own.
  • Store: connect storage opens its private store, with a small limit of blocks that a test reaches.
  • History_Store: the line history, apart from that store.
  • Acts_For_Principal: a service that it connects to shows what it holds for all callers.
  • Palette: its commands show in the palette of the desktop, and the palette names the one that the input chose. It gives the log to the processes that it starts, which write on it.
terminal_columns = FLOOD_TERMINAL_COLUMNS, terminal_rows = FLOOD_TERMINAL_ROWS, terminal_measure = trueIt writes its lines to a terminal and reads the key Space from it: it has no surface and needs nothing else. It shows the rates of the process in a terminal of a fixed size, so that its measures compare from one run to the next.
noneThe test of the records of a terminal ring whose kind names no record: it writes them to its terminal, as flood writes lines.
store_blocks = 8192

A shell of Linux in a guest:

  • Terminal: the serial console of the guest, both ways.
  • Store: its private store holds the guest image: a kernel of 13 MB and an initial archive. The blocks hold both, with room for a newer kernel beside them.
See: A Linux shell in a window in the repository
noneA developer tool: it reads the reports of the machine and the names of the modules, and serves the same facts. See: Developer tools
on_demand = trueIt serves processes() and counts() to a caller that acts for the principal. It starts at its first connection, so the table of the processes needs no start of its own, in each start policy, the rescue included.
on_demand = true

The debugger service:

  • Serve: its exports are the commands of the debugger.
  • Debugger: it asks this service for the handle of a process with the right Debug, on behalf of one of its callers, and, for a disk process that it debugs, for a connection that reads only to the store of its debug object (Debug_Store).
  • Inspect: the threads and the module records of the process that it debugs.
  • Debug_Image: the debug objects, which name the procedures, the lines, the types and the variables.
  • Image: the name of each module, from its hash. It starts at the first connection to it.
See: Developer tools: The debugger
noneIt shows what each processor runs.
noneIt shows the page tables.
noneIt reads the kernel entries of the process for its measures.
noneIt reads the kernel entries of the process for its measures.
noneIt reads the kernel entries of the process for its measures.
callable = {0 = "compositor"}The clock of the desktop: a connection to the compositor only, for the notification at the end of its timer, and the boot image for the description of the exports of the compositor . See: The clock application: The grants in the repository
noneIt shows what the kernel refuses.
noneIt reads the pointer themes in the resource table of the boot image.
noneIt serves records(): the whole log to a caller that acts for the principal, its own records to each other caller. The boot image is the catalog in which its window finds the module file of a log fact, to write the sentence of the fact. See: Log facts: typed records in place of formatted lines: The reader path in the repository
callable = {0 = "log"}, log_gives = trueThe test of the own records and of the records of its children: a connection to the log service and to no other service, with no grant to act for the principal, and the boot image for the description of the exports of that service and for the module of its children. It starts them on its own budget, and the handle of each child is its grant to read the records of that child; each child writes the records that its starter reads back, one of them more than the whole log keeps . See: The log scope of a reader in the repository, The own log ring of a process in the repository
noneIt shows the modules of the boot image.
log_gives = trueIt starts its nodes from the boot image, and its nodes write on the log.
noneIt reads its own page table, and starts its twins from the boot image.
noneIt reads the counts of the locks, and starts its lockers from the boot image.
noneIt reads its own mappings, and starts its child from the boot image.
noneIt starts its children from the boot image.
log_gives = trueIt starts its children from the boot image; the child that repairs logs its own cases.
log_gives = trueIt starts its children from the boot image, and is the debugger of each one: no grant of this service gives it that. A child writes one line from a buffer that its debugger watches.
noneIt gives the event table of the machine, and starts its children from the boot image.
noneIt counts the events of the processor for its own loop . See: Architecture: The counters of a thread
noneIt reads the counts of the scheduler, changes the strategy and writes the weight of each thread (the share policy). It starts the four processes of its case of the shares from the boot image, and serves strategy_set(), share() and policy() to the console.
store_blocks = 12000A service: the console calls its exports through a connection. Its private store keeps the pictures that the principal saves . See: The paint application in the repository
callable = {0 = "display"}, asks_acts = trueA window and a service: the agent runner on the host calls its exports through remote, and it asks the trusted display for the act dialog with the term asks_acts. It acts for nobody: the grant to act for the principal would open each export of the display that serves the principal. The boot image checks that the holder of Display has the act dialog. See: The assistant: The right to ask an act in the repository
noneA service: the console calls its exports through a connection.
noneA service: the console calls its exports through a connection.
on_demand = trueThe module of the tables, started as a process when a caller connects.
noneA service: the console calls its exports through a connection.
noneIt writes the settings, keeps them in its private store, and serves set() and get().
noneIt reads the real-time clock, writes the date page, and serves now().
noneThe start policy: its root ring starts and stops the processes of its list and says when the machine is usable, and it reads the machine parts page. It holds nothing else, so a fault in it reaches only the processes that it asked for. This service starts it, and refuses a Start of its name. See: The start policy in the repository
noneIt reads the documentation of each module of the boot image, and the module records of each process.
noneIt measures the block service on the disk of the measures, which holds no data of a process: its writes destroy nothing.
noneThe client of the test of the IOMMU: its device service on the disk of the measures is the test device service iommu_device.
on_demand = trueIt is the one client of the block service of the data disk, and it serves a private store to each caller with the grant Store. It starts at the first connection to it.
callable = {0 = "display"}, on_demand = trueThe holder of the role Plans: the generations of the plan of each principal in its private store, the boot image and a connection to the trusted display for the difference that the principal sees, and the roles page of this service, which takes the roles of an accepted plan of principal 0 whole or refuses them whole (Root_Command.Plan_Roles; Declarations: Apply, the difference and the rollback in the repository). Its callers act for their principal; it acts for nobody.
on_demand = trueThe holder of the role Recipes: the cache of the realisations and the recipes in its private store. See: Recipes, builders and the cache in the repository
on_demand = trueThe holder of the role Projects: the pins of each project in its private store. See: Declarations in the repository
on_demand = trueThe collector of principal 0: the audit spaces of the record outputs that a wiring gives it, as segments chained by their hash in its private store, and the act records of the wide grants . Its callers act for its principal; it acts for nobody. A source reaches it only through a wiring, never through a grant. See: Record outputs and record inputs of a module: typed streams of records between processes: The collector in the repository
store_blocks = 4500The notes and their versions live in its private store: a version of a note of 32 KiB holds 8 blocks of data and their nodes, and the store keeps each version for 10 minutes before the thinning.
store_blocks = 4500The test of persistence: its note, its count and their versions live in its private store: the versions of a run of 1000 commits of the count (4 blocks each), then thinning at the limit.
store_blocks = 4500The text that it edits and the versions of the text live in its private store: a commit of a text of 32 KiB holds 8 blocks of data and their nodes, and the store keeps each version for 10 minutes before the thinning.
noneThe records of the named principals in its private store, the passphrase in its window, the commands of the principals, and the ring of the TPM service, which seals the machine key to the measure of the system. It erases the versions of the file of a principal after a change of a secret, so an old secret opens no version. See: Principals, Storage: The erase of versions
store_blocks = 12000The test of the trees of a store: 100000 empty objects in 1110 trees, about 9500 nodes, and room for the copies of a commit.
store_blocks = 12000The test of the large objects of a store, written by ranges: a commit of 1000 blocks spread over an object of 8 GiB holds about 2000 blocks, with its version; the loop of range commits about 4000.
store_blocks = 2, log_gives = trueIt makes errors in its store, loads modules and starts fault from the boot image, counts the locks, and asks for connections that this service refuses (its start grant set names no service). One object is over the limit of its store. It gives the log to its child, which measures a refused Log.
noneIt loads modules of the boot image, and measures with the cycle counter.
noneIt reads the hash of the module cryptography in the boot image.
noneIt measures with the cycle counter.
noneA listen grant, its exports for the console, and its pages in its private store.
noneA client grant of TCP to one web server, 10.0.2.100 port 80.
store_blocks = disk_process.STORE_BLOCKS_LIMIT, on_demand = trueThe module file service: its private store is the store module_files of its principal, as a private store has the name of its process, with the limit with which this service reads it and the tool writes it, so no grant differs from the limit on the disk; a client grant of TCP to one web server, 10.0.2.100 port 80; and its exports for the console. It starts nothing: this service checks the hash of each file that a principal starts. It starts when a principal connects to it. See: Module contract: A module from a disk
noneA listen grant of UDP: QUIC in the process, the module cryptography through its imports.
noneIt plays a tone through the sound service of the sound device, its one client while it runs. See: The timed stream, and sound through virtio-snd in the repository
noneIt is the one client of the frame service of the network device, and it receives from this service the endpoint of each process with the grant Network.
callable = {0 = "assistant", 1 = "compositor", 2 = "date", 3 = "debugger", 4 = "inspect", 5 = "log", 6 = "manual", 7 = "monitor", 8 = "settings", 9 = "storage"}The calls of another machine: a listen grant of UDP that admits the address of the host only (QUIC in the process, the module cryptography through its imports), the client table, which names the key of each client that a principal allowed, connections to the services of its list, each for one row of that table, and the grant to act for the principal of that row. See: Module contract: A call from the host, Principals: The client keys of remote
noneThe remote display: a listen grant of UDP that admits the address of the host only, the client table, which names the uses of the key of each viewer that a principal allowed, and the capture face and the input face of the compositor on the ring of its window . It calls no service. See: The remote display in the repository
noneIt reads the size of the code of interface_module.
callable = {0 = "debugger"}The window of the debugger: a connection to the service debugger and to no other service, the boot image for the description of the exports of that service, and the grant to act for the principal, which the service asks of each caller. It holds no right over a process. See: Developer tools: The window of the debugger
callable = {0 = "sample"}It loads sample, starts a call host of it from the boot image, and connects to the service sample. See: Module contract: Tables and bytes as parameters
noneThe screen, the input ring and the control ring of this service (display_holder_start); its exports serve the processes.
noneThe ports and the two interrupts of the PS/2 controller (input_start).
noneThe text of the process that writes in it (terminal_start).
noneThe terminal of a console image with no compositor: the ports of the second serial port, COM2, where it writes ANSI text and reads keys (renderer_terminal_start). COM1 stays the log of the kernel.
noneThe terminal of a console image with no compositor on a machine with a screen: the framebuffer, where it draws a grid of characters, and the input ring, whose keys it sends to its process (renderer_terminal_start).
noneThe terminal of a console image for a page that draws it with the document of a browser: the ports of COM2, where it writes one JSON line for each step and reads keys (renderer_terminal_start).
noneOne block device and the ring of its one client (driver_start).
noneThe network device and the ring of its one client (driver_start).
noneThe disk of the measures for its one client iommu (driver_start).
noneThe entropy device, whose one client is this service (driver_start).
noneThe sound device and the ring of its one client (driver_start).
noneThe VirtIO-GPU device and the ring of its one client (driver_start).
noneThe registers of the TPM, and the ring and the region that unlock receives (tpm_service_start).
noneThe delegated wiring service: its core ring, stops ring, read-only boot image view, and transfer region (wiring_service_start). It holds no root authority, no machine handle, and no Control on any process.
noneThe delegated powerbox service: its service ring, trusted display ring and transfer region. It holds no root ring and no ambient authority.
noneThe delegated disk_processes service: it reads the module file of a disk process and its imports through a connection that reads only, into memory that the core lends, and asks for Start_From_Bytes (disk_processes_delegation.odin). Holds no root ring and no machine authority.
noneThe delegated devices service: PCI identity table matching and attenuated per-device grant minting. Holds no root ring.
noneThe delegated principals service: named principals, session lifecycle, disk grant tables, remote client keys, and principal 0 start policy choice. Holds no root ring and no machine authority.
nonenoneOnly the image of the test of a shortage of frames holds it: its start list asks for it, and shortage_start gives it the machine with Inspect and Stop; a command Start of another sender gives it no grant.
nonelog_gives = trueOn the machine of the operation sequences, its start list asks for it, and operation_fuzzing_start gives it the machine with the right Physical only, for the physical address of its mailbox, the boot image for the module of its runner, and the log, which it gives to each runner; a command Start of another sender gives it no grant. Only the boot image of the operation sequences holds it, and a release refuses an image that holds it.
nonenoneA runner of operation_fuzzing: its starter gives it its handles.
nonenoneA load that never ends and never waits for an input.
nonenoneIt writes to an address that it does not have.
nonenoneThe cards of the people whose work inspired the system.
nonenoneA light browser: the pages that it shows are built into it, so its window is its one handle.
nonenoneA node of rings: its starter gives it four memory objects.
nonenoneFive threads in one address space.
nonenoneFive threads and one queue of work.
nonenoneEverything that it uses, it makes.
nonenoneThe limits of its own budget.
nonenoneThe budget of its own children.
nonenoneThis service writes the facts of the seed of the system in its values: facts, not the seed (start_values_of_the_name).
nonenoneThe extended state of its own threads.
nonenoneThe process that the test of the debugger debugs.
noneThe test of the record and the replay of a process with a shared writer: it starts its readers from the boot image.
nonenoneA guest in its own memory.
nonenoneA child of frames: its starter gives it its handles.
nonenoneA child of locks: its starter gives it its handles.
nonenoneThe call host: its starter gives it the call ring and the call region.
nonenoneThe elements of the interface package, in its window.
nonenoneA frame at 1920 x 1080 drawn into memory of its own budget.
nonenoneThe candidate fonts, in its window.
nonenoneThe interface font, in its window.
nonenoneAn arena that grows until its own budget refuses a commit.
noneThe asker of the test of the record outputs: Start, Wire, Connect and Revoke are commands of the root ring, which only the grant Root_Ring sends. It starts and wires only its own children, and revokes only its own grant wirings. See: Record outputs and record inputs of a module: typed streams of records between processes: How a test waits on a record output in the repository
nonenoneThe writer and the reader of that test: their ends come from the root service in their wiring rings, and they need no grant.
nonenone
nonenoneThe utility modules of the record streams: their ends come in their wiring rings, and they need no grant.
nonenone
nonenoneThe demonstration pair of the start list: the start policy wires them, and they need no grant.
nonenone
noneThe asker of the test of the generic record inputs: Start, Wire and Stop are commands of the root ring. Its writer needs no grant.
nonenone
callable = {0 = "display"}The asker of the test of the audit of the collector: Start, Wire and Connect are commands of the root ring. It starts the collector and wires the pair of an audit to itself, and asks the holder of Display for the dialog of a plan, which it must refuse: the boot image gives the description of its exports.
callable = {0 = "plans"}The applier of the test of the plan of principal 0: a connection to the holder of Plans and to no other service, the boot image for the description of its exports and for the hash of the holder that the plan names, and the grant to act for the principal, which plans.apply asks.
nonenoneThe holder of Settings that the plan of that test names: it writes its line and stops, and needs no grant.
nonenoneThe writer of the test of the record output log: its end comes in its context before its first instruction, and it needs no grant. Its log budget holds 0 records (budgets.odin).
noneThe follower of the test of log.follow: Connect and Wire are commands of the root ring, and the end Connected of log.follow is given only to a caller that acts for the principal: log.follow carries the records of the whole log.
callable = {0 = "compositor"}The test of the border of compositor.notify: a connection to the compositor that does not act for the principal, and the boot image for the description of its exports (The tray widgets in the repository, "The export notify").
nonenoneA side that writes its own words in its wiring ring, past the library: it needs no grant either.
nonenoneThe writer of the streams of the console: its end comes in its wiring ring when the console reads output_counter.counts, and it needs no grant.
nonenoneIts reader in the wiring list that the console gives its start: its end comes in its wiring ring before its first instruction.
nonenoneA writer that writes its ring past the library and ignores the condition of its wiring: the console must refuse its record.
noneThe asker of the test of fan-out and the pace: it starts its slow reader and server with a wiring list, and reads server.requests itself. Start and Wire are commands of the root ring.
nonenoneIts slow reader: its two ends come in its wiring ring before the first instruction of server, and it needs no grant.
noneThe asker of the measures of the record outputs: it starts its readers and its writer with a wiring list, and reads its own grants between two runs. Start, Wire and Grants are commands of the root ring.
nonenoneIts writer and its readers: their ends come in their wiring rings before their first instruction, and they need no grant.
nonenone
nonenoneThe two rows of the test of the restarts of a start policy, which only the image of the test of the rescue holds: each stops itself at once, and needs no grant.
nonenone

Read from src/modules/system/root/start_grant_sets.odin.

counts global variable of the package output_counter

counts: system.Record_Output(Counted)

One record each time the writer counts, while a reader is wired.

src/modules/tests/output_counter/main.odin:28

requests global variable of the package server

requests: system.Record_Output(Access_Record)

One request that the server answered.

src/modules/demonstrations/server/requests.odin:35