summaryrefslogtreecommitdiff
path: root/transport/HidlTransportSupport.cpp
AgeCommit message (Collapse)Author
2021-02-24libhidlbase: PID is always sharable.Steven Moreland
This is useful for debugging, at parity with AIDL, and the information is already exposed via hwservicemanager. The client of audio HAL (audio server) needs to know the PID of it in order to adjust the priority of HAL threads (b/181148259). Bug: 180991044 Test: N/A Change-Id: I50803e60bb1d8ba8892e40be762162ef9c5ff7c1
2019-09-18Hide IBase static maps.Steven Moreland
Because sizeof(IBase) can't be changed, we have a couple of maps to store data about IBase. Hiding these maps internally inside libhidl* so that we can more easily remove them in the future if necessary. Fixes: 122472540 Test: hidl_test, checking logs Change-Id: Ic722a9fd1f406cf03abb072015078fc7192066ce
2019-04-22Do not destruct static maps.Steven Moreland
am: b1c7d06b1f Change-Id: I335033b68ce3aa98bf636012c4d8669be7d0f1aa
2019-04-22Do not destruct static maps.Steven Moreland
In case they are deleted while some threads are using them (this happens sometimes depending on how these libraries are loaded and how they are being used). Noting that b/69122224 is filed to move these into functions. Bug: 129726097 Test: HIDL's run_all_device_tests.sh Test: no longer see error where it repro'd before: FORTIFY: pthread_mutex_lock called on a destroyed mutex Change-Id: I66eb9aa24e31d7fc652f0426361c17600b4716ec
2019-04-22Use pruneMapLocked for setMinSchedulerPolicy.Steven Moreland
Bug: 129726097 Test: hidl's run_all_device_tests.sh Change-Id: I987f952589f634891c6c6e51583c89f900d17cb3 Merged-In: I771fa6bbeac0b9cbba5321881e191605b0e17e23
2019-03-11DO NOT MERGE - Merge PPRL.190305.001 into masterXin Li
Bug: 127812889 Change-Id: I13211edda50c7c94a53e7c6d8ed9637235fe1026
2019-01-16Add gServiceSidMap.Steven Moreland
Like gServicePrioMap. b/122472540 is filed to merge these maps in the future, but creating a separate map so that it can be easily backported. Bug: 121035042 Test: boot and check for SID values for calls into hwservicemanager coming from clients which called IServiceManager::getService. Change-Id: I4e5821d91ea694f86911218c23e68fcb987daaf9 Merged-In: I4e5821d91ea694f86911218c23e68fcb987daaf9 (cherry picked from commit d7f8d2226f5c7e98d12137732846e4ba55048927)
2019-01-12Revert "Revert "Add gServiceSidMap.""Steven Moreland
This reverts commit 8f21ad8aa6496e2ad6061589b87275f4a98ef651. This enables getting security contexts from the kernel. Bug: 121035042 Test: boot patch w/ w/o kernel patch on cuttlefish and check for security logs. Test: check for cnd failures on crosshatch. Change-Id: I771fa6bbeac0b9cbba5321881e191605b0e17e23 Merged-In: I771fa6bbeac0b9cbba5321881e191605b0e17e23 (cherry picked from commit 42bc6d55089566924dc367afa40280269b1d0419)
2018-12-13interfacesEqual: not templatized, use const sp&.Steven Moreland
So, this will save space when the function is used, and it'll also save copies (when the object is already of this type, otherwise, the conversion constructor will still be invoked). Bug: 118394906 Test: boot, hidl_test Change-Id: I3cb81d578df43e9e91d54f52945c0c44cc35208e
2018-09-20Proper checks for SCHED_NORMAL.Steven Moreland
It was checked to be in range -20..19 AND 1..99 before. Fixes: 116135964 Test: boot Pixel 2, check for errors Change-Id: I8f6d16c6f13a7c99b56c90eb836bff8ddd4c9384
2018-08-08Revert "Revert "Begin cleanup of HidlBinderSupport.h includes.""Steven Moreland
This reverts commit 9211951e255d5f129a977a7313e394d73af3fe42. Bug: 65843592 Reason for revert: Now that devices have been fixed. Change-Id: I692a8a69ce736abc3d4c08af771f2999a5e772ee
2018-08-08Revert "Begin cleanup of HidlBinderSupport.h includes."Steven Moreland
This reverts commit 128040a16d5ed83da9b4fb2c6f562e932fa99619. Bug: 65843592 Reason for revert: This broke some devices internally. Will fix those in advance before fixing this. Change-Id: I727997c4abed00504b5adcf7df09696afb872308
2018-08-02Begin cleanup of HidlBinderSupport.h includes.Steven Moreland
Removing ones that are unused within libhidltransport itself. Include of log/log.h is added because there are too many users depending on this transitive include. Bug: 65843592 Test: build only Change-Id: Ifcf2ab2a93324a242869318a5dd400e5d6944839
2018-08-01Have setMinSchedulerPolicy clean itself up.Steven Moreland
This cleans up any other entries in the map whenever a new one is added. This API is expected to be called extremely infrequently, so the current solution will only allow a single wp object to be leaked. Fixes: 111192774 Test: boot Change-Id: I740a596978440786dc06c977ba37bf3b1f9017d5
2017-12-05Add support for polling transport.Martijn Coenen
To remove remaining direct calls/linkage into libhwbinder. Bug: 34388964 Test: wifi works Change-Id: Idd3928e9a0879434cb71ab63eaca905f174e645e
2017-11-22HidlTransportSupport: fix build.Yifan Hong
Test: user build builds successfully Change-Id: Ic5b8910ac539b9acac4de5717b01ccced3a863c4
2017-11-20HidlTransportSupport: add getPidIfSharable.Yifan Hong
This function provides PID when it is "sharable" (i.e on debug builds). Auto-generated IBase::getDebugInfo uses this function (both in Java and C++) to provide the PID. Test: builds Test: lshal works Bug: 68430495 Bug: 68992575 Change-Id: I051e795bb01528341a5f061892902a9f305ad493
2017-10-24Move getRawServiceInternal to ServiceManagement.Martijn Coenen
For easier optimization in a follow-up CL. Test: boot marlin, hidl_test, hidl_test_java Bug: 67425500 Change-Id: I0ad6e970652ea3399f2e634ae0f81d6649411f89
2017-10-10Move getService into libhidl.Steven Moreland
This function is huge! By moving it out of auto-generated code, we can do a couple of things: - decrease the amount of space it takes (no longer not 'all' templated). - make it easier to fix bugs like b/67425500 Bug: 67425500 Test: hidl_test, hidl_test_java Change-Id: Ic8eb93d82e7bf8a6730d14109a36828bfe9d468a
2017-05-03Allow setting a minimum scheduler policy for a service.Martijn Coenen
The binder kernel driver supports priority inheritance at a node (service)-basis, that makes sure all transactions into that service are executed at a specified minimum scheduler policy and priority. This change allows users of HIDL interfaces to set such a policy for their interface. Bug: 37293077 Test: verified min_prio in /d/binder output Change-Id: If72dd8322381246832b460c386dda44fbd225757
2017-03-07Move configureRpcThreadpool into sources.Steven Moreland
Bug: 35710429 Test: hidl_test Change-Id: Ice4de080155a5b05878fec3045b495b447fff6ac