Commit Graph

37841 Commits

Author SHA1 Message Date
Tom Cherry e69ba761a3 Revert "Add getprop to toolbox"
This reverts commit c73497e17a.

Change-Id: Id6b84c86781a6ad7b675c10f142c3daa4117ec46
2018-01-09 15:53:00 +01:00
Treehugger Robot 8fa3e72846 Merge "Removed unused part in ld.config.txt.in" 2018-01-09 08:10:38 +00:00
Treehugger Robot 603826f857 Merge "Convert toolbox to Android.bp" 2018-01-09 06:01:26 +00:00
Justin Yun 939f06b429 Removed unused part in ld.config.txt.in
In the namespace with "isolated = false", "permitted.paths" is not
used.

Bug: 71727966
Test: walleye device boot
Change-Id: I6f624be3c4e2c4070bb784632d0757408ec12db0
2018-01-09 14:13:40 +09:00
Treehugger Robot b91021a2a8 Merge "bootstat: Add more boot reasons." 2018-01-09 00:03:22 +00:00
Treehugger Robot ac4f4721a0 Merge "Fix logging in libsuspend" 2018-01-08 23:32:26 +00:00
Treehugger Robot be10cae468 Merge "debuggerd_handler: set PR_SET_PTRACER before running crash_dump." 2018-01-08 23:32:22 +00:00
Dan Willemsen a852f95b53 Convert toolbox to Android.bp
This drops the *TOOLS automated logic, though since there are only
three tools now, that seems less important. It would have been possible
to implement that logic in a Go plugin, but that seems like a lot of
overkill to fix a few duplicated entries.

See build/soong/README.md for more information.

Test: mmma system/core/toolbox
Test: List of installed files is the same
Test: input.h-labels.h and tools.h are the same
Change-Id: I9753083c3f689e689e40001b998b39ad20509598
2018-01-08 15:03:21 -08:00
Tom Cherry acaeeeed73 Merge "Add getprop to toolbox" 2018-01-08 22:32:16 +00:00
Treehugger Robot affd4e9bd9 Merge "Use override_export_include_dirs." 2018-01-08 22:15:51 +00:00
Elliott Hughes 18cdd3502a Merge "Sort devices list before output." 2018-01-08 22:11:23 +00:00
Treehugger Robot 6097150de6 Merge "adb: add missing condition_variable include" 2018-01-08 21:38:51 +00:00
Steve Paik d5dc807475 Fix logging in libsuspend
ALOGV --> LOG(VERBOSE)
ALOGE --> PLOG(ERROR)

Also cpp-ify file handling

Bug: 70669809
Test:  Logs work
Change-Id: Idbaf3dccb495cdcd11f411c70784d19d1faa13a5
2018-01-08 13:35:35 -08:00
Tom Cherry 830fd168de Merge "Make property_info_checker a static executable for CTS" 2018-01-08 20:42:15 +00:00
Tom Cherry c73497e17a 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: I5f98f9e895d0620a2d9686bc0608490e7d9c3120
2018-01-08 12:36:44 -08:00
Treehugger Robot 1406d991a3 Merge "Change seccomp to the system filter" 2018-01-08 20:15:16 +00:00
Christopher Morin ace69b2f7b Merge "fs_mgr: don't log error messages when missing fstab" 2018-01-08 19:52:32 +00:00
Jeff Sharkey a7004e5fed Merge changes from topic "resgidz"
* changes:
  Add reserved disk GID to critical component.
  Set reserved GID when setting reserved blocks.
  Allocate GID to use reserved disk space.
2018-01-08 18:17:50 +00:00
Treehugger Robot 01ccde321f Merge "Nativeloader: Add minimal effort for host library path" 2018-01-08 09:40:50 +00:00
Jeff Sharkey 9410d572fb Add reserved disk GID to critical component.
We recently created a new GID that can be granted to critical system
processes, so that the system is usable enough for the user to free
up disk space used by abusive apps.

Test: builds, boots
Bug: 62024591
Change-Id: Ia5af7535cc05a214f8720ac08c594c6db888597a
2018-01-07 19:25:00 -07:00
Jeff Sharkey 47dc236d2f Set reserved GID when setting reserved blocks.
If we're setting up the number of reserved blocks, we also want to
set our new AID_DISK_RESERVED as the GID that's allowed to use those
blocks.

