The entry powerbox
Delegated powerbox service implementing Role.Powerbox .
Mediates grouped consent requests from windowed processes, forwards sealed Dialog_Record payloads (with principal-scoped Store_Share picker candidates) to the trusted Display role holder, verifies trusted local answers with anti-clickjacking arm delay and expiry bounds, and tracks issued grants.
See: The powerbox: grants that a running process asks for in the repository
powerbox module with an entry
- Hash
39e8945215d236c7ab4598d6944779ee14a9da3d4c733dc6479638978af6a160- Size
94208 bytes- Exports
2- Imports
0- Imported by
0- License
- MIT
Delegated powerbox service implementing Role.Powerbox
| Fact | Value |
|---|---|
| Kind | Modules with an entry |
| Source | src/modules/system/powerbox |
| Boot image | yes: in the boot image, 94208 bytes in this build |
| Build settings | none: the defaults of the source |
| Imports | none |
| Imported by | none |
Neighbours
It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.
Exports
| Export | What it does |
|---|---|
pending_count() -> Integer | returns the number of active pending consent dialogs across all sessions |
status(out: Powerbox_Status) -> Integer | writes the aggregate powerbox counters into out |
entry() | initializes the delegated powerbox service rings and loops over consent commands and expiry ticks until stopped |
pending_count
pending_count() ->
pending_count returns the number of active pending consent dialogs across all sessions.
- none
- When it fails
- a negative result, and the error record
src/modules/system/powerbox/main.odin:59
status
status(out: ) ->
status writes the aggregate powerbox counters into out.
out:
- When it fails
- a negative result, and the error record
src/modules/system/powerbox/main.odin:68
entry
entry()
entry initializes the delegated powerbox service rings and loops over consent commands and expiry ticks until stopped.
- Form
- The entry of the module: one parameter, an address, fixed by the contract.
src/modules/system/powerbox/main.odin:265
Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).
What the root service gives it
| What | Value | As the root service says |
|---|---|---|
| Grants | The delegated powerbox service: its service ring, trusted display ring and transfer region. It holds no root ring and no ambient authority. | |
| Other terms of its start grant set | none | |
| Budget that it asks for |
| Working memory budget for the freestanding powerbox service process. |
The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module (its line); the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).
Integer wire form
A wire form of the module contract: one word of a call. A signed integer of 64 bits, in a register.
Error_Record record of a module
A record of the module powerbox: 56 bytes, aligned on 8 bytes, 0 bytes of padding.
kindi6408 bytesuniti6488 bytesoperationi64168 bytesargumenti64248 bytesvaluei64328 byteslimiti64408 bytesfoundi64488 bytes
Powerbox_Status record of a module
A record of the module powerbox: 56 bytes, aligned on 8 bytes, 0 bytes of padding.
pending_dialogsi6408 bytestotal_requestsi6488 bytestotal_dialogs_showni64168 bytestotal_items_grantedi64248 bytestotal_items_refusedi64328 bytestotal_refused_requestsi64408 bytestotal_expired_dialogsi64488 bytes
