fbelavenuto Posted January 20 Share #1 Posted January 20 Hi guys, I'm having a problem with a module. When trying to load the kernel it complains about a missing symbol, but it exists!: DiskStation> modprobe sync_file [ 57.291977] sync_file: Unknown symbol anon_inode_getfile (err 0) modprobe: ERROR: could not insert 'sync_file': Unknown symbol in module, or unknown parameter (see dmesg) DiskStation> grep anon_inode_getfile /proc/kallsyms ffffffff811d07d0 T anon_inode_getfile It exists in Module.symvers: $ grep anon_inode_getfile Module.symvers 0x00000000 anon_inode_getfile vmlinux EXPORT_SYMBOL_GPL So I ask for help from those more experienced in linux. Quote Link to comment Share on other sites More sharing options...
Orphée Posted January 20 Share #2 Posted January 20 I'm feeling a "déjà-vu" : Quote Link to comment Share on other sites More sharing options...
fbelavenuto Posted January 20 Author Share #3 Posted January 20 4 hours ago, Orphée said: I'm feeling a "déjà-vu" : I'm sorry I hadn't seen your post! I am trying to compile i915 for broadwell. Source code is latest from Synology (linux-4.4.x.txz) Quote Link to comment Share on other sites More sharing options...
Orphée Posted January 20 Share #4 Posted January 20 15 minutes ago, fbelavenuto said: I'm sorry I hadn't seen your post! I am trying to compile i915 for broadwell. Source code is latest from Synology (linux-4.4.x.txz) Good luck, I'm currently stuck at the point in my topic above. If you succeed, please tell me 1 Quote Link to comment Share on other sites More sharing options...
fbelavenuto Posted Friday at 05:30 PM Author Share #5 Posted Friday at 05:30 PM On 1/20/2023 at 11:09 AM, Orphée said: Good luck, I'm currently stuck at the point in my topic above. If you succeed, please tell me Found a solution!! The symbol "anon_inode getfile" is called in the file "drivers/dma-buf/sync_file.c". This file was not created to be compiled as a module, so it does not link with existing symbols. To resolve this, add the following line to this file, next to "#includes": Quote #include <linux/module.h> Then add at the end of the file: Quote MODULE_LICENSE("GPL"); Once done, the file will be compiled as a GPL module and can be linked with any other kernel symbol. 1 Quote Link to comment Share on other sites More sharing options...
Orphée Posted Friday at 09:38 PM Share #6 Posted Friday at 09:38 PM 4 hours ago, fbelavenuto said: Found a solution!! The symbol "anon_inode getfile" is called in the file "drivers/dma-buf/sync_file.c". This file was not created to be compiled as a module, so it does not link with existing symbols. To resolve this, add the following line to this file, next to "#includes": Then add at the end of the file: Once done, the file will be compiled as a GPL module and can be linked with any other kernel symbol. Well played, were you able to build everything ? did you try to build trace_events.ko ? Quote Link to comment Share on other sites More sharing options...
fbelavenuto Posted Friday at 11:27 PM Author Share #7 Posted Friday at 11:27 PM 1 hour ago, Orphée said: Well played, were you able to build everything ? did you try to build trace_events.ko ? I built everything, but I got a KP! Quote Link to comment Share on other sites More sharing options...
Orphée Posted Friday at 11:45 PM Share #8 Posted Friday at 11:45 PM well I'm curious to know how you did Quote Link to comment Share on other sites More sharing options...
fbelavenuto Posted Monday at 11:29 AM Author Share #9 Posted Monday at 11:29 AM On 1/27/2023 at 8:45 PM, Orphée said: well I'm curious to know how you did I've put tests in a separate branch: https://github.com/fbelavenuto/arpl-modules/tree/test-i915 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.