Commit Graph

37909 Commits

Author SHA1 Message Date
Treehugger Robot 0f2ed7d398 Merge "Fixing app compat issue b/72143978" 2018-01-19 02:38:33 +00:00
Ian Pedowitz 7bb9785a1d Fixing app compat issue b/72143978
Revert "Remove obsolete workaround."

This reverts commit 1f3ac7583f.

Bug: 72143978
Bug: 24465209
Test: Tested failing case on sailfish, reverted back all CL's since
Test: 3471433 for b/24465209 and apps open
2018-01-18 16:25:24 -08:00
David Sehr 34f8eaab0d Merge "Remove libziparchive dependency on libutils" 2018-01-19 00:03:47 +00:00
Christopher Ferris 5e5056c5a5 Merge "Add support for getting a dex pc." 2018-01-18 18:45:56 +00:00
David Sehr abfb9f3b99 Remove libziparchive dependency on libutils
Prevent future cyclic dependency from libunwind changes.

Bug: 66919073
Test: make -j 50
Change-Id: I2a4fa5b7c2c3a82db2073d0fa51940da6603be1f
2018-01-18 09:23:53 -08:00
Christopher Ferris 98984b41da Add support for getting a dex pc.
Changes:
- Change the register type from int16_t to uint32_t for the location data
  and the Eval processing. This is because the special dex pc is > 65535.
- Add the ability for Dwarf register location information to point to a
  register that is itself a Dwarf location register.
- Add dex_pc to the frame information.
- Modify the unwind tool to print the dex pc if non-zero.

This does not implement the printing of the dex information in anything
but the unwind tool. It's not the final form of this printing.

Bug: 72070049

Test: Ran new unit tests.
Test: Dumped stack while in interpreter running 137-cfi art test and
Test: verified dex pc is set to non-zero.
Change-Id: I6ce8a6b577fb4f92abacbd433b1f68977e272542
2018-01-17 19:18:00 -08:00
Treehugger Robot 2c4f487dfb Merge "Apply the whitelist of actionable system properties" 2018-01-17 21:57:08 +00:00
Tom Cherry a0ffad60ef Merge "Introduce property types" 2018-01-17 21:01:33 +00:00
Jaekyun Seok eeb2188554 Apply the whitelist of actionable system properties
This whitelist will be applied only when
ro.actionable_compatible_property.enabled is true.

Bug: 38146102
Test: tested on walleye with ro.actionable_compatible_property.enabled=true
Change-Id: Ifd7211396b53e50a06d79e7c67224e2b38ef7c9d
2018-01-18 04:38:01 +09:00
Christopher Ferris 765516ecaf Merge "Find first non-zero jit debug entry." 2018-01-17 18:07:55 +00:00
Justin Yun 447280cea0 Merge "Add VNDK version suffix in ld.config.txt on build time." 2018-01-17 07:49:52 +00:00
Justin Yun cbbf195e46 Add VNDK version suffix in ld.config.txt on build time.
As we use different ld.config.txt per version, we don't need to
substitute the VNDK_VER on run time.
Remove all ${VNDK_VER} from the linker namespace configuration files.

Bug: 70603313
Test: build and boot GSI for walleye and sailfish
Change-Id: Ief8aee5c3308b2462cafaffc2423deda4e51a7bb
2018-01-17 12:14:25 +09:00
Oscar Shu da007e0deb Merge "Firmware dump create directory" 2018-01-16 23:57:15 +00:00
Christopher Ferris ed37aca987 Find first non-zero jit debug entry.
Sometimes a process will have multiple shared libraries loaded
that have defined __jit_debug_descriptor. Specifically, art testing
will load libart.so and libartd.so, which would have broken unwinding
through jit'd code for art testing if libart.so winds up being found first.
In order to avoid duplicating the code for the linker to figure out
which one is live, change the algorithm to find the first non-zero
first_entry_ set in __jit_debug_descriptor.

Bug: 68396769

Test: Passes unit tests.
Test: Verified this can unwind 137-cfi on arm/arm64.
Change-Id: Ic4d403065d2c6f22476ef0171e7add17cd1464cd
2018-01-16 14:59:51 -08:00
Tom Cherry 927c5d5fdc Introduce property types
Properties right now can take any format, but that makes it hard to
specify an API for these properties as Treble intends to do.
Therefore this change introduces the idea of property types, described below.

1) 'string' this is the default type and allows any property to be set.
2) 'bool' this allows only boolean values (true|false|1|0)
3) 'int' and 'uint' these allow signed and unsigned integer values
respectively.
4) 'double' this allows floating point numbers with double precision.
5) 'size' this allows for strings matching [0-9]+[gkm].
6) 'enum' this allows only a specific set of space deliminated values
to be set, e.g. 'enum allow these strings' only allows one of 'allow',
'these', or 'strings' to be set.

