Commit Graph

57 Commits

Author SHA1 Message Date
Alexandru Pirvulescu ee4c25f064 fix creation of all 3 anbox modules symlinks: anbox-binder anbox-hwbinder anbox-vndbinder 2024-05-26 20:10:21 +02:00
Puspendu Banerjee 2c06452251 updated doc to update changelog from git commits 2024-04-02 06:50:21 +02:00
Puspendu Banerjee dcd52bf298 Added packaging guide and compat fix
Added packaging guide and compat fix
2024-04-02 06:50:21 +02:00
Puspendu Banerjee b558310e0a removed obsolete name="%k", added binder symlink (#1)
* removed obsolete name="%k", added binder symlink

* removed obsolete name="%k", added binder symlink
2024-04-02 06:36:09 +02:00
ssfdust 44e5ba79f5 Fixes for kernel 6.8 2024-02-10 08:49:38 +01:00
ssfdust 13a93a4f7c Fix for kernel 6.7+
* 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
2024-01-13 21:57:08 +01:00
musover 084d19950a Added conditional matching for kernels >= 6.3.0 2023-12-03 22:42:07 +01:00
musover 41fe6db44a Fix build for 6.6 2023-12-03 22:42:07 +01:00
Zhang Hua 205c8037e6 Fix build for kernel 6.6
See also: 278832b81c
This results to a build failure on 6.6 kernel
without this commit.
2023-11-01 15:59:10 +01:00
TheSola10 abead1debf Fixes for kernel 6.3+ 2023-06-18 16:49:05 +02:00
@Kumar 44dc351409 Update README.md 2023-04-18 08:47:17 +02:00
SonarBeserk ae26ba25ac Create UNINSTALL.sh script and update README.md 2023-02-25 09:00:20 +01:00
munix9 a961389cd7 fix for kernel 6.1 2023-01-30 14:55:12 +01:00
Zhang Hua ab8278c603 Add TASK_FREEZABLE
See f5d39b0208 (diff-dc675d837f5054b5e96c5fc9fcb77ad08b94607f88b692930132614aa83613b2)
2023-01-29 09:16:20 +01:00
Noob Zhang 42335c65bc Fix build on 6.1 kernel
See f5d39b0208 for more info.
2023-01-29 09:16:20 +01:00
zhanghua000 cd66055f6d Fix build on 6.0 kernel 2022-10-28 15:22:16 +02:00
TheSola10 2325d6fe45 Fixed page fault by matching in-tree binder behavior 2022-09-11 19:24:41 +02:00
TheSola10 68444958fe Patches for kernel 5.19 2022-09-11 19:24:41 +02:00
Etaash Mathamsetty 2699623c48 patches for 5.18 kernel 2022-07-17 20:05:49 +02:00
Dhiego Cassiano Fogaça Barbosa 8148a16275 sync with android binder.c 2021-11-29 08:05:31 +01:00
Dhiego Cassiano Fogaça Barbosa b0c3c5a7c9 compilation fix for kernel 5.15.2
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*)
2021-11-29 08:05:31 +01:00
Christian Hoff 516144c6a0 Compile fixes for kernels 5.11, 5.12 & 5.13 2021-10-29 17:50:10 +02:00
Christian Hoff 0338a34979 Update binder to the latest version
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.
2021-09-26 18:54:51 +02:00
Christian Hoff 6ddae19459 Another compile fix for kernel >= 5.8
With kernel 5.8, the return value of map_kernel_range_noflush()
was changed. This function now returns 0 on success (instead of
the number of successfully mapped pages).