Test: builds, boots
Bug: 62024591
Change-Id: Iaabfa7d63ad9ff0b9732e2b9996937607d622fe2
2018-01-07 19:24:55 -07:00
Jeff Sharkey 354417a7fb Allocate GID to use reserved disk space.
Filesystems allow the setting of the "resgid" parameter to designate
a GID that is allowed to use the "reserved" disk space (in addition
to UID 0).  We'll be granting this GID to critical system processes,
so that the system is usable enough for the user to free up disk
space used by abusive apps.

Test: builds, boots
Bug: 62024591
Change-Id: I2d166f3b730f0a3e7279fb40f12db7413c1dadad
2018-01-07 19:21:51 -07:00
James Hawkins b607daec94 bootstat: Add more boot reasons.
These appear to be winding down...

Bug: none
Test: none
Change-Id: I00bc84d8e50b1563f97f812f722aa6bdbd6265b2
2018-01-05 14:42:55 -08:00
Steven Moreland e1c834db04 Use override_export_include_dirs.
Bug: 62878521
Test: soong build system finds renamed attribute
Change-Id: I51e42f4378db366b8711cd373fb835fecda88416
2018-01-05 14:42:12 -08:00
Treehugger Robot fcec40de0b Merge "rootdir: make sure the /odm mountpoint is always available" 2018-01-05 22:19:05 +00:00
Tom Cherry 99a415038b Make property_info_checker a static executable for CTS
property_info_checker is packaged with CTS, therefore it should be a
static exectuable to not require shared libraries.

Bug: 36001741
Test: CTS SELinuxHostTest#testValidPropertyContexts
Change-Id: Ib139094f8217e3d829677ab92b8450287a65d3f7
2018-01-05 13:56:27 -08:00
Chris Morin b183e05c3c fs_mgr: don't log error messages when missing fstab
Some devices, such as android on chromebooks, don't need an fstab.

Test: Ensure no error messages are seen from fs_mgr when fstab is
missing.

Change-Id: Ifadb2193743a61d03f1becefd6bc81a61eb45081
2018-01-05 13:37:26 -08:00
Christopher Morin 9bbcea1878 Merge "fs_mgr: fix memory leak" 2018-01-05 21:37:08 +00:00
Tom Cherry 5a7a8f2f17 Merge "PropertyService: Exclude sanitization for darwin" 2018-01-05 17:32:55 +00:00
Andreas Gampe e4c9acb767 PropertyService: Exclude sanitization for darwin
This doesn't seem to work. All other projects restrict sanitization,
too.

Mac build not actually tested.

Test: m
Test: linux host build still contains ubsan symbols
Change-Id: I60532a46177632320ba3b15b4a7c2d5e31ef2bfc
2018-01-04 19:25:52 -08:00
Chris Morin 517ed633c2 fs_mgr: fix memory leak
The fstab struct wasn't properly being freed.

Test: Ensure a user of fs_mgr (vold) runs without errors.
Change-Id: I4dcb8ae2ab3e831fbdb13372eb31a67a5d9fb735
2018-01-04 18:48:21 -08:00
Treehugger Robot db976aa526 Merge "Create a host side checker for property info file correctness" 2018-01-04 22:00:22 +00:00
Tom Cherry 919458c350 Create a host side checker for property info file correctness
Bug: 36001741
Test: verify a valid property info file and fail due to various failures
Change-Id: Iadd38796aa619f87ec559fe5687bbe2009df8b2d
2018-01-04 22:00:11 +00:00
Tom Cherry 2af1be4c16 Merge "Add OWNERS file" 2018-01-04 21:59:30 +00:00
Tom Cherry b6917a3c99 Add OWNERS file
Change-Id: I13315585ecc74978689d0e033ce93a94b1560d1d
Exempted-From-Owner-Approval: Vacation
2018-01-04 13:54:45 -08:00
Treehugger Robot 9e7cec22e0 Merge "LogAudit: remove dynamic rate limiter" 2018-01-04 17:21:32 +00:00
Tom Cherry 0f65650859 Merge "system property: property set without time spent asleep" 2018-01-04 17:06:59 +00:00
Steve Muckle 1a3e3065fb rootdir: make sure the /odm mountpoint is always available
The odm partition will eventually be required. Prepare for this by
creating its mount point.

Bug: 37322799
Test: run cts-dev -m CtsPermissionTestCases
Change-Id: Ibd031b68dd7328c853ded401bb2690dbd6675141
2018-01-04 08:45:20 -08:00
Treehugger Robot 2fdf9da669 Merge "Don't install unnecessary VNDK libs" 2018-01-04 13:36:14 +00:00
Dong Jinguang bb877e273b system property: property set without time spent asleep
There is a 2s timeout for system property set that currently
uses boot_clock as its clock source. If the system goes to sleep
during a property set, it may erroneously cause the timeout to
be reached as boot_clock increments during sleep. This patch
changes from boot_clock to steady_clock to ignore time spent
asleep when determining this timeout.

