Repository navigation
linuxkm: install headers needed by installed wolfssl headers - #12122
Open
MarkAtwood wants to merge 1 commit into
Open
MarkAtwood wants to merge 1 commit into
MarkAtwood wants to merge 1 commit into
Conversation
In a --enable-linuxkm build, the installed wolfssl/wolfcrypt/wc_port.h includes ../../linuxkm/linuxkm_wc_port.h and memory.h includes ../../linuxkm/linuxkm_memory.h. Neither file was installed, so an out-of-tree kernel module that includes wolfSSL headers from the install prefix failed with "No such file or directory". Install both under $(includedir)/linuxkm for linuxkm builds only.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The review identifies no active issues with the conditional installation of the Linux kernel module headers.
No open issues 🎉
What changed in this PR
This PR fixes missing installed headers for Linux kernel module builds, allowing out-of-tree modules to use wolfSSL headers from the install prefix.
Changes:
- Installs
linuxkm_memory.handlinuxkm_wc_port.hunder$(includedir)/linuxkm. - Limits installation to builds with
BUILD_LINUXKMenabled.
| File | Description |
|---|---|
linuxkm/include.am |
Conditionally installs the two Linux kernel headers required by public wolfSSL headers. |
Review effort: Balanced
|
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.
make installof a--enable-linuxkmbuild installswolfssl/wolfcrypt/wc_port.handmemory.h, which include../../linuxkm/linuxkm_wc_port.hand../../linuxkm/linuxkm_memory.h. Those two files were never installed, so an out-of-tree kernel module including wolfSSL headers from the install prefix fails to compile.Fix: install both under
$(includedir)/linuxkm, only whenBUILD_LINUXKMis set. Neither header includes any other wolfSSL-local file, so these two are the complete set.Reproduction (debian:trixie, linux-headers-6.12.116+deb13-amd64):
./configure --enable-linuxkm --with-linux-source=<headers>; FORCE_NO_MODULE_SIG=1 make install DESTDIR=D-I D/usr/local/include -DWOLFSSL_USE_OPTIONS_Hthat includeswolfssl/wolfcrypt/wc_port.handmemory.hfatal error: ../../linuxkm/linuxkm_wc_port.h: No such file or directoryhello.kobuilds.Not changed: bsdkm has the same include pattern (
../../bsdkm/bsdkm_wc_port.h) and likely the same gap; left out of scope, untested.