Commit graph

67415 commits

Author SHA1 Message Date
John Stultz
dc01a02a1a ueventd.rc: Reduce permissions for /dev/dma_heap/system to 444
Jeffrey Vander Stoep noted the permissions for the system dmabuf
heap should be 444 instead of 666, as we only need to open and
call ioctl on the device.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I650c9fabfffd1eac5f59bbc7fa1e0ae1f5646bd9
2020-12-14 23:29:35 +00:00
Tri Vo
5a611cb834 Merge "trusty: fuzz: Link libtrusty_test statically" 2020-12-14 20:39:09 +00:00
David Anderson
81e163fc55 Merge "libsnapshot: Don't export snapuserd server includes." 2020-12-14 18:47:19 +00:00
David Anderson
a056eca5ba snapuserd: Add a no-socket mode.
In first-stage init, during the selinux transition, no socket is needed.
It's even advantageous not to create one, since it greatly reduces the
amount of avc audits. This patch allows starting snapuserd with a preset
list of socket commands that it can run on startup.

Bug: 173476209
Test: manual test
Change-Id: I758d99097372e4dffb252e2836fd859b7fed162a
2020-12-14 00:48:50 -08:00
David Anderson
4e67f589de snapuserd: Use gflags for arguments.
This is in preparation for expanding the command-line features of
snapuserd.

Bug: N/A
Test: builds
Change-Id: Id33c4f190dc0f99cd436f0e9a6b1d6ee92e245e4
2020-12-14 00:42:25 -08:00
David Anderson
42a04ac3b4 libsnapshot: Don't export snapuserd server includes.
Also, move main() to snapuserd_daemon.cpp.

Bug: N/A
Test: builds
Change-Id: Iddeec5785450caa59a7e55daaa63b4584087392e
2020-12-14 00:41:18 -08:00
Shawn Willden
4f45dc3a7e Update message versionioning system
Bug: 171845787
Test: Build
Change-Id: Ie769113070a8a755a268f65e36384fe333c798b6
2020-12-13 10:56:50 -07:00
Wenhao Wang
75e5fc4361 Merge "trusty: Add ExtraCounters to Confirmationui Fuzzer" 2020-12-12 00:46:04 +00:00
Treehugger Robot
e107d445f6 Merge "Add new owners to various sub-projects." 2020-12-11 22:59:43 +00:00
Tri Vo
cafdd7c335 trusty: fuzz: Link libtrusty_test statically
Simplifies development flow because libtrusty_test.so doesn't need to be
pushed with the fuzzer.

Bug: 171750250
Test: m trusty_gatekeeper_fuzzer && adb sync data && \
adb shell /data/fuzz/arm64/trusty_gatekeeper_fuzzer/trusty_gatekeeper_fuzzer
Change-Id: I7c83b5784ede4881dcd9c2dd33c97bf49fcde6ff

Change-Id: Iba60f03000bfca15b00e484ef3a168604c65554a
2020-12-11 13:19:55 -08:00
Elliott Hughes
21de4e727e Add new owners to various sub-projects.
Test: treehugger
Change-Id: Ia2a99c0499633ccc5d23c37a1ec93867c876d637
2020-12-11 12:45:45 -08:00
Wenhao Wang
bf40c084cc trusty: Add ExtraCounters to Confirmationui Fuzzer
Add ExtraCounters to Confirmationui fuzzer so that the fuzzer can
grab the coverage information of the Confirmationui TA.

Bug: 174402999
Bug: 171750250
Test: /data/fuzz/arm64/trusty_confirmationui_fuzzer/trusty_confirmationui_fuzzer
Change-Id: I2e287281e7c8100f0d48413fbe0ff99d397a74c1
2020-12-11 10:56:40 -08:00
Nikita Ioffe
9e4b111a33 Log start of the test to logcat
This makes it easier to associate logs written during the test with the
test case that was running.

Test: atest CtsInitTestCases
Change-Id: I832f1c9ba8358341c934fdd91a65f5739bc98e37
2020-12-11 18:00:45 +00:00
Treehugger Robot
c5f423f903 Merge "libcutils: make it clearer that libcutils is just janitors." 2020-12-10 20:51:21 +00:00
Colin Cross
91f2e8356a Use libchrome as a shared library
... as being able to use cc_library in header_libs is not
intended.

