Commit Graph

27156 Commits

Author SHA1 Message Date
Tianjie Xu
9dac797013 Check block0 for remounting partition R/W
Add a function check_first_block to read block0 and output a message
on screen if the device has been remounted. The function is called
for version >= 4 only; it executes after a failing block verification
and before recovery attempts.

Bug: 21124327
Change-Id: I49dc0b861c702698896a2495ca094215705d4650
2015-12-17 14:16:02 -08:00
Ying Wang
4106b2e4c9 Merge "Disable .toc optimization for host modules." am: 7b92312ea1
am: 8449b88b2e

* commit '8449b88b2e64f49a6858ec36acca9e877585802e':
  Disable .toc optimization for host modules.
2015-12-15 19:32:42 +00:00
Ying Wang
8449b88b2e Merge "Disable .toc optimization for host modules."
am: 7b92312ea1

* commit '7b92312ea1184fc50b230f68214fe6ae9d3f597d':
  Disable .toc optimization for host modules.
2015-12-15 19:22:37 +00:00
Ying Wang
7b92312ea1 Merge "Disable .toc optimization for host modules." 2015-12-15 18:56:39 +00:00
Ying Wang
c01f2dcb10 Disable .toc optimization for host modules.
Host binaries may be run during the build process and the internal
implementation of the shared libraries makes a difference for the build
result. This change makes sure host tools get re-linked and re-run when
any of its dependency libraries gets updated.
DEX2OAT is such a host tool. We also changed DEX2OAT as full dependency
of dex-preoptimization, so we rebuild the odex files if DEX2OAT itself,
or any dependency libraries changed.

Bug: 24597504
Change-Id: Idf0d9be82ccebd826d9c5b405a39cff437e0af29
2015-12-15 10:00:19 -08:00
Shinichiro Hamaji
7034d9beae Merge "Reduce unnecessary rebuilds of .dex files with restat=1" am: 542aa57f1d
am: 0d4a0a9dd5

* commit '0d4a0a9dd5c1f3528b611862cb9fa81313028d1b':
  Reduce unnecessary rebuilds of .dex files with restat=1
2015-12-15 08:17:56 -08:00
Shinichiro Hamaji
0d4a0a9dd5 Merge "Reduce unnecessary rebuilds of .dex files with restat=1"
am: 542aa57f1d

* commit '542aa57f1d48b1a8f4afa71d6635f8ed93c82289':
  Reduce unnecessary rebuilds of .dex files with restat=1
2015-12-15 16:05:10 +00:00
Nicolas Geoffray
7126594f8d Merge "Revert "Revert "Make PIC and PREOPT default for all.""" 2015-12-15 11:26:15 +00:00
Nicolas Geoffray
2ad526124c Revert "Revert "Make PIC and PREOPT default for all.""
bug:25801231

This reverts commit f2a9135ed1.

Change-Id: I2eca605212b78505667af1f7e9c83f5cca5db35a
2015-12-15 09:54:30 +00:00
Shinichiro Hamaji
542aa57f1d Merge "Reduce unnecessary rebuilds of .dex files with restat=1" 2015-12-15 06:27:31 +00:00
Elliott Hughes
6efcdc4499 Merge "Turn on stack protector for mips64." am: 6725b4b004
am: b96f6bad55

* commit 'b96f6bad55c7d4a0a2151e34e624f1b817b4aff6':
  Turn on stack protector for mips64.
2015-12-14 23:30:05 +00:00
Elliott Hughes
4ea1c2c0cc Merge "Turn on stack protector for mips." am: 391caae952
am: 0391338750

* commit '03913387507ad37e9eaaf7bcc4ec37053191bee8':
  Turn on stack protector for mips.
2015-12-14 23:29:50 +00:00
Elliott Hughes
b96f6bad55 Merge "Turn on stack protector for mips64."
am: 6725b4b004

* commit '6725b4b004b45cd4cf3ed2ebdb40daf194e0b733':
  Turn on stack protector for mips64.
2015-12-14 23:13:48 +00:00
Elliott Hughes
0391338750 Merge "Turn on stack protector for mips."
am: 391caae952

* commit '391caae9528a5e7cc77763be6f456bd01325f66e':
  Turn on stack protector for mips.
2015-12-14 23:13:31 +00:00
Elliott Hughes
6725b4b004 Merge "Turn on stack protector for mips64." 2015-12-14 22:48:38 +00:00
Elliott Hughes
09ba4c870d Turn on stack protector for mips64.
Go straight to -fstack-protector-strong, since it works to boot the emulator.

Change-Id: I2b65a0ab4426856ae05f66c1e294951e45bd72b6
2015-12-14 14:46:38 -08:00
Elliott Hughes
391caae952 Merge "Turn on stack protector for mips." 2015-12-14 22:46:23 +00:00
Elliott Hughes
eb396e2a51 Merge "Enable -fstack-protector-strong for x86-64." am: 02191c97ef
am: d3eae50874

