Commit Graph

23335 Commits

Author SHA1 Message Date
Yifan Hong
e30ef0ef48 Merge "Allow fastbootd to read virtual_ab_prop"
am: 4d9b9f65ed

Change-Id: I4e31619349dd8e53c4331a6c0d6258ce08ee3443
2020-01-27 16:33:26 -08:00
Treehugger Robot
4d9b9f65ed Merge "Allow fastbootd to read virtual_ab_prop" 2020-01-28 00:11:18 +00:00
Ashwini Oruganti
91d4d574f1 Merge "priv_app: Remove permissions for config_gz"
am: 9baf6d6609

Change-Id: Idcb96ca85ed80c5545ab5f617fb3c9b80ee7aa0c
2020-01-27 14:49:30 -08:00
Treehugger Robot
9baf6d6609 Merge "priv_app: Remove permissions for config_gz" 2020-01-27 22:44:13 +00:00
Kenny Root
960f73b75b rebootescrow: allow use of block file
pmem uses a block file while access_ramoops uses a char file. Allow both for
now until we can unify on pmem.

Additionally allow the reading of vendor properties so it can read the
path to the character or block device to open.

Test: atest VtsHalRebootEscrowTargetTest
Bug: 146400078
Change-Id: Ief61534e0946480a01c635ce1672579959ec8db5
2020-01-27 12:28:44 -08:00
Oli Lan
335d704c77 Add sepolicy rules to allow apexd to perform snapshot and restore.
This adds rules required for apexd to perform snapshot and restore
of the new apex data directories.

See go/apex-data-directories for more information on the feature.

See the chain of CLs up to ag/10169468 for the implementation of
snapshot and restore.

Bug: 141148175
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_DeSys
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_DeUser
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_Ce
Change-Id: I1756bbc1d80cad7cf9c2cebcee9bee6bc261728c
2020-01-27 18:21:29 +00:00
Ashwini Oruganti
5ab5e8ad20 priv_app: Remove permissions for config_gz
Looking at go/sedenials, we see this permission being used by
MediaProvider once like so:

type=1400 audit(0.0:569759): avc: granted { getattr } for comm=4173796E635461736B202331 path="/proc/config.gz" dev="proc" ino=4026532157 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:config_gz:s0 tclass=file app=com.google.android.providers.media.module

This permission should not be granted to all priv-apps now that GMS core
has been split out into its own domain. This change removes the
permission for the priv_app domain and the corresponding auditallow.

Bug: 147833123
Test: TH
Change-Id: I4f60daefcbdd4991c5d2c32330e907a03bfe6fe5
2020-01-27 10:03:22 -08:00
Collin Fijalkovich
cb5c737f46 Configure SELinux for getVolumeList and isAppInactive Caches
Setup SELinux to allow the world to read, and system_server to write,
properties used as indicators that we need to invalidate their respective
set of client side caches.

Test: Flashed build and tested that phone boots and does not crash
as StorageManager and UsageStatsManager operations take place.

Change-Id: Ieaacf741ecab5beb18d59945739f05e7ea26ddec
2020-01-27 08:50:26 -08:00
Jon Spivack
62ce810826 Merge "Revert "Move aidl_lazy_test_server to system_ext""
am: 5f11b2e0ed

Change-Id: I6d5828f8b9f084382c6977865496d8cf8befedc9
2020-01-25 16:05:52 -08:00
Jon Spivack
5f11b2e0ed Merge "Revert "Move aidl_lazy_test_server to system_ext"" 2020-01-25 21:29:45 +00:00
Yifan Hong
75a880bda8 Allow fastbootd to read virtual_ab_prop
It needs to know whether B partitions should be allocated
at the second half of super.

Test: flash and see serial output
Fixes: 147363527
Change-Id: I58c57befa3ee3569c911cbdf506e919fe1d0bae4
2020-01-24 20:21:24 -08:00
Maciej enczykowski
d316288176 netd: remove freshly added neverallows
am: ef1493d2d5

Change-Id: I707215a238772a38727710d79f9d908698fc4dd8
2020-01-24 19:12:03 -08:00
Jon Spivack
4eae75c9d4 Revert "Move aidl_lazy_test_server to system_ext"
Revert submission 1209453-aidl-lazy-presubmit