Bug: 70858511
Test: unit tests, test that properties are only set if their type matches
Change-Id: I7a6b00fb43ec630d1f56c9e9a1f1b61d3914f603
2018-01-16 14:44:40 -08:00
Treehugger Robot 4719ecd28c Merge "Mount eBPF file system and cgroupv2 root directory" 2018-01-16 21:45:29 +00:00
Chenbo Feng 2cba6f2e0e Mount eBPF file system and cgroupv2 root directory
Mount the eBPF file system under /sys/fs/bpf to allow netd to pin and
retrieve persistent eBPF map object from the file system. It helps the
system to maintain a consistent eBPF data store when netd crashed and
restart. Mount the cgroupv2 module and use the root folder of it to
monitor network statistics through eBPF program attached.

Test: eBPF map object show up under /sys/fs/bpf after netd start.
Bug: 30950746
Change-Id: Ie475112116603798fe75a75c5a84f4bbe5b942ec
2018-01-16 21:45:25 +00:00
xshu 9a7a5b61c4 Firmware dump create directory
Setting up infanstructure for vendor tombstone in dir:
/data/vendor/tombstones

Wifi specific dumps will go into:
/data/vendor/tombstones/wifi

Bug: 70170285
Test: compile, run on device.
Change-Id: Ie16dd8236d9b5df19adb9818b4c62ce01e0d0b10
2018-01-16 19:10:57 +00:00
Treehugger Robot 4ba3ebbc2f Merge "OWNERS: add myself" 2018-01-16 19:09:56 +00:00
Treehugger Robot 5ee641c6cd Merge "liblog: clock_gettime, clock_getres and time benchmarks" 2018-01-16 18:33:48 +00:00
Treehugger Robot 962566095f Merge "liblog: benchmarks use google-benchmark library" 2018-01-16 18:27:24 +00:00
Treehugger Robot d443dd327a Merge "Use ro.logd.kernel for kernel logcat" 2018-01-16 18:24:08 +00:00
Mark Salyzyn dc3c14720f liblog: clock_gettime, clock_getres and time benchmarks
Add local BM_time_clock_gettime_*, BM_time_clock_getres_* and
BM_time_time benchmarks.  Relates to the bionic benchmarks of
the same names, except adds CLOCK_MONOTONIC_RAW.  Added here for
developer convenience whenever updates to the liblog or logd
code base need integration testing.

ToDo: add liblog gTests that analyse the benchmark data to confirm
that the specified integrated device has vdso access to all the
pertinent clock sources.  Add liblog local benchmarks and tests to
measure the device clock drift of each possible liblog clock
source to help evaluate device configuration.

Test: liblog_benchmarks --benchmark_filter=BM_time*
Bug: 63737556
Bug: 69423514
Change-Id: Ibafe0880d976ef2b3885765f71e0ba6c99d56f2a
2018-01-16 08:11:59 -08:00
Mark Salyzyn 1520bd43b0 liblog: benchmarks use google-benchmark library
Remove our circa 2014 snapshot of the google benchmarking library, and
use the now very stable google-benchmark suite. Some porting effort,
and deal with some benchmarking saddle points that take too long to
sort out. Focus on minimal API changes, _odd_ new behaviors, and style.

Test: liblog_benchmarks, ensure results in about the same range
Bug: 69423514
Change-Id: I2add1df9cb664333bcf983b57121ae151b26935b
2018-01-16 08:11:26 -08:00
Jeff Sharkey 3b44d2846e Merge "Remove FUSE logic; it's only a sdcardfs wrapper." 2018-01-16 08:55:16 +00:00
Treehugger Robot 854eb6cf78 Merge "Improve ALOGV compatiblity with clang-tidy" 2018-01-13 22:09:40 +00:00
Christopher Ferris 85d0c3adaf Merge "Add ability to read jit gdb data." 2018-01-12 23:44:06 +00:00
Jeff Sharkey 68e1093028 Remove FUSE logic; it's only a sdcardfs wrapper.
Leaving the FUSE logic intact was confusing to OEMs, who expected
that it would still work and pass CTS.  Remove all the FUSE logic
and leave a comment block about why the wrapper exists.

Also use new Android.bp makefile format.

Test: builds, boots
Bug: 63524725
Change-Id: I8b2a4fa0227109d65689c43302dc6fa40394ff58
2018-01-12 15:41:55 -07:00
Jeff Sharkey 178ede377a Merge changes from topic "defnormalz"
* changes:
  Add "default_normal" support for sdcardfs.
  sdcard: Use AID_ROOT constant
2018-01-12 22:32:35 +00:00
Jeff Vander Stoep e2f77d8ef1 OWNERS: add myself
Test: none
Change-Id: I150226c19370a2c5f06781003ec88befa0e91da7
2018-01-12 13:31:54 -08:00
Tom Cherry 5939c71606 Merge "getprop: add -T option to return a property's type" 2018-01-12 21:30:39 +00:00
Tom Cherry c64c006991 Merge "init: always expand args in subcontext" 2018-01-12 21:06:59 +00:00
Jeff Sharkey e2e3610e6e Add "default_normal" support for sdcardfs.
Also cleans up fallback-retry logic for older kernels by
progressively removing each newer flag with each retry.

Test: internal CTS
Bug: 64672411
Change-Id: I3de3b64b68838fb2ef4505fe73c4e9865b2f9026
2018-01-12 13:11:31 -07:00
Ryo Hashimoto d2d8eabf67 sdcard: Use AID_ROOT constant
To be consistent with the other parts of the code,
and to make it easy to use a differnt value when running in a container.

