Repository navigation
fix: honor KDIR in kernel feature probes - #346
Open
efegokdemir wants to merge 2 commits into
Open
efegokdemir wants to merge 2 commits into
efegokdemir wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.