Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 91538243 authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder: RPC prevent binder address collision

It's not clear that we're going to continue using such large addresses
(they are expensive, and we don't actually need addresses themselves to
be cryptographically unguessable - also since we are reading from
urandom, we're using a lot of entropy - ...), but just in case, clearing
out TODOs (and also in preparation of using RpcAddress for something
else, which we probably will continue using).

This prevents address collision by doing two things:
- create a bitspace for server vs client addresses (one bit in the
  address, in a newly defined header, determines the originating side
  of the connection for the address).
- instead of aborting when a duplicated address is created, try to
  create a new one.

As a side-effect, this also adds a header to binder RPC addresses.

Bug: 182939933
Test: binderRpcTest

Change-Id: I8ff0d29ca6df25b3f1d9662978fccbb3eb76c8ad
parent 7b8bc4c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment