Commit graph

57964 commits

Author SHA1 Message Date
Treehugger Robot
6f2e032ffd Merge "processgroup: Set min_sdk_version" am: f9273c2aa3
Change-Id: I31b8e0c967ad81d4913a80004e39b576fc477e26
2020-05-04 16:05:04 +00:00
Jooyung Han
0419c28d77 Merge "libcutils: Set min_sdk_version" am: 6789753739
Change-Id: I72e55a298052f5e0c475a64b80fa79ff615c3873
2020-05-04 16:04:50 +00:00
Treehugger Robot
f9273c2aa3 Merge "processgroup: Set min_sdk_version" 2020-05-04 15:52:39 +00:00
Jooyung Han
6789753739 Merge "libcutils: Set min_sdk_version" 2020-05-04 15:51:33 +00:00
Treehugger Robot
4723c78bb7 Merge "gralloc: Set min_sdk_version" am: 2a2e9e0a34
Change-Id: Ic304d6074d11121f1683158d2651b3c5a9e37751
2020-05-04 14:27:09 +00:00
Treehugger Robot
2a2e9e0a34 Merge "gralloc: Set min_sdk_version" 2020-05-04 14:17:22 +00:00
Orion Hodson
278c9794ec Merge "Add libnativehelper.so to public libraries" am: 2f448104d7
Change-Id: Iaa473a1425aa328ebb758b9362568da30279d0d0
2020-05-04 07:34:20 +00:00
Orion Hodson
2f448104d7 Merge "Add libnativehelper.so to public libraries" 2020-05-04 07:23:19 +00:00
Yifan Hong
36410aeddc Merge changes from topic "snapshot_fuzz" am: f4cd49afa4
Change-Id: I61de76f189473c0d56f4b4d7a0c79935fa098c54
2020-05-02 05:01:51 +00:00
Yifan Hong
f4cd49afa4 Merge changes from topic "snapshot_fuzz"
* changes:
  Enable automatic libsnapshot fuzzer runs
  Also log corpus when aborted through libbase.
  libsnapshot_fuzzer: Fuzz MapUpdateSnapshot.
  libsnapshot_fuzzer: construct valid super partition metadata.
  libsnapshot_fuzzer: Fuzz CreateUpdateSnapshots
  libsnapshot_fuzzer: add additional tests for more APIs
  libsnapshot_fuzzer: use protobuf
  libsnapshot_fuzzer: map super image
2020-05-02 04:46:31 +00:00
Treehugger Robot
567d0d1afe Merge "first_stage_init: add support to skip module load failures" am: 0964727323
Change-Id: I342ce80308b4f5d5a522aec6fca869b4af3a3d3e
2020-05-02 02:18:12 +00:00
Treehugger Robot
0964727323 Merge "first_stage_init: add support to skip module load failures" 2020-05-02 02:07:44 +00:00
Christopher Ferris
572f2652d3 Merge "Fix dangling pointer issue in LocalUpdatbleMaps" am: 8f9d4afa2d
Change-Id: Ie360794beb52da29afa3cce5c181ec439c23e981
2020-05-02 00:27:29 +00:00
Christopher Ferris
8f9d4afa2d Merge "Fix dangling pointer issue in LocalUpdatbleMaps" 2020-05-02 00:15:21 +00:00
Will McVicker
c8907427bc first_stage_init: add support to skip module load failures
Extend androidboot.first_stage_console cmdline property to enable
skipping module load failures without stopping at a serial console. This
is useful for GKI development.

Set androidboot.first_stage_console=2 for this behavior.

Bug: 155296582
Test: verify behavior for values 0, 1, and 2
Change-Id: I068c631a22c848e45a421b297b1acae1b3deb3c1
2020-05-01 16:47:12 -07:00
Yifan Hong
6ccddb648c Merge "Handle zero snapshot size appropriately." am: d2a8418acf
Change-Id: I1f8272e313b3db8caac196a153aad735d480965b
2020-05-01 23:17:21 +00:00
Yifan Hong
d2a8418acf Merge "Handle zero snapshot size appropriately." 2020-05-01 22:54:14 +00:00
Sim Sun
a7a194beb4 Fix dangling pointer issue in LocalUpdatbleMaps
Libunwindstack would remove duplicated items and update the `prev_map`
during reparsing `/proc/self/maps`. But we leave `prev_real_map`
pointing toward a MapInfo that will be deleted soon. It will cause a
dangling pointer issue.

Add new tests to cover this dangling pointer issue.

Bug: 155511785

Test: libunwindstack_test
Change-Id: I62e1b97bcb73f07e9349671f0b758f5ec9de16c0
2020-05-01 22:20:01 +00:00
Yifan Hong
83c690c7a6 Handle zero snapshot size appropriately.
This won't happen in practice because device size is never
zero. Hypothetically, if it is, PartitionCowCreator still
suggests that a CoW size of 8192 bytes needs to be created. In
reality, it is not necessary.

