Commit graph

38340 commits

Author SHA1 Message Date
Luis Hector Chavez
c37d85953e Merge "init.rc: Remount / with MS_REMOUNT|MS_BIND"
am: 008576080e

Change-Id: Ie48bb09b8f46ccdda809835fb29811fac8b44c6c
2018-02-14 23:34:58 +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
yusukes
b94bff1d64 Merge "Prevent WaitForProperty() from using ~100% of CPU time on 32bit builds"
am: 7c6b024241

Change-Id: I08851adfbb9a4fa01a65ca1af6a7c41d0643ca1d
2018-02-14 21:16:53 +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
Alexey Kuzmin
0f71d5fe53 Merge "Add tracing tags to vibrator"
am: c415d00fbe

Change-Id: Ic9e871085ae05ba68590623dc20f9c94f05fe0ec
2018-02-14 16:16:19 +00:00
David Srbecky
c3aabea0b1 Merge "Implement new DEX PC lookup scheme."
am: f1e55f7a99

Change-Id: I9e7161dbef33febe2b8eb4398ceee163815b7a8f
2018-02-14 16:15:14 +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
Justin Yun
7987a191f6 Merge "Move libz to llndk from vndk-sp for non-VNDK-enforced devices."
am: 524254f3df

Change-Id: I4436065d935dfb88a90dda18138a1f91ef7e7547
2018-02-14 09:34:07 +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
9a393de28f Merge "Fix PDK build"
am: 24e34e4b8e

Change-Id: I559cb5436686fd9214dcabf7509fc8b176938c61
2018-02-14 03:09:56 +00: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
Pavel Grafov
ab30115581 Merge "Make log_event_list.h available to vendor code."
am: fd01164a8d

Change-Id: Ie72c87f9bf5a65ae6c806f9b35778e1e2788bfb3
2018-02-14 01:02:08 +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
Josh Gao
f6a2296aff Merge "adbd: receive jdwp pids from art as raw integers."
am: d31df3a1be

Change-Id: I91bba1e12a7b20e1e4be104dd306d0fdafa7af55
2018-02-13 23:54:49 +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
Luis Hector Chavez
8cb681fa1f Merge "init.rc: Perform some mounts with nodev,nosuid,noexec"
am: cd66e4c6ea

Change-Id: I4d5496ae210c19f03ff1588f37cd848231f7b3e8
2018-02-13 22:32:40 +00: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
Jerry Zhang
1ab6e9d018 Merge "Remove urb request size maximum."
am: 1cb765c867

Change-Id: I2915011f47e312888d5e330be62cf76576d9cf3a
2018-02-13 07:40:07 +00:00
Christopher Ferris
b84d662e54 Merge "Fix computation of pc."
am: 71fa8125b9

Change-Id: I2a600c1fbe47ff5e4efadc0ff961d174b64f29c3
2018-02-13 07:38:23 +00:00
Josh Gao
a4c4ef463b Merge "adb: fix build breakage."
am: 14d7cdce51

Change-Id: I497739c7573be43483fd801ec2083f66fa425305
2018-02-13 07:36:35 +00:00
Josh Gao
854879ecdc Merge "adb: use delete on objects with destructors."
am: e504360f3d

Change-Id: I1ade6caf84ed8798db5ae194e52c9187789a885d
2018-02-13 07:33:45 +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
Daniel Colascione
2e50045f60 Merge "Support * as a wildcard for ATRACE_TAG_APP"
am: 53c964f53b

Change-Id: Ie6721a7c126908a6c1522a578094434a09b29db3
2018-02-12 23:14:23 +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
5384c29b55 Merge "Fix off by 4 error handling eh_frame hdr."
am: 73a2508dc4

Change-Id: Ic5374ce8305b29fa471bd2591a1943918ac74111
2018-02-12 20:09:12 +00:00
Elliott Hughes
bb5b8ab90d Merge "Fix a few demangler issues."
am: ecff589728

Change-Id: I4cd74455f1055ab02c0599035e3d789ce8a97520
2018-02-12 20:08:27 +00:00
Christopher Ferris
d25de127bf Merge "Clear dex pc to avoid duplicate frames."
am: 643f1e93ae

Change-Id: I1efa6a2331da06a019b126924ec0ca074068760d
2018-02-12 20:07:46 +00:00
Christopher Ferris
73a2508dc4 Merge "Fix off by 4 error handling eh_frame hdr." 2018-02-12 18:58:34 +00:00