History log of /system/libhidl/transport/HidlBinderSupport.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
25508806b87fc4d428590f06e0b6d361a254355c 05-Jul-2017 Martijn Coenen <maco@google.com> Fix proxy memory leak.

Proxy objects that had a death recipient registered
could not be freed; this is because of the following
chain of events:

- Proxy objects extend BpHwRefBase
- BpHwRefBase extends the lifetime of the object to
weak - meaning it will only get freed when both
all strong *and* weak references are gone.
- When a death recipient is registered, it keeps
a weak reference to the proxy object (it needs to,
so it can pass the object in the callback).
- The death recipient objects are kept in a vector
of sp<> objects.
- Now, whenever the last strong reference to the proxy
goes away in client code, the proxy object destructor
will not run, because of the weak reference left in
the death recipient.
- But, the death recipient won't get destructed either,
because it would only get destructed in the proxy
destructor.

This fixes the leak only in case the death recipient
fires; in case the last strong reference to the proxy
object is removed by the client without the death
recipient having fired, the leak remains. This can
be prevented in client code by calling unlinkToDeath()
before getting rid of a proxy object.

Bug:62319810 (?)
Bug:63127792
Test: mma, hidl_test
Change-Id: I686863ab462e63d98737cfc5ae50a6a8fa0081c0
/system/libhidl/transport/HidlBinderSupport.cpp
5186947b171bc36a77b36ad9fd72c6f0a7d8fade 10-May-2017 Steven Moreland <smoreland@google.com> remove "// static" comments

Test: pass
Change-Id: I6866fc0ed7bf3251e3af51b4505172b5f4af273b
/system/libhidl/transport/HidlBinderSupport.cpp
108d09d4eae07cd1d70a76187a929dc61548a229 06-May-2017 Steven Moreland <smoreland@google.com> libhidltransport: move methods to sources

Moved all methods with no templatization into sources.

Test: links
Bug: 35710429
Change-Id: I44bd6407e1bd74dd188b4033ddf176587ccdd8e7
/system/libhidl/transport/HidlBinderSupport.cpp
9d3eb357a2a3a64baa4824d550b5563b3dc0b15a 19-Apr-2017 Martijn Coenen <maco@google.com> Validate incoming data properly.

readEmbeddedBuffer() now requires the correct length
of the buffer as an argument.

Modified the readEmbeddedFromParcel() functions to take
a const-reference to the struct the data is embedded in;
the kernel has already fixed up the pointers, we just need
to verify the buffer has the correct size, parent buffer
and offset within that parent buffer.

Bug: 30498700
Test: hidl_test, hidl_test_java, YouTube, Maps, Netflix, Camera
Change-Id: I44d6ca7ef6f252f8154b03ff9914b7db69c70604
Merged-In: I44d6ca7ef6f252f8154b03ff9914b7db69c70604
/system/libhidl/transport/HidlBinderSupport.cpp
72db40f4a612d04187ae2fc1f9a3766933264bdf 10-Mar-2017 Steven Moreland <smoreland@google.com> Status.h: remove service specific error codes.

These are leftover from binder and are never used in HIDL/hwbinder.

Test: libhidl_test + hidl_test + internal marlin boots/works.
Bug: 36099713
Change-Id: I12b20e1ae54d9df802a961bc9bc99f616291b0fd
/system/libhidl/transport/HidlBinderSupport.cpp
6d4acb12519597610322097f86850d9e404d251a 03-Mar-2017 Hridya Valsaraju <hridya@google.com> Change size_t member of hidl_memory type to uint64_t

Also static_assert offsets to private members
in hidl_* types used in parcelling/unparcelling code.

Bug: 34986428 33846034
Test: hidl_test passes

Change-Id: Ib2ee81c45ee797f4933ed142160aeed250675819
/system/libhidl/transport/HidlBinderSupport.cpp
24332ef104a44b4bfb28c56ac2aa44584190e337 08-Mar-2017 Yifan Hong <elsk@google.com> Disable getDebugInfo address leak for production builds.

On production builds debugfs won't be available, so lshal cannot
infer binder relationships anyway. The address leak on production
builds also expose a security hole for address space attacks.
Added a build-time flag to disable the address leak on user builds.
The address will still be exposed for eng and userdebug builds so
that lshal can work properly.

Bug: 34899586
Test: lshal still works
Change-Id: Id1c381fbccad7584c2932deb9212d6996eeefd75
/system/libhidl/transport/HidlBinderSupport.cpp
6cf8fa2d989bf57aed9a62fd9f54261176a9f860 21-Feb-2017 Steven Moreland <smoreland@google.com> Move definition of configureRpcThreadpool.

Functions in headers should only depend on functions that you are
exporting. Otherwise, modules must link against dependencies of this
module.

Test: binderized marlin boots and works

Merged-In: If252dc517d37af8d3621f06d04c89361c4ae8df6
Change-Id: If252dc517d37af8d3621f06d04c89361c4ae8df6
/system/libhidl/transport/HidlBinderSupport.cpp
777bef976bf218a2290b86d52c45dcff84a2f698 02-Feb-2017 Yifan Hong <elsk@google.com> IBase::getReferenceInfo -> getDebugInfo

Bug: 34777099
Bug: 34861460

Test: lshal
Test: NFC / light / audio with and without persistent.hal.binderized;
run lshal to reflect this.

Change-Id: I70aebefcaf5ed92a3c31a7bf2406d610c4533258
/system/libhidl/transport/HidlBinderSupport.cpp
1f535a27054e7553e968cac664981073f0074009 07-Jan-2017 Steven Moreland <smoreland@google.com> Use new read(Embedded)Buffer/readNativeHandle APIs.

hidl_memory may have a null native_handle.
MQDescriptor may not.

Bug: 34134129
Test: hidl_test
Change-Id: I824760d59984a7c3e00309010760e33e4c289ef0
/system/libhidl/transport/HidlBinderSupport.cpp
b2c9c75b74c87e651dd08a100015eab17319556e 08-Dec-2016 Yifan Hong <elsk@google.com> Cleanup Hidl*Support.* files.

* Move gBnConstructorMap to Static.cpp/h
* update obsolete comments

Test: compiles

Change-Id: If9720b8fc3b09e9b91b8fdc04bcde269208471ed
/system/libhidl/transport/HidlBinderSupport.cpp
3079100878a2595be644d866e67c12a9de620fd5 01-Dec-2016 Martijn Coenen <maco@google.com> Hidlized version of IMemory.

- Add hidl_memory type.
- Add android.hidl.memory@1.0 package
- IMapper
- IAllocator
- IMemory
- Add libhidlmemory
- Add default implementation of android.hidl.memory@1.0
- Ashmem
- Ion (TODO, probably in another CL)

Test: compiles (WIP)
Change-Id: I4632eeb6a0051551b54ce04d919aaf551dfc5f28
/system/libhidl/transport/HidlBinderSupport.cpp
00f4a391c6f9a698bbcbbd05bf3d80e213c82884 16-Nov-2016 Yifan Hong <elsk@google.com> Split libhidl into base and transport.

libhidlbase contains "pure" classes that has nothing
to do with tranport level stuff. libhwbinder can now
safely depend on libhidlbase.

IBinder inheriting from IBase will be in a follow up
CL.

Bug: 32756130

Test: mma under hardware/interfaces
Test: hidl_test
Change-Id: Ie2bd80769df3816aab83789ba0d7fca9b5a2e52f
/system/libhidl/transport/HidlBinderSupport.cpp