Test: libsnapshot_fuzzer
Bug: 155484992
Change-Id: I6c69f54820522d50c699384eec90c474ca3a9402
2020-05-01 18:46:44 +00:00
David Anderson
f6bbb8e4d7 Merge "remount: Improve messaging when a reboot is needed." am: b827d1db0c
Change-Id: Ic44a9dacee8af27c722d1b75207f10202a1995c3
2020-05-01 18:01:44 +00:00
Yifan Hong
c43f513c91 Enable automatic libsnapshot fuzzer runs
Test: none
Bug: 154633114
Change-Id: I226d88b74bd1ea6b3cb912609d7bdf10aa8208fd
2020-05-01 11:00:48 -07:00
Yifan Hong
4d5bfabfeb Also log corpus when aborted through libbase.
If a CHECK or LOG(FATAL) is hit, also attempt to log the current
corpus.

Test: pass
Bug: 154633114
Change-Id: Id0f376021011924f5d64eb5b591b5ebab6dc7dbc
2020-05-01 11:00:48 -07:00
David Anderson
b827d1db0c Merge "remount: Improve messaging when a reboot is needed." 2020-05-01 17:44:18 +00:00
Nikita Ioffe
003d1827cc Merge "Reject services that are both critical and oneshot" am: e874875570
Change-Id: Iee0d3c1d84cc20c7b26dc93c207705021e02ebe3
2020-05-01 16:20:05 +00:00
Nikita Ioffe
6962ba555a Merge "Add reason why userspace reboot shutdown sequence failed" am: dfcf2e8a4a
Change-Id: If28287b487a0db7243266a7cb452af1d940d8413
2020-05-01 16:19:28 +00:00
Nikita Ioffe
e874875570 Merge "Reject services that are both critical and oneshot" 2020-05-01 16:07:09 +00:00
Nikita Ioffe
dfcf2e8a4a Merge "Add reason why userspace reboot shutdown sequence failed" 2020-05-01 16:06:55 +00:00
Nikita Ioffe
51c251c74b Reject services that are both critical and oneshot
Test: atest CtsInitTestCases
Test: builds
Test: device boots
Bug: 155275196
Merged-In: I1bb9099371bd1a3f339396ef343c49b054fcef66
Change-Id: I1bb9099371bd1a3f339396ef343c49b054fcef66
(cherry picked from commit 6a3c94b3aa)
2020-05-01 15:10:25 +01:00
Nikita Ioffe
39d4553fee Add reason why userspace reboot shutdown sequence failed
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 154772075
Merged-In: I7e4674c474189b0185c020e3e066aea5678d7428
Change-Id: I7e4674c474189b0185c020e3e066aea5678d7428
(cherry picked from commit a4e83ad3d7)
2020-05-01 13:27:14 +01:00
Treehugger Robot
b69a46f5c9 Merge "task_profiles.json: add a new task profile used by camera HAL" am: 8bb2b3f2ad
Change-Id: I524860d025626b93c1219a7425351f60f1551683
2020-05-01 08:04:33 +00:00
Treehugger Robot
5f4fb92bb7 Merge "snapshot_test: Fix overflow in statvfs arithmetics" am: ee024b01de
Change-Id: I9697ad412eaecfebc9880127ebdf45f10a7b8fd4
2020-05-01 08:04:24 +00:00
Treehugger Robot
8bb2b3f2ad Merge "task_profiles.json: add a new task profile used by camera HAL" 2020-05-01 07:51:57 +00:00
Treehugger Robot
ee024b01de Merge "snapshot_test: Fix overflow in statvfs arithmetics" 2020-05-01 07:44:38 +00:00
Yifan Hong
0d4a47b0c7 libsnapshot_fuzzer: Fuzz MapUpdateSnapshot.
Test: run it
Bug: 154633114
Change-Id: I15ea0fb28df5b0f6d32096aab808549c3855c289
2020-04-30 23:06:42 -07:00
Yifan Hong
db0e62b87a libsnapshot_fuzzer: construct valid super partition metadata.
This should hopefully achieve more coverage.

Test: pass
Bug: 154633114
Change-Id: Ice575f2d8c3e22b80465c133d055e7c4368ebdfa
2020-04-30 23:06:42 -07:00
Yifan Hong
74d1fb4571 libsnapshot_fuzzer: Fuzz CreateUpdateSnapshots
Test: run it
Bug: 154633114
Change-Id: I56ed2953e85714d23a9273224a28eb8e8e47a54d
2020-04-30 23:05:36 -07:00
Yifan Hong
c0df932a43 libsnapshot_fuzzer: add additional tests for more APIs
Test: run it
Bug: 154633114
Change-Id: I956cb74bfd46750137dfa73e9e040dd9d1782ce7
2020-04-30 23:05:36 -07:00
Yifan Hong
90a9393ea0 libsnapshot_fuzzer: use protobuf
Use protobuf because it already has all the fuzzing implemenetations.
Delete fuzz_utils.

Pros:
- Fuzzing protobuf is faster; it is easy to achieve 4K exec/s
- It is more guided; protobufs are fuzzed using mutators, and mutators
  should have better knowledge of the structure of the fuzz data
- No more hand-written parsing code of the fuzz data. That code in
  fuzz_utils.h is deleted.
- Corpus data can be reused even after adding new fields in the protobuf
- Corpus data is human-readable and easily manually written (it is
  the text format of the protobuf)

Cons:
- The "actions" are "declared" in protobuf definition and "defined" in
  C++, so there's more boilerplate to write. Adding a new "Action"
  requires changes in both.

Test: run libsnapshot_fuzzer
Bug: 154633114
Change-Id: Idc2a6b2c087e370e4cfef53142a244b9b275389e
2020-04-30 23:05:36 -07:00
Yifan Hong
5eb2d6fa27 libsnapshot_fuzzer: map super image
... instead of operating on the image file directly.
Test: run it
Bug: 154633114

Change-Id: Id04c0d15d0d52483647716f8bfb0b8ee1a2876d9
2020-04-30 23:05:36 -07:00
Suren Baghdasaryan
9428030216 Merge "init: Add task_profiles init command" am: 13c6574139
Change-Id: I650e9c7dc8c0b1511e9fd5cc48baa9a22a81a194
2020-05-01 01:17:46 +00:00
Suren Baghdasaryan
8c604e8615 task_profiles.json: add a new task profile used by camera HAL
Add new CameraServicePerformance task profile used by camera HAL.

Bug: 155419956
Test: confirm profile applies correctly
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I21cf942eca279a5ad4c1ff75c735560954f4ebc1
2020-05-01 01:05:42 +00:00
Suren Baghdasaryan
13c6574139 Merge "init: Add task_profiles init command" 2020-05-01 00:59:21 +00:00
Tom Cherry
b24d24e4ce Merge changes I5b3ca4f0,I610bed59 am: c941236374
Change-Id: I6c8070e3d2ac72465a086890ea8331ac582aab7d
2020-04-30 23:48:08 +00:00
Tom Cherry
c941236374 Merge changes I5b3ca4f0,I610bed59
* changes:
  liblog: mark tests as require_root: true
  liblog: require root for multi_connect_dgram_socket test
2020-04-30 23:38:31 +00:00
Suren Baghdasaryan
c9c0bbac53 init: Add task_profiles init command
Introduce new command to allow setting task profiles from inside .rc
script. This is to replace usage of writepid when a service is trying
to join a cgroup. Usage example from a .rc file:

service surfaceflinger /system/bin/surfaceflinger
    task_profiles HighPerformance

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I0add9c3b363a7cb1ea89778780896cae1c8a303c
2020-04-30 22:24:21 +00:00
Tom Cherry
20d4d23f8c liblog: mark tests as require_root: true
Some tests require root to be run, so we require_root to run all of
them.

Test: tests pass as root
Change-Id: I5b3ca4f08e41f16e81c5d5995043ab55d379a882
2020-04-30 14:39:10 -07:00
Tom Cherry
710825ce47 liblog: require root for multi_connect_dgram_socket test
Bug: 65062446
Test: multi_connect_dgram_socket is skipped for non-root
Test: multi_connect_dgram_socket passes for root
Change-Id: I610bed5987580e0c5a01952efc2e32e7d8cdf9b4
2020-04-30 14:28:13 -07:00
Tom Cherry
cb91a241d1 Merge "logd: refactor mLast setting into a GetOldest function" am: 1a342a12f3
Change-Id: I588463915153b1dd6c48905fcd053b92717e2df9
2020-04-30 20:06:58 +00:00
Alessio Balsini
75672f8be5 snapshot_test: Fix overflow in statvfs arithmetics
Operations on (unsigned long) f_bsize and f_bfree are correctly handled
on 64 bit architectures, but when switching to 32 bit, the
multiplication between the two could result in an overflow, causing the
test to crash.
Fix by using a uint64_t operand, hinting the compiler to handle the
whole multiplication with 64 bit operands.

Bug: 154355449
Bug: 148889015
Test: vts_libsnapshot_test (32 bit)
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: Ief5c03ff7954c4a3e8597ef6e7df467f59428877
2020-04-30 21:02:26 +01:00
Tom Cherry
1a342a12f3 Merge "logd: refactor mLast setting into a GetOldest function" 2020-04-30 19:53:17 +00:00