Repository navigation
fix(elf): disclose duplicate kernel module text sections - #9001
ShuaixinHuang wants to merge 7 commits into
Conversation
[Medium impact] The reviewed changes appear safe to merge; no actionable defects were found. SummaryThe parser now discloses duplicate
Reviews (2) · Last reviewed commit: "Merge main and verified baseline CI repa..." · Reviewed by Greptile |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Summary
Report duplicate .init.text and .exit.text declarations in the kernel module inspection limitations, while retaining the first declaration's size and location. Fixes #8941.
Change and scope
The ELF parser uses a shared first-section selection rule for all five single-section results. It emits the same warning already used for duplicate .modinfo and __versions sections. CLI and MCP use the same parser and report contract. This reads inert files and does not load a kernel module.
Evidence and validation
Two synthetic ELF regressions failed before the change and passed afterward. For example, a report can retain init_text.bytes = 4 and now include “Multiple .init.text sections are declared; the first is examined.”
Parser and service tests passed (32 tests). The compiled CLI suite (4 tests) and MCP boundary suite (3 tests) passed. The filesystem suite had two passes and one failure at fixture setup because the Windows host denied symlink creation with EPERM, before the service was called. Formatting and check:fast passed. Local Node 22.20.0 and npm 10.9.3 were used with the existing dependencies. No real kernel module was loaded or run.
Author readiness
Human owner: @ShuaixinHuang
CI integration
Integrated current main and the baseline test repairs from #9019, #9002, #9003 and #9009 so this branch can run independently. The local combination passed 128 related tests and check:fast on Windows. Current-HEAD remote CI remains the final integration check.