Compatibility with kernels >= 5.7 by choff · Pull Request #76 · anbox/anbox-modules
added 3 commits
March 8, 2021 20:19On kernel 5.7 and later, kallsyms_lookup_name() can no longer be called from a kernel module for reasons described here: https://lwn.net/Articles/813350/ As binder really needs to use kallsysms_lookup_name() to access some kernel functions that otherwise wouldn't be accessible, KProbes are used on later kernels to get the address of kallsysms_lookup_name(). The function is afterwards used just as before. This is a very dirty hack though and the much better solution would be if all the functions that are currently resolved with kallsysms_lookup_name() would get an EXPORT_SYMBOL() annotation to make them directly accessible to kernel modules.
With the commit 64fe66e8a95e in the Linux kernel, the member "mmap_sem" in the struct mm_struct was renamed to "mmap_lock". This patch fixes the resulting compile errors.
choff
mentioned this pull request
Over the last years, many fixes and changes have been applied to Binder in the Linux kernel, but these fixes were never backported to anbox-modules. The meant that the version of Binder in anbox-modules was very outdated. With this commit, Binder has been update to the latest state from the Linux kernel. This should also fix the compile on kernel 5.12 and later.
Linux 5.15.2 updated security.h security_binder_* functions (like security_binder_transfer_binder(), so it uses struct cred* instead of struct task_struct*)
* Use shrinker pointer instead of shrink struct for 6.7+, due to the `shrinker_alloc` function always return the pointer. * Most of the codes are stolen from drivers/android/binder_alloc.c
* removed obsolete name="%k", added binder symlink * removed obsolete name="%k", added binder symlink
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters