Commit graph

38093 commits

Author SHA1 Message Date
Elliott Hughes
dc699a269f bpfmt.
Bug: N/A
Test: builds
Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
2018-02-16 17:58:14 -08:00
Treehugger Robot
8c0c1ba989 Merge "Fix darwin build" 2018-02-17 01:45:37 +00:00
Christopher Tate
6983112f59 Fix darwin build
Darwin needs libbase too.

Test: 'm'
Change-Id: I9d50face92b7d5a4399dbcebd39d4062477b3a2c
2018-02-16 14:54:36 -08:00
Christopher Ferris
76eda07ff6 Merge "Fix soname reading code." 2018-02-16 17:25:42 +00:00
Elliott Hughes
ffe12c600f Merge "Include the map name when dumping memory around a register." 2018-02-16 16:54:34 +00:00
Christopher Ferris
beae42bc7f Fix soname reading code.
The dynamic section contained an address, not an offset into the elf
file to indicate where the soname exists. Changed to use the strtab
entries in the section headers to map this address to the actual offset.

Refactor the soname test a bit to make it easier to verify the code.

Bug: 73499044

Test: Passes new unit tests.
Test: Ran unwind_info on the failing shared elf and verified the soinfo
Test: is correct.
Change-Id: I16ba148389bcb9aadd3566fb442dac27f89fe894
2018-02-15 17:57:13 -08:00
Elliott Hughes
e1415a5c3b Include the map name when dumping memory around a register.
Bug: http://b/19590178
Test: ran tests, ran crasher
Change-Id: Ib9afa34c860d8732ef1943eb4decd0b7c8fb55fd
2018-02-15 16:28:50 -08:00
Treehugger Robot
851803d3cf Merge "If enablefilecrypto or init_user0 fails, reboot into recovery." 2018-02-15 21:16:42 +00:00
Paul Crowley
959b055535 If enablefilecrypto or init_user0 fails, reboot into recovery.
Test: Roll back PLATFORM_SECURITY_PATCH, ensure recovery dialog is seen
Bug: 70487538
Change-Id: Iceb6af3f9d6aea6bc646dbb4b5d29dffcb284736
2018-02-15 10:23:52 -08:00
Tom Cherry
e1ae2ff9e4 Merge changes Iea2d97fb,I08fa3905,Idd5b923e
* changes:
  Move all Action parsing into ActionParser
  Move ActionManager to its own file
  Move ActionParser to its own file
2018-02-15 16:32:52 +00:00
David Sehr
a99ff49ab0 Merge "Move libdexfile out of runtime" 2018-02-15 16:21:21 +00:00
Treehugger Robot
7238eca684 Merge "init.rc: Add nodev,noexec,nosuid to /config" 2018-02-15 03:01:33 +00:00
Tom Cherry
9cbf57048c Move all Action parsing into ActionParser
Bug: 36970783
Test: Build
Change-Id: Iea2d97fb45c3e88bc83fb72d6fa67049be42cfa9
2018-02-14 16:37:17 -08:00
Tom Cherry
7fd3bc27ec Move ActionManager to its own file
Bug: 36970783
Test: build
Change-Id: I08fa39052236b462249f79de1d02bf02bdbf4c84
2018-02-14 16:37:09 -08:00
Treehugger Robot
6698482ca4 Merge "init.rc: Mount /mnt with nodev,nosuid,noexec" 2018-02-15 00:20:12 +00:00
Treehugger Robot
f51886bbc4 Merge "ion_test.c: Fix c/p error in arg parse." 2018-02-14 23:25:23 +00:00
Treehugger Robot
008576080e Merge "init.rc: Remount / with MS_REMOUNT|MS_BIND" 2018-02-14 23:24:01 +00:00
Steven Moreland
b81e185907 ion_test.c: Fix c/p error in arg parse.
Bug/Test: N/A

Change-Id: Iad1ac3f057ed153429780242e138cec58e8ee764
2018-02-14 13:12:22 -08:00
Luis Hector Chavez
8774945036 init.rc: Add nodev,noexec,nosuid to /config
This change adds some additional flags to the /config mount. This is to
reduce the number of mounts with unnecessary privileges.

Bug: 73255020
Test: aosp_sailfish still boots
Test: CtsAppSecurityHostTestCases {ExternalStorageHostTest,StorageHostTest}
Merged-In: If3409d917cdf76a67ebfb7c4035a3ae8fee6189f
Change-Id: If3409d917cdf76a67ebfb7c4035a3ae8fee6189f
2018-02-14 20:58:56 +00:00
Luis Hector Chavez
081aa0a303 init.rc: Mount /mnt with nodev,nosuid,noexec
This change adds some additional flags to /mnt. This is to reduce
the number of mounts with unnecessary flags.

