Files
dynamorio/core
Bin Wang 76c5170fcd i#8021: Add DR options parsing in the kernel module init (#8096)
- Add an `options` module parameter to accept DynamoRIO options on
`insmod` and initialize them via `dynamorio_app_init_part_one_options()`
during module init.
- Added functions in `core/kernel_linux/os.c` that
`dynamorio_app_init_part_one_options()` depends on. They are exercised
by the init path and tested in the insmod CI.
- Implement `kernel_setenv()` for saving the options value. 
- Implement `os_check_option_compatibility()` to enforce kernel-mode
options constraints.
- Update the kernel module insmod workflow to build with both
`-DDEBUG=ON` and `OFF`, and verify that runtime options (`-loglevel 2`)
are parsed and logged correctly in the debug build.

On configuration lookup: the shared init path still performs it, but
`os_open()` is intentionally not implemented in kernel mode and returns
`INVALID_FILE` unconditionally. So no config file can be found and
options can only be set using the module parameter.

The kernel-mode options constraints implemented in
`os_check_option_compatibility()` are mostly copied from drk and may
need future adjustments. For example, #8116 tracks CPU-private fragment
restrictions (`shared_bbs`, `shared_traces`, `coarse_units`).

This initial implementation only supports setting options at module load
time. Dynamic updates and per-process options are tracked by #8115.

Issue: #8021
2026-09-14 13:45:54 -07:00
..
2025-07-29 12:09:07 -04:00

This directory contains the core implementation of DynamoRIO. Documentation for client developers can be found in the public API, where interface and data structures are found in the Files and Data Structures tabs, respectively.