Commit Graph

23209 Commits

Author SHA1 Message Date
Automerger Merge Worker
e9f40bc112 Merge "Only write snapshotctl_log when debug" am: df701f3e45
Change-Id: I8aa0da7a0ae63be6787cef145f188052da42cc77
2020-02-05 21:32:29 +00:00
Yifan Hong
df701f3e45 Merge "Only write snapshotctl_log when debug" 2020-02-05 21:23:11 +00:00
Automerger Merge Worker
deda3c9203 Merge "Allow update_engine to write snapshotctl log data" am: f58e6777b2
Change-Id: I8f67eca8af03b625b71ecee017c5e795cab08f90
2020-02-05 18:04:30 +00:00
Automerger Merge Worker
d2e13c7ffb Merge "Move virtual_ab_prop to vendor partition." am: 54411b5e3c
Change-Id: Ib2b961a021eec26e9eb3c96d1e32ad350421c76c
2020-02-05 18:04:18 +00:00
Yifan Hong
f58e6777b2 Merge "Allow update_engine to write snapshotctl log data" 2020-02-05 17:57:46 +00:00
Yifan Hong
54411b5e3c Merge "Move virtual_ab_prop to vendor partition." 2020-02-05 17:57:08 +00:00
Automerger Merge Worker
c4f463d17e Merge "Create new mediaprovider_app domain." am: 164359b952
Change-Id: I55abcb58b73137ddadd6a370b2de4da1272f6a9d
2020-02-05 08:09:36 +00:00
Automerger Merge Worker
3ea40693f7 Merge "Allow dumpstate to open and read linkerconfig directory" am: 7be9b32fdb
Change-Id: I1213fa68632fbad3be7196762c3f986209bd5790
2020-02-05 08:09:24 +00:00
Martijn Coenen
164359b952 Merge "Create new mediaprovider_app domain." 2020-02-05 07:58:54 +00:00
Kiyoung Kim
7be9b32fdb Merge "Allow dumpstate to open and read linkerconfig directory" 2020-02-05 07:58:12 +00:00
Yifan Hong
b6b35b7c46 Only write snapshotctl_log when debug
Only write snapshotctl_log_data_file for userdebug_or_eng.

Test: boot, still see log
Bug: 148818798
Change-Id: I03e979efd65e3992bd8ef30e6408768a14aa1de2
2020-02-04 17:15:06 -08:00
Yifan Hong
47ee18d67a Allow update_engine to write snapshotctl log data
recovery is excluded because it is not an interesting code
path.

Test: apply OTA, cancel, delete OTA states, then apply again
      to trigger CancelUpdate() code path, see logs

Bug: 148818798
Change-Id: I3baac977af54ac0a09c9b732fd172469c9f51627
2020-02-04 16:56:59 -08:00
Automerger Merge Worker
57dd66eae1 Merge "Allow setattr for chattr" am: c98291c37c
Change-Id: Ib329a1c44723dcb7f34699f4829fa875cb887db5
2020-02-04 23:13:11 +00:00
Daniel Rosenberg
c98291c37c Merge "Allow setattr for chattr" 2020-02-04 23:03:38 +00:00
Automerger Merge Worker
1c26630767 Merge "snapshotctl better logging" am: 28d5e87d39
Change-Id: I4b2915f2e8768f986ac3e9db8d5487b41855e691
2020-02-04 22:29:29 +00:00
Yifan Hong
28d5e87d39 Merge "snapshotctl better logging" 2020-02-04 22:18:33 +00:00
Automerger Merge Worker
d7ffd9d1e0 Merge "Allow system_server to attach bpf programs to tracepoints" am: d90d4aa2bb
Change-Id: Ia18f4643a3f069cc69f0885c77bbb68b4a2f7ff3
2020-02-04 21:23:43 +00:00
Connor O'Brien
d90d4aa2bb Merge "Allow system_server to attach bpf programs to tracepoints" 2020-02-04 21:11:47 +00:00
Yifan Hong
589bb6f369 snapshotctl better logging
Test: snapshotctl merge --log-to-file
Bug: 148818798
Change-Id: I0e9c8ebb6632a56670a566f7a541e52e0bd24b08
2020-02-04 10:09:24 -08:00
Automerger Merge Worker
01d09f9d1d Merge "[selinux] properly labeling dirs under /data/incremental" am: 37b87fc793
Change-Id: I75fe314463a07047d4eb69cbe78ef563010d72b2
2020-02-04 17:37:00 +00:00
Songchun Fan
37b87fc793 Merge "[selinux] properly labeling dirs under /data/incremental" 2020-02-04 17:26:20 +00:00
Martijn Coenen
e3f1d5a314 Create new mediaprovider_app domain.
This is a domain for the MediaProvider mainline module. The
MediaProvider process is responsible for managing external storage, and
as such should be able to have full read/write access to it. It also
hosts a FUSE filesystem that allows other apps to access said storage in
a safe way. Finally, it needs to call some ioctl's to set project quota
on the lower filesystem correctly.

