Files
Gleb Chesnokov 2f8ff7ea63 scripts: Integrate Sparse and Smatch with reviewed policy
Run the native checkers through the ordered SCST module build with C=2.
Preserve Kbuild flags, full raw output and every attempted CHECK record.
Keep full, diff and explicit input selection on the shared scope; diff
selection triggers the complete configured module analysis.

Read exact diagnostic exceptions from policy/sparse.json and
smatch.json: two reviewed Smatch IRQ reports and the external FC
flexible-array warning. Keep the existing SCST matching boundaries and
reasons. Smatch uses its matching installed kernel data without
engine-specific additions.

Reject build, checker, frontend and truncation failures even when Kbuild
returns success. Retain per-invocation records and a machine-readable
run summary, and detect printed CHECK steps without a record. Require
selected C inputs to occur in the build. Keep findings distinct from
incompleteness.

Check native compatibility before compilation, and forward external
kernel capability probes to the real checker instead of skipping them as
inputs outside SCST. Include the pinned Smatch typeof frontend
correction and isolated fixtures for failure propagation and exact
exception boundaries.
2026-10-19 21:38:56 +03:00

1.7 KiB

Repository tooling

README.md describes the directories and entry points. For changes under kunit/, also follow its instructions.

  • Keep a moved helper and all its callers, Make targets, CI jobs, packaging references, tests, and documentation in the same commit.
  • Resolve shared helper paths relative to the owning script. For sourced Bash libraries use BASH_SOURCE when the caller can live elsewhere.
  • Preserve intentional caller-directory semantics for source selection, archive contents, patch generation, and module signing.
  • Keep path reorganizations separate from changes to analyzer coverage, diagnostic filtering, kernel support, or runtime behavior. Document policy changes explicitly in their own commits.
  • Reuse the shared source and process helpers for analyzer drivers. Keep input selection separate from diagnostic policy, retain complete raw reports, and propagate missing-tool and process failures. Report no eligible inputs as a skip; fail incomplete analyzer runs.
  • Keep input and diagnostic exclusions in policy/, with a reason for each rule. Diagnostic exceptions must match the exact file, message and function where available; resolve external headers from the actual build context. Do not add environment-based filters that bypass the reviewed policy.
  • Drivers that modify build state must hold the shared build lock around build log reset and build-state changes. Other checks do not need the lock.
  • Keep analyzer fixture tests isolated in temporary directories and processes. They must not compile or load SCST, access live storage, or change services.
  • Apply the root safety boundaries to cleanup, signing and runtime helpers.