summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-08-30 16:01:16 -0700
committerBrad Fitzpatrick <bradfitz@android.com>2010-08-31 13:16:49 -0700
commit5273603e98d2db3bac656b7bcf5352c04c86d62f (patch)
treeae85f89451ef4e278cd237f4a2b28686c2f043c1 /include
parent00807f5ab9f53c48f05319d8510aa41be0ba6ea7 (diff)
downloadframeworks_native-5273603e98d2db3bac656b7bcf5352c04c86d62f.zip
frameworks_native-5273603e98d2db3bac656b7bcf5352c04c86d62f.tar.gz
frameworks_native-5273603e98d2db3bac656b7bcf5352c04c86d62f.tar.bz2
Don't propagate StrictMode over one-way Binder calls.
This was causing stack stitching problems where a one-way call with violations followed by a two-way call without violations was getting the previous one-way call's violation stack stitched on to the second caller's stack. The solution is a little more indirect than I would've liked (preserving the binder's onTransact flags until enforceInterface) but was seemingly necessary to work without changing the AIDL compiler. It should also be sufficiently cheap, since no new calls to thread-local IPCThreadState lookups were required. The additional work is just same-thread getter/setters on the existing IPCThreadState. Change-Id: I4b6db1d445c56e868e6d0d7be3ba6849f4ef23ae
Diffstat (limited to 'include')
-rw-r--r--include/binder/IPCThreadState.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/binder/IPCThreadState.h b/include/binder/IPCThreadState.h
index 04e24d2..b54718f 100644
--- a/include/binder/IPCThreadState.h
+++ b/include/binder/IPCThreadState.h
@@ -43,7 +43,10 @@ public:
void setStrictModePolicy(int32_t policy);
int32_t getStrictModePolicy() const;
-
+
+ void setLastTransactionBinderFlags(int32_t flags);
+ int32_t getLastTransactionBinderFlags() const;
+
int64_t clearCallingIdentity();
void restoreCallingIdentity(int64_t token);
@@ -113,6 +116,7 @@ private:
pid_t mCallingPid;
uid_t mCallingUid;
int32_t mStrictModePolicy;
+ int32_t mLastTransactionBinderFlags;
};
}; // namespace android