Bug: 141595441
Test: builds, mediaprovider module gets the correct domain
Change-Id: I0d705148774a1bbb59c927e267a484cb5c44f548
2020-02-04 16:53:18 +01:00
Automerger Merge Worker
40de618a00 Merge "Revert "Grant appdomain access to app_api_service"" am: 125b6f6b6a
Change-Id: Ia484646ec148f5f8103763ba6bc72ca1073bb1d7
2020-02-04 10:56:40 +00:00
Automerger Merge Worker
b11e731c6b Merge "Don't audit linkerconfig in dumpstate" am: 47e18130fd
Change-Id: I7a24f654883553f49ae04824320d53f607e4ca16
2020-02-04 10:56:27 +00:00
Adam Shih
125b6f6b6a Merge "Revert "Grant appdomain access to app_api_service"" 2020-02-04 10:50:52 +00:00
Kiyoung Kim
47e18130fd Merge "Don't audit linkerconfig in dumpstate" 2020-02-04 10:46:49 +00:00
Kiyoung Kim
608029fb86 Allow dumpstate to open and read linkerconfig directory
To include linkerconfig results into dumpstate, dumpstate needs extra
permission on lnkerconfig directory to search all items within the
directory. This change allows dumpstate to have extra access on
linkerconfig directory.

Bug: 148840832
Test: tested from cuttlefish
Change-Id: I955b54ec2cc3d1dcedaa34406e0e0776b6ac12f6
2020-02-04 19:45:19 +09:00
Kiyoung Kim
7e247cb035 Don't audit linkerconfig in dumpstate
dumpstate creates an error log from CTS test because dumpstate does not
have access to linkerconfig directory. As df doesn't need to scan
linkerconfig directory, do not audit this directory in dumpstate
to get attributes.

Bug: 148760417
Test: m -j passed
Test: No sepolicy error from correspoding test
Change-Id: I3c1c3a489584450bd23fbce2d7cc9b09aaf9c002
2020-02-04 15:51:00 +09:00
Adam Shih
5fb053eaa8 Revert "Grant appdomain access to app_api_service"
This reverts commit d5a0edd75e.

Reason for revert: CTS failure
There are apps that relies on SELinux regulations to constrain their access. We'll need to analyze them before introducing the sepolicy.

Bug: 147695658
Change-Id: Ic57fcb90371b50a978ab7b2e0d20c4cb3d2da7f6
Test: cts-tradefed run cts -m CtsPermissionTestCases
2020-02-04 02:51:38 +00:00
Daniel Rosenberg
e4c966648e Allow setattr for chattr
Bug: 138322712
Test: No denial for chattr on boot
Change-Id: I9fdfc8ff4d3d0b2743ca572f4c3e64477f97cd84
2020-02-03 17:57:03 -08:00
Songchun Fan
f09db16c56 [selinux] properly labeling dirs under /data/incremental
Setting files and dirs under /data/incremental as apk_data_file, so that
they will have the same permissions as the ones under /data/app.

Current layout of the dirs:
1. /data/incremental/[random]/mount -> holds data files (such as base.apk) and
control files (such as .cmd). Its subdirectory is first bind-mounted to
/data/incremental/tmp/[random], eventually bind-mounted to
/data/app/~~[randomA]/[packageName]-[randomB].

2. /data/incremental/[random]/backing_mount -> hold incfs backing image.

3. /data/incremental/tmp/[random] -> holds temporary mountpoints (bind-mount targets)
during app installation.

Test: manual
Change-Id: Ia5016db2fa2c7bad1e6611d59625731795eb9efc
2020-02-03 14:28:37 -08:00
Yifan Hong
5a3105e619 Move virtual_ab_prop to vendor partition.
These properties are owned by system, but is configurable
in vendor partition.

Test: apply OTA
Bug: 148569015
Change-Id: I24baa981d1f850cd18a3429f6e0a4efd31a8570d
2020-02-03 10:42:35 -08:00
Automerger Merge Worker
f67f26c962 Allow toolbox to set project quota IDs. am: 4de3228c46
Change-Id: Ib3f501ff1c625955207dde62fda44d4c16f836b2
2020-02-03 09:55:10 +00:00
Connor O'Brien
e3f0b2ca13 Allow system_server to attach bpf programs to tracepoints
In order to track time in state data using eBPF, system_server needs
to be able to attach BPF programs to tracepoints, which involves:
- calling perf_event_open and the PERF_EVENT_IOC_SET_BPF ioctl
- running BPF programs
- reading tracepoint ids from tracefs

Grant system_server the necessary permissions for these tasks

