Home
last modified time | relevance | path

Searched full:binder (Results 1 – 25 of 25) sorted by relevance

/linux/Documentation/admin-guide/
H A Dbinderfs.rst6 Android binderfs is a filesystem for the Android binder IPC mechanism. It
7 allows to dynamically add and remove binder devices at runtime. Binder devices
8 located in a new binderfs instance are independent of binder devices located in
10 to get a set of private binder devices.
18 mount -t binder binder /dev/binderfs
21 In a fresh instance of binderfs no binder devices will be present. There will
22 only be a ``binder-control`` device which serves as the request handler for
31 binderfs instances can be mounted with a limit on the number of binder
34 of binder devices can be allocated in this binderfs instance.
37 Using ``stats=global`` enables global binder statistics.
[all …]
/linux/tools/testing/selftests/filesystems/binderfs/
H A Dbinderfs_test.c21 #include <linux/android/binder.h>
79 ret = mount(NULL, binderfs_mntpt, "binder", 0, 0); in __do_binderfs_test()
89 memcpy(device.name, "my-binder", strlen("my-binder")); in __do_binderfs_test()
91 snprintf(device_path, sizeof(device_path), "%s/binder-control", binderfs_mntpt); in __do_binderfs_test()
94 TH_LOG("%s - Failed to open binder-control device", in __do_binderfs_test()
104 TH_LOG("%s - Failed to allocate new binder device", in __do_binderfs_test()
109 TH_LOG("Allocated new binder device with major %d, minor %d, and name %s", in __do_binderfs_test()
112 /* success: binder device allocation */ in __do_binderfs_test()
114 snprintf(device_path, sizeof(device_path), "%s/my-binder", binderfs_mntpt); in __do_binderfs_test()
117 TH_LOG("%s - Failed to open my-binder device", in __do_binderfs_test()
[all …]
/linux/samples/binderfs/
H A Dbinderfs_example.c15 #include <linux/android/binder.h>
44 ret = mount(NULL, "/dev/binderfs", "binder", 0, 0); in main()
51 memcpy(device.name, "my-binder", strlen("my-binder")); in main()
53 fd = open("/dev/binderfs/binder-control", O_RDONLY | O_CLOEXEC); in main()
55 fprintf(stderr, "%s - Failed to open binder-control device\n", in main()
65 fprintf(stderr, "%s - Failed to allocate new binder device\n", in main()
70 printf("Allocated new binder device with major %d, minor %d, and name %s\n", in main()
73 ret = unlink("/dev/binderfs/my-binder"); in main()
75 fprintf(stderr, "%s - Failed to delete binder device\n", in main()
/linux/include/uapi/linux/android/
H A Dbinderfs.h10 #include <linux/android/binder.h>
17 * struct binderfs_device - retrieve information about a new binder device
18 * @name: the name to use for the new binderfs binder device
19 * @major: major number allocated for binderfs binder devices
20 * @minor: minor number allocated for the new binderfs binder device
30 * Allocate a new binder device.
/linux/drivers/android/
H A Dbinder_alloc.h16 #include <uapi/linux/android/binder.h>
21 * struct binder_buffer - buffer used for binder transactions
39 * Bookkeeping structure for binder transaction buffers
61 * struct binder_shrinker_mdata - binder metadata used to reclaim pages
82 * struct binder_alloc - per-binder proc state for binder allocator
97 * @mapped: whether the vm area is mapped, each binder instance is
102 * Bookkeeping structure for per-proc address space management for binder
H A Dbinderfs.c32 #include <uapi/linux/android/binder.h>
106 * function will stash a struct binder_device for the specific binder
213 * binder_ctl_ioctl - handle binder device node allocation requests
214 * @file: The file pointer for the binder-control device node.
218 * The request handler for the binder-control device. All requests operate on
219 * the binderfs mount the binder-control device resides in:
221 * Allocate a new binder device.
377 * binderfs_binder_ctl_create - create a new binder-control device
380 * This function creates a new binder-control device node in the binderfs mount
432 dentry = d_alloc_name(root, "binder-control"); in binderfs_binder_ctl_create()
[all …]
H A Dbinder_alloc.c633 * binder_alloc_new_buf() - Allocate a new binder buffer
795 * @buffer: binder buffer to be accessed
829 * @buffer: binder buffer to be cleared
854 * binder_alloc_free_buf() - free a binder buffer
887 * vma for allocating binder buffers
1250 * new binder proc
1265 binder_shrinker = shrinker_alloc(0, "android-binder"); in binder_alloc_shrinker_init()
1288 * @buffer: binder buffer to be accessed
1320 * @buffer: binder buffer to be accessed
H A Dbinder.c2 /* binder.c
73 #include <uapi/linux/android/binder.h>
667 * a thread that called into (e)poll is handling non-binder in binder_wakeup_thread_ilocked()
745 binder_uintptr_t ptr = fp ? fp->binder : 0; in binder_init_node_ilocked()
1569 * @t: binder transaction for t->from
1591 * @t: binder transaction for t->from
1624 * @t: binder transaction for t->from
1772 * Copy the binder object at the given offset into @object. If @u is
1984 * function if there is a chance that binder's own file descriptor
2072 node = binder_get_node(proc, fp->binder); in binder_transaction_buffer_release()
[all …]
/linux/drivers/android/binder/
H A Drust_binder_main.rs5 //! Binder -- the Android IPC mechanism.
88 description: "Android Binder",
98 /// Provides a single place to write Binder return values via the
289 pr_warn!("Loaded Rust Binder."); in init()
291 BINDER_SHRINKER.register(kernel::c_str!("android-binder"))?; in init()
366 // SAFETY: The `rust_binderfs.c` file ensures that `device->ctx` holds a binder context when in rust_binder_open()
367 // using the rust binder fops. in rust_binder_open()
377 // SAFETY: This is an `inode` for a newly created binder file. in rust_binder_open()
384 // SAFETY: This file is associated with Rust binder, so we own the `private_data` field. in rust_binder_open()
534 seq_print!(m, "binder transactions:\n"); in rust_binder_transactions_show_impl()
[all …]
H A Drust_binderfs.c33 #include <uapi/linux/android/binder.h>
106 * function will stash a struct binder_device for the specific binder
208 * binder_ctl_ioctl - handle binder device node allocation requests
210 * The request handler for the binder-control device. All requests operate on
211 * the binderfs mount the binder-control device resides in:
213 * Allocate a new binder device.
257 /* ctx is null for binder-control, but this function ignores null pointers */ in binderfs_evict_inode()
368 * binderfs_binder_ctl_create - create a new binder-control device
371 * This function creates a new binder-control device node in the binderfs mount
394 /* If we have already created a binder-control node, return. */ in binderfs_binder_ctl_create()
[all …]
H A Dprocess.rs5 //! This module defines the `Process` type, which represents a process using a particular binder
8 //! The `Process` object keeps track of all of the resources that this process owns in the binder
11 //! There is one `Process` object for each binder fd that a process has opened, so processes using
12 //! several binder contexts have several `Process` objects. This ensures that the contexts are
128 /// Process is frozen and unable to service binder transactions.
199 // a thread that called into (e)poll is handling non-binder in push_work()
421 /// A process using binder.
423 /// Strictly speaking, there can be multiple of these per process. There is one for each binder fd
424 /// that a process has opened, so processes using several binder contexts have several `Process`
640 seq_print!(m, " has delivered dead binder\n"); in debug_print()
[all …]
H A Dthread.rs6 //! binder.
408 /// This represents a thread that's used with binder.
651 BinderObjectRef::Binder(obj) => { in translate_object()
653 // SAFETY: `binder` is a `binder_uintptr_t`; any bit pattern is a valid in translate_object()
655 let ptr = unsafe { obj.__bindgen_anon_1.binder } as _; in translate_object()
681 // SAFETY: The binder driver never calls `fdget_pos` and this code runs from an in translate_object()
840 // SAFETY: The binder driver never calls `fdget_pos` and this code runs from an in translate_object()
H A Dnode.rs150 /// The binder driver guarantees that oneway transactions sent to the same node are serialized,
313 /// An id that is unique across all binder nodes on the system. Used as the key in the
1121 seq_print!(m, "{}has cleared dead binder\n", prefix); in debug_print()
1123 seq_print!(m, "{}has dead binder\n", prefix); in debug_print()
H A Dfreeze.rs151 seq_print!(m, "{}has frozen binder\n", prefix); in debug_print()
/linux/rust/bindings/
H A Dbindings_helper.h148 #include "../../drivers/android/binder/rust_binder.h"
149 #include "../../drivers/android/binder/rust_binder_events.h"
150 #include "../../drivers/android/binder/page_range_helper.h"
/linux/rust/helpers/
H A Dhelpers.c13 #include "binder.c"
/linux/drivers/android/tests/
H A Dbinder_alloc_kunit.c3 * Test cases for binder allocator code.
523 kunit_err(test, "Failed to open binder alloc test driver file\n"); in binder_alloc_test_init()
571 MODULE_DESCRIPTION("Binder Alloc KUnit tests");
/linux/drivers/vfio/platform/
H A Dvfio_platform_private.h58 * These fields should be filled by the bus specific binder
/linux/security/selinux/include/
H A Dclassmap.h135 { "binder",
/linux/security/
H A Dsecurity.c480 * security_binder_set_context_mgr() - Check if becoming binder ctx mgr is ok
481 * @mgr: task credentials of current binder process
483 * Check whether @mgr is allowed to be the binder context manager.
493 * security_binder_transaction() - Check if a binder transaction is allowed
497 * Check whether @from is allowed to invoke a binder transaction call to @to.
508 * security_binder_transfer_binder() - Check if a binder transfer is allowed
512 * Check whether @from is allowed to transfer a binder reference to @to.
523 * security_binder_transfer_file() - Check if a binder file xfer is allowed
/linux/tools/testing/selftests/filesystems/statmount/
H A Dstatmount_test.c20 "autofs", "bcachefs", "bdev", "befs", "bfs", "binder", "binfmt_misc",
/linux/arch/arc/mm/
H A Dtlb.c190 * (Android Binder ended up calling this for vma->mm != tsk->mm, in local_flush_tlb_mm()
/linux/rust/syn/
H A Dgenerics.rs874 let msg = "`for<...>` binder not allowed with `?` trait polarity modifier"; in do_parse()
/linux/security/selinux/
H A Dhooks.c745 !strcmp(sb->s_type->name, "binder") || in selinux_set_mnt_opts()
7074 /* This function will check the file pass through unix socket or binder to see
/linux/
H A DMAINTAINERS1832 F: Documentation/netlink/specs/binder.yaml