Bug: 73255020
Test: aosp_sailfish still boots
Test: CtsAppSecurityHostTestCases {StorageHostTest,ExternalStorageHostTest}
Test: CtsOsTestCases StorageManagerTest
Test: find /mnt  | egrep -v '^/mnt/runtime/(default|read|write)/emulated' | \
      xargs ls -lZd  # Shows no character devices or executable files
Change-Id: I54739133119d9626ebeb2ef9a1c127f7a90fa098
2018-02-14 20:51:40 +00:00
Luis Hector Chavez
30780a7305 init.rc: Remount / with MS_REMOUNT|MS_BIND
Since we only want to change the ro flag on / (and leave all other mount
flags alone), this can also be achieved by passing MS_REMOUNT|MS_BIND,
even if the mount is not a bind-mount.

This aims to make running Android within a user namespace easier, since
remounts without the MS_BIND flag are forbidden.

Bug: 73255020
Test: aosp_sailfish still boots
Test: rootfs on / type rootfs (rw,seclabel)
      /dev/root on / type ext4 (ro,seclabel,relatime,data=ordered)
Change-Id: I2f89a8badfc467db47304c9355648e8fd8ad1272
2018-02-14 20:51:06 +00:00
Treehugger Robot
7c6b024241 Merge "Prevent WaitForProperty() from using ~100% of CPU time on 32bit builds" 2018-02-14 20:33:24 +00:00
yusukes
d3b9404241 Prevent WaitForProperty() from using ~100% of CPU time on 32bit builds
Since 'struct timespec' members (time_t and long) are both 32bit on
32bit systems, and std::chrono::{seconds,nanoseconds}::rep are both
>32bit, timespec members assigned in DurationToTimeSpec() can have a
negative value, especially when WaitForProperty() is called with the
default timeout value which is std::chrono::milliseconds::max().

Regarding functionality, passing a negative value to
__system_property_wait() is okay because WaitForProperty() still
waits for the property value (so unit tests are passing), but while
WaitForProperty() does that, the function, to be more exact,
SystemProperties::Wait() in bionic/, consumes ~100% of CPU time. This
happens because SystemProperties::Wait() which implements
__system_property_wait() has a tight while-loop with a __futex_wait()
call, and the futex call immediately returns EINVAL when the timespec
passed in has a negative value.

With this CL, WaitForProperty() will never pass a negative timespec
to __system_property_wait(), and therefore the __futex_wait() call
in bionic works as expected without consuming too much CPU time even
on 32bit systems.

Bug: None
Test: libbase_test32 still passes
Test: strace no longer shows repeated EINVALs from __futex_wait
Change-Id: Id1834fac8cd2876b02dbe4479bf3d3eda2fa7da1
2018-02-14 10:07:54 -08:00
David Sehr
3a26c27252 Move libdexfile out of runtime
Move the files out of runtime, leaving unfortunate dependences still
there on runtime/base (for the moment).  Also separates the build logic
into two Android.bp files.

Bug: 22322814
Test: make -j 50 test-art-host
Change-Id: I54b06f035034e7564480cd5d4c33c4f62785682d
2018-02-14 17:42:59 +00:00
Treehugger Robot
c415d00fbe Merge "Add tracing tags to vibrator" 2018-02-14 15:57:34 +00:00
David Srbecky
f1e55f7a99 Merge "Implement new DEX PC lookup scheme." 2018-02-14 15:26:41 +00:00
Treehugger Robot
524254f3df Merge "Move libz to llndk from vndk-sp for non-VNDK-enforced devices." 2018-02-14 09:26:42 +00:00
Justin Yun
8065a608a6 Move libz to llndk from vndk-sp for non-VNDK-enforced devices.
For non-VNDK-enforced devices, libz cannot be installed in vndk-sp
to avoid CTS test failure.
Move libz to llndk from vndk-sp for generating the namespace
configuration from ld.config.vndk_lite.txt.

Bug: 73296261
Test: run android.jni.cts test on marlin/sailfish
Change-Id: I1b8b43cd87dc8dfdd2667001ae1e50d9eaedf93d
2018-02-14 16:11:14 +09:00
Logan Chien
24e34e4b8e Merge "Fix PDK build" 2018-02-14 03:03:57 +00:00
Logan Chien
4892bbf8d2 Fix PDK build
This commit disables "bootstat" in PDK builds because "bootstat" depends
on "libstatslog" (from "frameworks/base") which is not included in PDK
builds as well.