Bug: 173252016
Test: m checkbuild
Change-Id: I624ee84728c59744c89ab51db567900c8eaf0571
2020-12-10 12:29:42 -08:00
Elliott Hughes
857a6f41ad libcutils: make it clearer that libcutils is just janitors.
Test: N/A
Change-Id: Iddfb0bb30b806f3364a64918df971c0a3e8220a0
2020-12-10 11:27:49 -08:00
Baligh Uddin
b0509aa7a7 Merge "Migrate to packages/modules/StatsD/lib/*" 2020-12-10 19:12:05 +00:00
Baligh Uddin
6ae4f777bc Migrate to packages/modules/StatsD/lib/*
BUG: 167962588
Test: TH
Merged-In: I22db7e344a9a96bfc16e009624b4896625306e83
Change-Id: I0c4e4aaece738259bafe57d420dfd1c941f834de
Exempt-From-Owner-Approval: Code Migration / Cleanup
2020-12-10 19:11:56 +00:00
Tom Cherry
6ece3c44fe Merge "init: remove DumpShutdownDebugInformation()" 2020-12-10 18:55:52 +00:00
Elliott Hughes
00c45323f1 Merge "Remove thread_store_set()/thread_store_get()." 2020-12-10 18:05:11 +00:00
Treehugger Robot
24adfede52 Merge "Add execute permission to /data/app-staging folder" 2020-12-10 17:04:42 +00:00
Tom Cherry
959ea63b30 init: remove DumpShutdownDebugInformation()
This hasn't helped investigating the issue, and the issue itself isn't
a problem anymore, so we remove these logs.

Bug: 155203339
Test: reboot
Change-Id: I20e51d8fcad5572906a8d556bec8a8dee4522834
2020-12-10 07:34:29 -08:00
Xin Li
f96f8e8c7f Merge "DO NOT MERGE - Merge Android R QPR1" 2020-12-10 02:18:27 +00:00
Xin Li
c30533a761 DO NOT MERGE - Merge Android R QPR1
Bug: 172690556
Merged-In: Id57384c385a6d0bc931caf1054812a469daa9ed0
Change-Id: I22db7e344a9a96bfc16e009624b4896625306e83
2020-12-09 17:44:05 -08:00
Mohammad Samiul Islam
64fe2c66e2 Add execute permission to /data/app-staging folder
Package verifiers (e.g, phonesky) needs to access the folders inside
/data/app-staging to be able to verify them. Without the execute
permission on app-staging folder, it cannot stat any of the sub-dirs
inside app-staging.

This also aligns with permission of /data/app folder.

Bug: 175163376
Test: manual
Test: installed a staged session and observed that Phonesky did not log
about not finding the apks in /data/app-staging folder

Change-Id: I9774ed800da9f15401d3cee653142a37bf54ef4a
2020-12-09 21:05:28 +00:00
Yifan Hong
3401909e7c Merge changes from topic "readonly_generic_ramdisk" am: 696882455b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1519823

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id57384c385a6d0bc931caf1054812a469daa9ed0
2020-12-09 20:29:58 +00:00
Treehugger Robot
2ecb2e9f26 Merge "Add erofs to supported fs type" am: 8571b76185
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1517501

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1b80de12a663a61a83232fce701802e9089eb5b7
2020-12-09 20:29:26 +00:00
Elliott Hughes
ebcf0925fc Merge "Use freecon() with getcon()/getfilecon()." am: 2acdc9de33
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1521162

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I023300186b76bba84632d278e454987688a9b325
2020-12-09 20:22:29 +00:00
Yifan Hong
696882455b Merge changes from topic "readonly_generic_ramdisk"
* changes:
  Add /metadata to ramdisk.
  Also create dirs under /first_stage_ramdisk for GKI.
  Refactor the list of empty dirs in ramdisk in its own list.
  Revert "Move e2fsck into /first_stage_ramdisk."
2020-12-09 19:46:17 +00:00
Treehugger Robot
8571b76185 Merge "Add erofs to supported fs type" 2020-12-09 19:16:40 +00:00
Elliott Hughes
2acdc9de33 Merge "Use freecon() with getcon()/getfilecon()." 2020-12-09 19:03:16 +00:00
Treehugger Robot
e495bce0af Merge "Add Android Studio Emulator team mebers to OWNERS" am: 25f322d353
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1520759

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I03ba9f0325f7e99d57a310c6f3c7b1820b52821e
2020-12-09 17:15:17 +00:00
Treehugger Robot
25f322d353 Merge "Add Android Studio Emulator team mebers to OWNERS" 2020-12-09 16:46:02 +00:00
Tom Cherry
a95f900d69 Merge "ueventd: add no_fnm_pathname option" am: 6cf3695502
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1518705

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8bf82b3439e15e282bef89a9ecc40663796006f6
2020-12-09 16:06:38 +00:00
Tom Cherry
877e2374a7 Merge "ueventd: add the import option from the init parser" am: 0608e36fb9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1520220

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia115083bd6f688a285368949ec8adbbdd322a816
2020-12-09 16:06:15 +00:00
Tom Cherry
6cf3695502 Merge "ueventd: add no_fnm_pathname option" 2020-12-09 15:50:16 +00:00
Tom Cherry
0608e36fb9 Merge "ueventd: add the import option from the init parser" 2020-12-09 15:47:25 +00:00
Elliott Hughes
d92c6a12da Use freecon() with getcon()/getfilecon().
Bug: https://issuetracker.google.com/175090444
Test: treehugger
Change-Id: Ia2b8102f1c9a4fd56ec1ff026ba5b4f375102b9b
2020-12-08 22:30:17 -08:00
Roman Kiryanov
d61738e8f1 Add Android Studio Emulator team mebers to OWNERS
qemu_pipe is an Android Studio Emulator (aka goldfish)
implementation detail.

Bug: 175046060
Test: none
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I7a80cdf1a2cd6b5af0d9544648b9d25e6abf9fad
2020-12-08 16:08:59 -08:00
Tom Cherry
5b271797de ueventd: add the import option from the init parser
Vendors have an interest in importing ueventd files based on certain
property values.  Instead of baking this logic in the ueventd binary,
add the import option from the init parser to the ueventd parser, to
allow vendors to expand as needed.

Test: imported files are parsed
Change-Id: I674987fd48f3218e4703528c6d905b1afb5fb366
2020-12-08 13:21:26 -08:00
Yifan Hong
a3f8373043 Add /metadata to ramdisk.
Now that GKI may not be writeable, also create /metadata at build time
to avoid error log at boot time.

Note that this also creates /first_stage_ramdisk/metadata in GKI.

[    1.891172] init: [libfs_mgr]check_fs():
mount(/dev/block/by-name/metadata,/metadata,ext4)=-1: No such
file or directory

Bug: 173425293
Test: boots

Change-Id: I62d23c382ed1ad165c1d6598b3df41bd92206733
2020-12-08 12:42:55 -08:00
Yifan Hong
55326187ab Also create dirs under /first_stage_ramdisk for GKI.
If the device uses GKI and generic ramdisk, also create
empty directories under /first_stage_ramdisk so that they
won't have to be created at runtime. This allows generic
ramdisk to be not writable.

Test: boots
Bug: 173425293
Change-Id: If987cb1d4af9f9ee94a43a4523f9e1465b01b16a
2020-12-08 12:42:55 -08:00
Yifan Hong
63be35649a Refactor the list of empty dirs in ramdisk in its own list.
Test: build and manual inspect
Bug: 173425293
Change-Id: I7805640af314b60801cc831f1d1f25820f0fb63b
2020-12-08 12:42:55 -08:00
Yifan Hong
addbafdb0b Revert "Move e2fsck into /first_stage_ramdisk."
This reverts commit 3337e782e6.

Reason for revert: e2fsck is moved into vendor ramdisk and installed
to / or /first_stage_ramdisk depending on the device, so there is no
need to move it.

Bug: 173425293
Change-Id: I1eb431e6b2a1e0ba7d0da0278d076b6682a0156d
Test: boots
2020-12-08 12:42:55 -08:00
Treehugger Robot
c6544c9246 Merge "ueventd: Add support for updating permissions on bind" am: bca7bfcc54
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1511048

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I35eb904d1129938662b7bbaa32e7c02a4addfb7e
2020-12-08 19:38:35 +00:00
Treehugger Robot
bca7bfcc54 Merge "ueventd: Add support for updating permissions on bind" 2020-12-08 18:53:44 +00:00
Tom Cherry
47031c8c88 ueventd: add no_fnm_pathname option
If a `*` appears within (but not at the end) of a /dev or /sys path in
a ueventd.rc file, then that path is matched with fnmatch() using the
FNM_PATHNAME, which means `*` will not match `/`.  That is not always
the intended behavior and this change creates the no_fnm_pathname
option, which will not use the FNM_PATHNAME flag and will have `*`
match `/`.

Bug: 172880724
Test: these unit tests
Change-Id: I85b813d89237dbf3af47564e5cbf6806df5d412f
2020-12-07 14:58:19 -08:00
Elliott Hughes
dcf81848cb Remove thread_store_set()/thread_store_get().
C++ thread_local is less code to write, and performs better. All known
users have been moved over already.

Test: treehugger
Change-Id: Idaa2a58bf23342dae08dd6b9003d8f532839b351
2020-12-07 10:54:53 -08:00
Treehugger Robot
f512b499b8 Merge "Make libcutils' thread local stuff more clearly deprecated." am: 77692aeea2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1515640

Change-Id: I2eaec4711ffb72d9ab34bbe0c2c69eec8ad9a4cc
2020-12-07 18:12:31 +00:00
Treehugger Robot
77692aeea2 Merge "Make libcutils' thread local stuff more clearly deprecated." 2020-12-07 17:58:30 +00:00