19 Commits

Author SHA1 Message Date
b8c7680284 kernel-open: probe class_create/devnode signatures (RHEL 9 5.14 build) (#552)
a2707a4 guards class_create(name) and the const-device class.devnode
callback in rmapi_node.c with LINUX_VERSION_CODE >= 6.4 / 6.2. RHEL 9
backports both to 5.14, so the #else branch is taken there and the
module fails to build (-Werror=incompatible-pointer-types, too many
arguments to class_create).

Probe include/linux/device/class.h in compat_probes.mk instead, keeping
the version check as the fallback for unprobed (host-fixture) builds,
and record the guard in docs/KERNEL_COMPAT.md.

Co-authored-by: TheWeakShall <22898767+TheWeakShall@users.noreply.github.com>
2026-12-04 16:15:23 -08:00
1f97fe0223 reports: update local validation reports and 580 parity ledger JSON 2026-12-04 19:30:58 +00:00
e7a1a5a41f Wave 9: 0-gap R620 controls, 64KiB GSP RPC, multi-gen GSP-RM routing/reset/ABI, real GspSystemInfo 2026-12-01 19:46:04 +00:00
a93577ae92 Wave 8: WPR_INFO 0x100cd4, 3-tier VRAM sizing, Maxwell/Pascal RM/UVM/BAR1 USERD, PCI bus master 2026-12-01 19:35:13 +00:00
7f7021e218 Wave 7: complete RM escape dispatch (0x27-0x5f/0xd5/0xd8) and x86_64/ARM64 kernel hardening gates 2026-12-01 19:19:30 +00:00
e83dd0ee5f Wave 6: live channel teardown, hot-unplug UAF fixes, PCE2LCE topology, real FBPA ECC + HbmSession 2026-12-01 19:03:54 +00:00
87cbefa8b0 gsp: stop leaking boot DMA and accept the real payload size
Review findings on the payload split: the DMA adapter rejected anything over
16 MiB, so the real 30,539,776-byte radix3 container failed before a single byte
was written; and the non-install path, session teardown and the slot-exhausted
install path all freed GSP-visible DMA without stopping the engine first, which
can let a running GSP write into pages the kernel has already reused.

Raise the cap to 64 MiB with the bounds checks intact, and reset the GSP
(kgspResetHw_TU102) before returning any GSP-visible buffer to the allocator,
including the WPR and queue rings. When that reset cannot be confirmed nothing is
released: leaking the buffers is preferable to a device writing into freed
memory. Teardown keeps the reference ordering, since kgspTeardown_TU102 resets
before FWSEC-SB and Booter Unload.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-30 17:36:46 -06:00
f6c191c270 gsp: build radix3 page tables and give boot payloads their own DMA
The four boot payload addresses were aliased to the command and message queues,
so GSP-RM read its own rings as a radix3 ELF, a bootloader, an image signature
and a crash-report region. Build the radix3 page tables from .fwimage and give
the signature and crash-report queue separate sysmem buffers, following
kgspCreateRadix3_IMPL and _kgspCreateSignatureMemdesc in 580.178.04.
2026-11-30 16:38:33 -06:00
58655a7fcf Take elf_machine from the Machine header line and commit the verified run
readelf -h prints the Magic line before the Machine line, so splitting on the
first colon captured Magic as elf_machine. Match the Machine line instead.

Commit the report regenerated by the verification run for the four PR #10 review
fixes: py_compile clean, check_irq_mock.sh 20/20, rom-fw fixture C stage
compiles with -Wall -Wextra -Werror, gate green on the current object with the
numbers unchanged (357 data relocations to code, 0 missing pads, 0 mid-function).
elf_machine is now in the report; module_sha256 reflects the .ko currently on
disk. tmp/ added to .gitignore so scratch stays untracked per the Git rules.
2026-11-30 17:39:55 +01:00
42dc565c12 The gate now judges what objtool enforces, and the strict rule stays visible as a count
- check_kernel_module.py: pass condition = every relocation in an allocatable non-executable section that resolves to code must target a landing-pad entry (addend 0). This be objtool's own rule (check.c:4611 accepts a target it knows is not an IBT target), so the gate can be green honestly instead of demanding something rustc cannot deliver.
- Strict every-entry check stays as an informational count (functions_without_endbr = 1332 on the current object) - visible, not a false failure.
- Proven against objtool on four cases, all agreeing: table without pads (both fail), table with branch protection (both pass), forced jump table (objtool errors, the check flags the mid-function relocations), current object (both pass).
- Gotchas written down: readelf pads [18] as one token but [ 5] as two, so flags were landing in the wrong column; objtool returns 0 on warnings unless --werror (CONFIG_OBJTOOL_WERROR=y adds it); the gate disassembles raw (-dr) so names match readelf.
- Gate is green on the current object: 357 data relocations to code, 0 missing pads, 0 mid-function. Counts move with the build, so read them as measured-at-the-time numbers.
2026-11-30 17:39:55 +01:00
94e9bbfeba Nightly -Z cf-protection=branch so the Rust object gets the ENDBR objtool demands
- utils.mk RUST_KERNEL_FLAGS (x86 kernel target) gains -Z cf-protection=branch; the ARM64 branch be left alone — IBT be an x86 CET feature and no BTI was ordered.
- rust-toolchain.toml moved from pinned stable 1.100.0 to nightly, since the flag be unstable. Verified against the tool: rustc --print=codegen-options on 1.100.0 lists nothing for CF protection, and the unstable book lists none/branch/full for the LLVM backend.
- Make RUSTC explicit so the pinned toolchain is what actually runs:
  - utils.mk: RUSTC ?= $(or $(shell rustup which rustc),$(shell command -v rustc)). Resolves the toolchain pinned in rust-toolchain.toml instead of trusting PATH order; still overridable with RUSTC=..., and no hardcoded ~/.cargo path that may not exist on another box.
  - The gotcha that made this necessary is recorded in the scroll: plain rustc here be the system stable 1.100.0 and rejects -Z. Boxes without rustup still fail - honest limit, no magic.
2026-11-30 17:39:55 +01:00
351779e571 Add default-on live GV100/V100 HBM2 memory-clock unlock (1053 MHz) and credit arikamidotnet / FBR-RAM-Downloader 2026-11-28 04:59:49 +00:00
c8deffec5d Add native /proc/driver/nvidia/{params,version,gpus/<bdf>} procfs entries for bare-metal runtime 2026-11-28 04:43:17 +00:00
321278a032 Bump Turing-Blackwell-Rubin GSP-RM path to 620.70.06 (MCTP+NVDM+GMCAPI, GR100, C-header oracle) 2026-11-28 04:33:24 +00:00
a209eced9d Port ATS THP fault coalescing, client-close sysmem pool trim, force_p2p, resize-bar1, and MOK install.sh 2026-11-28 02:22:41 +00:00
96617ab4af Wire live GSP-RM, Maxwell/Pascal, Display/KMS, MIG & PMU runtime + port NVSwitch/IMEX, unlocked SR-IOV/vGPU, DP-MST/VRR/HDR10/SLI, InfoROM/BIT/DCB & Tegra descriptors (119/119 Unicorn+E2E oracles, 5/5 live V100 VFIO PASS) 2026-11-28 01:40:57 +00:00
6543601569 Port remaining 580.178.04 subsystems to Rust with 82/82 Unicorn binary oracles (GSP-RM, Display/NvDisplay/Modeset, Maxwell/Pascal, PMU/MIG/CSL/ECC/AER/RDMA, 6,288 multi-state RM control cases) 2026-11-27 23:59:02 +00:00
4b6a77d90f Clean-room Rust NVIDIA 580.178.04 driver: GV100 0-diff parity (8-GPU PyTorch/NCCL/llama.cpp, H.264+HEVC NVDEC/NVENC, 2,096/2,096 RM controls, stock UVM/modeset bridges, artificial restrictions unlocked) 2026-11-27 20:45:30 +00:00
4526e6a816 Baseline: validated 30/30 tree with passing Level 7 hardware regression
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime
- Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after)
- Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
2026-11-23 23:48:38 +00:00