A reworked BPF API
A reworked BPF API
Posted Jul 24, 2014 2:37 UTC (Thu) by neilbrown (subscriber, #359)Parent article: A reworked BPF API
binder doesn't use fds, but it has similar numeric handles not unlike the "watch descriptors" that inotify uses.
A "binder_buffer" (which holds a message) contains some data and then some "offsets".
The "offsets" are references into the data part of the buffer where "flat_binder_object"s are stored, which contain a type, some flags and an object identifier.
Based on the the type, some transformation is performed on the object identifier to convert between "remote" and "local" references. (see switch (fp->type) in binder_transaction()).
This is much the same as converting between kernel-internal pointers and user-space fd numbers.
Posted Jul 24, 2014 20:28 UTC (Thu)
by samroberts (subscriber, #46749)
[Link]
A reworked BPF API