Commit Graph

37657 Commits

Author SHA1 Message Date
Jiyong Park ad7ddd5a02 Reland "Prevent vendors from accessing private VNDK libs"
This reverts commit 875fe42a81.

... and fixes a bug that private VNDK libs are not accessible even to
RenderScript framework libraries (such as libRS_internal.so). This is
fixed by exceptionally allowing the private libs only to 'rs'
namespace.

Bug: 70260989
Bug: 70279973
Bug: 63878960
Test: Build for walleye and tested Photos edit.
Test: other renderscript app (camerascript) works as well
Merged-In: I3978cbe2e869f6a1c214c755ded038349bde7b6b
Change-Id: I3978cbe2e869f6a1c214c755ded038349bde7b6b
(cherry picked from commit 781c47f4da)
2017-12-07 13:44:46 +09:00
Sundong Ahn e93d7f9941 Permitted and search path change
The permitted and search paths should be changed according to VNDK version.
However these paths are fixed with vndk and vndk-sp. So I define the
directory name as below
- /system/${LIB}/vndk${VNDK_VERSION}
- /system/${LIB}/vndk-sp${VNDK_VERSION}
${VNDK_VERSION} will be set by the property "ro.vndk.version".

Bug: 66074376
Test: build & run
Merged-In: I7b8e12327af89d131c4c49cb9b459a393c7dacb8
Change-Id: I7b8e12327af89d131c4c49cb9b459a393c7dacb8
(cherry picked from commit 85c773f0a2)
2017-12-07 13:44:29 +09:00
Christopher Ferris a7e2a12d38 Merge "Split arch data into separate files." 2017-12-07 02:35:35 +00:00
Elliott Hughes a78c686799 Merge "Remove dead code." 2017-12-07 00:44:56 +00:00
Yabin Cui d7edcc9bc4 Merge "libBacktraceOffline: fix using debug frame with load bias." 2017-12-07 00:25:20 +00:00
Yabin Cui 665f144566 Merge "base: allow creating tempfile in a custom temporary dir." 2017-12-07 00:07:25 +00:00
Christopher Ferris d06001d6e0 Split arch data into separate files.
Add an ArchEnum to express the arch of the Elf objects and Reg objects.

Split out the regs code into per arch pieces and generic parts.
Also, split out the header files for each arch.

Do not break out the test code yet, there isn't enough and it doesn't
help to maintain the tests.

Test: libunwindstack/libbacktrace/debuggerd unit tests pass.
Test: Running debuggerd -b <PIDS> yields valid data on bullhead.
Change-Id: If61f6c730c9ff2249f986b41de8c4d62f7158325
2017-12-06 16:01:40 -08:00
Xin Li f223ff4c29 Merge "DO NOT MERGE: Merge Oreo MR1 into master" 2017-12-06 23:18:26 +00:00
Xin Li ff84934e0a DO NOT MERGE: Merge Oreo MR1 into master
Exempt-From-Owner-Approval: Changes already landed internally
Change-Id: I9f1ced06ca1f28e5c75ba07c54cdc7bc78d5f5f9
2017-12-06 14:24:58 -08:00
Yabin Cui 464ea61143 base: allow creating tempfile in a custom temporary dir.
Bug: http://b/70232908
Test: none.
Change-Id: I24b894793f6725186b3582a91db083427e51aa5a
2017-12-06 14:20:07 -08:00
Elliott Hughes 231f1e664d Remove dead code.
Bug: N/A
Test: boots
Change-Id: Id901d95aa05d26767aa5d956ac6e167db1cc3036
2017-12-06 12:38:41 -08:00
Yabin Cui 4a26eaf1f1 libBacktraceOffline: fix using debug frame with load bias.
Bug: http://b/69383534
Test: run backtrace_test.
Change-Id: I295d9dc8f3e5b628f179b2eaeac21fa93de130b0
2017-12-06 11:27:06 -08:00
Ivan Lozano a93741ec87 Merge "Disable integer overflow sanitizer in grep."
am: 3946d93023

Change-Id: Ie4ab0b0c542de435a507c1efdab79eef91beaf2f
2017-12-06 19:21:39 +00:00
Ivan Lozano 3946d93023 Merge "Disable integer overflow sanitizer in grep." 2017-12-06 19:14:11 +00:00
Jin Qian 2cbce3739b Merge "fastboot: fix build break"
am: cce381e307

Change-Id: I1492e940fff923a979d957d9ca1d51ecffdb6492
2017-12-06 07:33:52 +00:00
Treehugger Robot cce381e307 Merge "fastboot: fix build break" 2017-12-06 07:27:29 +00:00
Jin Qian 0c04f78286 fastboot: fix build break
execvpe is a GNU extension. Use execve instead.

