| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Bug: 302723053
Test: mma
Change-Id: Id68a10a491e3db7f27ea2cbf843078544bb0ab85
|
| |
|
|
|
|
|
|
|
|
| |
Add a new BINDER_WITH_KERNEL_IPC macro to enable all code that
uses IPCThreadState or ProcessState. This macro is defined for
Android libbinder but left out for non-Android builds.
Bug: 224644083
Test: m
Change-Id: I622757fcc0f9885dbf271c0ffa84c54938d50774
|
| |
|
|
|
|
|
| |
Bug: N/A
Test: boot, binder_parcel_fuzzer, binderClearBuf test
Merged-In: I5c7d40334057cf8f91b64e2fea7809933565820d
Change-Id: I5c7d40334057cf8f91b64e2fea7809933565820d
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Minimal-ish change for basic binder RPC.
This enables binder to work over sockets. The main change to core code
is in 'Parcel' and 'BpBinder'. The Parcel format is now associated with
the binder that it is either for or a reply from (we no longer have
binder 'objects' for the kernel). BpBinder is extended to support
talking over sockets (ideally, this would be a subclass, but
IBinder::localBinder/remoteBinder mean there is a lot of code which
presupposes what type of binder we have).
In addition, we have a few new objects:
- RpcServer - set this up to serve a connection
- RpcConnection - symmetrical object handling dispatch to a known
server/client
- RpcAddress - (this will definitely change) randomly generated
addresses - this might include things like host VM context, ip
address, or similar in the future. In that case, the address
generation should be cryptographically secure.
- RpcState - this keeps track of known binders, their refcounts, and
async transactions, and it understand the binder socket wire
protocol
The connection itself looks like N socket accepts to a server (the
server might have M socket accepts back to the client for symmetrical
connections, that is connections which need more than nested
transactions). The number of these socket connections controls how many
synchronous transactions can be made. Wherever possible, the behavior
here seeks to mimick the binder driver, and some differences are
documented in the code.
After this CL merges, the future work I intend on completing includes:
- support to work over vsock
- performance benchmarking
- optimization of the socket code here (may include delaying refcounts)
- support to pass 'transitive' binders (pass a binder from one service
to a different service, to let it setup a new connection). This task
may be excluded from my efforts as a security hedge if I can manage.
- fuzzer for this wire format
- support for linkToDeath
- support for transaction encryption
- support for promoting from a weak pointer
- handling SIGPIPE for dead connections
- and many more! :)
Bug: 167966510
Test: binderRpcTest
Change-Id: I276c6e312f584b57f4e7a14389ea4a1d63cfa2f4
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is all an implementation detail for TextOutput which we want to
delete anyway. Since I'm working on binder sockets (and I don't want to
expand the usage of alog), I might add some other functions here, which
I don't want to expose from libbinder.
Bug: 148676615
Bug: 167966510
Test: N/A
Change-Id: Id5677c9ac195dac046becc5d36b02bbdd1f7c339
|
| |
|
|
|
|
|
|
| |
Fixes: 173657790
Test: adb shell su root service call SurfaceFlinger 1033 i32 31 & check
libbinder does not crash
Change-Id: I35610b54ff45d5f5a18d3cf364717c54d1739c83
|
| |
|
|
|
|
|
| |
Bug: 162909698
Test: m libbinder
Change-Id: I63ec0e57166a97711d254156bde04ffe155465a5
|
| |
|
|
|
|
|
| |
Bug: N/A
Test: build w/o -Wno-c++98-compat-extra-semi
Merged-In: I632d6df9a03485e547a6e7f14df0f1c068066c1e
Change-Id: I632d6df9a03485e547a6e7f14df0f1c068066c1e
|
| |
|
|
|
|
|
|
|
|
|
| |
If we have fewer bytes left in the buffer than
the output alignment, we would read out of bounds
and output (partially) incorrect data.
Test: debug output is correct
(cherry picked from commit 0d9dda2b69c47707e9fdf39d68b04b8edf5623ef)
Bug: 129785390
Change-Id: I66913c58295ccd8e1955a73a17f6eed45ca6cd1e
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes -Wzero-as-null-pointer-constant warning.
clang-tidy -checks=modernize-use-nullptr -p compile_commands.json -fix
...
Test: m
Bug: 68236239
Change-Id: I3181bc5683796423a98b0f9b94daf30880c07bdc
Merged-In: I3181bc5683796423a98b0f9b94daf30880c07bdc
(cherry picked from commit 91635563b8a1bf7a31e4ceb439728dacb79abd76)
|
| |
|
|
|
|
|
|
|
|
|
| |
Add a wrapper for the new BINDER_GET_NODE_DEBUG_INFO ioctl for use by
libmemunreachable.
Test: memunreachable_binder_test
Bug: 28275695
Change-Id: Ic112584fa05071bd336974b3a18869077a69389b
Merged-In: Ic112584fa05071bd336974b3a18869077a69389b
(cherry picked from commit b869cc94704d1a3d6226f471984eb33ff1bac7d5)
|
| |
|
|
|
|
|
|
| |
There is an instance where an unsigned integer is multiplied by -1.
Refactor the code to eliminate this operation.
Bug: 25085348
Change-Id: I9c5dc1cc22a27dc998ae8eeacc9f889373d993cd
|
| |
|
|
| |
Change-Id: I68551ad663f2649a06b1958e9bef152e6d026e72
|
| |
|
|
|
|
|
| |
Fix warnings related to casting pointers to ints, using %d or %ld to
print size_t/ssize_t, and unused parameters.
Change-Id: I7a13ba83d402952989c1f795cd9e880a95b98d9e
|
|
|
Change-Id: I6ff4cfc736751de2912c697f954e45e275f2d386
|