Commit Graph

6646 Commits

Author SHA1 Message Date
Dan Zhang
c8029bfbc3 Merge "Fix the reference leak on RemoteCallbackList" am: be30d27a8a am: ea493e4c77
am: dbf00b6a0b

Change-Id: If49b4ffddb6e578d82c1ad4b6c26f8153bb48a3a
2019-08-01 00:58:51 -07:00
Dan Zhang
dbf00b6a0b Merge "Fix the reference leak on RemoteCallbackList" am: be30d27a8a
am: ea493e4c77

Change-Id: Iffc4beb2fd5c30a35a744c133186826cd7f487b8
2019-08-01 00:37:46 -07:00
Dan Zhang
ea493e4c77 Merge "Fix the reference leak on RemoteCallbackList"
am: be30d27a8a

Change-Id: Ibf79be3f125ab58c8048c15f3f6f3a3e693295e7
2019-07-31 22:19:30 -07:00
Dan Zhang
be30d27a8a Merge "Fix the reference leak on RemoteCallbackList" 2019-08-01 05:03:03 +00:00
Josh Gao
cdca6b559c Merge changes I9350ec13,I809d9191,I235f727d,I1930f3ba
am: a0c949d5de

Change-Id: I1633d9eae6f162e338990766e62e3aa3873df606
2019-07-31 21:46:23 -07:00
Josh Gao
75f730abaf SharedMemory: use fdsan to protect our fd.
Bug: http://b/138422309
Test: booted, saw the GraphicsStatsService fd misacquisition
Change-Id: I9350ec13e523e1bf86797a1231769d890f277008
2019-07-31 15:19:11 -07:00
Josh Gao
9fdb8f9910 Revert "Revert "SharedMemory: break Cleaner reference cycle.""
This commit was reverted in Q because it broke things, but we want it in
master.

This reverts commit c36d0765a25d4701980738dc3e2053f19eb3d6b8.

Change-Id: I809d9191eee4909d265d2864ebd523f262f6bb61
Test: treehugger
2019-07-31 15:19:11 -07:00
Adam Seaton
9428f73436 Revert "SharedMemory: break Cleaner reference cycle."
Bug: 138422309

This reverts commit 390d9e6a18.

Reason for revert: crashes documented in b/138422309

Change-Id: I235f727d0fe87c09f6f05dddcae7759bab64dfd8
Merged-In: I235f727d0fe87c09f6f05dddcae7759bab64dfd8
(cherry picked from commit b16411f83a)
2019-07-31 15:19:11 -07:00
John Reck
c3ca72ca5b Merge "Fix regression in PFD#fromData" into qt-r1-dev
am: 1775a48935

Change-Id: Icf8fb72af14eb1cd16765a36e9fca4f9f5fdb265
2019-07-29 15:10:04 -07:00
John Reck
1775a48935 Merge "Fix regression in PFD#fromData" into qt-r1-dev 2019-07-29 21:23:57 +00:00
bsears
206ab727cf Merge "Revert "SharedMemory: break Cleaner reference cycle." Bug: 138422309" into qt-dev am: d4b0c9348a
am: b0e003f2c8

Change-Id: Icf894b94730571311439360533cfdc6ffca227f2
2019-07-26 17:12:20 -07:00
bsears
d15de9d187 Merge "Revert "SharedMemory: clear file descriptor when explicitly closed." Bug: 138422309" into qt-dev am: 480f1db9bc
am: 87216d7403

Change-Id: Ie6221fa2e0069b28284c37eea0a90327dd7164d6
2019-07-26 16:55:22 -07:00
bsears
b0e003f2c8 Merge "Revert "SharedMemory: break Cleaner reference cycle." Bug: 138422309" into qt-dev
am: d4b0c9348a

Change-Id: Ic8ff79117a25be51cccf4e1492e3dea87a045eb5
2019-07-26 16:36:19 -07:00
bsears
868ac4f3a1 Merge "Revert "SharedMemory: break Cleaner reference cycle." Bug: 138422309" into qt-dev
am: d4b0c9348a

