summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-01add a property for controlling perf_event_paranoidDaniel Micay
(Cherry picked from commit 2b22a66382db8a2fdf5ed7a685085a6d7d67cf12) This adds a system property for controlling unprivileged access to perf_event_paranoid. It depends on adding kernel support for perf_event_paranoid=3 based on grsecurity's PERF_HARDEN feature to completely disable unprivileged access to perf. A minimal port of this feature is used in the vanilla Debian kernel by default. It hides the non-hardened value as an implementation detail, since while it is currently 1, it will probably become 2 in the future. Bug: 29054680 Change-Id: I6e3ae3cf18d8c76df94f879c34fb6fde519b89a9
2016-05-31add /data/misc/profman for outputDavid Sehr
Bug: 28748264 Change-Id: Ib57ccc570de446e03ea8c27ce8e404929138b213
2016-05-30Merge "Add /vendor/xbin to the list of directories of executables" into nyc-devErik Kline
2016-05-27Add /vendor/xbin to the list of directories of executablesErik Kline
Bug: 28850734 Change-Id: Iaa14a463294d1f8a9c69328a273ce7f12a558bab
2016-05-26[adb] Followup CL to clean up adb_auth_host.cppYurii Zubrytskyi
Get rid of unused includes + replace a fixed-size buffer with an std::string Change-Id: I4f9927b900a79a012b5d52908b9d22ac3d2a401c
2016-05-26[adb] Issue the "auth" emulator command before any other oneYurii Zubrytskyi
Emulator console now requires authentication; this means 'adb emu ...' commands silently fail because of it. This CL adds an 'auth <token>' command to each user command, making sure it won't be silently ignored. Bug: https://code.google.com/p/android/issues/detail?id=211233 Change-Id: Id9ca4999fd2e6393cc88278eaf444243e13c0ec0
2016-05-24resolve merge conflicts of f0d4f38 to nyc-devElliott Hughes
Change-Id: Ibce10a3c66560c10c67bd51f5b568552f43825f2
2016-05-24resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee ↵Elliott Hughes
am: ad0c2bf5f3 am: a17f2802b1 am: 20b1e79563 am: c443a447b2 am: 5538f8bb63 * commit '5538f8bb63c79d1b9de6e809e085bd78b1027f9c': Fix scanf %s in lsof. Change-Id: I09d37fb2798e6038bb00fb8e210b9d3c5348a4e4
2016-05-24resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee ↵Elliott Hughes
am: ad0c2bf5f3 am: a17f2802b1 am: 20b1e79563 am: c443a447b2 * commit 'c443a447b2f6e950b03fe472c5f7cb6c54e9ba61': Fix scanf %s in lsof. Change-Id: Ia66e81641532cf7bca669fb52095aeca90158807
2016-05-24resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee ↵Elliott Hughes
am: ad0c2bf5f3 am: a17f2802b1 am: 20b1e79563 * commit '20b1e795637686d3a18c79413cccbba16881e295': Fix scanf %s in lsof. Change-Id: Ic63528dee82e3045020b527c093b9b4fffaf5530
2016-05-24resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee ↵Elliott Hughes
am: ad0c2bf5f3 am: a17f2802b1 * commit 'a17f2802b153b2ee361fea9a6cc37da0613a2e55': Fix scanf %s in lsof. Change-Id: I088944d9c376de58705698bfe7d417a10c708909
2016-05-24resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aeeElliott Hughes
am: ad0c2bf5f3 * commit 'ad0c2bf5f345a4cdb53a3e4f690db842e8df1685': Fix scanf %s in lsof. Change-Id: I51f630de4cb5ce667ac856a1848206c368816aea
2016-05-24resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6Elliott Hughes
am: 1a98776aee * commit '1a98776aee4d02c33d922bbbe3ffdd54099840a9': Fix scanf %s in lsof. Change-Id: I1af0d93d03631f257b1372a08aad158508f652ea
2016-05-24resolve merge conflicts of 7f5da85 to lmp-devElliott Hughes
am: de529e72b6 * commit 'de529e72b63c135053711ceb27a043f8d80e308c': Fix scanf %s in lsof. Change-Id: I4dc617bbe052059b04296e4213fb778fbf3cf8eb
2016-05-24resolve merge conflicts of 7f5da85 to lmp-devElliott Hughes
Change-Id: I7a7547426a229ac99d187ec8bfabd49c4da51907
2016-05-24Fix scanf %s in lsof. am: 008efb756fElliott Hughes
am: 491dfb11b7 * commit '491dfb11b762f44dc9848496d5d30514082aab64': Fix scanf %s in lsof. Change-Id: Ife17fa56f125dfec08d0d4b0c5c368bdae51106e
2016-05-24Fix scanf %s in lsof.Elliott Hughes
am: 008efb756f * commit '008efb756fea8a9e66a1825b546e9dc392c72bec': Fix scanf %s in lsof. Change-Id: I608ae2094649617308b45571df1b649724ec8ac3
2016-05-24Merge "Remove target_sdk_version parameter" into nyc-devTreeHugger Robot
2016-05-24Remove target_sdk_version parameterDimitry Ivanov
Since linker-namespaces are enabled for all target_sdk_versions and there is no longer need in workarounds in libnativeloader - remove unused target_sdk_version parameter for internal calls. This also brings libnativeloader closer to aosp/master Bug: http://b/26040253 Change-Id: I7d6f6ac31be0dca5f3c3f6ea20e6cc87ce3a3c7f
2016-05-24Merge "Fix SharedBuffer. Remove aref." into nyc-devHans Boehm
2016-05-24Merge "adb: close ep0 on disconnection." into nyc-devYabin Cui
2016-05-23Fix SharedBuffer. Remove aref.Hans Boehm
Add comment that SharedBuffer is deprecated. Both aref and SharedBuffer had memory ordering bugs. Aref has no clients. SharedBuffer had several bugs, which are fixed here: mRefs was declared neither volatile, not atomic, allowing the compiler to, for example, reuse a stale previously loaded value. It used the default android_atomic release memory ordering, which is insufficient for reference count decrements. It used an ordinary memory read in onlyOwner() to check whether an object is safe to deallocate, without any attempt to ensure memory ordering. Comments claimed that SharedBuffer was exactly 16 bytes, but this was neither checked, nor correct on 64-bit platforms. This turns mRef into a std::atomic and removes the android_atomic dependency. Bug: 28826227 Change-Id: I39fa0b4f70ac0471b14ad274806fc4e0c0802e78 (cherry picked from commit 3e4c076ef204c4b572d02bd1c8dbf8c599e0014d)
2016-05-19Fix memory order and race bugs in Refbase.h & RefBase.cppHans Boehm
Convert to use std::atomic directly. Consistently use relaxed ordering for increments, release ordering for decrements, and an added acquire fence when the count goes to zero. Fix what looks like another race in attemptIncStrong: It seems entirely possible that the final adjustment for INITIAL_STRONG_VALUE would see e.g. INITIAL_STRONG_VALUE + 1, since we could be running in the middle of another initial increment. Attempt to somewhat document what this actually does, and what's expected from the client. Hide the documentation in the .cpp file for now. Remove a confusing redundant test in decWeak. OBJECT_LIFETIME_STRONG and OBJECT_LIFETIME_WEAK are the only options, in spite of some of the original comments. It's conceivable that either of these issues has resulted in actual crashes, though I would guess the probability is small. It's hard enough to reason about this code without the bugs. Bug: 28705989 Change-Id: I4107a56c3fc0fdb7ee17fc8a8f0dd7fb128af9d8 (cherry picked from commit e263e6c6337a24d56dc803792206e54981ad53a5)
2016-05-19Merge changes I40a11748,I5e56f17f,Ie3748b6c,I4e1d56a8 into nyc-devJosh Gao
* changes: adb: use asocket's close function when closing. adb: switch the socket list mutex to a recursive_mutex. adb: clang-format sockets.cpp. adb: add implementations of mutex, recursive_mutex.
2016-05-18adb: use asocket's close function when closing.Josh Gao
close_all_sockets was assuming that all registered local sockets used local_socket_close as their close function. However, this is not true for JDWP sockets. Bug: http://b/28347842 Change-Id: I40a1174845cd33f15f30ce70828a7081cd5a087e (cherry picked from commit 53eb31d87cb84a4212f4850bf745646e1fb12814)
2016-05-18adb: switch the socket list mutex to a recursive_mutex.Josh Gao
sockets.cpp was branching on whether a socket close function was local_socket_close in order to avoid a potential deadlock if the socket list lock was held while closing a peer socket. Bug: http://b/28347842 Change-Id: I5e56f17fa54275284787f0f1dc150d1960256ab3 (cherry picked from commit 9b587dec6d0a57c8fe1083c1c543fbeb163d65fa)
2016-05-18adb: clang-format sockets.cpp.Josh Gao
Bug: http://b/28347842 Change-Id: Ie3748b6c803d4e8056e9d7abd065a8b99d945a5b (cherry picked from commit 52bd8526aaaf10511177fb42c55c26bc722b0833)
2016-05-18adb: add implementations of mutex, recursive_mutex.Josh Gao
Our version of mingw doesn't support std::mutex or std::recursive_mutex, so implement our own using the Windows primitives. Bug: http://b/28347842 Change-Id: I4e1d56a89bc5fcb5f859bf5014343697a4a85b77 (cherry picked from commit 903b749f7883394213933f733b902e104ce6dda7)
2016-05-18Remove a dead header (<netutils/dhcp.h>).Elliott Hughes
9c07eb9dd83a4b62a24836cc82a0ab5e7ae08f7d removed the implementation, but missed the header file. Bug: http://b/27192644 Change-Id: I809a3eb0081b05783b70dbca0274cdde6b1b31a6
2016-05-17Set parent namespace for linker-namespacesDimitry Ivanov
This change allows applications to share RTLD_GLOBAL native libraries between namespaces associated with different classloaders. The rule is - if a library is GLOBAL within namespace associated with parent classloader, it is shared with namespace associated with this classloader Note that the sharing happens on create_namespace event, which is tied to createClassloader in case of application classloaders created by the framework, for custom application classloaders it is tied to first loadLibrary() event. Bug: http://b/28560538 Bug: https://code.google.com/p/android/issues/detail?id=208458 Change-Id: I7ee701166f8ec5eff033b7acc0f80c7aa4ec5bda (cherry picked from commit 24db75c1ce7ff8376a475214b059b9a37ac07936)
2016-05-17healthd: Check if battery device exists instead of charger drivers before ↵Ruchi Kandoi
setting fake properties. am: 9cb3d3ccf4 am: f2ca669e80 * commit 'f2ca669e80078254ad3aceac800161b3266d3195': healthd: Check if battery device exists instead of charger drivers before setting fake properties. Change-Id: I8115836dbd81264634dd7ab84bc360ac610a030b
2016-05-17healthd: Check if battery device exists instead of charger drivers before ↵Ruchi Kandoi
setting fake properties. am: 9cb3d3ccf4 * commit '9cb3d3ccf49bf0fd484563fbf611c68789d5b8a9': healthd: Check if battery device exists instead of charger drivers before setting fake properties. Change-Id: I521f7a7d097da915e40a273d73a655aa01ea397e
2016-05-17Merge "Fix strstr16." into nyc-devMichael Wright
2016-05-16Pass permitted_path to the linker as is.Dimitry Ivanov
Now that we have the fixed list of whitelisted libraries there is no longer need to check if java_permitted_path is nullptr. In fact checking it prevents custom classloaders created by apps from loading libraries using absolute path. Bug: http://b/28659864 Change-Id: I1bfc16a573b090f70f078ecccd0e4016939a5dc0 (cherry picked from commit b31caa95ec1ab9da7b300544e9716c1cac92d8f8)
2016-05-16Fix strstr16.Michael Wright
strcmp needs a limit, otherwise it will compare the null terminator with the next character in the haystack, which results in the compare failing for all searches except where the needle is found at the very end. Bug: 28663748 Change-Id: I1939dc4037c2f2a75d617943b063d2d38a8c5e3a
2016-05-16healthd: Check if battery device exists instead of charger drivers beforeRuchi Kandoi
setting fake properties. healthd used to check for registered charger drivers to determine if the device is an always-plugged device with no battery. This patch changes it to check for battery instead. Change-Id: Ie4ff5d3f21dc1a83a780a41eb0c929f66b86d631 Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com> (cherry picked from commit fabd490f58df73711a56478c9777f397fca733f6)
2016-05-16Merge "Add String16#contains and strstr16 methods." into nyc-devTreeHugger Robot
2016-05-11Move linker-namespace functions declarationsDimitry Ivanov
They are intended for platform use only and we shouldn't have them in the public header file. This CL moves them to libnativeloader private header file. Bug: http://b/28174921 Change-Id: I01cf446d2d8d7cf6f9e31130aa3d4e54fbbbb9fc (cherry picked from commit 6796522256b4cd861d3ebaf8264bd272b3c7441f)
2016-05-11Merge "nativeloader: Ignore empty java_permitted_path" into nyc-devDimitry Ivanov
2016-05-10nativeloader: Ignore empty java_permitted_pathDimitry Ivanov
Passing empty permitted path should result in no-op. This addresses review comment on CL with commit f334cbf0e1425633bef96a21b0ce9e30f4c6ffa9 Bug: http://b/28639227 Change-Id: I4a4540e522e90a145a374939921932c86f35e88d
2016-05-10Merge "Wipe device on policy error" into nyc-devPaul Crowley
2016-05-10Wipe device on policy errorPaul Crowley
If we fail to set a crypto policy on a system-DE directory, this is a serious and unrecoverable condition; the only way forward is to erase the entire device. In a future commit we will also allow users the option of booting again. Bug: 28318405 Change-Id: Iff1e52c5bbee1beed29dc4b609d24bfeb7d138da
2016-05-10Extend white-listed directories to include /mnt/expandDimitry Ivanov
Apps on sdcard live under /mnt/expand and therefore this directory should be under linker namespaces permitted_path. Bug: http://b/28639227 Change-Id: I462f9f23656c95d9c2a48bb3f513abcd9d08f340
2016-05-09nativeloader: Fix the case of search_path == nullDimitry Ivanov
When user creates custom classloader which does not extend BaseDexClassLoader the librarySearchPath gets set to null by java.lang.Runtime.doLoad(). This patch makes nativeloader correctly handle it. Bug: http://b/28659864 Change-Id: I1b61c6bc952984d7c49775a9178fc3270948e62a (cherry picked from commit 8a0425b86acd4f20ef68ef350ac32e1c5057c558)
2016-05-09Add String16#contains and strstr16 methods.Michael Wright
These are needed for aapt to find javadoc comments that contain "@removed" in order to skip them when printing styleable docs. Bug: 28663748 Change-Id: I8866d2167c41e11d6c2586da369560d5815fd13e
2016-05-09Return correct length from pmsgRead()Rubin Xu
Bug: 28610769 Change-Id: I38cac786ca43ef8d9530f4e2e5a0bdd4cc3bccef
2016-05-06Merge "Add public libs from an environment variable" into nyc-devTreeHugger Robot
2016-05-06Merge "adb: search for a maximum of 16 emulators." into nyc-devJosh Gao
2016-05-06Add public libs from an environment variableDimitry Ivanov
This is enabled only for builds with ro.debuggable=1 It is intended for use only in tests using dalvikvm and needing access to platform libraries. Bug: http://b/28449304 Change-Id: I402457d0da542996ccf265aeaa305f09881e4333 (cherry picked from commit 4ddabd01bf361cadb33baa7213e2ca5129b938f0)
2016-05-06adb: search for a maximum of 16 emulators.Josh Gao
Android Wear has unfortunately been using port 5601 for years, which falls into the range of ports we were previously polling for Android emulators. Reduce the maximum number of emulators we can support so that 5601 no longer falls within our range. Bug: http://b/26468076 Change-Id: I931809cfa412122f4781eebe0164facab12c95f0