This commit adjusts binder accordingly.
2021-03-08 21:23:59 +01:00
Christian Hoff 443f984b1a Compile fixes for kernel >= 5.8
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.
2021-03-08 20:44:14 +01:00
Christian Hoff 4af9d5d591 Fix compilation of binder and ashmem on kernel 5.7 and later
On 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.
2021-03-08 20:19:16 +01:00
Simon Fels 98f0f3b3b1
Merge pull request #43 from pevik/kernel-v5.4
travis: Add kernel v5.4
2020-06-14 10:15:28 +02:00
Simon Fels 8f3d8b9235
Merge pull request #45 from devhammed/feat/add_script_that_automates_install_steps
feat: add script that automates install steps
2020-06-14 10:15:07 +02:00
Hammed Oyedele c9fe3e7d23
docs: describe the purpose of the INSTALL.sh 2020-03-04 10:25:36 +01:00
Hammed Oyedele 083cc573b6
feat: add script that automates install steps 2020-03-04 10:23:32 +01:00
Petr Vorel b9cd224b48 travis: Add kernel v5.4
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
2020-01-01 20:29:30 +01:00
Simon Fels e0a237e571
Merge pull request #38 from bentolor/fix/kernel-5.3
Add KVER=5.2 and KVER=5.3 to travis configuration
2019-11-14 15:13:46 -08:00
Benjamin Schmid 6ebb94b78a Add KVER=5.2 and KVER=5.3 to travis configuration 2019-10-29 12:12:20 +01:00
Simon Fels 816dd4d6e7
Merge pull request #19 from 86423355844265459587182778/master
Fix compilation on kernels >= 5.1
2019-07-13 11:32:21 +02:00
Anonymous 85d3854719 Update Travis configuration 2019-07-04 19:02:11 +09:00
Anonymous 2dc5e2e70a Update Travis configuration 2019-07-04 18:54:57 +09:00
Anonymous 0b96354396 Update Travis configuration 2019-07-04 18:44:11 +09:00
Anonymous c0518e945d Update Travis configuration to use GCC 8 2019-07-04 18:37:54 +09:00
Anonymous ec5b60a231 Add KVER=5.0 and KVER=5.1 to travis configuration 2019-06-04 15:43:43 +09:00
Anonymous ae35b8da22 Fix compilation on kernels >= 5.1 2019-05-12 12:45:44 +09:00
Simon Fels 27fd47e11e
Merge pull request #10 from mkhon/linux-3.10
Fix build on vzkernel 3.10
2018-09-08 14:57:43 +02:00
Max Khon 67172ec4bd Fix build on vzkernel 3.10 2018-09-06 07:30:17 -04:00
Simon Fels bb8a4c9972 Update changelog for release 12 and 13 2018-09-02 13:45:47 +02:00
Simon Fels 5061f6e5cb
Merge pull request #9 from morphis/fix-sigbus-with-newer-kernels
staging: ashmem: Fix SIGBUS crash when traversing mmaped ashmem pages
2018-09-02 12:20:21 +02:00
Simon Fels 0e31fc5ec5 ashmem: account for older kernel which don't have vma_set_anonymous
Was first introduced in 4.18 and needs to be called from ashmem when
running with a kernel >= 4.18.
2018-09-02 12:11:35 +02:00
John Stultz 0391d4fe2f staging: ashmem: Fix SIGBUS crash when traversing mmaped ashmem pages
Amit Pundir and Youling in parallel reported crashes with recent
mainline kernels running Android:

  F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
  F DEBUG   : Build fingerprint: 'Android/db410c32_only/db410c32_only:Q/OC-MR1/102:userdebug/test-key
  F DEBUG   : Revision: '0'
  F DEBUG   : ABI: 'arm'
  F DEBUG   : pid: 2261, tid: 2261, name: zygote  >>> zygote <<<
  F DEBUG   : signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0xec00008
  ... <snip> ...
  F DEBUG   : backtrace:
  F DEBUG   :     #00 pc 00001c04  /system/lib/libc.so (memset+48)
  F DEBUG   :     #01 pc 0010c513  /system/lib/libart.so (create_mspace_with_base+82)
  F DEBUG   :     #02 pc 0015c601  /system/lib/libart.so (art::gc::space::DlMallocSpace::CreateMspace(void*, unsigned int, unsigned int)+40)
  F DEBUG   :     #03 pc 0015c3ed  /system/lib/libart.so (art::gc::space::DlMallocSpace::CreateFromMemMap(art::MemMap*, std::__1::basic_string<char, std::__ 1::char_traits<char>, std::__1::allocator<char>> const&, unsigned int, unsigned int, unsigned int, unsigned int, bool)+36)
  ...

This was bisected back to commit bfd40eaff5ab ("mm: fix
vma_is_anonymous() false-positives").

create_mspace_with_base() in the trace above, utilizes ashmem, and with
ashmem, for shared mappings we use shmem_zero_setup(), which sets the
vma->vm_ops to &shmem_vm_ops.  But for private ashmem mappings nothing
sets the vma->vm_ops.

Looking at the problematic patch, it seems to add a requirement that one
call vma_set_anonymous() on a vma, otherwise the dummy_vm_ops will be
used.  Using the dummy_vm_ops seem to triggger SIGBUS when traversing
unmapped pages.

Thus, this patch adds a call to vma_set_anonymous() for ashmem private
mappings and seems to avoid the reported problem.

Fixes: bfd40eaff5ab ("mm: fix vma_is_anonymous() false-positives")
Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Joel Fernandes <joelaf@google.com>
Cc: Colin Cross <ccross@google.com>
Cc: Matthew Wilcox <willy@infradead.org>
Reported-by: Amit Pundir <amit.pundir@linaro.org>
Reported-by: Youling 257 <youling257@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-09-02 11:40:16 +02:00
Simon Fels 2a5ea7c88b
Merge pull request #5 from megies/patch-1
Fix modprobe call in README
2018-07-13 08:04:06 +02:00
Tobias Megies 1049f488ff
Update README.md
built module name for binder was not correct.. so the modprobe command needs changing compare c0c9d8f5d5/ashmem/dkms.conf (L5)
2018-07-12 15:38:08 +02:00
Simon Fels c0c9d8f5d5
Merge pull request #3 from zhsj/add-install-doc
add install instruction
2018-06-23 14:21:13 +02:00
Shengjing Zhu 7c5c2226b8 add install instruction
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-06-22 22:50:18 +08:00