* commit 'd3eae508740ef71d60844b8149544fb7b637b09a':
  Enable -fstack-protector-strong for x86-64.
2015-12-14 22:33:29 +00:00
Elliott Hughes
b8cd34fca1 Merge "Be smarter about stack-protector on the host." am: 19e85a25ee
am: 39d848b1b4

* commit '39d848b1b4a00ba7bc79242f746197e39d878310':
  Be smarter about stack-protector on the host.
2015-12-14 22:33:16 +00:00
Elliott Hughes
b9b89e9385 Turn on stack protector for mips.
Go straight to -fstack-protector-strong, since it works to boot the emulator.

Change-Id: Ie44abd869355d2163dec7d9e2635b26b45255df6
2015-12-14 14:15:12 -08:00
Elliott Hughes
d3eae50874 Merge "Enable -fstack-protector-strong for x86-64."
am: 02191c97ef

* commit '02191c97effe88dddfd60b365a9c408861ba8870':
  Enable -fstack-protector-strong for x86-64.
2015-12-14 13:54:03 -08:00
Elliott Hughes
39d848b1b4 Merge "Be smarter about stack-protector on the host."
am: 19e85a25ee

* commit '19e85a25eefe5fbb12a7121a6b87a0e5d87be39b':
  Be smarter about stack-protector on the host.
2015-12-14 13:53:53 -08:00
Elliott Hughes
02191c97ef Merge "Enable -fstack-protector-strong for x86-64." 2015-12-14 21:45:40 +00:00
Elliott Hughes
19e85a25ee Merge "Be smarter about stack-protector on the host." 2015-12-14 21:41:58 +00:00
Elliott Hughes
505e4ec646 Be smarter about stack-protector on the host.
Some projects are still built with our host GCC 4.8, which doesn't
support -fstack-protector-strong. The combo .mk files are used by
GCC and clang, so it's not safe to turn on -fstack-protector-strong
there. Instead, do it in the clang-specific .mk for now.

We can clean this up when elfutils (the last code built for the host
with GCC that I'm aware of) is built by clang. We'll be able to
remove the host GCC prebuilts too!

Change-Id: I314b9eab071c132a8e2cb8cc779a75ae8abb12e2
2015-12-14 13:20:59 -08:00
Elliott Hughes
249fa3c25e Merge "Enable -fstack-protector-strong for x86." am: 7abad39b78
am: 49d443b6f7

* commit '49d443b6f717bc57371bf6dde950c9c5a7427151':
  Enable -fstack-protector-strong for x86.
2015-12-14 13:20:46 -08:00
Elliott Hughes
49d443b6f7 Merge "Enable -fstack-protector-strong for x86."
am: 7abad39b78

* commit '7abad39b78225d2517bc46dff3192ea001184947':
  Enable -fstack-protector-strong for x86.
2015-12-14 13:16:22 -08:00
Elliott Hughes
7abad39b78 Merge "Enable -fstack-protector-strong for x86." 2015-12-14 21:05:21 +00:00
Elliott Hughes
9cffbc4a07 Merge "Enable -fstack-protector-strong for the host." am: a4b3d20d28
am: 3313f0b094

* commit '3313f0b094c29ef51a177eff710ff2f6644d20ff':
  Enable -fstack-protector-strong for the host.
2015-12-14 12:47:54 -08:00
Elliott Hughes
3313f0b094 Merge "Enable -fstack-protector-strong for the host."
am: a4b3d20d28

* commit 'a4b3d20d28da1f86dde6063b732c75cf238976ee':
  Enable -fstack-protector-strong for the host.
2015-12-14 12:44:02 -08:00
Elliott Hughes
a4b3d20d28 Merge "Enable -fstack-protector-strong for the host." 2015-12-14 20:31:10 +00:00
Elliott Hughes
5324c3c19f Enable -fstack-protector-strong for x86-64.
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).

The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.

https://lwn.net/Articles/584225/

Change-Id: I3ce7a73c5cf36eba5c74df37367f3d3475b0a4ed
2015-12-14 11:16:20 -08:00
Elliott Hughes
8ebc4d6aab Enable -fstack-protector-strong for x86.
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).

The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.

https://lwn.net/Articles/584225/

Change-Id: I55a9fdbf5777ccdeed9f2e9a23c73bb94ad7b646
2015-12-14 11:15:15 -08:00
Elliott Hughes
ae316d2d59 Enable -fstack-protector-strong for the host.
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).

The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.

https://lwn.net/Articles/584225/