Reason for revert: b/148282665. A test has begun to fail on git_stage-aosp-master, and I need to verify whether these changes are responsible.

Reverted Changes:
Ib09a2460e: Add aidl_lazy_test to general-tests
Ib08989356: Move aidl_lazy_test_server to system_ext
I694e6ad35: Add aidl_lazy_test_server to Cuttlefish
I65db12c63: Add aidl_lazy_test to presubmit
I7ec80a280: Dynamically stop services with multiple interfaces...

Change-Id: I55f6b0f7800f348259787f62c6faa19a90f8bdcc
2020-01-25 02:55:04 +00:00
Maciej Żenczykowski
ef1493d2d5 netd: remove freshly added neverallows
until we gain a better understanding of why this is breaking builds
on for example pixel3_mainline-userdebug

Test: no, but removing neverallows can't break the already broken build...
Bug: 148311635
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib4fa19317034412f9eaa789f39df2548f13178dc
2020-01-25 02:13:01 +00:00
Maciej Żenczykowski
d06a8a6e8a Merge "netd does not require and should not have SYS_ADMIN nor module loading privs"
am: 33a653331a

Change-Id: I01d0ae911a541b4fc0d57fde3d28e9656a6cae30
2020-01-24 16:50:33 -08:00
Maciej Żenczykowski
33a653331a Merge "netd does not require and should not have SYS_ADMIN nor module loading privs" 2020-01-25 00:19:24 +00:00
Valerie Hau
622e779b7a Merge "Whitelisting window_manager_native_boot system property"
am: b9b2acff99

Change-Id: I8a98e5afb20e81327a4293fb5e8038007d5bc8b5
2020-01-24 13:08:52 -08:00
Treehugger Robot
b9b2acff99 Merge "Whitelisting window_manager_native_boot system property" 2020-01-24 19:52:07 +00:00
Andrei Onea
59da5e821f Make platform_compat discoverable everywhere
The binder's methods are protected by signature
permissions (READ_COMPAT_CHANGE_CONFIG and
OVERRIDE_COMPAT_CHANGE_CONFIG).

Bug: 142650523
Test: atest PlatformCompatTest
Test: atest CompatConfigTest
Test: atest OverrideValidatorImplTest
Change-Id: I65d425aacb120c6481076431151cf43ecab2509f
2020-01-24 17:01:37 +00:00
Maciej Żenczykowski
d4a692fe7e netd does not require and should not have SYS_ADMIN nor module loading privs
This is pulling in:
  dontaudit netd self:capability sys_module;
  dontaudit netd kernel:system module_request;
from:
  https://android-review.googlesource.com/c/device/amlogic/yukawa/+/1217396
  //device/amlogic/yukawa/sepolicy/netd.te

  https://android-review.googlesource.com/c/device/generic/goldfish/+/1217397
  //device/generic/goldfish/sepolicy/common/netd.te

  https://android-review.googlesource.com/c/device/google/bonito-sepolicy/+/1217435
  //device/google/bonito-sepolicy/vendor/qcom/common/netd.te

  https://android-review.googlesource.com/c/device/google/crosshatch-sepolicy/+/1217398
  //device/google/crosshatch-sepolicy/vendor/qcom/common/netd.te

  https://android-review.googlesource.com/c/device/google/wahoo/+/1217436
  //device/google/wahoo/sepolicy/vendor/netd.te

  https://android-review.googlesource.com/c/device/linaro/hikey/+/1217455
  //device/linaro/hikey/sepolicy/netd.te

  https://android-review.googlesource.com/c/device/ti/beagle-x15/+/1217475
  //device/ti/beagle-x15/sepolicy/netd.te