Change-Id: Icef464ff04de9d1e300161383251e35d557ca973
2019-07-26 16:35:31 -07:00
bsears
de6bfd230c Merge "Revert "SharedMemory: clear file descriptor when explicitly closed." Bug: 138422309" into qt-dev
am: 480f1db9bc

Change-Id: Ib346fb19a7be0635fe9e15d0fc6a307a614fb1c5
2019-07-26 16:31:52 -07:00
bsears
87216d7403 Merge "Revert "SharedMemory: clear file descriptor when explicitly closed." Bug: 138422309" into qt-dev
am: 480f1db9bc

Change-Id: I3ba90a97cc16bcf29c15073c252c382450ae4a71
2019-07-26 16:31:40 -07:00
John Reck
12ea937f8f Fix regression in PFD#fromData
Don't rely on the GC to clean up FD resources when they can
just be cleaned up immediately. We know the MemoryFile isn't
going to be used any further, so just close it.

Bug: 138323667
Test: Repro steps in bug. Verified addresses FD leak in system_server from repeatedly opening & closing settings.
Change-Id: Ic82006c9cb48f580aaad942c4679e774186382c9
2019-07-26 23:19:05 +00:00
Josh Gao
a4a7c1a0a5 Merge "SharedMemory: clear file descriptor when explicitly closed."
am: e33db449d8

Change-Id: I699605f2c6c7f0e24f9646d692b45c71dd88fc91
2019-07-26 15:08:05 -07:00
Adam Seaton
b16411f83a Revert "SharedMemory: break Cleaner reference cycle."
Bug: 138422309

This reverts commit 390d9e6a18.

Reason for revert: crashes documented in b/138422309

Change-Id: I235f727d0fe87c09f6f05dddcae7759bab64dfd8
2019-07-26 17:17:16 +00:00
Adam Seaton
5966196515 Revert "SharedMemory: clear file descriptor when explicitly closed."
Bug: 138422309

This reverts commit 20ab1e3427.

Reason for revert: crashes documented in b/138422309

Change-Id: Ic9e33fdb24bad2b30f0eb357d6752c1834df41d5
2019-07-26 17:17:03 +00:00
Josh Gao
655d6f5cde Merge changes I8bdb4c74,I613a7d03 into qt-dev
am: a09ee2d39f

Change-Id: Ibcbc22b6f4f77825f16e52a832e28fcb40d3fa6d
2019-07-25 17:41:26 -07:00
Josh Gao
de90a881a7 Merge changes I8bdb4c74,I613a7d03 into qt-dev am: a09ee2d39f
am: 036d594c69

Change-Id: Ib925304a870e5d9881147eaa9831e57be4dda6a9
2019-07-25 17:33:51 -07:00
Josh Gao
036d594c69 Merge changes I8bdb4c74,I613a7d03 into qt-dev
am: a09ee2d39f

Change-Id: I6ae25d6b3aa39ef6f9ed1ffcf6fce6e5920a5578
2019-07-25 16:54:20 -07:00
Josh Gao
20ab1e3427 SharedMemory: clear file descriptor when explicitly closed.
We run the Cleaner in close, but after the fix in commit 6ca916a6, this
no longer clears the value stored in the FileDescriptor, which means
that subsequent operations on an explicitly closed SharedMemory will
operate on a bogus fd number. Clearing the FileDescriptor value in close
is sufficient, because Cleaner.clean is idempotent, and the only other
case where it executes is when the FileDescriptor is phantom reachable,
which means no one can access it to get its integer value.

Bug: http://b/138392115
Bug: http://b/138323667
Test: treehugger
Change-Id: I8bdb4c745466532a0712976416184c53fcf0dbf6
(cherry picked from commit a7641806dd)
2019-07-25 14:08:58 -07:00
Josh Gao
a7641806dd SharedMemory: clear file descriptor when explicitly closed.
We run the Cleaner in close, but after the fix in commit 6ca916a6, this
no longer clears the value stored in the FileDescriptor, which means
that subsequent operations on an explicitly closed SharedMemory will
operate on a bogus fd number. Clearing the FileDescriptor value in close
is sufficient, because Cleaner.clean is idempotent, and the only other
case where it executes is when the FileDescriptor is phantom reachable,
which means no one can access it to get its integer value.