Change-Id: I8bf4b6a4e9fd0cae0239f4c5aa9707f141460a7d
2017-12-05 21:39:40 -08:00
Alin Jerpelea 6ba4207461 Merge "add odm partition to ld.config.legacy"
am: cc06663c04

Change-Id: I4251acfd4d37b09041aedfdbf926da0d2e64ff67
2017-12-06 04:10:24 +00:00
Alin Jerpelea 4a33cee3f8 Merge "Allow firmware loading from ODM partition"
am: 5b78366665

Change-Id: Ic7c19c97598fc4087af9a1b7fcc28d5ed0600558
2017-12-06 04:10:02 +00:00
Treehugger Robot cc06663c04 Merge "add odm partition to ld.config.legacy" 2017-12-06 04:03:07 +00:00
Treehugger Robot 5b78366665 Merge "Allow firmware loading from ODM partition" 2017-12-06 04:03:07 +00:00
Jin Qian 1ab4d182bd Merge "fastboot: pass environment variables to exec_e2fs_cmd"
am: 7ed1a15efe

Change-Id: I25b475a4fdc0894d5321ff8c0d64c588b56d25c7
2017-12-06 02:57:29 +00:00
Treehugger Robot 7ed1a15efe Merge "fastboot: pass environment variables to exec_e2fs_cmd" 2017-12-06 00:28:32 +00:00
Christopher Ferris de54053fc3 Merge "Demand read load bias for a map."
am: 1ae6d14f93

Change-Id: I781a7499b370e70c7fcf18acbdaafcb1c0889781
2017-12-05 23:43:27 +00:00
Christopher Ferris 1ae6d14f93 Merge "Demand read load bias for a map." 2017-12-05 23:36:44 +00:00
Jin Qian 03c73e106f fastboot: pass environment variables to exec_e2fs_cmd
Set MKE2FS_CONFIG to point to a config file that comes with mke2fs
binary.

Change-Id: I1d68726ff8baa0c00b930b32f66c54c298c46b81
2017-12-05 14:06:26 -08:00
Christopher Ferris b7de5f5429 Demand read load bias for a map.
Add a static GetLoadBias method to the Elf object that only reads just
enough to get the load bias.

Add a method to MapInfo that gets the load bias. First attempt to get
it if the elf object already exists. If no elf object was created, use
the new static method to get the load bias.

In BacktraceMap, add a custom iterator so that when code dereferences
a map element, that's when the load bias will be retrieved if it hasn't
already been set.

Bug: 69871050

Test: New unit tests, verify tombstones have non-zero load bias values for
Test: libraries with a non-zero load bias.
Change-Id: I125f4abc827589957fce2f0df24b0f25d037d732
2017-12-05 13:12:47 -08:00
Hao Wang da620dff5f Merge "logd: enhance multiple blocking readers performance"
am: 6740b9697e

Change-Id: Iedd4096dd37d30a605fc8e92b89e5715fc0c4300
2017-12-05 19:54:23 +00:00
Treehugger Robot 6740b9697e Merge "logd: enhance multiple blocking readers performance" 2017-12-05 19:31:21 +00:00
Hao Wang f6e2296953 logd: enhance multiple blocking readers performance
logd suffers performance degradation when multiple blocking
readers connect to it. Each time when the writer thread log
new entries, all of the readers are notified regardless of
which log id they are watching.

In this case, only give notification to the readers who are
actually watching new entries' log id. This decreases logd
CPU consumption by skipping unnecessary LogBuffer::flushTo
loops.

Test: liblog-unit-tests, logd-unit-tests & CtsLiblogTestCases
      logcat-unit-tests
Test: manual:
1.'logcat –b all' at constant heavy logging load level
2.simultaneously 'logcat –b crash' in another session,
   a healthy crash buffer usually keep empty
3.logd CPU consumption doesn't increase after step 2

Change-Id: I4ffc045c9feb7a0998f7e47ae2173f8f6aa28e8a
2017-12-05 18:46:24 +08:00
Christopher Ferris 269bbeef84 Merge "Switch MemoryRemote to use ptrace."
am: ebca57adec

Change-Id: I1729cd0095b2882091328768ce951f785f23fbbf
2017-12-05 01:57:43 +00:00
Christopher Ferris ebca57adec Merge "Switch MemoryRemote to use ptrace." 2017-12-05 01:49:17 +00:00
James Hawkins bb69ab2010 Merge "bootstat: Add more boot reasons."
am: 4aba23831d

