sass2mlir / Manual

Kernel blacklisting: design limits

Why instruction inspection alone is not a safe kernel-blocking policy, and what an experimental pass would need to prove.

Experimental design

Inspecting a kernel is not a blocking policy

sass2mlir can expose decoded instructions and control flow for a pass to inspect. It does not ship a blacklist command or a security-enforcement pass. The earlier “GPU antivirus” walkthrough described an unimplemented proposal; this URL remains as a design note.

build/sass-mlir passes
build/sass-mlir inspect kernel.cubin

These commands enumerate transformations and inspect an image. They do not classify it as safe or malicious.

Design boundary

A signature needs a threat model and a response contract

Common memory and barrier instructions also occur in ordinary kernels. A short opcode signature can produce false positives, and changes in register allocation or control flow can evade a naive match. Unknown instructions or unresolved transfers are missing evidence, not a clean bill of health.

Replacing a body with an immediate EXIT is not transparent neutralization. It can leave output buffers unwritten, omit required synchronization and cause dependent device or host work to consume invalid state. Preserving the symbol and parameter layout does not preserve application behavior.

The pass tutorial teaches a bounded transformation with explicit preconditions, validation and refusal. Use that workflow for experiments; this page supplies no kernel-blocking implementation or security guarantee.