Test: builds
Signed-off-by: Maciej Żenczykowski
Change-Id: Idff03782133691ff43e49cb04544e5d1b1be922f
2020-01-24 13:07:09 +00:00
Automerger Merge Worker
de87bc5c0f Merge "Move aidl_lazy_test_server to system_ext" am: 65028a3609
Change-Id: I5188f907df866d600e84273ec5190712a47a7943
2020-01-24 01:42:46 +00:00
Jon Spivack
65028a3609 Merge "Move aidl_lazy_test_server to system_ext" 2020-01-24 01:30:49 +00:00
Automerger Merge Worker
46761bbc6a Merge "Allow incidentd to parse persisted log" am: 9db478bb86
Change-Id: Ic07052836a47c06240d5067c702570343497e20c
2020-01-24 01:23:10 +00:00
Mike Ma
9db478bb86 Merge "Allow incidentd to parse persisted log" 2020-01-24 01:04:03 +00:00
Lee Shombert
a0a4772d9f Merge "Support for more binder caches"
am: edd4726300

Change-Id: I64df7d5d8d5d382600bc3a7b5c5fa53164482996
2020-01-23 07:49:31 -08:00
Lee Shombert
edd4726300 Merge "Support for more binder caches" 2020-01-23 15:44:39 +00:00
Ryan Savitski
73391bf5ce Merge changes I8630c20e,I4aa482cf
am: a67cd2333e

Change-Id: I28b886cbf2f2fc4f9db450f0f7db02915df4b7b1
2020-01-23 07:17:06 -08:00
Treehugger Robot
a67cd2333e Merge changes I8630c20e,I4aa482cf
* changes:
  debug builds: allow perf profiling of most domains
  initial policy for traced_perf daemon (perf profiler)
2020-01-23 15:10:59 +00:00
Ilya Matyukhin
29b9d7d68e Merge "Add sepolicy for biometrics.face@1.1"
am: 915ad1ecbf

Change-Id: I6a3c41e00ad717d749fbdc87d87c153a85668fa2
2020-01-23 04:05:09 -08:00
Treehugger Robot
915ad1ecbf Merge "Add sepolicy for biometrics.face@1.1" 2020-01-23 10:23:09 +00:00
Songchun Fan
d9592a8be0 Merge "[apex] remove module com.android.incremental"
am: 9de90db5c0

Change-Id: I5390e8cd7da9c70044f8ca0386d91cb5c26d02bb
2020-01-22 19:25:18 -08:00
Jon Spivack
eb57c756c2 Move aidl_lazy_test_server to system_ext
This allows it to be installed and run during presubmit.

Bug: 147380480
Test: aidl_lazy_test
Change-Id: Ib08989356d02f2bf041d0780ec6c5bf65899c597
2020-01-22 17:36:05 -08:00
Ilya Matyukhin
536796c6dd Add sepolicy for biometrics.face@1.1
Bug: 145027036
Test: build and run on cuttlefish
Change-Id: Ic3cc7755e65ba3537cbe817e0835ac34c04d6561
2020-01-22 17:17:12 -08:00
Songchun Fan
9de90db5c0 Merge "[apex] remove module com.android.incremental" 2020-01-23 00:19:43 +00:00
Oliver Nguyen
d3a484ad6f Merge "Clang coverage also enables global write to /data/misc/trace."
am: 8ad9190770

Change-Id: I36f431c5af0380bc6331ae09d890ea71e1bb949e
2020-01-22 14:42:33 -08:00
Oliver Nguyen
8ad9190770 Merge "Clang coverage also enables global write to /data/misc/trace." 2020-01-22 22:34:35 +00:00
Ryan Savitski
845569e2e5 debug builds: allow perf profiling of most domains
As with heapprofd, it's useful to profile the platform itself on debug
builds (compared to just apps on "user" builds).

Bug: 137092007
Change-Id: I8630c20e0da9c67e4927496802a4cd9cacbeb81a
2020-01-22 22:04:02 +00:00
Ryan Savitski
67a82481f8 initial policy for traced_perf daemon (perf profiler)
The steps involved in setting up profiling and stack unwinding are
described in detail at go/perfetto-perf-android.

To summarize the interesting case: the daemon uses cpu-wide
perf_event_open, with userspace stack and register sampling on. For each
sample, it identifies whether the process is profileable, and obtains
the FDs for /proc/[pid]/{maps,mem} using a dedicated RT signal (with the
bionic signal handler handing over the FDs over a dedicated socket). It
then uses libunwindstack to unwind & symbolize the stacks, sending the
results to the central tracing daemon (traced).

