So, I am writing a module, that is working in kernel space. My code compiles correctly and works correctly.
The thing is that there are some header files, which I couldn't find anywhere. That doesn't make sense to me, how come everything goes right when header files are not present. They must be present somewhere.
These are some of header files I couldn't find anywhere (there are more, but for my question, they may be enough):
#include <asm/errno.h> #include <asm/socket.h> /* /include/linux/socket.h */ #include <stdarg.h> /* /include/linux/kernel.h */ #include <asm/types.h> #include <asm/mmiowb.h> /* /include/linux/spinlock.h */ #include <asm/param.h> /* /include/linux/jiffies.h */
Though some of header files can be found on architectures other than
but I don't think that's any solution to the question.
And I don't have any idea where to look for these files:
#include <generated/timeconst.h> /* /include/linux/jiffies.h */ #include <generated/bounds.h> #include <generated/autoconf.h> /* /include/linux/kconfig.h */ #include <generated/asm-offsets.h>
I am looking for these files in the following directories from linux kernel 5.4.31:
/include /include/uapi /arch/x86/include /arch/x86/include/uapi
I expect the files to be found in the above include paths. But I don't know much about where and how linux header files are processed after compilation, since I'm finding for them in the source code.