Commit Graph

29 Commits

Author SHA1 Message Date
dimitry b6ba817de4 Define current ABI string in android-base/macros.h
Test: make
Change-Id: I8200d7b3232edba43a583c5ff1e1b0f78c768f69
2017-08-23 20:46:38 +02:00
Dimitry Ivanov ac8abec905 resolve merge conflicts of bb958f0f5 to oc-dev-plus-aosp
Test: n/a
Change-Id: Iede624aa5210794d48b63d6053293028483b89c7
2017-05-25 09:57:15 -07:00
Dimitry Ivanov af0264bbe9 Load vendor public libraries to sphal namespace
Load vendor public libraries to sphal namespace
if it exists - preserve old behavior of loading
these libraries to default namespace if sphal
namespace is not present on the device.

Bug: http://b/37410104
Test: cts-tradefed run singleCommand cts --skip-preconditions -m CtsJniTestCases
      on marlin (with enabled sphal configuration) and on angler where ld.config.txt
      is not present.

Change-Id: Iaa3fa437ba2900acc2e5b9c78039fe1553e4c9dd
2017-05-24 11:02:31 -07:00
Zhenhua WANG caf7750f3f NativeBridge: add "linked namespace" semantic corresponding to linker
For dynamic linking perspective, semantics of NativeBridge needs to
align with dynamic linker. This patch adds "linked namespace" semantic
which shares some libraries from one namespace to another.

Bug: 37123321
Test: Fugu: netflix, play movies, youtube
Test: make test-art-host-run-test-115-native-bridge

cherry picked from commit e8fb11dfa1

Change-Id: I71ce1dde19d61363d5eb9731fd4795a8c315b3a0
2017-04-07 10:42:51 -07:00
Zhenhua WANG e8fb11dfa1 NativeBridge: add "linked namespace" semantic corresponding to linker
For dynamic linking perspective, semantics of NativeBridge needs to
align with dynamic linker. This patch adds "linked namespace" semantic
which shares some libraries from one namespace to another.

Test: make test-art-host-run-test-115-native-bridge
Change-Id: I71ce1dde19d61363d5eb9731fd4795a8c315b3a0
2017-03-29 17:34:11 -07:00
Mark Salyzyn 30f991f251 liblog: use log/log.h when utilizing ALOG macros
Test: compile
Bug: 30465923
Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
2017-01-11 09:31:15 -08:00
Dimitry Ivanov d836ab005a Allow different namespace types for different classloaders
An app should be able to make cross-arch calls to different apps
via other app's Context.getClassLoader()

Bug: 32542970
Test: Boot fugu. Check that there are no linker-namespace
      related errors in the log.

Change-Id: I1593f4688bcde0121a5e24a707441a4935fa7dc4
2016-11-04 15:21:13 -07:00
Zhenhua WANG f2804e5985 Upgrade native bridge to version 3 to support namespace
Native bridge implements namespace related interfaces in version 3.
The namespace semantic here is same as Android dynamic linker's.
Native loader wraps library loading functions of dynamic linker and
native bridge. Thus, Android runtime is able to load native library
of different ISA on one device by calling native loader directly.

Bug: http://b/28242460
Test: mm && make test-art-host -j48
Change-Id: Idde2b9d99fb6ebe547407c716b5478a231f745a7
Signed-off-by: Zhenhua WANG <zhenhua.wang@intel.com>
2016-10-25 11:11:38 -07:00
Mark Salyzyn cfd5b080af system/core: preparation to pull back interfaces from android/log.h
Point to log/log.h where necessary, define LOG_TAG where necessary.
Accept that private/android_logger.h is suitable replacement for
log/logger.h and android/log.h.

Correct liblog/README

Effectively a cleanup and controlled select revert of
'system/core: drop or replace log/logger.h' and
'system/core: Replace log/log.h with android/log.h'.

Test: compile
Bug: 30465923
Change-Id: Ic2ad157bad6f5efe2c6af293a73bb753300b17a2
2016-10-20 08:11:39 -07:00
Mark Salyzyn 66ce3e08c5 system/core Replace cutils/log.h with android/log.h
Should use android/log.h instead of cutils/log.h as a good example
to all others.  Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
2016-09-30 12:47:05 -07:00
Douglas Leung d10e01775b Add Mips64 Runtime ISA type.
Change-Id: I8d8d1ab10787899e91abafe269b59ee535e85653
2016-02-08 14:02:47 -08:00
Calin Juravle 5e11a2936b Revert "nativebrige: log code_cache access errors to stderr as well"
This reverts commit 6d5017803e.

Bug: 26675310

Change-Id: Id56b5e832c85f01fca0a2198499d24224c5a6878
2016-01-27 17:53:20 +00:00
Calin Juravle 6d5017803e nativebrige: log code_cache access errors to stderr as well
115-native-bridge is a flaky tests. This will help tracing the flakiness
cause.

Change-Id: I7b8000738cd97b9cdb1055a0480ff9acbd85cae6
2016-01-12 12:24:16 -08:00
Elliott Hughes 9b828adfad Use __ANDROID__ instead of HAVE_ANDROID_OS.
Change-Id: I9967f3fd758c2a5b40be5b60ae72be7e2fb75136
2015-07-30 09:33:43 -07:00
jgu21 cef898fa8f Allow native bridge to work without a code cache
In isolatedProcess, the app_code_cache_dir is not needed
for native bridge. This commit allows native bridge to work
without a code cache in isolatedProcess.

