Commit graph

66 commits

Author SHA1 Message Date
Steven Moreland
7f4e21adda Merge "Update makefies: no 'types'" am: 4ee5ec1469 am: bab622f6a6
am: 7224bc9bcf

Change-Id: I434939e0770afa436c532a945542fce30a71ef7d
2019-03-04 16:05:59 -08:00
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -08:00
Henry Fang
a757b1bc0d Add VTS for cas@1.1 hal interface
Added sendSessionEvent and onSessionEvent test case,
so vts can cover new interface in cas@1.1
Test: Manual
bug: 123642769

Change-Id: I3e82a5a7c9d1e8721b2e4fdc2aaffacfe96b91d9
2019-02-12 12:28:03 -08:00
Henry Fang
3e3cbb7c21 Revert "Revert "Update cas@1.0 hal to cas@1.1""
This reverts commit 1b066c8d1d.

Reason for revert: <This CL isn't related to public API which triggered previous revert>

Change-Id: If1fa2a244e5f4ee7f978cda79421172da02220f1
2019-01-31 22:46:57 +00:00
Xusong Wang
1b066c8d1d Revert "Update cas@1.0 hal to cas@1.1"
This reverts commit f9f0a25b26.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I32657e10fa8ff58dd351aa8e0b611195c2826f07
2019-01-31 01:04:02 +00:00
Henry Fang
f9f0a25b26 Update cas@1.0 hal to cas@1.1
Add sendSessionEvent to notify hal what happened on a session.
Add onSessionEvent to listen notification from hal for a session
Test: manual
Bug: 122472761

Change-Id: I98434325915e7bee57e63bdeeedba9ed5578e493
2019-01-28 15:14:32 -08:00
TreeHugger Robot
758ebb9aee Merge "cas: retrieve detailed error from descrambler" 2019-01-15 20:41:05 +00:00
Chong Zhang
521f69550c cas: retrieve detailed error from descrambler
Retrieve detailed error and pass back to client.

bug: 120301718
Change-Id: Iab4324c38318b7aaf73fc4072c6aeb12c3862e06
2019-01-04 12:12:25 -08:00
Peter Kalauskas
b4abef9b0a Rename registerServiceWithCallback
Rename registerServiceWithCallback to registerService

Test: Build and check that cas functions as a lazy hal as before
Change-Id: Id7aac4a4b34e5891e81dcb9ead1239a37c1a70c8
2019-01-03 15:23:12 -08:00
Peter Kalauskas
d6efaf4e7c Fix bug where lazy cas rc file ran wrong service
Test: Modify aosp_marlin-userdebug to use android.hardware.cas@1.0-service-lazy
      and run CtsMediaTestCases
Change-Id: I4f8329b13c7a900cf4c2b14cec1017b6e40dd6c1
2018-12-14 21:31:12 +00:00
Keun Soo YIM
68ae05dd2d pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -08:00
Peter Kalauskas
f646be06ed Add separate lazy service target to cas
Test: Run cts test android.media.cts.MediaCasTest
Bug: 119050069
Change-Id: I5117e4d10931affe85f2a0bb437d2fefb291e18f
2018-11-28 11:56:04 -08:00
Peter Kalauskas
bf608fcc23 Convert IMediaCasService to use vintf_fragments
Bug: 119669996
Test: Run cts CtsMediaTestCases
Change-Id: I841c64523ce506b923a530b7fb6f2476b4607661
2018-11-20 16:49:06 -08:00
Chong Zhang
42eca4926f cas: do not use hidl_memory if size is > SIZE_MAX
am: e1ce74509e

Change-Id: I4fe12a4ec828605413329d2f771f66bb12e3e9e9
2018-05-11 14:12:51 -07:00
Chong Zhang
e1ce74509e cas: do not use hidl_memory if size is > SIZE_MAX
Bug: 79376389
Test:
POC in bug; CTS MediaCasTest.

Change-Id: Ia3ecf9664ab69ce293e10b73bc20c37a9992db9f
2018-05-10 14:33:47 -07:00
TreeHugger Robot
6b6b1d2c1a Merge "Correct type of appData field" into pi-dev 2018-04-10 04:25:29 +00:00
Chong Zhang
9c6e0dc952 Correct type of appData field
bug: 77732157

test: CTS MediaCasTest; VTS VtsHalCasV1_0Target.
Change-Id: I18b4e9afb52fee72d55b13a48ac1339cf4728983
2018-04-09 12:36:21 -07:00
Chong Zhang
4aabc95234 cas: fix UAF in descrambler
Change the plugin holder in both CasImpl and DescramblerImpl
to shared_ptr, and use atomic store/load for read/write.

