Skip to content

linuxkm: install headers needed by installed wolfssl headers - #12122

Open
MarkAtwood wants to merge 1 commit into
wolfSSL:masterfrom
MarkAtwood:linuxkm-install-headers
Open

MarkAtwood wants to merge 1 commit into
wolfSSL:masterfrom
MarkAtwood:linuxkm-install-headers

Conversation

@MarkAtwood

Copy link
Copy Markdown
Contributor

make install of a --enable-linuxkm build installs wolfssl/wolfcrypt/wc_port.h and memory.h, which include ../../linuxkm/linuxkm_wc_port.h and ../../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 when BUILD_LINUXKM is 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
  • build a minimal kbuild module with -I D/usr/local/include -DWOLFSSL_USE_OPTIONS_H that includes wolfssl/wolfcrypt/wc_port.h and memory.h
  • master: fatal error: ../../linuxkm/linuxkm_wc_port.h: No such file or directory
  • with this change: hello.ko builds.

Not changed: bsdkm has the same include pattern (../../bsdkm/bsdkm_wc_port.h) and likely the same gap; left out of scope, untested.

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.
Copilot AI balanced review requested due to automatic review settings November 13, 2026 04:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.h and linuxkm_wc_port.h under $(includedir)/linuxkm.
  • Limits installation to builds with BUILD_LINUXKM enabled.
File Description
linuxkm/​include.am Conditionally installs the two Linux kernel headers required by public wolfSSL headers.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

zephyr-frdm_rw612

  • FLASH: datas +16 B, log_const_area -8 B, rodata +36 B, text +11,664 B (+4.1%, 294,172 B / 67,108,864 B, total: 0% used)
  • RAM: bss +49 B, datas +16 B (+0.1%, 58,423 B / 983,040 B, total: 6% used)

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

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.

2 participants