summaryrefslogtreecommitdiff
path: root/libs/binder/RpcServer.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-05-12 23:31:00 +0000
committer Steven Moreland <smoreland@google.com> 2021-05-13 16:45:08 +0000
commitdbe7183d0493cba5f53f9f0248a7576cc35b4100 (patch)
tree41536590b9d1962d20752cb07ef5138034bad119 /libs/binder/RpcServer.cpp
parenta63ff93a1bd754e14d0d979d8bac619fa6140c3b (diff)
libbinder: RPC cap transaction size at 100KB
Why? - Android code uses -fno-exceptions and generally doesn't check for OOM conditions (unlike the Linux kernel itself!). Even if we check for allocation success, a successful allocation here may mean even a 1 byte allocation on another thread or by the server will cause a failure. - kernel binder can have by default 1MB of concurrent transactions at a time. A transaction of size 100KB is already exceedingly dangerous to the runtime, since in a big process, this could cause other processes to reach the limit. In the future, we could increase this cap (lowering is potentially difficult) or make it customizable. Bug: 167966510 Test: binderRpcTest, binderRpcBenchmark, binder_rpc_fuzzer Change-Id: Ia215f1a00412654ce08e6bced14d4da4a0a46987
Diffstat (limited to 'libs/binder/RpcServer.cpp')
0 files changed, 0 insertions, 0 deletions