Commit Graph

36959 Commits

Author SHA1 Message Date
Tom Cherry 4a679454d7 init: cleanup exit() uses
Primarily, this fixes a bug where a forked child of property service
uses exit() instead of _exit, which has the unintended consequences of
running the global destructors of init proper, which leads to
unintended cleanup.

Secondly, this replaces the remaining calls of exit() that really
should be LOG(FATAL).

Test: boot sailfish
Change-Id: I779228e7d44a73186bc7685bb723c4b9278a0a2d
2017-09-26 16:30:03 -07:00
Bowgo Tsai c4decb0f7e Merge "fs_mgr_fstab: do an exact match when searching a mount point" am: a0dd1adab0 am: dff1e3418e
am: d4ce377d8c

Change-Id: I39df04346c5d45ebd8689c25bd2a3244b185fc90
2017-09-26 23:29:13 +00:00
Bowgo Tsai d4ce377d8c Merge "fs_mgr_fstab: do an exact match when searching a mount point" am: a0dd1adab0
am: dff1e3418e

Change-Id: If1bfa9e7c69dadff162d79583b2a5cd5e1dba7bd
2017-09-26 23:20:06 +00:00
Bowgo Tsai dff1e3418e Merge "fs_mgr_fstab: do an exact match when searching a mount point"
am: a0dd1adab0

Change-Id: If29801d08031c83587e43f981f148f22a675dec5
2017-09-26 23:17:16 +00:00
Treehugger Robot a0dd1adab0 Merge "fs_mgr_fstab: do an exact match when searching a mount point" 2017-09-26 23:09:43 +00:00
Elliott Hughes d9a6163875 Merge "Show the number of VMAs in the tombstone." am: 92c355cc4f am: dae30de40c
am: f89042a43a

Change-Id: I76343c08ccdc9e4cffd5d4507956cf048fce40da
2017-09-26 21:19:48 +00:00
Elliott Hughes f89042a43a Merge "Show the number of VMAs in the tombstone." am: 92c355cc4f
am: dae30de40c

Change-Id: Ie0a74c69155d7a6cb06fbd4e20caef2d69def631
2017-09-26 21:13:02 +00:00
Mark Salyzyn bfd05b69a5 init: shutdown,thermal shut off display immediately
Remove a source of heat.

Test: manual
Change-Id: I9a7391ddb121b6748a4f49f4b5bfb77453ca1514
2017-09-26 14:06:51 -07:00
Elliott Hughes dae30de40c Merge "Show the number of VMAs in the tombstone."
am: 92c355cc4f

Change-Id: Id6ac448ef7255eb76e792ba5985a6a305e5b2e9d
2017-09-26 21:06:31 +00:00
Treehugger Robot 92c355cc4f Merge "Show the number of VMAs in the tombstone." 2017-09-26 21:01:20 +00:00
Elliott Hughes 868d39a82f Show the number of VMAs in the tombstone.
Tombstones (especially ones with lots of VMAs) are regularly truncated.
We can at least show the number of VMAs, though, for anyone interested
in knowing whether they got close to the default 64Ki limit.

Bug: http://b/66911122
Test: ran crasher, examined tombstone
Change-Id: I286db66f28f132307d573dbe5164efc969dc6ddc
2017-09-26 12:01:06 -07:00
Mark Salyzyn 594ce46f64 bootstat: bootloader stat files misspelled
(cherry picked form commit 25246ddfe6)

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Bug: 65843095
Change-Id: I6620c9965f4af8b6a3829f1f4cdcc9b691471a71
2017-09-26 11:27:52 -07:00
Mark Salyzyn c4a524b1d7 bootstat: switch from root.root to system.log
(cherry picked from commit c3ad75be84)

bootstat does not need root uid and root gid permissions to perform
its tasks.  It appears that system uid and log gid are adequate and
appropriate.

Test: manual
Bug: 63736262
Bug: 65843095
Change-Id: I094c2cb054e441562fa8717a4d3dc0086fb70a7a
2017-09-26 11:27:02 -07:00
Saurabh Shah 67b48abebc Merge "sync: store the num_fences from first SYNC_IOC_FILE_INFO" am: f7d14b643b am: 53a13e5705
am: 1db0e0e5b7