This patch covers the app profiling use-cases. Splitting out the
"profile most things on debug builds" into a separate patch for easier
review.

Most of the exceptions in domain.te & coredomain.te come from the
"vendor_file_type" allow-rule. We want a subset of that (effectively all
libraries/executables), but I believe that in practice it's hard to use
just the specific subtypes, and we're better off allowing access to all
vendor_file_type files.

Bug: 137092007
Change-Id: I4aa482cfb3f9fb2fabf02e1dff92e2b5ce121a47
2020-01-22 22:04:01 +00:00
Ivailo Karamanolev
7ad4e6350f Merge "Add rules for Lights AIDL HAL"
am: 0545b44e40

Change-Id: I71e5765f17b519a16193c8d0209b61dcb8f63144
2020-01-22 13:39:26 -08:00
Ivailo Karamanolev
0545b44e40 Merge "Add rules for Lights AIDL HAL" 2020-01-22 21:34:34 +00:00
Ivailo Karamanolev
254d757289 Add rules for Lights AIDL HAL
Test: manual; yukawa and cuttlefish; adb logcat | grep -i avc
Bug: 142230898
Change-Id: I9f576511d1fc77c5f0ad3cf1b96b038b301773d7
2020-01-22 20:33:42 +01:00
Lee Shombert
097f9794f4 Support for more binder caches
Bug: 140788621

This adds keys for several planned binder caches in the system server
and in the bluetooth server.  The actual cache code is not in this
tree.

Test: created a test build that contains the actual cache code and ran
some system tests.  Verified that no protection issues were seen.

Change-Id: Ibaccb0c0ff8b127d14cf769ea4156f7d8b024bc1
2020-01-22 08:21:08 -08:00
Jeffrey Vander Stoep
1a0201f032 Merge "reland: untrusted_app_29: add new targetSdk domain"
am: db60355f94

Change-Id: Ic16d67e3ad755fda51bffaf444f2b8bb2601e04f
2020-01-22 07:04:28 -08:00
Jeffrey Vander Stoep
db60355f94 Merge "reland: untrusted_app_29: add new targetSdk domain" 2020-01-22 14:43:36 +00:00
Martijn Coenen
1460d6d8c2 Merge "Add FS_IOC_FS(G|S)ETXATTR to ioctl_defines and allow vold to use it."
am: 28304cc43a

Change-Id: I46b9217f996fa670e9df6000d63a7cbcf31ef1c1
2020-01-22 06:37:05 -08:00
Treehugger Robot
28304cc43a Merge "Add FS_IOC_FS(G|S)ETXATTR to ioctl_defines and allow vold to use it." 2020-01-22 14:31:47 +00:00
Martijn Coenen
e0ab03aee3 Add FS_IOC_FS(G|S)ETXATTR to ioctl_defines and allow vold to use it.
Bug: 146419093
Test: vold can call the ioctl
Change-Id: I409b702d00bc5ef5f42f9c613d8f89195fefb800
2020-01-22 10:53:33 +01:00
Jeff Vander Stoep
1f7ae8ee3f reland: untrusted_app_29: add new targetSdk domain
Enforce new requirements on app with targetSdkVersion=30 including:
- No RTM_GETLINK on netlink route sockets.

Remove some of the repetitive descriptions in each untrusted_app_N.te
file, and instead refer to the description in
public/untrusted_app.te.

Bug: 141455849
Test: CtsSelinuxTargetSdkCurrentTestCases
Test: libcore.java.net.NetworkInterfaceTest#testGetNetworkInterfaces
Change-Id: I89553e48db3bc71f229c71fafeee9005703e5c0b
2020-01-22 09:47:53 +00:00
Kiyoung Kim
acfb6c7a1a Merge "Update linkerconfig to generate APEX binary config"
am: fa8bcd3d29

Change-Id: I7c7afa118b7e7808402c047e89c8c862afe5619a
2020-01-22 00:04:50 -08:00
Kiyoung Kim
fa8bcd3d29 Merge "Update linkerconfig to generate APEX binary config" 2020-01-22 07:58:43 +00:00