On Thu, Jun 9, 2022 at 3:39 AM Mauro Moltrasio <mmoltras@xxxxxxxxxx> wrote: > > Hi everyone, > > I'm new here so I'm sorry if this is not the right place to ask about this. > > I'm trying to build a kernel module based on this repo https://github.com/stackrox/falcosecurity-libs/tree/master/driver using the kernel header files for: > - 5.18.2-201.fc36.x86_64 > - 5.18.2-200.fc36.x86_64 > - 5.18.1-200.fc36.x86_64 > - 5.18.0-60.fc37.x86_64 Kernel-headers is somewhat misleading, The kernel-headers package is specifically for userspace, kernel-devel is the package required for building modules, but I assume that is what you are referring to since I never build kernel-headers for 5.18.1 or newer. > In all of them I'm getting an error like this: > ERROR: modpost: "cc_mkenc" [/scratch/module-src/1.1.0/collector.ko] undefined! > make[2]: *** [scripts/Makefile.modpost:134: /scratch/module-src/1.1.0/Module.symvers] Error 1 > make[2]: *** Deleting file '/scratch/module-src/1.1.0/Module.symvers' > make[1]: *** [Makefile:1753: modules] Error 2 > make: *** [Makefile:16: all] Error 2 > > I think I've narrowed it down to the cc_mkenc function being defined in the kernel files but not exported: https://github.com/torvalds/linux/blob/6bfb56e93bcef41859c2d5ab234ffd80b691be35/arch/x86/coco/core.c#L99-L116 > > Does anyone know if this is something I'm only getting? Is there a work around to get these builds working again? This was introduced in 5.18, and it would appear the cc_mkdec was exported as part of the API, but the cc_mkenc was not as there was no need with in tree code: https://github.com/torvalds/linux/commit/b577f542f93cbba57f8d6185ef1fb13a41ddf162 The path forward would require either a change in the out of tree module, or a patch to upstream to export the cc_mkenc. This might take some convincing. Justin _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure