summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-29HidlLazyUtils: avoid race w/ register & onClientsandroid-12.0.0_r32android-12.0.0_r29android-12.0.0_r28android-12.0.0_r27android-12.0.0_r26android-12.0.0_r21android-12.0.0_r20android-12.0.0_r19android-12.0.0_r18android-12.0.0_r16android12-qpr1-releaseandroid12-qpr1-d-s3-releaseandroid12-qpr1-d-s2-releaseandroid12-qpr1-d-s1-releaseandroid12-qpr1-d-releaseandroid12-devSteven Moreland
In HIDL, the threadpool is started whenever a binder object is sent to another process, so there is the rare race condition: - a process has a threadpool of size > 1 - it calls register service - when sending this service to hwservicemanager, under the hood, the threadpool is started (but it hasn't recorded internally that the service is registered) - another process gets ahold of the service - hwservicemanager tells the service it has a client - the service aborts, because it has no record of registering this service Bug: 191608065 Test: hidl_lazy_test Change-Id: Ia430352db4fb1345ba3e6633e3918b441af24fd7 Merged-In: Ia430352db4fb1345ba3e6633e3918b441af24fd7
2021-04-14[automerger skipped] Merge RQ2A.210405.006 to aosp-master - DO NOT MERGE am: ↵Bill Yi
8d76739a53 -s ours am: 67fcb65189 -s ours am: 077d6c34ac -s ours am skip reason: subject contains skip directive Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1675188 Change-Id: I80cde2b433d018b3e43496c6a1ccb5b1f3072d5b
2021-04-14[automerger skipped] Merge RQ2A.210405.006 to aosp-master - DO NOT MERGE am: ↵Bill Yi
8d76739a53 -s ours am: 67fcb65189 -s ours am skip reason: skip tag Change-Id Ia3a9dae55e766ef339a0d16bd5163f592765221a with SHA-1 5ef5916839 is already in history Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1675188 Change-Id: I9c5ca08032402059d04d3151d83dbc5b20e8aef0
2021-04-14[automerger skipped] Merge RQ2A.210405.006 to aosp-master - DO NOT MERGE am: ↵Bill Yi
8d76739a53 -s ours am skip reason: skip tag Change-Id Ia3a9dae55e766ef339a0d16bd5163f592765221a with SHA-1 5ef5916839 is already in history Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1675188 Change-Id: Ie54ddcb4f3471b57b135504e62624d962ce8f8e2
2021-04-13Merge RQ2A.210405.006 to aosp-master - DO NOT MERGEandroid-s-beta-2android-s-beta-1Bill Yi
Merged-In: Ia3a9dae55e766ef339a0d16bd5163f592765221a Merged-In: I42456e274166590d64fb721457700e8e50d36b1e Change-Id: I6c5b960dcf98849b2eaa9e5f0ee9870edae85670
2021-04-14[automerger skipped] Merge RQ2A.210405.006 to stage-aosp-master - DO NOT ↵Bill Yi
MERGE am: 5ef5916839 -s ours am: 57e6121438 -s ours am skip reason: subject contains skip directive Original change: https://googleplex-android-review.googlesource.com/c/platform/system/libhidl/+/14174233 Change-Id: Idc553bb4ea052c04a77419846d52d6f60de31fae
2021-04-14[automerger skipped] Merge RQ2A.210405.006 to stage-aosp-master - DO NOT ↵Bill Yi
MERGE am: 5ef5916839 -s ours am skip reason: skip tag Change-Id I435e34d50f469e0056eb23a71b1e8872f491e27f with SHA-1 1a8e6a75a4 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/system/libhidl/+/14174233 Change-Id: I42456e274166590d64fb721457700e8e50d36b1e
2021-04-12Merge RQ2A.210405.006 to stage-aosp-master - DO NOT MERGEBill Yi
Merged-In: I435e34d50f469e0056eb23a71b1e8872f491e27f Change-Id: Ia3a9dae55e766ef339a0d16bd5163f592765221a
2021-04-09setTrebleTestingOverride: base on ro.debuggable am: f47cdf7bbb am: ↵Steven Moreland
2b592d4409 am: 1a8e6a75a4 Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1668626 Change-Id: Ic420a00981f2427b09d40efcb6b056a445b09185
2021-04-09setTrebleTestingOverride: base on ro.debuggable am: f47cdf7bbb am: 2b592d4409temp_ab_7272582Steven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1668626 Change-Id: I435e34d50f469e0056eb23a71b1e8872f491e27f
2021-04-09setTrebleTestingOverride: base on ro.debuggable am: f47cdf7bbbSteven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1668626 Change-Id: Ib286ae228d986f1ecc76269906244b2fd513c9a3
2021-04-07setTrebleTestingOverride: base on ro.debuggableSteven Moreland
This was previously based on the build, but this causes hidl_test, hidl_test_java, and fmq_test to fail on the GSI build. In order to avoid this problem, checking this property at runtime. Fixes: 184616522 Test: atest hidl_test hidl_test_java fmq_test Change-Id: Ifff473fa9530557bbb3fabc3fda1b25a05249f05
2021-03-29Merge "hidl_string: empty string opt always applies" am: 34fb6e1222 am: ↵Steven Moreland
2f35293174 am: 47b900270c Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1656230 Change-Id: I77bfb1ad910b1774e6fca27daabb522e7d9ea424
2021-03-29clarify getRawServiceInternal 'retry' docs am: e5f8f7c02c am: ec1e232221 am: ↵Steven Moreland
70ecfbf092 Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1656229 Change-Id: I77a45e3fecc2a80afc614a123378009f7116baf6
2021-03-29Merge "hidl_string: empty string opt always applies" am: 34fb6e1222 am: ↵Steven Moreland
2f35293174 Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1656230 Change-Id: I68c091f0b4bc4248f22d2e71f0537763a6e5abd6
2021-03-29clarify getRawServiceInternal 'retry' docs am: e5f8f7c02c am: ec1e232221Steven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1656229 Change-Id: I8dfdef7b2197d711f594ac967801f5a36732f251
2021-03-29Merge "hidl_string: empty string opt always applies" am: 34fb6e1222Steven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1656230 Change-Id: I9f6aea65b86a849ce8e69e7dec2c436d28a96b74
2021-03-29clarify getRawServiceInternal 'retry' docs am: e5f8f7c02cSteven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1656229 Change-Id: Ie5acec5527ff810e49697cfeb2167ba5c8865d86
2021-03-29Merge "hidl_string: empty string opt always applies"Steven Moreland
2021-03-29hidl_string: empty string opt always appliesSteven Moreland
Before, it only applied for the default constructor. However, there are many cases where we can avoid the extra allocation. The most important is when we allocate a hidl_memory object. Here, the empty string literal is passed to hidl_string, but we don't actually need an allocation. Bug: 179720143 Test: N/A Change-Id: I307305b88e8b8c54cb2e2759b60b7015a3ac82b9
2021-03-29clarify getRawServiceInternal 'retry' docsSteven Moreland
This will only retry for VINTF manifest services. Bug: 183154648 Test: N/A Change-Id: I9bdf2448ca8c4fe910c27539e0847156acb7bb6a
2021-02-24libhidlbase: PID is always sharable. am: 8b9e383583 am: 70260b5a12 am: ↵Steven Moreland
3a949737b6 Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1602501 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I08f527b0d7b964cb3bd2a480f4b4104a3dd0cec9
2021-02-24libhidlbase: PID is always sharable. am: 8b9e383583 am: 70260b5a12Steven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1602501 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I2ded502013c8ed7f51237771fdb213ece19eb56f
2021-02-24libhidlbase: PID is always sharable. am: 8b9e383583Steven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1602501 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I62e823d991913f207f5ca0748583a243cdc396cc
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
2021-02-20[automerger skipped] Mark ab/7061308 as merged in stage. am: 8b52af87ca -s ↵Xin Li
ours am: 7f8b7ace57 -s ours am skip reason: Change-Id I6ddf4f417f3f0a994077f0a8140bffd2baafe0aa with SHA-1 85ec5c0516 is in history Original change: undetermined MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ifd123bf1eb95435c8f10d3b49822fc9c1a17935f
2021-02-20[automerger skipped] Mark ab/7061308 as merged in stage. am: 8b52af87ca -s oursXin Li
am skip reason: Change-Id I6ddf4f417f3f0a994077f0a8140bffd2baafe0aa with SHA-1 85ec5c0516 is in history Original change: undetermined MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I7fc18f8971cfbaac6b91cc68dc0d5cfe1c889e45
2021-02-20Mark ab/7061308 as merged in stage.Xin Li
Bug: 180401296 Merged-In: I6ddf4f417f3f0a994077f0a8140bffd2baafe0aa Change-Id: I028d0c5b7c0855385c34245d2ae4ad608e20de45
2021-02-18libhidlbase: avoid dlclose am: edd49128bc am: 6785dc4b99 am: a2680e6287Steven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1592996 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ia122fcc72cb58a1ce29dacd352cacf6a39861aa9
2021-02-18libhidlbase: avoid dlclose am: edd49128bc am: 6785dc4b99Steven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1592996 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I8edbe4820d299d8013cac69b6c96f12047d2427a
2021-02-18libhidlbase: avoid dlclose am: edd49128bcSteven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1592996 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I4d23e19613633cc473b8dda746362a8a7d9db3e3
2021-02-17libhidlbase: avoid dlcloseSteven Moreland
HIDL passthrough has a fatal design flaw! It's not known which implementation library serves which instance name. dlclose is extremely problematic: - some symbols (e.g. like [[clang::no_destroy]] or equiv) may be leaked. - binder, given multithreaded environment, might have other threads using this data - binder, may send ownership of some of this data out of process So, proactively removing dlclose here. As a side effect, this may mean we are keeping extra libraries open when they were closed before. Though, note: a. ephemeral dlopen/dlclose is a mostly silent cost which is now visible b. dlopen/dlclose will definitely be leaking memory c. for passthrough HALs used by system, only one instance is supported, so we shouldn't have this problem d. passthrough HALs are used as implementation detail for vendors, but: i. (a)/(b) still apply here ii. most vendor HALs are direct implemenations now (not passthrough). If this turns out to take more memory on some devices, we can prefer to improve HIDL's passthrough infrastructure to know which library it needs to open for which implementation. This would improve device performance over the existing baseline. Fixes: 180501607 Test: N/A Change-Id: I8555ce46b497be4df9d02490bbbe78dbf3255d32
2021-02-16[LSC] Add LOCAL_LICENSE_KINDS to system/libhidl am: ad2415c261 am: ↵Bob Badour
d49bfa9bc6 am: 4c5963579d Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1589043 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: If423cfbc201577ca0b2142c416524f22c044615e
2021-02-16[LSC] Add LOCAL_LICENSE_KINDS to system/libhidl am: ad2415c261 am: d49bfa9bc6Bob Badour
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1589043 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I23678ad1b50dc4da5ec9b54f07a40e9ebc5f6f9d
2021-02-15[LSC] Add LOCAL_LICENSE_KINDS to system/libhidl am: ad2415c261Bob Badour
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1589043 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ic0db761c0cc176bcb531716a6a46d1f21cb5af36
2021-02-12[LSC] Add LOCAL_LICENSE_KINDS to system/libhidlandroid-s-preview-1Bob Badour
Added SPDX-license-identifier-Apache-2.0 to: Android.bp adapter/Android.bp libhidlmemory/Android.bp minijail/Android.bp transport/Android.bp transport/allocator/1.0/Android.bp transport/allocator/1.0/default/Android.bp transport/allocator/1.0/utils/Android.bp transport/allocator/1.0/vts/functional/Android.bp transport/base/1.0/Android.bp transport/base/1.0/vts/functional/Android.bp transport/manager/1.0/Android.bp transport/manager/1.1/Android.bp transport/manager/1.2/Android.bp transport/memory/1.0/Android.bp transport/memory/1.0/default/Android.bp transport/memory/block/1.0/Android.bp transport/memory/token/1.0/Android.bp transport/safe_union/1.0/Android.bp transport/token/1.0/Android.bp transport/token/1.0/utils/Android.bp vintfdata/Android.mk Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I2a7ef0ec44c7b087eb00ed2bdfc4940d07f7a148
2021-02-09Merge cherrypicks of [13532551, 13532552, 13534990, 13533561, 13533870, ↵android-11.0.0_r37android-11.0.0_r36android-11.0.0_r35android-11.0.0_r34android11-qpr2-releaseandroid-build-team Robot
13533871, 13534991, 13533562, 13532553, 13533872, 13534992, 13532554, 13535065, 13535085, 13535105, 13535125, 13535126, 13535106, 13535107, 13535086] into rvc-qpr2-release Change-Id: I02599dc44549485b81711b20edff8e13b1b927e0
2021-02-09Rip out getProcessAgeMs.Steven Moreland
A certain system crash has pointed to this at least 77K times, and it's not important. Bug: 173264759 Test: boot Change-Id: Ice3dddee6d62c443d3fd88e1082e5af7a58b4255 Merged-In: Ice3dddee6d62c443d3fd88e1082e5af7a58b4255 (cherry picked from commit 8ea10819ca6a3333f488fdfdf2e8eef5cc3ac3cf)
2021-02-09getProcessAgeMs: better error messagesSteven Moreland
There function is jumping to abort on specific boots in two processes on the device repeatedly. Most likely, it is failing because of ubsan, but it isn't clear where exactly it is failing, so checking all assumptions and dumping errors. Bug: 170456142 Bug: 173264759 Test: adb logcat *:E | grep HidlServiceManagement # no errors on ToT Test: adb logcat | grep HidlServiceManagement # see registration logs Merged-In: Ib5c390dd93a9e4f78b42e7172cff74603a89f6cf Change-Id: Ib5c390dd93a9e4f78b42e7172cff74603a89f6cf (cherry picked from commit adee24d077f082bc8e946e1cd81a2c3830570c56)
2021-01-25Merge "libhidl_test: fatal -> error warning" am: a89f743b5a am: 4042b96f62 ↵Steven Moreland
am: bf8445ce7a Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1558666 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ic1009d0607e34c016e5ae7d256e20f3cd298b783
2021-01-25Merge "libhidl_test: fatal -> error warning" am: a89f743b5a am: 4042b96f62Steven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1558666 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ia28c9a7c52236b62711bf40b6f7c820989948c69
2021-01-25Merge "libhidl_test: fatal -> error warning" am: a89f743b5aSteven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1558666 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Id609874274c9833ac676f12b7d524517b5f95b85
2021-01-25Merge "libhidl_test: fatal -> error warning"Steven Moreland
2021-01-23libhidl_test: fatal -> error warningSteven Moreland
Avoid stopping the compiler. Fixes: 178056347 Test: build only Change-Id: Icdd0e0002c60774fea07452c06a58a3bed0fb236
2021-01-22Merge "HidlInstrumentor - fix w/ Wpadded" am: 951417092a am: b8a0af5f90 am: ↵Steven Moreland
8d99411d54 Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1557027 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9b3ebc88eb0f279ba4bef2e254ba5fad526f81a2
2021-01-22Merge "HidlInstrumentor - fix w/ Wpadded" am: 951417092a am: b8a0af5f90Steven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1557027 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ibb2fe7b38b68d9847ae9462110f7e1d56647a6b0
2021-01-22[automerger skipped] Rip out getProcessAgeMs. am: 8ea10819ca -s ours am: ↵Steven Moreland
d081c12130 -s ours am skip reason: Change-Id Ice3dddee6d62c443d3fd88e1082e5af7a58b4255 with SHA-1 489e7571db is in history Original change: https://googleplex-android-review.googlesource.com/c/platform/system/libhidl/+/13382330 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I038fec434b96d3ff84b3b62597a09987c6c4f4a6
2021-01-22Merge "HidlInstrumentor - fix w/ Wpadded" am: 951417092aSteven Moreland
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1557027 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9b42aa336514513c1b7e8c737087caa4e191a851
2021-01-22[automerger skipped] Rip out getProcessAgeMs. am: 8ea10819ca -s oursSteven Moreland
am skip reason: Change-Id Ice3dddee6d62c443d3fd88e1082e5af7a58b4255 with SHA-1 489e7571db is in history Original change: https://googleplex-android-review.googlesource.com/c/platform/system/libhidl/+/13382330 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ic69fba849da738a6c802ca1c5486585e89c3ed49
2021-01-22Merge "HidlInstrumentor - fix w/ Wpadded"Steven Moreland