Expand description
The check that an in-guest Tool image runs with syscall site patching off,
and collects the statistics it reports at exit, when the host asked for it
(Config::in_guest_site_patching_off, set for
hermit --backend=in-guest-trap).
The in-guest LiteInst runtime takes both settings from the guest
environment while it installs the Tool: REVERIE_LITEINST_SITE_PATCHING and
the statistics coordinator’s variable. Hermit sets them, but code that runs
in the guest before the runtime’s constructor (a constructor of one of the
program’s own shared libraries), or code the runtime calls through
interposable symbols during installation, could change them. So the check
does not read the environment: the Tool’s constructor records the host’s
request, which arrived in the configuration handshake that guest code
cannot change (require_site_patching_off), and once installation has
returned the runtime’s preload constructor (detcore_liteinst_initialize)
compares it with the settings the runtime actually captured and refuses to
run the program when they differ (violation).
Functions§
- require_
site_ patching_ off - Records that the host asked this Tool image to run with syscall site patching off and statistics on. Called from the Tool’s constructor.
- site_
patching_ off_ required - Whether the host asked this Tool image to run with syscall site patching
off (
require_site_patching_off). - violation
- Why an image whose runtime captured
runtime_patches(whether it patches syscall sites) andruntime_collects(whether it collects its exit statistics) breaks the host’s request, orNonewhen it does not or when nothing was requested (requiredfalse).