Skip to content

fix: honor KDIR in kernel feature probes - #346

Open
efegokdemir wants to merge 2 commits into
NVIDIA:masterfrom
efegokdemir:codex/issue-311-kdir-test
Open

efegokdemir wants to merge 2 commits into
NVIDIA:masterfrom
efegokdemir:codex/issue-311-kdir-test

Conversation

@efegokdemir

Copy link
Copy Markdown

Summary\n\nFixes #311 by making the kernel feature probes use the configured KDIR override instead of always assuming /lib/modules//build.\n\n## Changes\n\n- Honor KDIR in the HAVE_VM_FLAGS_SET probe.\n- Honor KDIR in the HAVE_PROC_OPS probe.\n- Export KDIR from the driver Makefile so its probe subprocesses receive the same directory used for the module build.\n\n## Testing\n\n- Synthetic probe regression with both scripts and a fake make: passed; both selected the configured KDIR.\n- Makefile integration check with KDIR and KVER overrides: passed.\n- git diff --check: passed.\n- shellcheck: reports pre-existing quoting and cd warnings in both scripts; no new warning was introduced by this change.\n\n## Notes\n\nThe test uses a shell environment override and preserves the existing kernel-version fallback when KDIR is unset. AI assistance was used for source inspection, implementation, and validation; I reviewed the resulting change.

efegokdemir and others added 2 commits September 21, 2026 21:55
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
GNU Make before 4.4 does not export variables to $(shell) commands.
Pass KDIR explicitly so both probes use the configured kernel tree,
and quote the probe make argument to preserve spaces in its path.

Add a hardware-independent regression for the Makefile environment,
KVER fallback, and each probe's kernel directory argument.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant