Currently we only report why a property set call has failed but drop
the context of what was trying to set the property. This change
adds information about why a property was trying to be set when it
fails.
It also unifies property_set() within init to go through the same
HandlePropertySet() function as normal processes do, removing unneeded
special cases.
Test: boot bullhead
Test: attempt to set invalid properties and see better error messages
Change-Id: I5cd3a40086fd3b226e9c8a5e3a84cb3b31399c0d
Added by I7255d45335fa009dc9e5de99dff67af52bd70e06
Bug: None
Test: Ran the analyzer. Complaint is gone.
Change-Id: Id9b8debd8b9690210f5a8e19154ee3a5095b8fbd
Add a way to test LeakSanitizer with the server by adding an
environment variable that intentionally leaks.
Test: ASAN_OPTIONS=detect_leaks=1:leak_check_at_exit=1 ADB_LEAK=1 adb server nodaemon
Change-Id: I7255d45335fa009dc9e5de99dff67af52bd70e06
Create a host side parser for init such that init rc files can be
verified for syntax correctness before being used on the device.
Bug: 36970783
Test: run the parser on init files on host
Change-Id: I7e8772e278ebaff727057308596ebacf28b6fdda
Link statically against libmemunreachable to avoid runtime
dependency on libmemunreachable.so.
Provide a better error when run as non-root.
Rename the test to MemunreachableBinderTest.
Add comments explaining the test sequence.
Bug: 28275695
Test: memunreachable_binder_test
Change-Id: Iddfba636205b7ca3ad31a6ba2c4e85abadd32d0d
The recent change to detect missing source files broke reading makefiles
for mips, since this didn't specify a source file.
Bug: 73904572
Test: lunch aosp_mips-eng; m nothing
Test: lunch aosp_arm-eng; m crash_dump.policy
Test: lunch aosp_arm64-eng; m crash_dump.policy
Test: lunch aosp_x86-eng; m crash_dump.policy
Test: lunch aosp_x86_64-eng; m crash_dump.policy
Change-Id: I28864b5af59267f1ab83084128f2c59b04039374
We don't actually need to use quick_exit to avoid calling static
destructors, since we have -Wexit-time-destructors to guarantee we
don't actually have any, and this precludes the use of asan's exit time
leak checking, so switch back to atexit/exit.
Test: ASAN_OPTIONS=detect_leaks=1:leak_check_at_exit=1 adb server nodaemon with a manually inserted leak
Change-Id: Id8178913f64cb02c820c5073351369a9e4d8c74d
Passing in MS_REMOUNT | MS_BIND tells the kernel to only remove the
MS_RDONLY flag and keep all the other flags the same. This is also the
only kind of remount that is allowed in Linux containers (to be more
precise, within user namespaces).
This change also attempts to always run the remount command when dealing
with /, since containers will almost always run a loop device, and since
the number of the device changes, it is not convenient to put it in the
fstab. Plus, the container won't have permission to modify it, but might
be able to perform the remount.
Bug: 72178046
Test: `adb remount` works in both sailfish and Chrome OS
Change-Id: I9e8ec8afcd57f67875a312824667768b3aa89faa
This patch adds sysfs_path=%s in fstab to get the sysfs entry path.
One example is that vold is able to conduct UFS-specific operations given the
below fstab entry.
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard
latemount,wait,check,fileencryption=ice,quota,formattable,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc
Bug: 63264275
Bug: 68721792
Change-Id: I5097873893948f12296ac5eaa0c2a59a6e6dd9e1
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
There is currently a timeout for reboot, however if the system gets
stuck, particularly during file system operations, there is no safety
mechanism that guarantees the system will still reboot.
This change does all of the optional reboot steps in a separate thread
and waits for this thread with a timeout, such that if the reboot
steps get hung, the system is guaranteed to still reboot.
This is specific to 'reboot'. Shutdown continues to run unbounded to
run fsck.
Bug: 72781711
Test: Reboot devices hitting and not hitting this timeout
Change-Id: Id5e1b3693bab00602177e28b9b662e1499c32961
- Add a new function Backtrace::UnwindOffline that takes the stack data.
- Modify BacktraceMap::CreateOffline so it doesn't take the stack data.
This makes it easier to reuse the map object created this way.
Reusing the map object increases simpleperf speed (unwinds per second) by 50%.
Test: backtrace_test libunwindstack_test
Change-Id: I90cfbae9e50d95d8a0e3cd394b33ba36d65d45f7
Calls to abort() will always result in our signal handler being called,
because abort will manually unblock SIGABRT before raising it. This
can lead to deadlock when handling address space exhaustion in the
fallback handler. To fix this, switch our mutex to a recursive mutex,
and manually keep track of our lock count.
Bug: http://b/72929749
Test: debuggerd_test --gtest_filter="CrasherTest.seccomp_crash_oom"
Change-Id: I609f263ce93550350b17757189326b627129d4a7
This cleans up a bit of the Unwinder code to make it clear what's
going on.
Modify the offline unit tests to verify the pc and sp to make sure
that those values get computed correctly.
Test: Passes unit tests.
Test: Passes 137-cfi art tests.
Change-Id: I0787a1d77b8726d3defd08f31c7476f6798f8d0d
It's currently not clear that init stops processes due to being sent a
control message nor who sent that message.
Bug: 73343913
Test: send control messages and see the logs
Change-Id: I9e9eff2001e649814107ea961b3b747a1f6da598