DynamoRIO / DynamoRIO/dynamorio

Kernel module stub generation and relink runs unconditionally on no-op builds

Open
#8,112 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

### Description

In #8099 we switched `dynamorio_module` from an output-driven `add_custom_command` to an always-run `add_custom_target` so that kbuild can detect header-only changes and rebuild stale objects.

Because custom targets run unconditionally on every build invocation, if `Module.symvers` is present, the stub generation pipeline now executes even when no source or header files have changed.

### Priority and Impact

This is low priority for the following reasons:

1. The overhead is relatively small as it only involves rebuilding stubs.c/.o and linking, the other ordinary objects are not rebuilt. It takes less than 3 seconds on my machine.
2. Avoiding this would require additional complexity in the CMakeLists.txt or Kbuild file.
3. Furthermore, stub generation is a temporary scaffolding intended to be removed once missing symbols are fully implemented.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the dynamorio_module target in CMakeLists.txt and the related rules in Kbuild. Reproduce a no-op build with Module.symvers present, then inspect how stubs.c/.o generation and relinking are triggered. Done means preserving header-only change detection while avoiding the stub-generation and relink work when nothing changed.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake, linux
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.