bug: 71497234
Test: 1. System service process try to set a system property
      with timeout 2s
      2. At the same time, the system go into sleep mode more
      than 2s
      3. System property set will be ok.

Change-Id: I808b9af16974a0f4de60a4ca30ae64d095a13422
2018-01-04 09:35:40 +08:00
Treehugger Robot 625d1383d3 Merge "Pin lmkd for real" 2018-01-03 23:23:38 +00:00
Jeff Vander Stoep 54c7a5f1e7 LogAudit: remove dynamic rate limiter
Select a low rate-limit to cut down on logspam and resulting
performance regressions.

Functionally reverts 247d682fe1
(logd: sepolicy dynamic rate limiting) and sets a static low
rate-limit. Before 247d682f, the limit was statically set to 20.
247d682f continued to support 20, but if sustained dropped the limit
to 5. This revert leaves us at 5 so as not to impact performance.

Test: /data/nativetest/logd-unit-tests/logd-unit-tests \
    --gtest_filter=logd.sepolicy_rate_limiter
    [  PASSED  ] 1 test.
Bug: 71538411
Change-Id: I6c92f4ba825cc24beb8f1f1b79258fa8097c837b
2018-01-03 12:52:58 -08:00
Daniel Colascione 4dd5d00ecc Pin lmkd for real
We pin lmkd in memory so that we don't take page faults (and thus
requisition memory) while we're in the process of responding to a
low-memory condition. mlockall(2) is the right primitive for this
pinning. Previously, we used the MCL_FUTURE flag to mlockall: used
this way, mlockall doesn't actually pin all pages in memory, since
MCL_FUTURE affects only the default flags for future mappings and
doesn't affect mapping already in existence at the time of the
mlockall call --- like the lmkd executable itself.

This patch adds the MCL_CURRENT flag, which also pins all pages
already mapped.

Test: code inspection
Change-Id: I4563959367a2f0a9cadc3ea41731b7f311326685
2018-01-03 12:32:14 -08:00
Yi Kong 370d2e02e0 Merge "Use correct format specifier" 2018-01-03 19:49:08 +00:00
Andreas Gampe 5c7d582be4 Nativeloader: Add minimal effort for host library path
Attempt to (somewhat) support the given library path on a non-Android
device. Iterate through the given list and construct a complete path.
This will of course not handle dependencies correctly and is best
effort.

Required (and enough) for agent-related testing in ART.

Bug: 70901841
Test: m
Change-Id: I9ecb27d662c8a2c79a70b6c5464483c449c5d034
2018-01-02 09:05:55 -08:00
Mike Frysinger 50ecaca744 adb: add missing condition_variable include
Test: build still works
Change-Id: I0e77336bab2a4a54cb2e77143162627d47aac0b1
2018-01-02 02:25:02 -05:00
Yi Kong 21c515ad1c Use correct format specifier
Discovered by the upcoming compiler update.

Test: m checkbuild
Change-Id: I8dd4bb711bfa4f4b71a3345a2ee38f689cee5257
2017-12-27 13:42:49 -08:00
Luis Hector Chavez 4841e744c2 debuggerd_handler: set PR_SET_PTRACER before running crash_dump.
Set and restore PR_SET_PTRACER when performing a dump, so that when
Android is running on a kernel that has the Yama LSM enabled (and the
value of ptrace_scope is > 0), crash_dump can attach to processes and
print nice, symbolized stack traces.

Bug: 70992745
Test: kill -6 `pidof surfaceflinger` && logcat -d -b crash
      # in both sailfish and Chrome OS

Change-Id: If4646442c6000fdcc69cf4ab95fdc71ae74baaaf
2017-12-27 13:19:31 -08:00
Treehugger Robot 93d344d98c Merge "zip_archive: Fix a few more badly written tests." 2017-12-27 11:35:20 +00:00
Narayan Kamath c36b80928b zip_archive: Fix a few more badly written tests.
Fix failures in DataDescriptor related tests due to to a bad call to
SetZipString (undefined behaviour). Also fix a typo in the test for
invalid descriptors, we were asserting things on the wrong array.

Test: zip_archive_test
Change-Id: I8c9a632443fdf1d5c115670d6e9317e1f4bf6ef4
2017-12-27 09:42:00 +00:00