Change-Id: Icaffd6019899acfc1b279afccafc3d69471ee7c3
2017-12-05 01:02:07 +00:00
Treehugger Robot 4aba23831d Merge "bootstat: Add more boot reasons." 2017-12-05 00:12:33 +00:00
Ivan Lozano f4dafbc836 Disable integer overflow sanitizer in grep.
Disables integer overflow sanitization in grep on integer sanitized
builds.

Bug: 30969751
Test: Compiles.
Change-Id: I2668ef6f2261a86f17d2a0f04d5ec7a3c0336ff1
2017-12-04 14:47:49 -08:00
Christopher Ferris e714ed2774 Switch MemoryRemote to use ptrace.
Some processes will fail to read when using process_vm_read, so switch
back to ptrace for now. For example, the system_server process only
gets two frames without this fix.

Fix up some of the remote memory read unit tests to allow passing
even when using ptrace.

Bug: 70160908

Test: All unit tests pass, debuggerd -b <system_server pid> works.
Change-Id: I37c67bf9c480d7268c9fe32dad6a8d78a4020b85
2017-12-04 14:27:34 -08:00
James Hawkins 00433a2305 bootstat: Add more boot reasons.
Bug: none
Test: none
Change-Id: I4cc6e2e39b6c5954387006d48f2119211fa37dd5
2017-12-04 14:20:21 -08:00
Yao Chen 9e28024b42 Merge "make log.tag.stats_log work for stats buffer."
am: 1e2ed53ffc

Change-Id: I5b81edb2c221eb8a7c5ab64316d788879d727c58
2017-12-04 21:17:18 +00:00
Treehugger Robot 1e2ed53ffc Merge "make log.tag.stats_log work for stats buffer." 2017-12-04 21:02:26 +00:00
Elliott Hughes d11a642bd0 Merge "Always build awk."
am: 919887ebd3

Change-Id: I81d8d8600b1cb0f23b3bb789c04d4f0dad7b708f
2017-12-04 20:48:49 +00:00
Elliott Hughes 919887ebd3 Merge "Always build awk." 2017-12-04 20:32:48 +00:00
Yao Chen 025f05a225 make log.tag.stats_log work for stats buffer.
Test: adb shell setprop log.tag.stats_log S
      And saw the stats logs are silent.

Change-Id: I7a9313f5f12029f9b8a8f070de1e1db659675525
2017-12-04 10:07:12 -08:00
Elliott Hughes 62fc11b054 Always build awk.
Bug: http://b/69117476
Test: builds
Change-Id: I93590e942fa78d7e472f032181f72b87c57bc387
2017-12-04 09:35:43 -08:00
Alin Jerpelea b398ac859c Allow firmware loading from ODM partition
ODM partition may contain firmware and we should allow
firmware loading from this partition

Test: firmware is loaded succesfully
Change-Id: I7d327bc79a04d1a2dee0fd47407eb53f9d391665
Signed-off-by: Alin Jerpelea <alin.jerpelea@sonymobile.com>
2017-12-04 16:22:15 +01:00
Josh Gao 3e4f309b68 Merge changes I53c2c560,I7d845ac5,I8b11d923
am: b4fda18d83

Change-Id: I1901e4dfe4d5d59b0ebfa018bb79d0827d22ba05
2017-12-02 00:22:06 +00:00
Treehugger Robot b4fda18d83 Merge changes I53c2c560,I7d845ac5,I8b11d923
* changes:
  unwindstack: rename Memory::ReadPartially to Read.
  unwindstack: rename Memory::Read to ReadFully.
  unwindstack: add Memory::ReadPartially.
2017-12-02 00:12:21 +00:00
James Hawkins 9810df82a8 Merge "bootstat: Add four more boot reasons."
am: 20a410b575

Change-Id: Ida2da2e46327d9cb572bb0f12d5348acc5c5357d
2017-12-01 19:42:38 +00:00
James Hawkins 20a410b575 Merge "bootstat: Add four more boot reasons." 2017-12-01 19:35:03 +00:00
Joel Galenson a55ca79ba6 Merge "Remove unnecessary restorecon."
am: f896d274bc

Change-Id: If23392b7c0ba23cce9a9f65b55aa4e48713d977e
2017-12-01 16:52:00 +00:00
Elliott Hughes 152d7e0f6c Merge "std::string_view is no longer experimental."
am: c8022a3efc

Change-Id: I75fa251cb6a959e7dfd32524b8d0ffcf839c3dc4
2017-12-01 16:51:24 +00:00