Change-Id: I97a2187cebac64e3b9f22b691d4676b6da083ebd
2015-12-14 11:14:21 -08:00
Ian Pedowitz
1e745d799d Merge "Revert "Make PIC and PREOPT default for all."" 2015-12-14 18:28:33 +00:00
Nicolas Geoffray
f2a9135ed1 Revert "Make PIC and PREOPT default for all."
Need to update seed and ariel.

This reverts commit b93f5905d2.

Change-Id: Icc6f1539a97ccb2b1fcb12d2bc48904045689096
2015-12-14 18:22:17 +00:00
Nicolas Geoffray
eba59d86ea Merge "Make PIC and PREOPT default for all." 2015-12-14 13:55:22 +00:00
Nicolas Geoffray
b93f5905d2 Make PIC and PREOPT default for all.
bug:25888050
bug:25801231

Change-Id: Idf0f466a00dd592c433fc798c29ed80396015713
2015-12-14 13:02:19 +00:00
Shinichiro Hamaji
f972a4a980 Reduce unnecessary rebuilds of .dex files with restat=1
The .dex.toc files are created by dexdump, which outputs all
information in a .dex file which may affect compilation of
other modules.

For prebuilt java libraries and static java libraries, we'll
output empty .toc files and don't set restat=1. .dex.toc files
are necessary even for static java libraries because they can
be referenced by LOCAL_JAVA_LIBRARIES (instead of
LOCAL_STATIC_JAVA_LIBRARIES).

We don't use this optimization for apps build. We cannot build
dexdump for apps build due to lack of libc++.

Performance:

$ m && touch \
  frameworks/base/core/java/com/google/android/util/Procedure.java \
  && time m
Before: 3m48s
After: 1m46s

Bug: 24597504
Change-Id: Id1665923b414dee705dc60af4c021390a19ea26f
2015-12-14 19:07:34 +09:00
Stephen Hines
2967be8a2b Merge "Revert "Change USE_CLANG_PLATFORM_BUILD default to true."" am: eca3206abb
am: 67b6cc2201

* commit '67b6cc2201f41508ea36bd0943aef545a68a679f':
  Revert "Change USE_CLANG_PLATFORM_BUILD default to true."
2015-12-13 15:13:26 -08:00
Stephen Hines
67b6cc2201 Merge "Revert "Change USE_CLANG_PLATFORM_BUILD default to true.""
am: eca3206abb

* commit 'eca3206abbf2223d6bc6c1c4337c911077fc2897':
  Revert "Change USE_CLANG_PLATFORM_BUILD default to true."
2015-12-13 15:10:18 -08:00
Stephen Hines
eca3206abb Merge "Revert "Change USE_CLANG_PLATFORM_BUILD default to true."" 2015-12-13 23:06:03 +00:00
Stephen Hines
7a0c88ec3e Revert "Change USE_CLANG_PLATFORM_BUILD default to true."
This reverts commit 3c8036da53.

Change-Id: I930bbebce8396d7c0abd847530640a696d3418e7
2015-12-13 22:58:22 +00:00
Nick Kralevich
bcdc1070d4 Merge "sepolicy: Fix \'avc denied\' issues for the emulators" am: 154657f0e3
am: abfd39ae3a

* commit 'abfd39ae3ae34bc4208f23aa040a406c1d7358be':
  sepolicy: Fix 'avc denied' issues for the emulators
2015-12-13 13:16:09 -08:00
Dan Albert
1f6d007a23 Merge "Use lib64 for mips64 as well." am: 6674573897
am: 3340159339

* commit '33401593392cf903cb3228a7a998f91a7e392be0':
  Use lib64 for mips64 as well.
2015-12-13 13:14:37 -08:00
Nick Kralevich
abfd39ae3a Merge "sepolicy: Fix \'avc denied\' issues for the emulators"
am: 154657f0e3

* commit '154657f0e371a3ff180e8b0936aeaa3d2da9a57c':
  sepolicy: Fix 'avc denied' issues for the emulators
2015-12-11 17:14:51 -08:00
Nick Kralevich
154657f0e3 Merge "sepolicy: Fix 'avc denied' issues for the emulators" 2015-12-12 01:07:07 +00:00
Dan Albert
3340159339 Merge "Use lib64 for mips64 as well."
am: 6674573897

* commit '667457389791a505660e102bc2bdde1362543e37':
  Use lib64 for mips64 as well.
2015-12-11 16:21:35 -08:00
Dan Albert
6674573897 Merge "Use lib64 for mips64 as well." 2015-12-12 00:09:16 +00:00
Dan Albert
445bc2fc2d Use lib64 for mips64 as well.
This was previously working because for some reason prebuilts/ndk had
a tangled mess of hand assembled symlinks that pointed lib -> lib64
for the multilib architectures.

Change-Id: I294d67f58f2008b1a53790cf676f5223df449cbc
2015-12-11 15:04:59 -08:00