Bug: 69142822
Test: build
Change-Id: I9b2c7744e3867bb15511dd4ddd7bce281d758a7b
2018-01-12 13:09:54 -07:00
Tom Cherry 8573b55f0f getprop: add -T option to return a property's type
Bug: 70858511
Test: Return property types correctly
Change-Id: I506582d88c12a7f52d699635a41b24de4bc80289
2018-01-12 11:26:46 -08:00
Christopher Ferris 150db124f3 Add ability to read jit gdb data.
Changes:
- New JitDebug class to handle all of the jit gdb interface.
- Add unit tests for all, along with new offline test using debug data.
- Add new Memory type called MemoryOfflineParts that has multiple
  MemoryOffline objects to support the offline test.
- Update the tools to use the JitDebug object.
- Modify libbacktrace to use the JitDebug, but only looking in libart.so
  and libartd.so.
- Change the Format32Bits to Is32Bit since it's more accurate and I use
  it in a different context where original name didn't make sense.
- Add a new function to find global variables in an elf file
  (GetGlobalVariable).
- Add a new function to determine if a pc is valid for this elf (IsValidPc).

Bug: 68396769

Test: Ran new unit tests. Added new offline test that uses jit debug data.
Test: Ran art test that generates jit data and verified a crash unwinds
Test: through the jit data.
Change-Id: I6e7ee2f5bab2242028a06feece156dff21c0a974
2018-01-12 11:18:42 -08:00
Tom Cherry ceecbfc40e Merge "Rename property 'schema' to 'type'" 2018-01-12 19:13:44 +00:00
Tom Cherry c49719fc5d init: always expand args in subcontext
Currently init expands properties in arguments only when those
commands are run in a subcontext.  This creates a hole where
properties that should not be accessible from a given subcontext of
init can be accessed when running a command in the main init
executable (for example `start`).

This change creates a callback in subcontext init that simply expands
and returns arguments back to the main init process, to ensure that
only those properties that a subcontext can access get expanded.

Bug: 62875318
Test: boot bullhead, new unit tests
Change-Id: I2850009e70da877c08e4cc83350c727b0ea98796
2018-01-12 10:35:26 -08:00
Tom Cherry 4094e5ee2e Rename property 'schema' to 'type'
Bug: 70858511
Test: boot
Change-Id: I8e17596ddd8393f245c7e02ff72765c84d3bb208
2018-01-11 16:26:50 -08:00
Krzysztof Wesolowski b0e17c9e91 Improve ALOGV compatiblity with clang-tidy
Currently used clang tidy does not filter the warnings caused
by macros, even if macros come from filtered headers.

This change allows projects using ALOGV to use
readability-implicit-bool-conversion without spreading //NOLINT everywhere.

Bug: 71533509
Change-Id: Id1b193d1e56d13f00171e04f600292877c5f6cb3
2018-01-11 11:11:20 -08:00
Vasily Tarasov 55feb241b1 Merge "Adding per-method clang thread safety annotations" 2018-01-11 17:48:33 +00:00
Tom Cherry eac86b0ea9 Merge "Reland: Add getprop to toolbox" 2018-01-11 16:31:50 +00:00
Treehugger Robot 4d281880e0 Merge "Do not append VNDK version if VNDK is not used" 2018-01-10 23:30:47 +00:00
Justin Yun dd16301bab Do not append VNDK version if VNDK is not used
If BOARD_VNDK_VERSION is not defined, ro.vndk.version will not be
set. In this case, the device, is not able to use versioned
configuration files.
Check BOARD_VNDK_VERSION to append the VNDK version to the namespace
configuration files.

Bug: 71730104
Test: Check boot on both 2016 and 2017 Pixel devices.
Change-Id: I1df27c75de42a526768a156387f22a934cda6d72
2018-01-11 08:29:54 +09:00
Vasily Tarasov 713f289dd0 Adding per-method clang thread safety annotations
Change-Id: Ic92702a06570f48bf3616e0ee959a49e1eec393c
2018-01-10 12:25:32 -08:00
Tom Cherry 91094e06ce Reland: Add getprop to toolbox
Add a non-toybox version of getprop, so that we can interface with the
new C++ PropertyInfoAreaFile class to return property context
information.

Bug: 36001741
Test: Compared toolbox getprop results with toybox getprop
Change-Id: I4e90aa5b843cb5cfcbe85f05f23ae8e22729b26e
2018-01-10 11:26:24 -08:00
Tom Cherry ea4c7d5727 Merge "Add toolbox to vendor" 2018-01-10 18:14:17 +00:00
Treehugger Robot e0fc36c47b Merge "Add AID_STATSD and AID_INCIDENTD for statsd/incidentd daemons." 2018-01-10 02:51:19 +00:00
Elliott Hughes 5edeadb53b Merge "Just check in tools.h." 2018-01-10 02:45:37 +00:00
Treehugger Robot 3553883418 Merge "Remove obsolete workaround." 2018-01-10 01:29:50 +00:00