RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
...
Up to now a rdkservice (aka thunderplugin) was typically coded into one single .so file. Most of the Thunder plug-in libraries are linked with other libraries because they implement their functionality on the basis of functionality provided by other dynamic libraries. When the Thunder plugin library is loaded, these linked libraries are also loaded, as well as libraries needed by those libraries and so on, until the whole library dependency tree is loaded. And for For those plugins that need to run in a different container, it also means that same .so and its defined dependency tree to be is loaded by both the thunderplugin process inside its dedicated container (which you would expect) but it is also loaded by core thunder WPEFramework
process inside WPEFRAMEWORK
container. And that core thunder process typically only needs a portion of this library, the part for exposing JSON-RPC part and transforming to COM RPC and much smaller to zero dependency tree but since there is only one single .so for the plugin defined, it has no other choice then to load that same one - with the unnecessary big dependency tree - (linker reads .so and its definition requires access to full dependency in tree) or loading will fail. This also results that that same unnecessary big dependency tree needs to be made available in the WPEFRAMEWORK
container. It exposes the WPEFRAMEWORK
container to bigger attack surface and sometimes goes against the security design and very reasons why container was split off in first place. Here are some other disadvantages that come with with it :
...
The last step of the splitting process is to set the locator
property in the root
object of the configuration
object in the plugin’s JSON file, to a the name of the library that needs to be loaded by the WPEProcess
. Please note that the locator
property of the main object of the plugin’s JSON file must still point to the library that is needed by the WPEFramework
process. Plugin's JSON file matches the name of the plugin with .json
extension and is placed in the /etc/WPEFramework/plugins
directory on the rootfs. An exemplary plugin’s JSON file with the modification applied is presented here:
Code Block | ||
---|---|---|
| ||
{ "locator":"libWPEFrameworkWebKitBrowser.so", (…) "configuration":{ (…) "root":{ "locator":"libWPEFrameworkWebKitBrowserImpl.so", (…) } (…) } (…) } |
...
libWPEFrameworkWebKitBrowser.so
and libWPEFrameworkWebKitBrowserImpl.so
upstreamed proposed by LG and upstreamed by Metrological, see Jira | ||||||
---|---|---|---|---|---|---|
|
Thanks to this we avoid mounting in the WPEFRAMEWORK
the following libraries:
...