Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LKM does not compile #855

Closed
sergejzr opened this issue Jul 30, 2020 · 5 comments
Closed

LKM does not compile #855

sergejzr opened this issue Jul 30, 2020 · 5 comments

Comments

@sergejzr
Copy link

Expected Result
compilation

Actual Result
LD [M] /home/zerr/git/darling/src/external/lkm/darling-mach.o
CC [M] /home/zerr/git/darling/src/external/lkm/overlayfs/copy_up.o
/home/zerr/git/darling/src/external/lkm/overlayfs/copy_up.c: In function ‘ovl_copy_up_data’:
/home/zerr/git/darling/src/external/lkm/overlayfs/copy_up.c:142:11: error: too many arguments to function ‘do_clone_file_range’
cloned = do_clone_file_range(old_file, 0, new_file, 0, len, 0);
^~~~~~~~~~~~~~~~~~~
In file included from /home/zerr/git/darling/src/external/lkm/overlayfs/copy_up.c:8:
/usr/src/linux-headers-4.19.0-4-common/include/linux/fs.h:1842:12: note: declared here
extern int do_clone_file_range(struct file *file_in, loff_t pos_in,
^~~~~~~~~~~~~~~~~~~
make[8]: *** [/usr/src/linux-headers-4.19.0-4-common/scripts/Makefile.build:309: /home/zerr/git/darling/src/external/lkm/overlayfs/copy_up.o] Error 1
make[7]: *** [/usr/src/linux-headers-4.19.0-4-common/Makefile:1535: module/home/zerr/git/darling/src/external/lkm] Error 2
make[6]: *** [Makefile:146: sub-make] Error 2
make[5]: *** [Makefile:8: all] Error 2
make[5]: Leaving directory '/usr/src/linux-headers-4.19.0-4-amd64'
make[4]: *** [Makefile:346: default] Error 2
make[4]: Leaving directory '/home/zerr/git/darling/src/external/lkm'
make[3]: *** [src/external/lkm/CMakeFiles/lkm.dir/build.make:58: src/external/lkm/CMakeFiles/lkm] Error 2
make[2]: *** [CMakeFiles/Makefile2:56720: src/external/lkm/CMakeFiles/lkm.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:56727: src/external/lkm/CMakeFiles/lkm.dir/rule] Error 2
make: *** [Makefile:15712: lkm] Error 2

Steps To Reproduce
Followed the instructions
make lkm

dmesg Output
Run dmesg | grep 'overlay\|darling'

Put the command output here!

System Information
Debian 10

Software Version
Git Alpha: March 31, 2020
@HinTak
Copy link
Contributor

HinTak commented Jul 30, 2020

4.19 is too old. The lkm code was made to work for <5.4 only recently.
See this change:
darlinghq/darling-newlkm@8153f63

@sergejzr
Copy link
Author

Thanks! Is there a compiled binary already?

@HinTak
Copy link
Contributor

HinTak commented Jul 30, 2020

Kernel modules are always kernel-version specific... You'll need to upgrade to a more recent kernel (+ kernel headers + kernel-devel) first.

@caio-vinicius
Copy link

Same here, building on GCP. Unfortunately don't work on Linux # 4.19.0-10-cloud-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux

@facekapow
Copy link
Member

Closing due to kernel being too old

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

No branches or pull requests

4 participants