Change-Id: Ib811872fda6ebb5ebba7c4a8575c6fb040b3d35e
2017-09-26 18:02:09 +00:00
Saurabh Shah 1db0e0e5b7 Merge "sync: store the num_fences from first SYNC_IOC_FILE_INFO" am: f7d14b643b
am: 53a13e5705

Change-Id: Iab1bb3b899965445087338ae01fbfb05c262027f
2017-09-26 18:00:05 +00:00
Saurabh Shah 53a13e5705 Merge "sync: store the num_fences from first SYNC_IOC_FILE_INFO"
am: f7d14b643b

Change-Id: I9c5ecaa30d4b08aa1eb327375c562dff6f78263e
2017-09-26 17:58:19 +00:00
Treehugger Robot f7d14b643b Merge "sync: store the num_fences from first SYNC_IOC_FILE_INFO" 2017-09-26 17:52:03 +00:00
Bowgo Tsai cc323958f9 fs_mgr_fstab: do an exact match when searching a mount point
Currently when searching a mount point from a fstab, it checks whether the
mount point of an fstab entry is the prefix of a given path, and the
next char after the match is either '\0' or '/'.

However, it will always return the fstab entry with mount point
"/vendor" when searching path is "/vendor", "/vendor/abc" or "/vendor/cde"
in the following fstab. Because "/vendor" is the prefix of "/vendor/abc"
and "/vendor/cde", and the next char after the match is '/'.

    /dev/block/platform/.../by-name/vendor   /vendor      ext4  ro  wait
    /dev/block/platform/.../by-name/abc      /vendor/abc  ext4  ro  wait
    /dev/block/platform/.../by-name/cde      /vendor/cde  ext4  ro  wait

Fix this by performing an exact match when searching the mount point.

Bug: 63912287
Test: boot sailfish

Change-Id: I504655f5c71790c5d528085de416ce3c30d21fea
2017-09-26 21:06:59 +08:00
Alexandros Frantzis 68223500ea libsync: Add fence info tests
This patch adds regression tests to check that the fence info returned
by libsync contains valid data.

Test: sync-unit-tests

Change-Id: I0c57c49b7be563efc9a43f12381059f20e0a4e52
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
2017-09-26 13:09:35 +03:00
Tom Cherry 99de249cf5 Merge "Reland "Remove comments and code about ro.boot.slot"" am: dea5e081ac am: 9bc2a967cf
am: 687cb99e96

Change-Id: I1d3a43ae6c7faeb9830e64ff6ba2da18965b9c34
2017-09-26 00:13:27 +00:00
Tom Cherry 687cb99e96 Merge "Reland "Remove comments and code about ro.boot.slot"" am: dea5e081ac
am: 9bc2a967cf

Change-Id: I004d8761fca5c0d1b8b6f4e8546fc2ecf2f1f34c
2017-09-26 00:11:26 +00:00
Tom Cherry 9bc2a967cf Merge "Reland "Remove comments and code about ro.boot.slot""
am: dea5e081ac

Change-Id: Idf32e9600b6a3b93a6a2b4c414cc0193d5d65fb9
2017-09-26 00:08:55 +00:00
Tom Cherry dea5e081ac Merge "Reland "Remove comments and code about ro.boot.slot"" 2017-09-25 23:58:30 +00:00
Saurabh Shah 90a74600d7 sync: store the num_fences from first SYNC_IOC_FILE_INFO
Fixes a bug with the signal time of devices using the
modern sync file interface. The bug only affects kernels running
an Android kernel 4.9 and later.

b/63395253

Test: tests/sync_test.cpp

Change-Id: I6fb00bcb8e16a3268c357153edd8e35a44546caa
2017-09-25 15:51:46 -07:00
George Burgess IV fd60591eb1 Merge "Silence static analyzer warnings about memory leaks" am: 20ae530e01 am: 07406662a4
am: 64b6ce0d75

