From 8193c1884c68c6355d662a4e9f8af679174b9b3b Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Tue, 11 May 2021 00:26:30 +0000 Subject: libbinder: RPC - add DOS TODO Reading client ID needs to happen on another thread from the main server in order to avoid a client freezing the server. Though, before moving the thread tracking to RpcServer, I want to implement reverse connections (reverse threadpools for handling callbacks) since this is the feature that originally motivated the threadpool being handled in RpcSession. Bug: 185167543 Test: N/A Change-Id: I1e862ac098159a6efc3c0736050a0b7fe6e7c57e --- libs/binder/RpcServer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp index aaebb23f6f..bcee251966 100644 --- a/libs/binder/RpcServer.cpp +++ b/libs/binder/RpcServer.cpp @@ -138,7 +138,8 @@ void RpcServer::join() { } LOG_RPC_DETAIL("accept4 on fd %d yields fd %d", mServer.get(), clientFd.get()); - // TODO(b/183988761): cannot trust this simple ID + // TODO(b/183988761): cannot trust this simple ID, should not block this + // thread LOG_ALWAYS_FATAL_IF(!mAgreedExperimental, "no!"); int32_t id; if (sizeof(id) != read(clientFd.get(), &id, sizeof(id))) { -- cgit v1.2.3-59-g8ed1b