Commit graph

38069 commits

Author SHA1 Message Date
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
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
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
Christopher Ferris
a8c397317d Clear dex pc to avoid duplicate frames.
Bug: 73228466

Test: Passes new unit tests, fails without change.
Change-Id: I3660bfd16cbf2d5cf96490ca7714bc5f97914884
2018-02-12 08:46:19 -08:00
Christopher Ferris
e37e2d05b1 Fix off by 4 error handling eh_frame hdr.
- Add a new tool that can dump the register information given a pc.
- Add a new offline unwinder test that fails without this change.
- Update unit tests.
- Refactor offline unwind tests to make it easier to add tests.

Bug: 73048324

Test: Passes new unit tests.
Test: Passes libbacktrace unit tests.
Test: Ran debuggerd -b on random processes.
Change-Id: If6c70a044299505c2274ae6888b35bf9ac34b74b
2018-02-10 17:11:23 -08:00
Daniel Colascione
642ef98b3b Support * as a wildcard for ATRACE_TAG_APP
Test: strcmp
Change-Id: I33ec3ae071e3856538444663bbabb3c779ed8afa
2018-02-09 20:08:19 -08:00
Treehugger Robot
cd2fa1f432 Merge "debuggerd_fallback: fix race." 2018-02-10 01:44:07 +00:00
Elliott Hughes
d7bb826a9c Fix a few demangler issues.
Specifically:

  * rvalue references.

  * St does not require N...E delimiters (explicit special case in the spec).

  * ".cfi" suffixes.

Bug: http://b/67678053
Test: ran tests
Change-Id: If8cabad448b46b165eefc6c5487996428c9c6975
2018-02-09 17:34:55 -08:00
Josh Gao
c531ed6648 debuggerd_fallback: fix race.
A race condition occurs when one thread takes more than a second to get
scheduled to handle the signal we send to ask it to dump its stack.
When this happens, the main thread will continue on, close the fd, and
then ask the next thread to dump, but the slow thread will then wake up
and try to write to the new thread's fd, or trigger an assertion in
__linker_enable_fallback_allocator.

Do a few things to make this less bad:
  - encode both target tid and fd in the shared atomic, so that we know
    who each fd is for
  - switch __linker_enable_fallback_allocator to return success instead
    of aborting, and bail out if it's already in use
  - write to the output fd right when we get to it, instead of doing it
    whenever the dumping code decides to, to reduce the likelihood that
    the timeout expires

Test: debuggerd_test
Change-Id: Ife0f6dae388b601e7f991605f14d7a0274013f6b
2018-02-09 15:35:40 -08:00
Daniel Colascione
bac72c884f Merge "Add explanation for clone use" 2018-02-09 19:33:09 +00:00
Christopher Ferris
99888af9f1 Merge "Expose per arch headers." 2018-02-09 19:23:31 +00:00
Treehugger Robot
26b69296fe Merge "debuggerd: update policy for recent sigaction changes." 2018-02-09 07:12:50 +00:00
Christopher Ferris
53914165e4 Expose per arch headers.
Bug: 73013352

Test: Compiles.
Change-Id: Ic05660db7d7858a9857143ee5e58cdaddcf52a35
2018-02-08 19:29:08 -08:00
Josh Gao
08cd23e732 debuggerd: update policy for recent sigaction changes.
Commit 3e235911 in bionic switched LP32's sigaction implementation over
to using the rt_sigaction syscall, matching LP64. Update our seccomp
policy to match.

Bug: http://b/73119572
Test: debuggerd_test32
Change-Id: I0a662a1c874298d434468d2dcdb4ebf9f276110c
2018-02-08 16:48:03 -08:00
Daniel Colascione
b650aef2a0 Add explanation for clone use
Test: no code changes
Change-Id: I70c8af8261cda3163677557fd78ae0119b1f1be0
2018-02-08 15:07:47 -08:00
David Sehr
2ccde89153 Merge "Remove dependency on -no_art variant" 2018-02-08 21:26:05 +00:00
Treehugger Robot
c50d19c0b0 Merge "Revert "Don't initialize atrace if it's already disabled."" 2018-02-08 17:27:41 +00:00
Treehugger Robot
4c0ee1e8a0 Merge changes from topic "vndk-sp-list-update"
* changes:
  Rename namespace configuration source files.
  Use actual VNDK list for non-VNDK-enforcing devices
2018-02-08 05:52:02 +00:00
Josh Gao
9bf624cd3a Merge "adb: switch asocket::enqueue to std::string." 2018-02-08 01:06:22 +00:00
Paul Crowley
738adf7b46 Revert "Don't initialize atrace if it's already disabled."
This reverts commit e184423526.

Reason for revert: b/73081734
Bug: 73081734

Change-Id: I8ae835f5575292ebd3c4457ef26c2e8f98cfa11e
2018-02-08 00:49:37 +00:00
Josh Gao
f99711fe87 Merge changes I86bcfaaa,I24d7f5d0
* changes:
  adb: restore packet data length checks.
  adb: switch asocket's intrusive linked list to vectors.
2018-02-08 00:34:40 +00:00
Jerry Zhang
3be61d3850 Remove urb request size maximum.
The 16kB maximum for transfers was removed from
the kernel in 3.3. Devio has since supported
arbitrary transfer sizes through scatter gather.

See the following kernel patches for context:
"USB: change the memory limits in usbfs URB submission"
"usbdevfs: Use scatter-gather lists for large bulk transfers"

Bug: 67683483
Test: Run usb_async_test app with USB3 : 38MB/s -> 300MB/s
Change-Id: Ia52440cb725561b0f1db1a75aa1b8ab952585826
2018-02-07 16:12:14 -08:00
Justin Yun
27bdc37fac Rename namespace configuration source files.
For strict VNDK runtime restriction, use ld.config.txt as a source
file. For treblized devices without BOARD_VNDK_VERSION, use
ld.config.vndk_lite.txt file.

Test: Build and boot on Pixel 2017 and 2018 devices.
Change-Id: Ie5b77facd4c11bc73219ecf13ad1298ac5d60d8e
2018-02-08 08:46:59 +09:00
Justin Yun
8a9a8eeb85 Use actual VNDK list for non-VNDK-enforcing devices
Rename ld.config.txt.in to ld.config.vndk.txt and
ld.config.txt to ld.config.vndk_light.txt.

For FULL_TREBLE devices without BOARD_VNDK_VERSION, update the VNDK
library list in ld.config.vndk_light.txt with the actual VNDK list.

Bug: 69526027
Test: Build marlin/sailfish and check boot
Change-Id: Idbb0cc97d11037c1493d4739e84961297ce51dbd
Merged-In: Idbb0cc97d11037c1493d4739e84961297ce51dbd
2018-02-08 08:33:15 +09:00
David Sehr
892e675a89 Remove dependency on -no_art variant
Remove an external dependency on a shim I used to protect against
renaming.

Bug: 22322814
Test: make -j 50
Change-Id: I7e6eaee7d82a1a42d4c37daa74803cefc7bb68ce
2018-02-07 15:19:22 -08:00
Treehugger Robot
ab26cc4b12 Merge "healthd: don't report fake data for battery-less devices" 2018-02-07 20:38:32 +00:00
Christopher Ferris
3ff3ff1c36 Merge "Check that dex pc is in a valid map." 2018-02-07 14:50:03 +00:00