Bug: http://b/138392115
Bug: http://b/138323667
Test: treehugger
Change-Id: I8bdb4c745466532a0712976416184c53fcf0dbf6
2019-07-25 14:07:56 -07:00
Josh Gao
390d9e6a18 SharedMemory: break Cleaner reference cycle.
Previously, the Cleaner we create to close the ashmem file descriptor
used a thunk that held a strong reference to the FileDescriptor we
wanted to clean up, which prevented the Cleaner from ever running.

Break the cycle by storing the integer value of the file descriptor
instead.

Bug: http://b/138323667
Test: treehugger
Change-Id: I613a7d035892032f9567d59acb04672957c96011
(cherry picked from commit 6ca916a657)
2019-07-25 12:13:15 -07:00
Josh Gao
90cc26920b Merge "SharedMemory: break Cleaner reference cycle." am: 5783a79cfc am: e9c55ddce1
am: 132b66b0c2

Change-Id: Ide4fbc059ceabf2028d57f5e5a9e7358dd88e7e5
2019-07-24 22:28:37 -07:00
Josh Gao
132b66b0c2 Merge "SharedMemory: break Cleaner reference cycle." am: 5783a79cfc
am: e9c55ddce1

Change-Id: I8444786cdde94c75e3711349bad812d514a58890
2019-07-24 22:17:45 -07:00
Josh Gao
e9c55ddce1 Merge "SharedMemory: break Cleaner reference cycle."
am: 5783a79cfc

Change-Id: I732fac88ccee02e49506dd40a7204e5210648b10
2019-07-24 22:08:03 -07:00
Josh Gao
6ca916a657 SharedMemory: break Cleaner reference cycle.
Previously, the Cleaner we create to close the ashmem file descriptor
used a thunk that held a strong reference to the FileDescriptor we
wanted to clean up, which prevented the Cleaner from ever running.

Break the cycle by storing the integer value of the file descriptor
instead.

Bug: http://b/138323667
Test: treehugger
Change-Id: I613a7d035892032f9567d59acb04672957c96011
2019-07-24 15:40:57 -07:00
Tao Bao
7c8feecd92 Merge "Add a new API applyPayloadFd() of UpdateEngine" am: f4b0318d6f am: eca7403bcf
am: c009d8e067

Change-Id: I1f464891e522c58bfc0aa958a5fed1e00bbc01d2
2019-07-13 09:57:29 -07:00
Tao Bao
c009d8e067 Merge "Add a new API applyPayloadFd() of UpdateEngine" am: f4b0318d6f
am: eca7403bcf

Change-Id: I39b71250baaf7796af4fca4d875ed338a3985f96
2019-07-13 09:47:38 -07:00
Tao Bao
eca7403bcf Merge "Add a new API applyPayloadFd() of UpdateEngine"
am: f4b0318d6f

Change-Id: I771090d681ca565392a9aaeb8ecd60026b572ae3
2019-07-13 09:39:32 -07:00
Tao Bao
f4b0318d6f Merge "Add a new API applyPayloadFd() of UpdateEngine" 2019-07-13 16:29:49 +00:00
Treehugger Robot
f0d921c41a Merge "Replace HashMap with ArrayMap for services" 2019-07-11 20:41:31 +00:00
Andrew Lewis
17a248a7ec Merge "Redact ISOBMFF boxes with 'free'" into qt-dev am: f68a201ebc
am: b8e0f62908

Change-Id: Icacc228d3e473e2f1fea2ff68753064bf4f6ccd6
2019-07-11 06:38:34 -07:00
Andrew Lewis
b8e0f62908 Merge "Redact ISOBMFF boxes with 'free'" into qt-dev
am: f68a201ebc