Test: Build a target (described in http://b/72961456) with
`platform.zip` built from master FSK source tree.

Bug: 72961456
Change-Id: I06b1555694510e17ea82d5c6dfcdeaf99b905e4d
2018-02-14 03:03:28 +00:00
Christopher Ferris
559c7f2092 Implement new DEX PC lookup scheme.
GDB wasn't handling the old one gracefully.

- Create a RegsInfo structure that can be used to properly eval expression
  data.
- Remove the versions on Dwarf ops. It doesn't work the in the real world
  and doesn't add useful information.
- Fix dex pc frame number bug.

Test: testrunner.py -j40 --host --cdex-fast -t 137
Test: libunwindstack_test
Test: All unit tests pass.
Change-Id: Iac4fea651b81cb6087fd237a9a5027a352a49245
2018-02-13 16:45:38 -08:00
Treehugger Robot
fd01164a8d Merge "Make log_event_list.h available to vendor code." 2018-02-14 00:02:33 +00:00
Treehugger Robot
d31df3a1be Merge "adbd: receive jdwp pids from art as raw integers." 2018-02-13 23:34:49 +00:00
Tom Cherry
0f6417f232 Move ActionParser to its own file
Bug: 36970783
Test: build
Change-Id: Idd5b923e4789760bb9ef67c10982b2642bc6a31a
2018-02-13 15:26:14 -08:00
Treehugger Robot
cd66e4c6ea Merge "init.rc: Perform some mounts with nodev,nosuid,noexec" 2018-02-13 21:02:47 +00:00
Pavel Grafov
446d01c2c7 Make log_event_list.h available to vendor code.
This is required in order to be able to log audit
events from wpa_supplicant. Only log writing functions
from log_event_list.h are made available.

Test: manually
Bug: 70886042
Change-Id: I097d4ad1de573662658678e6a9f1fc8f17820542
2018-02-13 19:21:43 +00:00
Alexey Kuzmin
3b5aebb046 Add tracing tags to vibrator
Now all somewhat time-consuming methods of the VibratorService
are surrounded by traceBegin/traceEnd blocks.
The vibration itself is surrounded with asyncTrace block.

Test: Run "systrace vibrator" and see the time consumption report.
Bug: 73000045
Merged-In: I94172e379354ec3418321b8151e6182cec2e886c
Change-Id: I94172e379354ec3418321b8151e6182cec2e886c
2018-02-13 18:29:40 +00:00
Treehugger Robot
1cb765c867 Merge "Remove urb request size maximum." 2018-02-13 07:25:04 +00:00
Christopher Ferris
71fa8125b9 Merge "Fix computation of pc." 2018-02-13 03:02:19 +00:00
Josh Gao
14d7cdce51 Merge "adb: fix build breakage." 2018-02-13 02:05:52 +00:00
Josh Gao
1b58bbf2ef adb: fix build breakage.
Test: mma
Change-Id: Id8e7ffd2212449bbac5b64b50e7b3aef7e97d649
2018-02-12 18:03:49 -08:00
Josh Gao
e504360f3d Merge "adb: use delete on objects with destructors." 2018-02-13 01:37:46 +00:00
Josh Gao
e0361d1e90 adb: use delete on objects with destructors.
asocket has a destructor now, so we have to delete it, or leak the
data pointed to by its std::string.

Bug: http://b/73257049
Test: manual testing with asan
Change-Id: Ia88199292cc74e10032a9a16226d3afc61c3e0be
2018-02-12 17:31:39 -08:00
Luis Hector Chavez
f8a7e37b2d init.rc: Perform some mounts with nodev,nosuid,noexec
This change adds some additional flags to some mounts. This is to reduce
the number of mounts with these flags.

Bug: 73255020
Test: aosp_sailfish still boots
Change-Id: I285e6d7b3dcc19f691a3d6780e7d3a3a5d7cb3de
2018-02-12 23:17:10 +00:00
Josh Gao
86f39b4078 adbd: receive jdwp pids from art as raw integers.
Don't go through a pointless conversion to hex that reduces our maximum
pid to 64k.

Bug: http://b/17661822
Test: `adb jdwp`
Change-Id: Idd572eac827f3ed3825ac2cf55fc4db109e70854
2018-02-12 15:07:28 -08:00
Daniel Colascione
53c964f53b Merge "Support * as a wildcard for ATRACE_TAG_APP" 2018-02-12 22:51:33 +00:00
Christopher Ferris
e4df5f5ab5 Fix computation of pc.
Fix the case where a non-zero load bias or a non-zero elf offset causes
the pc to be set incorrectly.

Add unit tests for these cases.

Bug: 73172903

Test: Ran unit tests.
Test: Ran the unit tests from the simpleperf CL that detected the failure.
Change-Id: Id8802c00b34c66875edd4926a20c5fccd2bb7d72
2018-02-12 14:06:13 -08:00
Christopher Ferris
73a2508dc4 Merge "Fix off by 4 error handling eh_frame hdr." 2018-02-12 18:58:34 +00:00
Elliott Hughes
ecff589728 Merge "Fix a few demangler issues." 2018-02-12 18:54:29 +00:00
Christopher Ferris
643f1e93ae Merge "Clear dex pc to avoid duplicate frames." 2018-02-12 18:44:20 +00:00