You are not logged in.
Hi,
TLDR
I am experiencing compilation issues for a driver, where the .ko files are generated, but modprobe rejects with Exec format error.
So far I suspect that this is a gcc 15.2.1 bug, potentially linked to kernel compilation flags.
This is why I am posting that here - potentially most knowledgeable people are here.
Just say if this topic should be in another location in forums.
DETAILS
The driver of interest is the Xilinx QDMA driver for PCIe FPGA boards.
In case it is useful, the webpage : https://xilinx.github.io/dma_ip_drivers … index.html
To ease experiments I created an AUR package that describes these issues. Because it _should_ work with the provided patches.
https://aur.archlinux.org/packages/xilinx-qdma-git
Current status is : compilation with the small patches finished, .ko files are generated and installed, but modprobe rejects these with the following error message :
modprobe: ERROR: could not insert 'qdma_pf': Exec format error
It is worth noting that compilation and link is done without warning. But the next step with the kernel objtool emits a large amount of such fishy warnings :
qdma-pf.o: warning: objtool: eqdma_cpm5_hw_desc_err_process() falls through to next function eqdma_cpm5_config_num_regs_get()
qdma-pf.o: warning: objtool: .eh_frame+0xa23c: data relocation to !ENDBR: eqdma_cpm5_dump_reg_info.cold+0x0
Searching internet, these warnings look similar to previous gcc bugs that are supposedly fixed already.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116174
To help with analysis, we could test on a machine with Ubuntu 24 and gcc 13.3.
Compilation and link and objtool go fine. Kernel modules are accepted by modprobe. And the PCIe board works \o/
Which indicates the current toolchain in Archlinux has some sort of a problem.
I tried with gcc 14, but I am hitting unsupported compilation options that are set by the kernel Makefiles.
Digging in the kernel build Makefiles I could find how to add custom options, but not how to remove options event for dirty experiment purposes.
REPRODUCER
I took the effort and created a small reproducer that emits these warnings, with the minimal set of compilation flags that generates the exact same warnings.
Here is an archive in a public cloud (tar.gz, 1.5 kB) :
https://cloud.univ-grenoble-alpes.fr/s/PP5KdEFQwRGn3RN
The warnings at objtool step :
main_ld.o: warning: objtool: func2() falls through to next function func1()
main_ld.o: warning: objtool: func1() falls through to next function process()
Remove any option from CFLAGS (except first line) and objtool messages change
The warnings disappear if that option is removed : -fno-plt
I don't know what that option does and obviously I cant test the phony generated object.
But I would like to test if the QDMA driver would work if only could remove that option from compilation flags.
Any advice how I could do that ?
Could it be a gcc bug ?
Thanks for your time :-)
Last edited by marzoul (Yesterday 09:25:57)
Offline
I am experiencing compilation issues for a driver, where the .ko files are generated, but modprobe rejects with Exec format error.
I built modules with `make` in dma_ip_drivers/QDMA/linux-kernel/ and inserted qdma_pf.ko with no problem:
[78212.904378] qdma_pf: loading out-of-tree module taints kernel.
[78212.904432] qdma_pf: module verification failed: signature and/or required key missing - tainting kernel
[78212.964898] qdma_pf:qdma_mod_init: Xilinx QDMA PF Reference Driver v2024.1.0.0.gcc (GCC) 15.2.1 20260209
linux-6.19.11-arch1-1
Are you sure you are trying to insert module into the same kernel as it is built for?
Offline
Thank you for your answer.
I have same version of gcc, but not of linux :
gcc (GCC) 15.2.1 20260209
6.19.10.arch1-1
Maybe some changes were made in latest linux package for better compatibility with gcc 15.2.1.
I'll update when the machine is available.
Offline
I built modules with `make` in dma_ip_drivers/QDMA/linux-kernel/ and inserted qdma_pf.ko with no problem:
After system update and reboot just to be sure, I re-confirm the compilation with makepkg is broken on at least 2 machines. Same Archlinux system, no dubious config.
gcc (GCC) 15.2.1 20260209
6.19.11-arch1-1 x86_64
You said that you just did make in directory linux-kernel.
I tried that to be sure (with patches from my AUR package) : it works !
So that seems to be a good temporary fallback.
I'll try to dig in the makepkg CFLAGS to check what is causing all this trouble.
Offline
I'll try to dig in the makepkg CFLAGS to check what is causing all this trouble.
I'd suggest to create DKMS package for kernel modules. Without DKMS, besides CFLAGS and other possible pitfalls of compiling by makepkg, you'll need to manually rebuild package after every kernel upgrade.
Last edited by dimich (Yesterday 19:19:39)
Offline