Test: modify system_server to try to attach programs; check for
denials
Bug: 138317993
Change-Id: I07dafd325a9c57d53767a09d4ca7b0fb2dd2d328
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-01-31 19:47:24 -08:00
Automerger Merge Worker
b79b7ff9dc Merge changes I179c05b3,Ia529ede4 am: 2b44078cac
Change-Id: If3f5b745f5bcdedb74ac63c4258f5adbe1f8095f
2020-01-31 16:39:10 +00:00
Automerger Merge Worker
06c548de85 Merge "Add getattr access on tmpfs_zygote files for webview_zygote." am: 89946d7e1b
Change-Id: Ic22176854c83a2ad9bb8a7ec1a821358f8066e3e
2020-01-31 16:36:46 +00:00
Automerger Merge Worker
09a23d1f6d Merge "Revert^2 "Move aidl_lazy_test_server to system_ext"" am: 499e0173b5
Change-Id: I11947c33539046ddd35c06a8ecb6505c315cdb93
2020-01-31 16:36:04 +00:00
Automerger Merge Worker
208cf1d042 Merge "Revert "Make platform_compat discoverable everywhere"" am: 606f3d7fcf
Change-Id: Ia345f7e4a32415667cea290ca4b1770c317d88ab
2020-01-31 16:35:28 +00:00
Martijn Coenen
4de3228c46 Allow toolbox to set project quota IDs.
These ioctls are required to set a default project quota ID on
/data/media.

Bug: 146419093
Test: verified chattr call from rootdir/init.rc
Change-Id: I0c9028e0a6502302fe81a73dfa087261a36d9863
2020-01-31 16:09:04 +01:00
Oli Lan
2b44078cac Merge changes I179c05b3,Ia529ede4
* changes:
  Add dac_read_search to apexd to prevent spurious denials.
  Allow apexd to execute toybox for snapshot & restore.
2020-01-31 10:05:21 +00:00
Nicolas Geoffray
89946d7e1b Merge "Add getattr access on tmpfs_zygote files for webview_zygote." 2020-01-31 08:09:05 +00:00
Jon Spivack
499e0173b5 Merge "Revert^2 "Move aidl_lazy_test_server to system_ext"" 2020-01-31 00:04:08 +00:00
Andrei-Valentin Onea
606f3d7fcf Merge "Revert "Make platform_compat discoverable everywhere"" 2020-01-30 22:37:03 +00:00
Andrei-Valentin Onea
8a40e7c132 Revert "Make platform_compat discoverable everywhere"
Revert "Add new permissions to test"

Revert submission 1210143-platformcompat-permissions

Reason for revert: http://b/142942524
Reverted Changes:
I3601b12d5: Add new permissions to test
I65d425aac: Make platform_compat discoverable everywhere
I1c8cbb656: Add permissions for using PlatformCompat methods

Change-Id: I356c1d1c4d1213eea6e5585b23faa40722b1a01a
2020-01-30 21:38:35 +00:00
Nicolas Geoffray
80aaf85eed Add getattr access on tmpfs_zygote files for webview_zygote.
webview_zygote inherits tmpfs files from zygote and needs to stat
them after fork.

Bug: 138851227
Test: run walleye_jitzygote config, fork webview_zygote.
Change-Id: I092b942c0426f3f5731536ae9f2f5886a9196d3d
2020-01-30 21:29:19 +00:00
Oli Lan
7e346c98fc Add dac_read_search to apexd to prevent spurious denials.
As apexd now has dac_override, it should also have dac_read_search to
avoid spurious denials.

Bug: 141148175
Test: Build, run apex installation, check denials.
Change-Id: I179c05b36ae0fe62d943ca59ee7f8158507f1f10
2020-01-30 19:06:30 +00:00
Automerger Merge Worker
f01f40ffe7 Merge "Convert sepolicy-analyze to Android.bp" am: 4ea62412b8
Change-Id: I835d39da9fe72906367077dbd1e41ea973170362
2020-01-30 17:45:22 +00:00
Automerger Merge Worker
5b2b1f10c8 Merge "Add permissions for chattr" am: 7b6cd1e43e
Change-Id: Id464200407baf62f06dc5c9cfe9c1919f16e3cc0
2020-01-30 17:43:08 +00:00
Oli Lan
1a775e077b Allow apexd to execute toybox for snapshot & restore.
This allows apexd to execute "cp" to perform snapshot and
restore operations.

Other rules for this were added in aosp/1217340, but this one was
missed.

Bug: 141148175
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_DeSys
Change-Id: Ia529ede468578bfadc87e049a2c0ab4f87e1c43d
2020-01-30 16:54:42 +00:00
Dan Willemsen
4ea62412b8 Merge "Convert sepolicy-analyze to Android.bp" 2020-01-30 16:37:07 +00:00