Commit graph

21669 commits

Author SHA1 Message Date
Dimitry Ivanov
6399dcce59 Revert "Pack relocations for mips64"
This reverts commit 8bd30fe3cb.

Bug: http://b/20658994
Change-Id: I6c31094559a12b824344802bf3993f91aee79a26
2015-04-29 18:59:05 +00:00
Dimitry Ivanov
d05fd6fc82 Revert "Pack relocations for mips"
This reverts commit 9dc1a7359f.

Bug: http://b/20658994
Change-Id: Ib10c764a7d06db823ee2fccfa47240e0a639d4bc
2015-04-29 18:57:54 +00:00
Stephen Smalley
21ebc213bb Define BOARD_SEPOLICY_DIRS for 64-bit emulators.
Define BOARD_SEPOLICY_DIRS for the arm64, mips64, and x86_64
emulator targets.  As a first cut, simply inherit from the
existing policy directories used for generic and generic_x86.
We may need further board-specific policy added for these targets
but testing will require first enabling SELinux in the relevant
kernel configs.

Change-Id: I7b4459b32298698fc2908cbbdd0e3afadbe5ac24
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-04-29 09:55:08 -04:00
Jeff Brown
d2ef36ecbd Merge "Add float support to binary event log." 2015-04-29 01:42:50 +00:00
Jeff Brown
9dc5808702 Add float support to binary event log.
Bug: 20664753
Change-Id: Iab232b1f172094919839d57f15644dfb2eaa1425
2015-04-28 18:21:09 -07:00
Evgeniy Stepanov
cd092913aa Merge "Don't pack ASAN executables." 2015-04-28 22:06:30 +00:00
Dan Albert
5619dbec25 Don't pack ASAN executables.
The relocation packer is causing the kernel to load the executable
overlapping ASAN's shadow space.

Bug: http://b/20665974
Change-Id: Ifc5914f4fbed5f4f00ed1c795d01cf2fcb849cfe
2015-04-28 15:00:15 -07:00
Dan Albert
5a54a468bb Merge "--no-as-needed needs -Wl." 2015-04-28 21:56:44 +00:00
Dan Albert
1f0d53080b --no-as-needed needs -Wl.
Not sure why my checkbuild passed.

Change-Id: Iead84121daaaa32c5dd1f0712e9b7caaffd58352
2015-04-28 14:55:50 -07:00
Dan Albert
a06323d6ed Merge "Make asan more closely match clang behavior." 2015-04-28 21:19:00 +00:00
Dan Albert
8a31153ae0 Make asan more closely match clang behavior.
Always link libm with asan. Hasn't been a problem before because ASAN
was only ever used when libc++ was as well, which already links libm.

Pass --no-as-needed for host modules.

These aren't needed for the target builds because the target uses the
shared RTL.

Change-Id: I5d6a3c2dd557b5231be2b7711df6438693753a88
2015-04-28 14:09:34 -07:00
Dan Albert
a7ebd27bc5 Merge "Fix bad variable names." 2015-04-28 18:32:47 +00:00
Dan Albert
9f17655453 Fix bad variable names.
My working tree was still dirty when I verified the original change.

Change-Id: I3e6fa6908b809c016231b398c5d30d8cce3b87ab
2015-04-28 11:26:45 -07:00
Evgenii Stepanov
55f3c4c25e Merge "Fix AddressSanitizer link order and multilib setup." 2015-04-27 22:46:41 +00:00
Evgenii Stepanov
f0b15e173b Fix AddressSanitizer link order and multilib setup.
ASan runtime library (when using dynamic linking) must be the first
dependency of the main executable to achieve correct symbol
interposition. This matches how the clang driver works.

In multilib setup, ASan-RT name depends on the target arch:
  /system/lib/libclang_rt.asan-arm-android.so
  /system/lib64/libclang_rt.asan-arm64-android.so

We also set RPATH to /system/lib/asan or /system/lib64/asan
to have a place for ASan-only versions of system libraries.

Change-Id: I5c0cdb89e5e08a1950eb276e406da9f31a6e52dd
2015-04-27 14:48:35 -07:00
Dan Albert
959f0eccb4 Merge "Add LOCAL_SANITIZE_RECOVER." 2015-04-27 19:53:02 +00:00
Dan Albert
4111d4804a Add LOCAL_SANITIZE_RECOVER.
This is needed for projects that have known ubsan issues that we can't
fix right away (perhaps because it's an upstream project that we're
diligent about keeping in sync with upsteam).