Change-Id: Ic083bb9487da697c439defdc33dec12b12bdcaca
2017-09-25 19:50:38 +00:00
George Burgess IV 64b6ce0d75 Merge "Silence static analyzer warnings about memory leaks" am: 20ae530e01
am: 07406662a4

Change-Id: I4701d6691e538dee564b6e87fe0206bd001a0e23
2017-09-25 19:48:06 +00:00
George Burgess IV 07406662a4 Merge "Silence static analyzer warnings about memory leaks"
am: 20ae530e01

Change-Id: I3501573fbf2767570b5d9a615a5f53637b9771fd
2017-09-25 19:45:26 +00:00
Treehugger Robot 20ae530e01 Merge "Silence static analyzer warnings about memory leaks" 2017-09-25 19:41:13 +00:00
Christopher Ferris c3e8c82d84 Merge "Add a new unwind method on error." am: 9b91324cb0 am: fb8ea2626b
am: e288e330c8

Change-Id: I45fed698330be8d6db960311333431ba9f8da322
2017-09-25 19:28:07 +00:00
Christopher Ferris e288e330c8 Merge "Add a new unwind method on error." am: 9b91324cb0
am: fb8ea2626b

Change-Id: Ie444adce663073d03c746fdef0e9ea274e0b09e4
2017-09-25 19:26:05 +00:00
Christopher Ferris fb8ea2626b Merge "Add a new unwind method on error."
am: 9b91324cb0

Change-Id: I99aca55a9ae9ffd2c7220885ec033486996b31a6
2017-09-25 19:24:07 +00:00
Christopher Ferris 9b91324cb0 Merge "Add a new unwind method on error." 2017-09-25 19:16:59 +00:00
Jiyong Park f8025aae82 Remove workaround for VNDK violations
lib-dplmedia.so and qseeproxydaemon no longer depend on non-VNDK
libraries. Remove the workaround.

Bug: 64427765
Bug: 64820887
Test: 2017 pixel devices boots
Change-Id: Ib8bcbbb16169dc5c997d6c0dad061c66dcd0ccfe
2017-09-26 01:54:57 +09:00
Jiyong Park 1cc09e749f Fix: make vndk namespace visible for 2016 Pixes
The nativeloader tries to find the 'vndk' namespace when there is a
vendor apk in the classloader paths. This can happen even for a
downloaded app if the app is using a vendor apk via <uses-library> tag.

In order to prevent the nativeloader from failing to find the vndk
namespace, the namespace is marked as visible.

Bug: 66482442
Test: download the app mentioned in the bug, it does not crash.
Change-Id: I82e2394eb6eedcb8645e1a5b3735bbfe2735b312
2017-09-26 01:38:22 +09:00
Tom Cherry 211a4a5d5a Reland "Remove comments and code about ro.boot.slot"
This reverts commit c5f5fd430a.

Dependencies are now merged.

Bug: 37663204
Bug: 66437505
Change-Id: I84284b6bc37f6aae4096dec73f45ebd85d28ca9d
2017-09-25 16:04:30 +00:00
Josh Gao 6014a15e7b Merge "tombstoned: fix another call to evconnlistener_new." am: baea76dba7 am: 6d0d6c34cd
am: 5d0e0fbdbb

Change-Id: Iccc34fef36be06df302706a65fdf99bebb1dcaad
2017-09-25 13:05:09 +00:00
Josh Gao 5d0e0fbdbb Merge "tombstoned: fix another call to evconnlistener_new." am: baea76dba7
am: 6d0d6c34cd

Change-Id: I3473abcea7d65a5477639b5ddcec4fe794975cc1
2017-09-25 13:03:10 +00:00
Josh Gao 6d0d6c34cd Merge "tombstoned: fix another call to evconnlistener_new."
am: baea76dba7

Change-Id: I37f27333ea52881056b04341699c671244ab0835
2017-09-25 13:00:40 +00:00
Treehugger Robot baea76dba7 Merge "tombstoned: fix another call to evconnlistener_new." 2017-09-25 12:57:30 +00:00
George Burgess IV 80136a1e41 Silence static analyzer warnings about memory leaks
The static analyzer complains that this memory is leaked regardless of
how I try to work around it (unless we escape the memory by using a
global or something, but...). Basically, as long as there's some sort
of operation on the reinterpret_cast'ed pointer, it complains. If we
remove the bitwise negations, it doesn't. Doing so would presumably
defeat the purpose of this test, though, so add a NOLINT.