Change-Id: I26ca8aac1b2c29e536f8d798ada3d3b269d6dc1e
2019-07-11 06:26:47 -07:00
Andrew Lewis
65ded6c655 Merge "Redact ISOBMFF boxes with 'free'" into qt-dev
am: f68a201ebc

Change-Id: I4755c6f884958dce01e06aa5a889f06e035f1f1c
2019-07-11 06:26:42 -07:00
Andrew Lewis
4ec5fda3d6 Redact ISOBMFF boxes with 'free'
Test: atest MediaStore_Video_MediaTest android.os.RedactingFileDescriptorTest
Bug: 135499138
Change-Id: Idaa8ad30300d5427f91bb2543be3152881018cf6
2019-07-10 19:46:48 +01:00
Steven Moreland
cdc0b2d3cd Merge "AIDL it! IServiceManager" into stage-aosp-master am: 1c373c4361
am: 42762e7b4f

Change-Id: Ib1abcd696eb043072bacfd74aefae8951586f866
2019-07-09 15:36:56 -07:00
Kyeongkab.Nam
bcc56339bb Add a new API applyPayloadFd() of UpdateEngine
Due to the restriction of Treble, update_engine cannot access to OTA
packages located on non-core domain area.
(e.g. /data/vendor/upgrade/xxx.zip)
To solve such problem, update_engine needs to accept a file descriptor
(FD) of OTA package file instead of its URI. Accordingly, UpdateEngine
also needs to add a new interface of applyPayload which accepts FD.

Test: Manual update
Bug: 130209137
Change-Id: Ic924445c4abf27fd7dc111c74b972ac7ff9ffa6b
2019-07-09 11:21:57 +09:00
Steven Moreland
e17de65051 AIDL it! IServiceManager
Bug: 135768100
Test: boot
Change-Id: I7f8b5d07d4937804e8b0838936f8984ca7d08efa
(cherry picked from commit 7b152971e4)
2019-07-09 01:54:41 +00:00
Mathew Inwood
89f02cc81c Merge "Restore some greylist entries." into qt-dev am: f76bdce6e0
am: 13ffa87a6d

Change-Id: I4c92e5685804a5b03510ab5b9396c0dc6f4aad46
2019-06-28 08:49:28 -07:00
Mathew Inwood
68d07b7d6b Merge "Restore some greylist entries." into qt-dev
am: f76bdce6e0

Change-Id: I7636cbdbd4177461c56103a6a8e7d87498c9ba13
2019-06-28 08:19:19 -07:00
Mathew Inwood
13ffa87a6d Merge "Restore some greylist entries." into qt-dev
am: f76bdce6e0

Change-Id: I320e33be57b8124ff7c132a67c8981d53802f8f5
2019-06-28 07:43:43 -07:00
TreeHugger Robot
f76bdce6e0 Merge "Restore some greylist entries." into qt-dev 2019-06-28 12:02:43 +00:00
Mathew Inwood
3a75f264a8 Restore some greylist entries.
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
  information added

So they are being moved back to the greylist for Q.

Test: Treehugger
Bug: 136102585
Change-Id: I5ac8b8b9b23c3789d80239cf456072cc7dfa1203
2019-06-28 10:15:37 +01:00
Tim Joines
f2527bbc60 Merge "Disable USAP by default on devices" into qt-dev am: 6c3bbf9e93
am: 35bc777130

Change-Id: Ib7a037e51b3a007a942fb877cb09d2c890021596
2019-06-27 10:49:44 -07:00
Lorenzo Colitti
d1d1e36e67 Merge "Transfer ownership of NetworkStatsFactory to NetworkStatsService." am: bd94f0afd2 am: 92292f556b
am: cf545aa02a

Change-Id: Ibe2fcacb3779b3c6bc484fe6f398475bf5b6383b
2019-06-27 09:26:02 -07:00
Tim Joines
4ecc6562f6 Merge "Disable USAP by default on devices" into qt-dev
am: 6c3bbf9e93

Change-Id: I131b75b45e43b185266ebb54f49815896fc67ffe
2019-06-27 09:22:21 -07:00