Also make the normal ubsan use -fno-sanitize-recover=all by default.

Change-Id: I1b0f3309792f32dbd08c18816d7306e76c8d7c30
2015-04-27 11:07:38 -07:00
Elliott Hughes
b271669a0c Merge "Fix a trivial comment typo." 2015-04-25 18:04:21 +00:00
Elliott Hughes
ae1d4b0d18 Fix a trivial comment typo.
Bug: https://code.google.com/p/android/issues/detail?id=170069
Change-Id: Iacd308893561a991971b191d4d10a78ca82753d4
2015-04-25 11:02:40 -07:00
Sami Tolvanen
00e1f0033e Merge "Check partition hash before resorting to block_image_verify" 2015-04-25 08:00:03 +00:00
Nick Kralevich
f3a6b07b80 Merge "host compiler: enable compiler hardening flags" 2015-04-25 04:35:46 +00:00
Nick Kralevich
100acd1001 host compiler: enable compiler hardening flags
Enable the following compiler hardening flags:

* -Wl,-z,relro
* -Wl,-z,now
* -fstack-protector

relro / bind_now make the relro region read-only after linking,
preventing certain attacks against ELF data structures.

stack-protector adds stack canaries, which can detect exploits
which overwrite parts of the stack.

Explicitly not added in this change is FORTIFY_SOURCE=2. Adding that
option turns on glibc's warn_unused_result attributes. This generates
a huge number of new compile time warnings, and for the multiple
makefiles which have -Werror in them, turns those warnings into errors.
I'm not able to fix all the errors right away.

Bug: 20558757
Change-Id: I86791177c6695f5325233d9dd9a5dd3ccc2b1a2f
2015-04-24 21:26:08 -07:00
Dmitriy Ivanov
573dfb7cb8 Merge "Pack relocations for mips64" 2015-04-24 23:52:40 +00:00
Dmitriy Ivanov
8bd30fe3cb Pack relocations for mips64
Bug: http://b/18051137
Change-Id: I063c5d6cf007658c0efe9cb1d65ed8026b3e7dae
2015-04-24 16:34:09 -07:00
Dmitriy Ivanov
4fa4e4befd Merge "Do not pack relocations for prebuilts by default" 2015-04-24 22:56:08 +00:00
Dmitriy Ivanov
64762c3027 Do not pack relocations for prebuilts by default
Do not pack relocations for prebuilds unless
 LOCAL_PACK_MODULE_RELOCATIONS is true

Bug: http://b/20537715
Bug: http://b/18051137
Change-Id: Iddef3b09741da6ae10d73c98103b868cc7695d38
2015-04-24 15:33:14 -07:00
Dmitriy Ivanov
691a4379c3 Merge "Pack relocations for mips" 2015-04-24 19:45:22 +00:00
Dmitriy Ivanov
9dc1a7359f Pack relocations for mips
Bug: http://b/18051137
Change-Id: Id5e0adfb55273f23e1c99b4eecb318c6b8d19989
2015-04-24 12:20:02 -07:00
Dmitriy Ivanov
b1c2727aec Merge "Pack relocations for x86" 2015-04-24 17:44:09 +00:00
Dmitriy Ivanov
1d4804ccd1 Pack relocations for x86
Bug: http://b/18051137
Change-Id: I3f316343e9bbd2037a9583d5b6fb41a06be153cd
2015-04-24 10:34:59 -07:00
Sami Tolvanen
e09d096ed6 Check partition hash before resorting to block_image_verify
It's not necessary to call block_image_verify for the most common
case where we attempt an update for the first time and the target
partition has expected contents. It is sufficient to confirm that
the target partition is intact.

Computing a hash is much faster than simulating the update, which
means this change should make the update speed for v3 much closer
to v2 for the common case. If the update was interrupted, this is
going to make resuming somewhat slower, of course. Hopefully this
should be rather rare.