bug: 73172817
Test:CTS MediaCasTest, VTS VtsHalCasV1_0Target, poc in bug
Change-Id: I3f1472d3b9d8d3dc74168c07325c5c319a96807d
2018-03-23 18:50:38 -07:00
Chong Zhang
addcb3aa51 cas: fix UAF in descrambler -- DO NOT MERGE
Change the plugin holder in both CasImpl and DescramblerImpl
to shared_ptr, and use atomic store/load for read/write.

bug: 73172817
Test:CTS MediaCasTest, VTS VtsHalCasV1_0Target, poc in bug
Change-Id: I6b040680c28c38cef2fef3042f570dc64e86bb77
2018-03-24 01:46:21 +00:00
Chong Zhang
d2eb83e668 MediaCas: use HidlMemory to avoid handle leaks
bug: 67710751
test: VTS VtsHalCasV1_0Target test
Change-Id: Ia9a3c38b755a1aeb1d16dba30217055e6f0c27e2
2018-02-15 15:45:35 -08:00
Zhuoyao Zhang
a964d83a1f Merge "Convert cas hal test to use VtsHalHidlTargetTestEnvBase" am: fadafee26a am: 16465a4b37
am: 707258b232

Change-Id: Ia1cd0ec1ed287ff20f64ea840dadcbc539981091
2018-02-09 20:42:12 +00:00
Zhuoyao Zhang
707258b232 Merge "Convert cas hal test to use VtsHalHidlTargetTestEnvBase" am: fadafee26a
am: 16465a4b37

Change-Id: I7b339163bf8a857f7d6409533f35d9c7b740b717
2018-02-09 20:34:39 +00:00
Zhuoyao Zhang
a5e6707e9c Convert cas hal test to use VtsHalHidlTargetTestEnvBase
Bug: 64203181
Test: make vts
      vts-tradefed run vts -m VtsHalCasV1_0Target

Change-Id: If8174499b0fce2404fa3f363bc3ec439092c4068
2018-02-08 21:31:01 -08:00
Steven Moreland
905ca6a633 Merge "Remove conditional vndbinder usage in CAS." am: 231626d43d
am: 897864234e

Change-Id: Ifcd1c61e5655c9667576c5fe38c6ed0fe269b6cf
2017-12-15 20:20:10 +00:00
TreeHugger Robot
58983cb2b2 Merge "cas: manually clear strong ref before callback" 2017-12-14 08:46:11 +00:00
TreeHugger Robot
6658796be0 Merge "Reland "Remove conditional vndbinder usage in CAS."" 2017-12-14 04:01:11 +00:00
Steven Moreland
11a8a0e183 Reland "Remove conditional vndbinder usage in CAS."
Fugu kernels have been updated.
Bug: 70393284
Test: fugu boots

This reverts commit e9fb979b1e.

Change-Id: I976a0df6279e6ae7d334fa22e3c2c83bb3e285b7
2017-12-13 21:35:44 +00:00
Chong Zhang
ea3f07b614 cas: manually clear strong ref before callback
Hidl doesn't guarantee the server side method goes out of scope
before the client side returns. Even when client calls on the
same thread, the next method could overlap the previous call.
Next call can come in as soon as the hidl callback is called.

In case of openSession and release, there is a rare chance that
release call comes in before previous openSession is returned.
If this happens, the cas plugin object destructor is delayed to
the point when openSession goes out of scope (thus let go its
strong ref to the plugin). This violates our contract that the
plugin object and all associated sessions are released by the
time release() returns.

Manually clean up the strong ref before calling hidl callback
in openSession would fix this.

bug: 70544685
Change-Id: Id89a00591a354c8a46def3cc691dd8e28b4c971b
2017-12-12 22:09:20 -08:00
TreeHugger Robot
8573894006 Merge "cas: add vts test to catch oob in descrambling requests" 2017-12-09 06:20:37 +00:00
Steven Moreland
e9fb979b1e Revert "Remove conditional vndbinder usage in CAS."
This reverts commit 5884a6f0f3.
Bug: 70393284

Reason for revert: Fugu doesn't have vndbinder yet.
Exempt-from-owner-approval: Device doesn't boot.

Change-Id: Ib23691c102fd8aca63a4a6755eb7fd1f9e852a4d
2017-12-08 19:34:26 +00:00
Steven Moreland
75673fc6ac Remove conditional vndbinder usage in CAS.
Platform consistency, removing overload of meaning
behind PRODUCT_FULL_TREBLE/treble variable.

