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
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
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
The fstab struct wasn't properly being freed.
Test: Ensure a user of fs_mgr (vold) runs without errors.
Change-Id: I4dcb8ae2ab3e831fbdb13372eb31a67a5d9fb735
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
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
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
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
Prevent a possible DOS of the kernel logs because the runtime result
could differ from the boottime result.
Test: adb bugreport, then examine kernel log
Change-Id: I140fd465f2e691c751d92af50dbdf95e23c121d8
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
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
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
The abort message was accidentally relocated to be printed below the
registers, backtrace, and stack, which isn't very helpful. Move it back
to its rightful place.
Test: treehugger
Change-Id: I8aa5b63e58081f27ccdb42481fed8d9eb3a892a4
When a process crashes, both ActivityManager and init will try to kill
its process group when they notice. The recent change to minimize the
amount of time a process is paused results in crash dumps being killed
before they finish as a result of this. Since anything that needs to be
low-latency is probably not going to be too happy if it crashes, just
wait for completion whenever we're processing a real crash.
Bug: http://b/70343110
Test: debuggerd_test
Change-Id: I894bb06efd264b1ba005df06f7326a72f4b767bb
Moving to std::hash changed iteration order but these tests should
not have relied on hash_map iteration order anyway.
Test: zip_archive_test
Change-Id: I712bf2307c8770f03ea6f074bfc506a40cdcb066
Integer overflow sanitized builds are throwing an error on the while
loop decrement in the rfind function. This refactors the loop to prevent
decrementing the value on the final iteration.
Test: Compiled and device boots without runtime error.
Bug: 30969751
Change-Id: Ice4532cce933062b3c14adf2d9749cfdea4ad84c
Merged-In: Ice4532cce933062b3c14adf2d9749cfdea4ad84c
Also, modify the ProcessVmRead function to allow arbitrarily large
reads and add a test for it.
Test: Run tool and verify the output can be used to do an offline
Test: unwind.
Test: Ran unit tests.
Change-Id: I0974ddca4f5cf72b4c9fa29b597a0a669e223828
If LOG_TAG was not defined, falling back to a default
behaviour (using binary name).
Bug: 35361699
Test: manual
Change-Id: I209a6ebaf0df882f98642f6d1831766cb296c951
Both Extract...() functions don't need dynamic allocation
for the writers, as those are strictly scoped. This CL
changes heap allocation to stack allocation.
Test: zip_archive_test
Change-Id: Id727e4b9848235cd063cc67ecbe052d21ca21326