Bug: 20309033
Change-Id: I04792f3681bf2cd5d9a4e1c41eb883c7f26c6f58
2015-04-24 10:56:59 +00:00
Dmitriy Ivanov
529943c723 Merge "Disable packed relocations for NDK builds" 2015-04-24 04:48:44 +00:00
Dmitriy Ivanov
3b51f20be9 Disable packed relocations for NDK builds
Bug: http://b/20537715
Change-Id: I1289a88d5eb694980b026b695cb25edd8ba76ed5
2015-04-23 18:55:23 -07:00
Dmitriy Ivanov
648f1b66b4 Merge "Pack relocation tables for dynamic executables" 2015-04-23 22:20:37 +00:00
Dmitriy Ivanov
4c2d1a64fb Pack relocation tables for dynamic executables
Add replocation-packer step for dynmic executables.

  Enable it by default for arm and arm64 platforms.

Bug: http://b/18051137
Change-Id: I0c88fd31595bcea62a087f219acb9ecf9c80f2e5
2015-04-23 12:07:16 -07:00
Dimitry Ivanov
1ff47c7f36 Merge "Revert "Pack relocation tables for all dynamic executables"" 2015-04-23 04:24:46 +00:00
Dimitry Ivanov
1eca10fa9d Revert "Pack relocation tables for all dynamic executables"
This reverts commit e7a1b8a0c6.

Change-Id: I1a2185e1c68d364941e3b3e525a8c4a7a42e0cc1
2015-04-23 04:22:33 +00:00
Dmitriy Ivanov
ec6a977323 Merge "Pack relocation tables for all dynamic executables" 2015-04-23 02:24:46 +00:00
Dmitriy Ivanov
e7a1b8a0c6 Pack relocation tables for all dynamic executables
Bug: http://b/18051137
Change-Id: I277277d5f5eb450ef9b4a23cfec16d75d977eb89
2015-04-22 13:30:43 -07:00
Tao Bao
7f47c13339 Merge "Add support for full radio option" 2015-04-22 18:26:31 +00:00
dcashman
ab59266db0 Merge "Add lib dirs to cts distribution." 2015-04-22 17:02:32 +00:00
dcashman
17412c8305 Add lib dirs to cts distribution.
Add ability to include dirs to the cts distribtion to enable bundling of shared
libraries on which host-side executables rely.

Bug: 19566396
Change-Id: Id501874244ae98fbfef2aa591885c88dee5b8b02
2015-04-21 17:53:21 -07:00
Tao Bao
43078aa37a Add support for full radio option
Occasionally we need to include full radio image in incremental OTAs.
Adding --full_radio option to support that.

It needs matching changes in the releasetools.py in the target_files
zip, which comes from device/<vendor>/<device>/releasetools.py.

Bug: 19994922
Change-Id: Id1fb3a9cdb7e67dd9dbadd8fb6cd5fccd358820e
2015-04-21 16:54:52 -07:00
Dmitriy Ivanov
5beb338793 Merge "Remove unsupported *_COMPRESS_MODULE_SYMBOLS" 2015-04-20 20:18:56 +00:00
Dmitriy Ivanov
4eb120b999 Remove unsupported *_COMPRESS_MODULE_SYMBOLS
Change-Id: Ibb7da2997a0bb5b9f435213c9d3206bc4aad18db
2015-04-20 12:24:12 -07:00
Nick Kralevich
69b20474d5 Merge "Support LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES for prebuilt APKs" 2015-04-18 00:38:07 +00:00
Nick Kralevich
5aa0223c6a Support LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES for prebuilt APKs
If a prebuilt APK contains shared libraries and the flag
LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES := true is set, then
uncompress any shared libraries stored within the APK.
This allows processes to load the shared library directly from
the APK.

Bug: 20247329
Bug: 8076853
Bug: 1162500
Change-Id: Iac4db32457d9ce31eb7256410023819b44fda0a6
2015-04-17 16:53:15 -07:00
Dan Albert
b687444051 Merge "Add support for a partial ubsan build." 2015-04-17 19:33:02 +00:00
Dmitriy Ivanov
e3aa1c1f85 Merge "Remove LOCAL_JNI_SHARED_LIBRARIES_ZIP_OPTIONS" 2015-04-17 18:50:13 +00:00
Sami Tolvanen
586b38cc39 Merge "Calculate max_stashed_blocks correctly for block OTA v3" 2015-04-17 18:43:51 +00:00