Bug: 67975337
Test: boot
Change-Id: I09df37fc0306f80879424334029ab9668cee9d4f
Merged-In: I09df37fc0306f80879424334029ab9668cee9d4f
2017-12-06 16:12:41 -08:00
Steven Moreland
4e1e4081e4 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
(cherry-picked from commit c2f829a1d2)
2017-12-03 10:31:49 -08:00
Steven Moreland
5884a6f0f3 Remove conditional vndbinder usage in CAS.
Platform consistency, removing overload of meaning
behind PRODUCT_FULL_TREBLE/treble variable.

Bug: 67975337
Test: boot
Change-Id: I09df37fc0306f80879424334029ab9668cee9d4f
2017-11-29 12:51:31 -08:00
Steven Moreland
e5c6548346 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:23:43 -08:00
Steven Moreland
8b76a6b90d Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:55 -08:00
Steven Moreland
fcca4e23b7 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:43 -08:00
Chong Zhang
95cc5af781 cas: add vts test to catch oob in descrambling requests
bug: 67962232

test:
cts MediaCasTest
vts VtsHalCasV1_0Target

Change-Id: I825e8cefb0d6f8e183e96ee2ebfbe0be1572dca8
2017-11-21 10:54:40 -08:00
Steven Moreland
c2f829a1d2 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 11:39:07 -08:00
Steven Moreland
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
Chong Zhang
5e17666308 Merge "cas: validate shared buffer size before using" into oc-mr1-dev am: 6a8fab9781
am: 66905b8168

Change-Id: Ibeb02056beeef366e1724f8b992b438f2363c997
2017-11-10 09:08:05 +00:00
Chong Zhang
16a3cd0b07 cas: validate shared buffer size before using
bug: 67962232

test:
cts MediaCasTest
vts VtsHalCasV1_0Target

Change-Id: I20b89d5971db4c89704245bb00c281af8c943697
2017-10-31 11:53:39 -07:00
TreeHugger Robot
f3d37254df Merge "Update for Soong-only makefiles." 2017-10-11 20:00:03 +00:00
Suresh Sivaraman
ab4c6f8fde Merge "Added VTS tests for requiresSecureDecoderComponent and release API" into oc-mr1-dev am: 2528c405f3
am: 7c932db240

Change-Id: If5ff8a90992432ee08eb7ed10eb3b2918e86c9dd
2017-10-11 18:42:14 +00:00
TreeHugger Robot
2528c405f3 Merge "Added VTS tests for requiresSecureDecoderComponent and release API" into oc-mr1-dev 2017-10-11 18:33:25 +00:00
Steven Moreland
f390f03aa4 Update for Soong-only makefiles.
Test: pass
Bug: 33420795
Change-Id: Ibec6d1e38939b9e7566a96381439be2aac3bf8ca
2017-10-11 18:30:28 +00:00
Chong Zhang
542be2bcdf Merge "cas-vts: use MemoryDealer to allocate shared memory" into oc-mr1-dev am: de05222287
am: 6643820a0d

Change-Id: I05166e239a97eb034a803b0204f1bc95d30e7bc2
2017-10-11 01:21:35 +00:00
Chong Zhang
704d5861a7 cas-vts: use MemoryDealer to allocate shared memory
cas hal can't (and doesn't need to) use hidl_memory allocated by
hidl allocator. All real clients (MediaDescrambler jni, ACodec)
are using MemoryDealer-allocated ashmem only. Modify the test
to cover these cases.

bug: 67603039
test:
> make vts -j64
> vts-tradefed run vts -m VtsHalCasV1_0Target

Change-Id: Ib9563abc1a14c34781a28d15c7766c6c160d288a
2017-10-10 13:09:32 -07:00
Suresh Sivaraman
6d176aa77d Added VTS tests for requiresSecureDecoderComponent and release API
Bug: 63914034
Bug: 65593293

Test:
Build & test vts:

> make vts -j64

> vts-tradefed run vts -m VtsHalCasV1_0Target

Change-Id: I465735768239f2d53427a18e5ad1fa0069f6e35c
2017-10-09 12:38:13 -07:00
Suresh Sivaraman
1ce1e21517 Merge "Added VTS tests for MediaCas - II" into oc-mr1-dev am: 239a450438
am: 4833ea292c

Change-Id: I780d60287d85d0e25fcfd67f44310fe72a9a94ec
2017-10-06 16:57:06 +00:00
Suresh Sivaraman
0645aec1de Added VTS tests for MediaCas - II
Bug: 63914034
Bug: 65593293

Test:
Build & test vts:

> make vts -j64

> vts-tradefed run vts -m VtsHalCasV1_0Target

Change-Id: If5a0e7cb3d520843ba45147a085c43b94027e584
2017-10-05 19:47:31 +00:00