Change-Id: I8580268d5ec6ca8d44e4500c3fafe10408e1e0d3
Signed-off-by: jgu21 <jinghui.gu@intel.com>
2015-07-10 11:22:09 +08:00
Andreas Gampe a6ac9ce98b LibNativeBridge: Version 2
Add a callback function to retrieve "signal handler" from the bridge,
if the bridge wants it to be managed by the runtime. The signal handler
will be invoked after the runtime's own one, and before any other
chained handler.

Add a callback function to check compatibility of the bridge with the
library.

Add a function to expose the native bridge version. Add a test for this
function.

Bug: 20217701
Change-Id: Ic23a60b949f119c7d8b0e7cb27a61e6c16532a23
2015-05-14 20:20:49 -07:00
Narayan Kamath 484c55b37f Track renaming of initUnchangeableSystemProperty.
It's now setUnchangeableSystemProperty.

Change-Id: Ib42f8ac9f074230dfb7af2eb633e0a536ab7d4b7
2015-02-10 15:43:41 +00:00
Narayan Kamath 8cf2ce1064 Merge "Don't allow SUPPORTED_ABIs to be set by the native bridge." 2014-10-27 16:16:02 +00:00
Calin Juravle f9d9e2a2d9 Handle code_cache dir creation in libnativebridge
Also:

- add kPreInitiliazed state to native bridge with check transition:
kOpened->kPreInitialized->kInitialized
- made sure we free the memory for the code_cache_path
- tidy up some error messages
- tidy up tests
- add a dummy native bridge to test with

Bug: 18027433
Bug: 18097480

Change-Id: I39f74c93580f2e224080dd3df2ffaa9cf9f8cd9c
2014-10-27 15:03:13 +00:00
Narayan Kamath dd22aeff73 Don't allow SUPPORTED_ABIs to be set by the native bridge.
SUPPORTED_ABIs is a prioritized list of all ABIs a device
support, and must not vary depending on whether or not an app
is emulated.

bug: 18061712

(cherry picked from commit 66f0d93c26)

Change-Id: I99cea3a56228dac43ae310c295881881e5a77c31
2014-10-22 18:56:32 +01:00
Calin Juravle c3eb4314b7 Use initUnchangeableSystemProperty for initializing os.arch.
Bug: 17713104

(cherry picked from commit 00851a53be)

Change-Id: Ibddc535248a10e3534586eafb76c074332e025c4
2014-10-01 21:16:16 +01:00
Andreas Gampe 04054e28e2 LibNativeBridge: Add testing
Change PreInitializeNativeBridge to have a different path for
the host to allow testing. Add a test (needs root privileges).

Add a test for NeedsNativeBridge.

Change error reporting to use strerror.

Change-Id: Id2d488f0484ff8b0438863b48ef43770e784505f
2014-09-25 23:18:31 -07:00
Andreas Gampe 2f71cb24fa LibNativeBridge: Fix two bugs
Instruction set comparison must include the termination character
so that prefixes are not identified as equal.

Mount argument order was wrong.

Change-Id: Ib70e36ce2ea5af158ebc9d7fafd00e978348d73d
2014-09-25 21:34:25 -07:00
Andreas Gampe 4390a63236 LibNativeBridge: Fix mac build warning
Change-Id: I5a819cb5edb064b8a7288b5f2b3100c515421adf
2014-09-24 20:14:28 -07:00
Andreas Gampe 962eb40abb LibNativeHelper: No bind mount on mac
Cannot bind-mount /proc/cpuinfo on the mac.

Change-Id: Id5f0cd46ba0eba484477c56bbecf14d95e88d6f2
2014-09-24 16:36:17 -07:00
jgu21 ab0da5a9a6 LibNativeBridge: Add early init & env setup
Add a method to set up /proc/cpuinfo with enough privileges. Set
up the environment for an app in InitializeNativeBridge().

Turn on -Wall for libnativebridge.

Change-Id: I0b93da93251c6b4638de786bf98cf99df07c3fc2
2014-09-23 20:08:25 -07:00
Andreas Gampe 035bd7541e NativeBridge: Refactor for new initialization flow
Setup becomes Load, have explicit Initialize and Unload.

Change-Id: I5a20de1cb68dd1802937b369b14c50c9c1031c67
2014-09-04 12:57:54 -07:00
Andreas Gampe 049249ce7a NativeBridge: Tighten security on libnativebridge
Do not allow arbitrary paths for the native bridge - only allow
simple names.

Do not allow re-setup of the native bridge.

Bug: 16404669

(cherry picked from commit cd2ef4c1af)

Change-Id: Ie22de356d2307fe2758f9094a85d44e61a4098a1
2014-08-22 01:44:06 -07:00
Calin Juravle 961ae12dea Move native bridge library in system/core
Bug: 16884833

Change-Id: I73aab8e212860ba5aee9444d801806d3da326a41
2014-08-12 22:39:25 +01:00