David Anderson
2cf268ab9f
Use std::shared_ptr in Epoll's callback list.
...
Ignore-AOSP-First: Awaiting security triage
Bug: 187862380
Bug: 184569329
Test: CtsInitTestCases
Change-Id: Ibb34a6b8a5675dbc515b7f8a43d7eecf2084510c
(cherry picked from commit aea97815308ab98faf1599c16d6190b787d34941)
2021-08-09 21:25:49 +00:00
Mark Salyzyn
96c38ce6a2
storaged: protect global proto_loaded am: 4d3fe5ab72
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/13112711
Change-Id: I19e893cd00025a522407537a713b13077c1bf4ce
2021-05-06 14:52:52 +00:00
Joe Yu
76f158b252
[automerger skipped] Fix storaged memory leak am: f042976977
-s ours
...
am skip reason: skipped by user jpawlowski
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/13112710
Change-Id: Ie54114d4e6d220dd5bf548bb5364ecdee5a5c21f
2021-05-06 14:52:50 +00:00
Nikita Ioffe
03ad58468b
Merge "Fix potential use-after-free bug in reboot" into rvc-dev
2020-12-08 23:42:42 +00:00
Nikita Ioffe
71bd926bf0
Fix potential use-after-free bug in reboot
...
Instead of operating on raw pointers, init now uses name of the
services as it's primary identifier. Only place that still uses
vector<Service*> is StopServices.
In addition, ServiceList::services() function is removed, which should
help avoiding similar bugs in the future.
Bug: 170315126
Bug: 174335499
Test: adb reboot
Test: atest CtsInitTestCases
Change-Id: I73ecd7a8c58c2ec3732934c595b7f7db814b7034
Merged-In: I73ecd7a8c58c2ec3732934c595b7f7db814b7034
(cherry picked from commit bbba64826fdfb7be1f04b7bbb125fbe6d25e5028)
2020-12-01 22:54:05 +00:00
Mark Salyzyn
32b5003cf6
storaged: protect global proto_loaded
...
proto_loaded is not thread safe, so we must protect it with
a mutex proto_lock.
Signed-off-by: hanhongli@360.cn
Signed-off-by: gongguang@360.cn
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 170732441
Test: compile
Change-Id: I93416598b6047e890c66b922b360093aa42db8c5
2020-11-23 21:44:29 +00:00
Mark Salyzyn
4d3fe5ab72
storaged: protect global proto_loaded
...
proto_loaded is not thread safe, so we must protect it with
a mutex proto_lock.
Signed-off-by: hanhongli@360.cn
Signed-off-by: gongguang@360.cn
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 170732441
Test: compile
Change-Id: I93416598b6047e890c66b922b360093aa42db8c5
2020-11-23 13:42:13 -08:00
Joe Yu
f042976977
Fix storaged memory leak
...
storaged try to load user's proto even if it has been loaded before
https://partnerissuetracker.corp.google.com/u/2/issues/118719575
Change-Id: Ia7575cdc60e82b028c6db9a29ae80e31e02268b1
(cherry picked from commit 857a63eb66
)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 170732441
Test: compile
2020-11-23 13:41:54 -08:00
Elliott Hughes
5281bee360
FileMap::create: remove duplicate addition. am: 54794ac613
am: 2912d9c190
am: 98e213207f
am: a6d7150812
am: 8a192ea12a
am: 3c751b9f66
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12393457
Change-Id: I470769ef78fdfda93b8eee4e8b68065487c2aca1
2020-08-29 00:28:38 +00:00
Elliott Hughes
3c751b9f66
FileMap::create: remove duplicate addition. am: 54794ac613
am: 2912d9c190
am: 98e213207f
am: a6d7150812
am: 8a192ea12a
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12393457
Change-Id: Iddc2342abba73f6a5bf15adf5ae2993a55cac444
2020-08-28 23:39:24 +00:00
Elliott Hughes
8a192ea12a
FileMap::create: remove duplicate addition. am: 54794ac613
am: 2912d9c190
am: 98e213207f
am: a6d7150812
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12393457
Change-Id: I786693d6ba95669444f329a2f17c287d8fbc524e
2020-08-28 23:24:01 +00:00
Elliott Hughes
a6d7150812
FileMap::create: remove duplicate addition. am: 54794ac613
am: 2912d9c190
am: 98e213207f
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12393457
Change-Id: I8aeee458349a540c6a75fce57fd4a1d8b5b75eb3
2020-08-28 23:11:38 +00:00
Elliott Hughes
98e213207f
FileMap::create: remove duplicate addition. am: 54794ac613
am: 2912d9c190
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12393457
Change-Id: I416cdeb24824e7da9f437f61530e1861c9ea446c
2020-08-28 22:58:07 +00:00
Elliott Hughes
2912d9c190
FileMap::create: remove duplicate addition. am: 54794ac613
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12393457
Change-Id: Id0ff977722c484055c7a55397752ecda6f61a91f
2020-08-28 22:43:23 +00:00
sirius.wang
9c2f03b906
fuzzy_fastboot: use 'tcp:' prefix to identify fastboot protocol. am: 767fe1515a
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12448097
Change-Id: I4e1233336d3de093d31aecfd377451114461de46
2020-08-28 16:20:40 +00:00
sirius.wang
767fe1515a
fuzzy_fastboot: use 'tcp:' prefix to identify fastboot protocol.
...
The fastbootd over ethernet was implemented with IPv6 link-local
address. An IPv6 address may include many ':'. It will break this fuzzy
test. This new solution uses "tcp:" prefix to identify the fastboot
protocol, like the host fastboot command.
BUG: 157887327
Test: fuzzy_fastboot --serial=tcp:fe80::230:1bff:feba:8128%wlan0 \
--gtest_filter=*Logical*
Bug: http://b/166279510
Change-Id: I8fe7e6e3ade94a26e05a31ac20ed9ab3839dd342
Merged-In: I971fd9e25741e18bf7f5907d562556b09db1d624
2020-08-25 17:33:17 +00:00
Elliott Hughes
54794ac613
FileMap::create: remove duplicate addition.
...
The previous change was intended to detect the overflow, but
accidentally retained the existing addition, so we'd abort before
getting to the explicit check.
Also reformat slightly to better match the current code in qt-dev and
beyond, to reduce merge conflicts.
Bug: 156997193
Test: treehugger
Change-Id: I73a3a4e75f0aad00888e8f2b49a07b7e8b4eda05
Merged-In: I73a3a4e75f0aad00888e8f2b49a07b7e8b4eda05
2020-08-19 18:40:10 +00:00
Yifan Hong
632b1ab4ba
libsnapshot_test: skip global setup on non-VAB devices. am: b085db746a
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12329326
Change-Id: I9c273068441327d893d84e48fbec4df3189833c3
2020-08-10 19:10:40 +00:00
Alessio Balsini
37645974cc
Re-enable libsnapshot ImageManagerTest am: c723fca056
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12337395
Change-Id: Ic5cd924138f4dafeb238b4f2a0f6d7d5ffb7ea99
2020-08-10 19:10:37 +00:00
Yifan Hong
b085db746a
libsnapshot_test: skip global setup on non-VAB devices.
...
On non-VAB devices, fake super image creation may fail because it
may not support f2fs file pinning.
Also changes global setup to a testing::Environment object because it is
the recommended way in gtest's guide. SnapshotTestEnvironement::TearDown
is automatically executed before RUN_ALL_TEST returns.
Test: vts_libsnapshot_test
Test: make IsVirtualAbEnabled() return false, then all tests are
skipped.
Bug: 162557082
Change-Id: I1382f9a4ddec146fa2d8cfb21ac66ca22a2e110f
(cherry picked from commit a7c00a0943
)
Merged-In: I1382f9a4ddec146fa2d8cfb21ac66ca22a2e110f
2020-08-07 18:07:14 -07:00
Alessio Balsini
c723fca056
Re-enable libsnapshot ImageManagerTest
...
ImageManagerTest had been temporarily disabled because flaky.
This test looks stable now, re-enable it.
Bug: 148889015
Test: atest vts_libsnapshot_test [-- --abi x86]
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I858661fed7f58d1e2857ed88f5d8e0f5220bf8c2
(cherry picked from commit 42a608162d
)
Merged-In: I858661fed7f58d1e2857ed88f5d8e0f5220bf8c2
2020-08-07 18:07:13 -07:00
Kazuhiro Inaba
49ddb673c5
cts: Skip CtsInitTestCases over a native bridge. am: 9cecf8422a
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12263311
Change-Id: I9d208b96945f99b64da031d03e09a570862bcc1b
2020-08-05 19:10:41 +00:00
Steven Moreland
ce44c8ac3c
Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542
am: d8801aaad8
am: d05ecb8d9d
am: dc99a094dd
am: 64b312bbd8
am: 0cb14f1fe7
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459
Change-Id: I1cb83a4a22e205dddd10536f61392215d5cb33dc
2020-08-04 23:19:46 +00:00
Steven Moreland
0cb14f1fe7
Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542
am: d8801aaad8
am: d05ecb8d9d
am: dc99a094dd
am: 64b312bbd8
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459
Change-Id: I7d40bc3c63aa13c4050662f17b8a0854f8864ce4
2020-08-04 23:02:18 +00:00
Steven Moreland
64b312bbd8
Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542
am: d8801aaad8
am: d05ecb8d9d
am: dc99a094dd
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459
Change-Id: I79dcbb310a2515e7f17ad2ebbb0367070084dab2
2020-08-04 22:46:49 +00:00
Steven Moreland
dc99a094dd
Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542
am: d8801aaad8
am: d05ecb8d9d
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459
Change-Id: I816b8858c69e6481299f942401a16b5b39cd8b69
2020-08-04 22:21:36 +00:00
Steven Moreland
d05ecb8d9d
Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542
am: d8801aaad8
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459
Change-Id: Ifa0692e4966e78f4e180a2efc53db991177b6006
2020-08-04 22:03:55 +00:00
Steven Moreland
d8801aaad8
Merge "libutils: check vsnprintf error" into oc-dev am: a03d37d542
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/12254459
Change-Id: Id247c7079c146da8eaf52f098027d5daa25ce8d8
2020-08-04 21:37:54 +00:00
Steven Moreland
a03d37d542
Merge "libutils: check vsnprintf error" into oc-dev
2020-08-04 21:20:36 +00:00
TreeHugger Robot
6d76455283
[automerger skipped] Merge "Fail explicitly on length overflow." into oc-dev am: ea8d38e77f
am: cf91151364
am: 84dcff4c6b
am: cf6c14c850
-s ours am: 6f734f4802
-s ours am: 2384ca2ae5
-s ours
...
am skip reason: Change-Id Ie49975b8949fd12bbde14346ec9bbb774ef88a51 with SHA-1 40f657b9f4
is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619803
Change-Id: I7dc5773941a3d7f3b560440b548271b43a14b833
2020-07-31 21:40:48 +00:00
TreeHugger Robot
2384ca2ae5
[automerger skipped] Merge "Fail explicitly on length overflow." into oc-dev am: ea8d38e77f
am: cf91151364
am: 84dcff4c6b
am: cf6c14c850
-s ours am: 6f734f4802
-s ours
...
am skip reason: Change-Id Ie49975b8949fd12bbde14346ec9bbb774ef88a51 with SHA-1 40f657b9f4
is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619803
Change-Id: I626c2a0a1c7b138450236061b90c0595d5e9c560
2020-07-31 21:13:08 +00:00
TreeHugger Robot
6f734f4802
[automerger skipped] Merge "Fail explicitly on length overflow." into oc-dev am: ea8d38e77f
am: cf91151364
am: 84dcff4c6b
am: cf6c14c850
-s ours
...
am skip reason: Change-Id Ie49975b8949fd12bbde14346ec9bbb774ef88a51 with SHA-1 f846413e62
is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619803
Change-Id: I7da965fecbe3b8af3bb01b035bc5ef9b7cd11813
2020-07-31 20:47:05 +00:00
TreeHugger Robot
cf6c14c850
Merge "Fail explicitly on length overflow." into oc-dev am: ea8d38e77f
am: cf91151364
am: 84dcff4c6b
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619803
Change-Id: Ie7b7a57f55ead23f8d382ac98eb5087a2c614b1b
2020-07-31 20:24:42 +00:00
TreeHugger Robot
84dcff4c6b
Merge "Fail explicitly on length overflow." into oc-dev am: ea8d38e77f
am: cf91151364
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619803
Change-Id: Idb480f2a4dc1aa0d929e17e7e568a9c1b05c8489
2020-07-31 20:03:44 +00:00
TreeHugger Robot
cf91151364
Merge "Fail explicitly on length overflow." into oc-dev am: ea8d38e77f
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619803
Change-Id: I9a6def9ff590fdadb457e9a011df3532829d23f4
2020-07-31 19:45:35 +00:00
TreeHugger Robot
ea8d38e77f
Merge "Fail explicitly on length overflow." into oc-dev
2020-07-31 19:24:50 +00:00
TreeHugger Robot
437d4fbf3a
[automerger skipped] Merge "Fail explicitly on length overflow." into qt-dev am: 30a74852b0
-s ours am: d9798c6c33
-s ours
...
am skip reason: Change-Id Ie49975b8949fd12bbde14346ec9bbb774ef88a51 with SHA-1 40f657b9f4
is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11641094
Change-Id: I3ef3360f038a711af363d20ffa393dd66f5e7847
2020-07-30 21:53:25 +00:00
TreeHugger Robot
d8d4e2fee7
[automerger skipped] Merge "Fail explicitly on length overflow." into qt-qpr1-dev am: 3e8e1e9011
-s ours
...
am skip reason: Change-Id Ie49975b8949fd12bbde14346ec9bbb774ef88a51 with SHA-1 bff51b88aa
is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11738780
Change-Id: Ibd2724c9a8b0285d208d55b5dc71f50f657a0564
2020-07-30 21:53:18 +00:00
TreeHugger Robot
d9798c6c33
[automerger skipped] Merge "Fail explicitly on length overflow." into qt-dev am: 30a74852b0
-s ours
...
am skip reason: Change-Id Ie49975b8949fd12bbde14346ec9bbb774ef88a51 with SHA-1 40f657b9f4
is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11641094
Change-Id: I530996ecd0105ff1df2afb2069361717d391ad3a
2020-07-30 21:44:03 +00:00
TreeHugger Robot
3e8e1e9011
Merge "Fail explicitly on length overflow." into qt-qpr1-dev
2020-07-30 21:34:33 +00:00
TreeHugger Robot
30a74852b0
Merge "Fail explicitly on length overflow." into qt-dev
2020-07-30 21:21:49 +00:00
Steven Moreland
ee22384c54
libutils: check vsnprintf error
...
For encoding errors, this function will return a negative value which
causes problems down the line. Check for an error and return. Also,
integer overflows are guarded.
Bug: 161894517
Test: fuzzer test case
Change-Id: Ia85067d4258bde4b875c832d6223db5dd26b8838
Merged-In: Ia85067d4258bde4b875c832d6223db5dd26b8838
2020-07-30 17:29:34 +00:00
Kazuhiro Inaba
9cecf8422a
cts: Skip CtsInitTestCases over a native bridge.
...
The set of linked binaries was making it difficult to run
the test over a native bridge. Since init won't usually
run over a native bridge, the test can be skipped.
Bug: 161081809, 142324733, 162288553
Test: Arm build of CtsInitTestCases skips rammus-arc-r Chromebook.
Change-Id: Icdd8b03111d0f3fd6658ee6d9a97fca27181db45
2020-07-30 06:53:28 +00:00
Xin Li
1b804d13e3
Merge stage-aosp-rvc-ts-dev into rvc-dev
...
Bug: 148878042
Merged-In: I54c668427c06c415584cc80d6e7d35d451b28393
Change-Id: I4c92f304137715a61d0a8fab07c57ca6ebb832fc
2020-07-21 20:31:38 +00:00
Xin Li
1521c58c5d
Merge ab/12162526 into stage-aosp-rvc-ts-dev
...
Bug: 148878042
Change-Id: I54c668427c06c415584cc80d6e7d35d451b28393
2020-07-15 17:55:15 -07:00
Victor Khimenko
add3b3a137
Merge "Make libbacktrace buildable for native_bridge" into rvc-dev
2020-07-14 17:18:34 +00:00
Steven Moreland
8367a666b5
String16::remove - avoid overflow am: 4048e49956
am: 107f18cb61
am: 9be245c3f0
am: 64fb5012b8
am: 4e27b6992b
am: 26b81f59d2
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619802
Change-Id: Ib4704bc8a733ace56e7998b7bad5a6c5638900ad
2020-07-14 17:03:30 +00:00
Steven Moreland
26b81f59d2
String16::remove - avoid overflow am: 4048e49956
am: 107f18cb61
am: 9be245c3f0
am: 64fb5012b8
am: 4e27b6992b
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619802
Change-Id: Id47901d6e4247aafb9f666ba505ab966d3adefed
2020-07-14 16:45:16 +00:00
Steven Moreland
4e27b6992b
String16::remove - avoid overflow am: 4048e49956
am: 107f18cb61
am: 9be245c3f0
am: 64fb5012b8
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619802
Change-Id: I03057c052a24f205c78ee600178d45e0cd51a3c1
2020-07-14 16:29:09 +00:00
Steven Moreland
64fb5012b8
String16::remove - avoid overflow am: 4048e49956
am: 107f18cb61
am: 9be245c3f0
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11619802
Change-Id: I3ab9771d898eea0158acfd07fbe5a2f4b7dad883
2020-07-14 16:12:53 +00:00