Bug: 27101951
Test: mma. No more static analyzer warning for this file.
Change-Id: If9008946a2145d17b8651535141bfd7ec9224739
2017-09-24 13:36:29 -07:00
Andreas Gampe 57f9d65952 Merge "Base: Warn on using ostream<< with std::string*" am: 7229576bfe am: b2af36f208
am: 422f1732c5

Change-Id: I5b48c8e9bad6babadd5fe1a1752c36048d7764dd
2017-09-23 01:46:40 +00:00
Andreas Gampe 422f1732c5 Merge "Base: Warn on using ostream<< with std::string*" am: 7229576bfe
am: b2af36f208

Change-Id: Ie9e38c5edb7dd231a36ece79bb132ea4f322fbcf
2017-09-23 01:44:40 +00:00
Andreas Gampe b2af36f208 Merge "Base: Warn on using ostream<< with std::string*"
am: 7229576bfe

Change-Id: I19312268899265d062fa568980512b7501c59ce7
2017-09-23 01:43:27 +00:00
Treehugger Robot 7229576bfe Merge "Base: Warn on using ostream<< with std::string*" 2017-09-23 01:38:42 +00:00
Josh Gao ce9cc4e428 tombstoned: fix another call to evconnlistener_new.
Apply the same fix from c2e98f63 to intercept_manager.cpp.

Bug: http://b/64543673
Test: debuggerd_test
Change-Id: Ibfb919e059fa62f8336cfc1426d03ef015590136
2017-09-22 18:00:35 -07:00
Christopher Ferris b9de87f7ed Add a new unwind method on error.
If a function crashes by jumping into unexecutable code, the old method
could not unwind through that. Add a fallback method to set the pc from
the default return address location.

In addition, add a new finished check for steps. This will provide a method
to indicate that this step is the last step. This prevents cases where
the fallback method might be triggered incorrectly.

Update the libbacktrace code to unwind using the new methodology.

Update the unwind tool to use the new unwind methodology.

Add a new option to crasher that calls through a null function.

Create a new object, Unwinder, that encapsulates the a basic unwind. For now,
libbacktrace will still use the custom code.

Added new unit tests to cover the new cases. Also add a test that
crashes calling a nullptr as a function, and then has call frames in
the signal stack.

Bug: 65842173

Test: Pass all unit tests, verify crasher dumps properly.
Change-Id: Ia18430ab107e9f7bdf0e14a9b74710b1280bd7f4
2017-09-22 16:55:12 -07:00
Andreas Gampe c8f935aa5e Base: Warn on using ostream<< with std::string*
In most reasonable cases, this is actually a bug. So add a diagnostic.

Test: m
Change-Id: Ib506b45dbdbafcb1893486b08ef13ec8f11d0357
2017-09-22 16:25:58 -07:00
Rom Lemarchand 9813914a3b Revert "Revert "Add derive_gid flag for mounting sdcardfs""
This reverts commit 28dbcaa23b.

Reason for revert: All kernel prebuilts merged

(cherry picked from commit ac8dc7e76f)

Bug: 65600849
Bug: 65573871
Test: m
Change-Id: Ib3cae2908c9e8f2b69d8effe618a6f1ac94f44e2
2017-09-22 14:30:30 -07:00
Richard Uhler d729ab4e0f Merge "Revert "Add derive_gid flag for mounting sdcardfs"" am: 643e9a536c am: 59f8cbb0ad
am: c0da77ee3a

Change-Id: I0ffb5948c11362bd4694076613e7d6b4dd608b3f
2017-09-22 17:32:09 +00:00
Richard Uhler c0da77ee3a Merge "Revert "Add derive_gid flag for mounting sdcardfs"" am: 643e9a536c
am: 59f8cbb0ad

Change-Id: Ice11a3316f0afac256a9c4b3ec8f4cc78a345dc4
2017-09-22 17:30:09 +00:00