OSDN Git Service
Dan Albert [Tue, 24 Mar 2015 18:43:55 +0000 (11:43 -0700)]
Convert result of a call to JSON.
I still had the service that was relying on this running on top of
local changes, so this hadn't been a problem yet.
Change-Id: I63b45b8c7cf81972dbb7128013c1c777a2342d4c
Yabin Cui [Tue, 24 Mar 2015 02:39:50 +0000 (02:39 +0000)]
Merge "Let g_thread_list_lock only protect g_thread_list."
Yabin Cui [Thu, 19 Mar 2015 21:19:19 +0000 (14:19 -0700)]
Let g_thread_list_lock only protect g_thread_list.
As glibc/netbsd don't protect access to thread struct members by a global
lock, we don't want to do it either. This change reduces the
responsibility of g_thread_list_lock to only protect g_thread_list.
Bug:
19636317
Change-Id: I897890710653dac165d8fa4452c7ecf74abdbf2b
Dmitriy Ivanov [Tue, 24 Mar 2015 00:48:57 +0000 (00:48 +0000)]
Merge "RTLD_LAZY is not supported, use RTLD_NOW instead."
Yabin Cui [Mon, 23 Mar 2015 23:18:27 +0000 (23:18 +0000)]
Merge "Add test for pthread types alignment check."
Dmitriy Ivanov [Mon, 23 Mar 2015 21:58:45 +0000 (14:58 -0700)]
RTLD_LAZY is not supported, use RTLD_NOW instead.
Change-Id: Ia08ed6416aef686435224b50b3e58955d09f04e2
Dan Albert [Mon, 23 Mar 2015 20:32:15 +0000 (20:32 +0000)]
Merge "Work around a bug in the Jenkins queue API."
Dan Albert [Mon, 23 Mar 2015 20:29:15 +0000 (13:29 -0700)]
Work around a bug in the Jenkins queue API.
https://issues.jenkins-ci.org/browse/JENKINS-27256
1.601 broke the ability to get a build's URL before the build had
actually started. The bug is pseudo-fixed, but would require
installing a new plugin and fixing the python jenkinsapi plugin for
the time being to use /queuefix/ rather than /queue/.
Just avoiding logging a URL for now.
Change-Id: Ibf90e5887fc4532dac688082ad7729787897da11
Yabin Cui [Tue, 17 Mar 2015 05:46:42 +0000 (22:46 -0700)]
Add test for pthread types alignment check.
Bug:
19249079
Change-Id: I83c4f0d11ec5d82a346ae0057d02a92bb1d519e8
Yabin Cui [Fri, 20 Mar 2015 23:26:23 +0000 (23:26 +0000)]
Merge "Fix alignment error for pthread_internal_t/pthread stack."
Yabin Cui [Fri, 20 Mar 2015 17:58:04 +0000 (10:58 -0700)]
Fix alignment error for pthread_internal_t/pthread stack.
aligned attribute can only control compiler's behavior, but we
are manually allocating pthread_internal_t. So we need to make
sure of alignment manually.
Change-Id: Iea4c46eadf10dfd15dc955c5f41cf6063cfd8536
Dmitriy Ivanov [Fri, 20 Mar 2015 04:05:51 +0000 (04:05 +0000)]
Merge "Limit soinfo compatibility fields to arm32"
Dmitriy Ivanov [Fri, 20 Mar 2015 00:50:29 +0000 (17:50 -0700)]
Limit soinfo compatibility fields to arm32
Change-Id: I3924cd68397c223c0d206295d587f9dd8ebdc086
Yabin Cui [Fri, 20 Mar 2015 00:00:29 +0000 (00:00 +0000)]
Merge "Return EINVAL when calling pthread_detach for joined thread."
Yabin Cui [Thu, 19 Mar 2015 22:19:25 +0000 (15:19 -0700)]
Return EINVAL when calling pthread_detach for joined thread.
Change-Id: I717015132187e087e0ad485284a13c8801e25e77
Yabin Cui [Thu, 19 Mar 2015 23:38:40 +0000 (23:38 +0000)]
Merge "Fix two errors in pthread_detach.cpp."
Yabin Cui [Thu, 19 Mar 2015 23:28:19 +0000 (16:28 -0700)]
Fix two errors in pthread_detach.cpp.
The errors are introduced in "Make pthread join_state not protected by g_thread_list_lock".
Bug:
19636317
Change-Id: I58ae9711da94bfbac809abfd81311eeb70301a4b
Dmitriy Ivanov [Thu, 19 Mar 2015 17:06:15 +0000 (17:06 +0000)]
Merge "Move open from zip tests to dlext"
Dmitriy Ivanov [Thu, 19 Mar 2015 05:50:01 +0000 (22:50 -0700)]
Move open from zip tests to dlext
To avoid building them for glibc.
Also replace snprintf with std::string
Change-Id: I12e1d2e4ab46ff5af6c05453da67842e0d838fc5
Yabin Cui [Thu, 19 Mar 2015 02:50:19 +0000 (02:50 +0000)]
Merge "Make __get_thread inlined."
Dmitriy Ivanov [Thu, 19 Mar 2015 02:40:30 +0000 (02:40 +0000)]
Merge "Implement lookup by DT_SONAME"
Yabin Cui [Wed, 18 Mar 2015 21:14:02 +0000 (14:14 -0700)]
Make __get_thread inlined.
Bug:
19825434
Change-Id: Ifb672a45a5776b83625a25654ed0d6f7fc368ae3
Dmitriy Ivanov [Wed, 18 Mar 2015 03:06:36 +0000 (20:06 -0700)]
Implement lookup by DT_SONAME
This CL also fixes SEARCH_NAME hack and resolves
https://code.google.com/p/android/issues/detail?id=6670
once and for all.
Bug: https://code.google.com/p/android/issues/detail?id=6670
Change-Id: I9b8d6a672cd722f30fbfbb40cdee8d9b39cfe56e
Elliott Hughes [Wed, 18 Mar 2015 23:11:51 +0000 (23:11 +0000)]
Merge "Hide statfs/fstatfs' ST_VALID flag from userspace."
Elliott Hughes [Wed, 18 Mar 2015 22:46:48 +0000 (15:46 -0700)]
Hide statfs/fstatfs' ST_VALID flag from userspace.
Spotted while debugging the strace 4.10 upgrade.
Change-Id: I1af1be9c9440151f55f74a835e1df71529b0e4fe
Dmitriy Ivanov [Wed, 18 Mar 2015 22:09:07 +0000 (22:09 +0000)]
Merge "Fix library lookup for filenames with slash."
Dmitriy Ivanov [Wed, 18 Mar 2015 00:12:18 +0000 (17:12 -0700)]
Fix library lookup for filenames with slash.
If filename contains a slash, then it is interpreted
as a (relative or absolute) pathname.
Bug: https://code.google.com/p/android/issues/detail?id=6670
Change-Id: Iba57d638301f3089ad47ba083edca2dd36b801ed
Dimitry Ivanov [Wed, 18 Mar 2015 17:25:32 +0000 (17:25 +0000)]
Merge "Support loading shared libraries from zip files"
Elliott Hughes [Wed, 18 Mar 2015 01:15:04 +0000 (01:15 +0000)]
Merge "Fix _PATH_DEFPATH to correspond to the actual default path."
Elliott Hughes [Wed, 18 Mar 2015 01:05:23 +0000 (01:05 +0000)]
Merge "set errno to ENOENT in getauxval per glibc 2.19"
Elliott Hughes [Wed, 18 Mar 2015 00:34:14 +0000 (17:34 -0700)]
Fix _PATH_DEFPATH to correspond to the actual default path.
This is currently set in init.rc, but I plan on making init
set PATH to _PATH_DEFPATH and removing the line from init.rc...
Bug:
19564110
Change-Id: Ifa7226a3a5a90d141a788d7d6b1ae86245674218
Daniel Micay [Mon, 16 Mar 2015 01:39:25 +0000 (21:39 -0400)]
set errno to ENOENT in getauxval per glibc 2.19
Bionic's getauxval(...) implementation returns zero when entries are
missing. Zero can be a valid value, so there is no unambiguous way of
detecting an error. Since glibc 2.19, errno is set to ENOENT when an
entry is missing to make it possible to detect this. Bionic should match
this behavior as code in the Linux ecosystem will start relying on it to
check for the presence of newly added entries.
Change-Id: Ic1efe29bc45fc87489274c96c4d2193f3a7b8854
Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Yabin Cui [Tue, 17 Mar 2015 21:20:52 +0000 (21:20 +0000)]
Merge "Change name of rwlock benchmark."
Yabin Cui [Tue, 17 Mar 2015 18:19:07 +0000 (11:19 -0700)]
Change name of rwlock benchmark.
rw_lock is not easy for me to remember, so I prefer changing it to rwlock.
Change-Id: I0784acaca0c3b46c28184a77eb29ffe696f9ea07
Yabin Cui [Tue, 17 Mar 2015 18:40:38 +0000 (18:40 +0000)]
Merge "Fix build: pthread_mutex/pthread_detach."
Yabin Cui [Tue, 17 Mar 2015 18:34:57 +0000 (11:34 -0700)]
Fix build: pthread_mutex/pthread_detach.
Change-Id: I9c7b6297d3bf3ab8004d05d44cc4c95159315c9e
Yabin Cui [Tue, 17 Mar 2015 18:12:58 +0000 (18:12 +0000)]
Merge "Make pthread join_state not protected by g_thread_list_lock."
Yabin Cui [Tue, 17 Mar 2015 18:12:32 +0000 (18:12 +0000)]
Merge "Remove duplication in pthread_mutex.cpp."
Simon Baldwin [Fri, 16 Jan 2015 13:22:54 +0000 (13:22 +0000)]
Support loading shared libraries from zip files
Add code to support loading shared libraries directly from within
APK files.
Extends the linker's handling of LD_LIBRARY_PATH, DT_RUNPATH, etc
to allow elements to be either directories as normal, or ZIP
format files. For ZIP, the ZIP subdirectory string is separated
from the path to file by '!'.
For example, if DT_NEEDED is libchrome.so and Chrome.apk is the
Android ARM APK then the path element
/system/app/Chrome.apk!lib/armeabi-v7a
would cause the linker to load lib/armeabi-v7a/libchrome.so
directly from inside Chrome.apk. For loading to succeed,
libchrome.so must be 'stored' and not compressed in Chrome.apk,
and must be page aligned within the file.
Motivation:
Chromium tracking issue:
https://code.google.com/p/chromium/issues/detail?id=390618
Bug:
8076853
Change-Id: Ic49046600b1417eae3ee8f37ee98c8ac1ecc19e7
Dmitriy Ivanov [Tue, 17 Mar 2015 00:10:49 +0000 (00:10 +0000)]
Merge "Fix build: align pthread_cond_t to sizeof(long)"
Dmitriy Ivanov [Tue, 17 Mar 2015 00:06:59 +0000 (17:06 -0700)]
Fix build: align pthread_cond_t to sizeof(long)
Change-Id: Ieaee6d09089b161ec516ba22cafaee1ecb4342da
Christopher Ferris [Mon, 16 Mar 2015 23:33:34 +0000 (23:33 +0000)]
Merge "Add alignment to opaque types."
Christopher Ferris [Mon, 16 Mar 2015 23:21:08 +0000 (16:21 -0700)]
Add alignment to opaque types.
If there is no alignment forced, then the compiler might put these
structures at any alignment.
Change-Id: I6416db72433504e0ec1178bfae6f5b18b6e363fb
Dmitriy Ivanov [Mon, 16 Mar 2015 21:50:16 +0000 (21:50 +0000)]
Merge "Remove obsolete test_isolated wrapper function"
Dmitriy Ivanov [Mon, 16 Mar 2015 21:49:58 +0000 (21:49 +0000)]
Merge "General purpose memory allocator for linker."
Yabin Cui [Mon, 16 Mar 2015 21:31:08 +0000 (21:31 +0000)]
Merge "Fix atomic_load on const variable in pthread_cond_t."
Yabin Cui [Mon, 16 Mar 2015 21:26:53 +0000 (14:26 -0700)]
Fix atomic_load on const variable in pthread_cond_t.
Change-Id: I60f55a53294a09332a3fbec669ed793359d1bdf5
Dmitriy Ivanov [Mon, 16 Mar 2015 21:15:46 +0000 (14:15 -0700)]
Remove obsolete test_isolated wrapper function
We already run all of our tests in isolated mode.
Change-Id: I8236baa302b1026a9b4a1c33a4aa65e223771bc7
Dan Albert [Mon, 16 Mar 2015 21:02:51 +0000 (21:02 +0000)]
Merge "Revert "Revert "Moving StringPrintf to libbase."""
Yabin Cui [Mon, 16 Mar 2015 20:58:01 +0000 (20:58 +0000)]
Merge "Hide content of pthread_cond_t in pthread_cond_internal_t."
Dmitriy Ivanov [Mon, 16 Mar 2015 20:30:01 +0000 (20:30 +0000)]
Merge "Fix typo"
Dmitriy Ivanov [Mon, 16 Mar 2015 20:20:23 +0000 (13:20 -0700)]
Fix typo
Change-Id: Ie6dad7d09873c88f6bbb2d45c2780e3b0c618bd6
Dmitriy Ivanov [Wed, 11 Mar 2015 00:48:27 +0000 (17:48 -0700)]
General purpose memory allocator for linker.
Add basic general purpose memory allocator to
linker in order to enable usage of other libraries
like libziparchive.
Change-Id: I4a680ebb36ed5ba67c61249f81dba9f567808434
Yabin Cui [Sat, 14 Mar 2015 03:30:00 +0000 (20:30 -0700)]
Hide content of pthread_cond_t in pthread_cond_internal_t.
Bug:
19249079
Change-Id: I6f55af30bcd6211ce71630c6cacbef0e1663dcee
Dan Albert [Mon, 16 Mar 2015 17:06:29 +0000 (10:06 -0700)]
Revert "Revert "Moving StringPrintf to libbase.""
This reverts commit
d2dad2b24fb82604f9dbe7a082e630a524f1473d.
Nicolas Geoffray [Mon, 16 Mar 2015 12:20:26 +0000 (12:20 +0000)]
Merge "Revert "Moving StringPrintf to libbase.""
Nicolas Geoffray [Mon, 16 Mar 2015 12:19:26 +0000 (12:19 +0000)]
Revert "Moving StringPrintf to libbase."
libbase has been reverted
This reverts commit
7ed5fa1e4d37722a644518594bf2b0e1529c05e9.
Change-Id: I5d8ff8c38ff8c9123e6cee5dc15a101a79e94b2e
Dan Albert [Sat, 14 Mar 2015 23:55:08 +0000 (23:55 +0000)]
Merge "Moving StringPrintf to libbase."
Christopher Ferris [Sat, 14 Mar 2015 19:22:29 +0000 (19:22 +0000)]
Merge "Fix typo in alias symbol."
Christopher Ferris [Sat, 14 Mar 2015 19:17:45 +0000 (12:17 -0700)]
Fix typo in alias symbol.
Change-Id: I41d2c29bd4a9ba382bbe3440541c8e1506fc5809
Christopher Ferris [Sat, 14 Mar 2015 17:44:31 +0000 (17:44 +0000)]
Merge "For libm, use a macro for aliasing symbols."
Christopher Ferris [Sat, 14 Mar 2015 00:43:52 +0000 (17:43 -0700)]
For libm, use a macro for aliasing symbols.
Change-Id: Ibd42ebc387c2bf3eba9aa96091770915b4b34184
Dan Albert [Sat, 14 Mar 2015 05:34:37 +0000 (22:34 -0700)]
Moving StringPrintf to libbase.
Change-Id: I47ef28bb294ffb7c7c065c5624417edf23503b77
Yabin Cui [Sat, 14 Mar 2015 02:38:31 +0000 (02:38 +0000)]
Merge "Hide content of pthread_rwlock_t in pthread_rwlock_internal_t."
Yabin Cui [Fri, 13 Mar 2015 21:22:05 +0000 (14:22 -0700)]
Hide content of pthread_rwlock_t in pthread_rwlock_internal_t.
Bug:
19249079
Change-Id: Ifbe634c716b6793bef897ec5134b55eb44c6b8d5
Christopher Ferris [Fri, 13 Mar 2015 21:12:05 +0000 (21:12 +0000)]
Merge "Add some GNU specific elf constants."
Dmitriy Ivanov [Fri, 13 Mar 2015 21:04:07 +0000 (21:04 +0000)]
Merge "Switch libc and libm to sysv-only hash style"
Dmitriy Ivanov [Fri, 13 Mar 2015 19:43:30 +0000 (12:43 -0700)]
Switch libc and libm to sysv-only hash style
Bug:
19059885
Change-Id: I60a23dc5f9c756994d566818332ca42b305b4a05
Christopher Ferris [Fri, 13 Mar 2015 17:32:45 +0000 (10:32 -0700)]
Add some GNU specific elf constants.
Change-Id: I6c668463a27a641c9a280ce1937857d622344ff8
Christopher Ferris [Fri, 13 Mar 2015 17:18:20 +0000 (17:18 +0000)]
Merge "Add the optimized implementation of 18 math functions for x86 and x86_64 respectively"
Yabin Cui [Fri, 13 Mar 2015 17:02:17 +0000 (17:02 +0000)]
Merge "Make gtest_main exit 1 when some test are failed."
Yabin Cui [Fri, 13 Mar 2015 05:16:03 +0000 (22:16 -0700)]
Make gtest_main exit 1 when some test are failed.
This is the gtest behavior, which I think can make test status
judgement more convenient.
Change-Id: I7d3c210d1744b954a4148cd905dd5c353207fce8
Yabin Cui [Thu, 5 Mar 2015 01:36:59 +0000 (17:36 -0800)]
Remove duplication in pthread_mutex.cpp.
Also add unit tests about thread woken up by pthread_mutex_unlock.
Bug:
19216648
Change-Id: I8bde8105b00186c52a2f41d92458ae4a5eb90426
Yabin Cui [Sat, 7 Mar 2015 01:23:53 +0000 (17:23 -0800)]
Make pthread join_state not protected by g_thread_list_lock.
1. Move the representation of thread join_state from pthread.attr.flag
to pthread.join_state. This clarifies thread state change.
2. Use atomic operations for pthread.join_state. So we don't need to
protect it by g_thread_list_lock. g_thread_list_lock will be reduced
to only protect g_thread_list or even removed in further changes.
Bug:
19636317
Change-Id: I31fb143a7c69508c7287307dd3b0776993ec0f43
Mark Salyzyn [Thu, 12 Mar 2015 20:33:25 +0000 (20:33 +0000)]
Merge "syslog.h: missing LOG_MAKEPRI definition"
Mark Salyzyn [Thu, 12 Mar 2015 20:21:35 +0000 (13:21 -0700)]
syslog.h: missing LOG_MAKEPRI definition
Bug:
19681572
Change-Id: Ice5f5cb1f71522ffc47b2243a8dc4c277c2a288f
Elliott Hughes [Wed, 11 Mar 2015 16:42:48 +0000 (16:42 +0000)]
Merge "Add the UMOUNT_NOFOLLOW flag to <sys/mount.h>."
Elliott Hughes [Wed, 11 Mar 2015 16:32:25 +0000 (09:32 -0700)]
Add the UMOUNT_NOFOLLOW flag to <sys/mount.h>.
Change-Id: I2b81cfc3147d9a0a6ac2a8f064e6d9864fa7e04d
Dmitriy Ivanov [Wed, 11 Mar 2015 00:37:48 +0000 (00:37 +0000)]
Merge "Rename LinkerAllocator and LinkerAllocatorPage"
Dmitriy Ivanov [Wed, 11 Mar 2015 00:35:22 +0000 (00:35 +0000)]
Merge "Refactoring: rename linker_allocator files"
Dmitriy Ivanov [Tue, 10 Mar 2015 22:43:50 +0000 (15:43 -0700)]
Rename LinkerAllocator and LinkerAllocatorPage
Change-Id: I87d80fbcd4ec26c0ee4f601b9c4c64f600418dd9
Dmitriy Ivanov [Tue, 10 Mar 2015 22:30:26 +0000 (15:30 -0700)]
Refactoring: rename linker_allocator files
Change-Id: Ifc08e64b3a85205f072b7abab1149c7ab71e2f75
Dimitry Ivanov [Tue, 10 Mar 2015 17:41:18 +0000 (17:41 +0000)]
am
c16c8368: Merge "Generate gnu hash for arm only"
* commit '
c16c8368773452e2d18d761a7b3ea6f249dc2ac5':
Generate gnu hash for arm only
Dimitry Ivanov [Tue, 10 Mar 2015 17:34:51 +0000 (17:34 +0000)]
Merge "Generate gnu hash for arm only"
Goran Jakovljevic [Tue, 10 Mar 2015 16:11:39 +0000 (17:11 +0100)]
Generate gnu hash for arm only
Fixes build failure caused by:
https://android-review.googlesource.com/#/c/139660
As previously discussed [1], MIPS does not support GNU-style ELF hashes.
[1] https://android-review.googlesource.com/#/c/49282/2/tests/Android.mk
Change-Id: I9a7966eebfd1ef0a587a20b71faefde38e84ab62
Dmitriy Ivanov [Tue, 10 Mar 2015 15:03:35 +0000 (15:03 +0000)]
am
a94cf791: Merge "Generate sysv hash for libc, libstdc++ and libm"
* commit '
a94cf791c1c9b93d49f5573716de93348757ae15':
Generate sysv hash for libc, libstdc++ and libm
Yabin Cui [Tue, 10 Mar 2015 15:03:34 +0000 (15:03 +0000)]
am
37c71b14: Merge "Loosen fchmodat AT_SYMLINK_NOFOLLOW test on symlink."
* commit '
37c71b14e51c53b0cb5daa19bf38559d063453dc':
Loosen fchmodat AT_SYMLINK_NOFOLLOW test on symlink.
Dmitriy Ivanov [Tue, 10 Mar 2015 04:41:01 +0000 (04:41 +0000)]
Merge "Generate sysv hash for libc, libstdc++ and libm"
Yabin Cui [Tue, 10 Mar 2015 04:14:12 +0000 (04:14 +0000)]
Merge "Loosen fchmodat AT_SYMLINK_NOFOLLOW test on symlink."
Dmitriy Ivanov [Tue, 10 Mar 2015 02:38:56 +0000 (19:38 -0700)]
Generate sysv hash for libc, libstdc++ and libm
Bug:
19059885
Change-Id: I35e2a9cd0bb3914d9d0c82d163bfaf0fff844667
Yabin Cui [Mon, 9 Mar 2015 20:55:18 +0000 (13:55 -0700)]
Loosen fchmodat AT_SYMLINK_NOFOLLOW test on symlink.
It has been reported in b2/
19657449 and b2/
19381040 that fchmodat
AT_SYMLINK_NOFOLLOW operation on symlink can succeed. It seems to be
controlled by kernel(version or configuration) or user configuration
whether chmod is allowed on symlinks. Unless we can disable chmod on
symlinks in bionic explicitly, we can not guarantee that the test can
pass. But it seems reasonable to allow chmod on symlink if kernel allows
to. So We prefer to loosen the test here, accepting both success and
failure when doing chmod operation on symlinks.
Bug:
19657449
Bug:
19381040
Change-Id: I780e84f0b50d0412fbac9f1c240d07e984892a28
Dmitriy Ivanov [Mon, 9 Mar 2015 21:11:02 +0000 (21:11 +0000)]
am
017f94d3: Merge "Store fields for gnu_hash separately"
* commit '
017f94d34eedfaca1c62cb35a65b8436f04b8f62':
Store fields for gnu_hash separately
Dmitriy Ivanov [Mon, 9 Mar 2015 21:05:51 +0000 (21:05 +0000)]
Merge "Store fields for gnu_hash separately"
Dmitriy Ivanov [Mon, 9 Mar 2015 19:02:02 +0000 (12:02 -0700)]
Store fields for gnu_hash separately
Kindle app relies on soinfo's sysv hash
fields while linking native libraries.
This change allows to keep sysv hash fields
intact for the libraries linked with --hash-style=both.
Bug:
19059885
Change-Id: I12528652955638f1a6586bda99e111bb1c8aa7a3
Jingwei Zhang [Fri, 31 Oct 2014 10:29:18 +0000 (18:29 +0800)]
Add the optimized implementation of 18 math functions for x86 and x86_64 respectively
Change-Id: I31bf601448a9427f825517f3a0ff24de47f49bfa
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
Nick Kralevich [Sat, 7 Mar 2015 23:38:35 +0000 (23:38 +0000)]
am
edc1d3e3: Merge "linker: Allow an app to update it\'s own LD_LIBRARY_PATH"
* commit '
edc1d3e3c6266eadcd05a9aa7bcdec701ba060aa':
linker: Allow an app to update it's own LD_LIBRARY_PATH
Nick Kralevich [Sat, 7 Mar 2015 23:31:31 +0000 (23:31 +0000)]
Merge "linker: Allow an app to update it's own LD_LIBRARY_PATH"
Nick Kralevich [Sat, 7 Mar 2015 21:37:05 +0000 (13:37 -0800)]
linker: Allow an app to update it's own LD_LIBRARY_PATH
When the kernel executes a program which is setuid, setgid, has
file capabilities, or causes an SELinux domain transition, the
AT_SECURE flag is set. This flag instructs the dynamic linker to
prune any dangerous environment variables passed across security
boundaries.
For SELinux in particular, whether this flag is set depends on the
the "noatsecure" process permission. If that permission does not
exist, then AT_SECURE=1 whenever a domain transition occurs.
In https://android-review.googlesource.com/129971 , Android stopped
using noatsecure when executing init services. In
https://android-review.googlesource.com/130610 , init was flipped
back into SELinux enforcing mode, making ag/129971 active. The
combination of those two changes ensured that AT_SECURE=1 was
set when executing init spawned services.
In particular, AT_SECURE=1 is set when init executes zygote. Due to
the forking nature of zygote, AT_SECURE remains untouched when
executing zygote's children.
This causes problems for the code added in
https://android-review.googlesource.com/48409 . Specifically, if
AT_SECURE=1, an attempt to call android_update_LD_LIBRARY_PATH()
is silently ignored. This causes problems when art tries to adjust
the LD_LIBRARY_PATH for Android apps. Ultimately, apps are unable
to find shared libraries they depend on.
As discussed in bug
7896159, there's no security reason for
preventing an application from updating it's own LD_LIBRARY_PATH.
We only need to prune LD_LIBRARY_PATH when transitioning across
security boundaries, but not when we're entirely within a security
boundary.
Remove the AT_SECURE check within do_android_update_LD_LIBRARY_PATH().
It's unneeded and prevents an application from modifying it's own
LD_LIBRARY_PATH. This allows an application to specify a location
where it's dlopen()ed shared libraries should be loaded from.
There is no change to AT_SECURE handling in
__sanitize_environment_variables(). We continue to honor it there
to prevent using security sensitive environment variables across
an exec boundary.
Bug:
19559835
Change-Id: If4af2ee8e84265aaa0c93de8b281208b20d7942a
Christopher Ferris [Sat, 7 Mar 2015 17:13:22 +0000 (17:13 +0000)]
am
9afb08dd: Merge "libm: Add hardware sqrt, ceil, floor and trunc for x86 & x86_64"
* commit '
9afb08dd0984acea49da5aae21b41522cb805dac':
libm: Add hardware sqrt, ceil, floor and trunc for x86 & x86_64
Dmitriy Ivanov [Sat, 7 Mar 2015 17:13:21 +0000 (17:13 +0000)]
am
536ec735: Merge changes I796a4ce8,I6165d062,I66c95d90,Ia67fa11d
* commit '
536ec7359eb951655e389443aa918a4bb16b2d8b':
Add support for packed relocations.
Refactoring: introduce reloc_iterators
Generalize compression tool
Import relocation packer from chromium repo