Commit graph

17971 commits

Author SHA1 Message Date
Jayant Chowdhary
f7b53209a4 Allow camera hal to read serialno.
Bug: 128037879

Test: Camera HAL is able to read ro.serialno

Change-Id: I904c852a7100bc65456ee63ffb31d70681293d7d
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2019-03-14 14:36:41 -07:00
Suren Baghdasaryan
96cc32b0eb Merge "sepolicy: Remove unnecessary psi procfs rules" 2019-03-14 01:42:21 +00:00
Tri Vo
d6c5ff5f72 Allow global read access to /sys/kernel/mm/transparent_hugepage/
If kernel is built with CONFIG_TRANSPARENT_HUGEPAGE optimization,
libjemalloc5 will attempt to read
/sys/kernel/mm/transparent_hugepage/enabled and hit an SELinux denial.

Various denials similiar to the following are seen on cuttlefish:
avc: denied { open } for comm="surfaceflinger"
path="/sys/kernel/mm/transparent_hugepage/enabled" dev="sysfs" ino=776
scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:sysfs:s0 tclass=file
permissive=1

Bug: 28053261
Test: boot cuttlefish without above denials.
Change-Id: Ic33f12d31aacc42d662a8c5c297fbb5f84d4deea
2019-03-13 23:47:25 +00:00
Treehugger Robot
058f7f4add Merge "ODM updates the recovery partition through vendor's materials" 2019-03-13 21:36:50 +00:00
Suren Baghdasaryan
f4b7e01c1f sepolicy: Remove unnecessary psi procfs rules
Remove unnecessary rules which will be added from 28.0.cil automatically
by the build process.

Bug: 111308141
Test: builds

Change-Id: I02064785cac1ed6d8b4e462604a1b8db10c1a25a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-03-13 20:53:55 +00:00
Suren Baghdasaryan
9902c67cfa Merge "sepolicy: Allow lmkd access to psi procfs nodes" 2019-03-13 20:51:31 +00:00
Tri Vo
3a463e108d Merge "vold: write permission to sysfs_devices_block" 2019-03-13 20:36:30 +00:00
Treehugger Robot
98de091a4f Merge "Allow traced_probes to access power rail data." 2019-03-13 19:47:54 +00:00
Andreas Gampe
01147a70f4 Merge "Sepolicy: ART APEX boot integrity" 2019-03-13 18:19:03 +00:00
Treehugger Robot
e5667b30d5 Merge "Allow mini-keyctl to setattr for restricting keyring" 2019-03-13 17:30:22 +00:00
Ben Murdoch
f948ea58c7 Allow traced_probes to access power rail data.
Allows power rail data to be logged in the trace, allowing
high fidelity attribution of battery power use.

Matching feature CL: aosp/891533

SELinux denials that lead to this:
avc: denied { call } for scontext=u:r:traced_probes:s0 tcontext=u:r:hal_power_stats_default:s0 tclass=binder

Test: checked data in a trace
Bug: 122584217

Change-Id: I7e0f4e825be3f54bc78d91da1cb85c2f61465a44
2019-03-13 17:11:31 +00:00
Suren Baghdasaryan
53065d6aa8 sepolicy: Allow lmkd access to psi procfs nodes
Lmkd needs read access to /proc/pressure/memory, proc/pressure/cpu
and proc/pressure/io nodes to read current psi levels.
Lmkd needs write access to /proc/pressure/memory to set psi monitor
triggers.

Bug: 111308141
Test: modified lmkd to use PSI and tested using lmkd_unit_test

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: I9efd60c7fbb89cc08938fa5119b13d794813b52b
Change-Id: I9efd60c7fbb89cc08938fa5119b13d794813b52b
2019-03-13 10:00:37 -07:00
Treehugger Robot
20fe557ec5 Merge "Sepolicy: Give sys_admin for relabel" 2019-03-13 15:06:54 +00:00
wenquan.zhang
182d50d10b ODM updates the recovery partition through vendor's materials
This is for Non-AB ota update recovery partition on GMS Express 2.0 project.
recovery partition update via /vendor/bin/install-recovery.sh from /vendor/etc/recovery.img

Bug: 124277294
Test: builds and test GOTA.
Change-Id: I97521c03a881bd0427e5d02836220ee2c0db7650
2019-03-13 03:24:55 -07:00
Andreas Gampe
1845b406fc Sepolicy: ART APEX boot integrity
Add ART boot integrity check domain. Give it rights to run
fsverity and delete boot classpath artifacts.

Bug 125474642
Test: m
Test: boot
Change-Id: I933add9b1895ed85c43ec712ced6ffe8f820c7ec
2019-03-12 22:26:17 -07:00
Treehugger Robot
62e8da9713 Merge "system_server: allow writes to /proc/pid/*" 2019-03-13 05:09:18 +00:00
Treehugger Robot
7a70210a47 Merge "Fix surface flinger property types" 2019-03-12 23:58:52 +00:00
Tim Murray
a8d538f66d system_server: allow writes to /proc/pid/*
Test: system_server can write to /proc/<pid>/*
bug 119988524

Change-Id: I312b8022cd143907bcbfc8152691e2053e1e816d
2019-03-12 16:20:11 -07:00
Inseob Kim
8669f52f79 Fix surface flinger property types
Third parameter of a property_context entry should be "exact" if the
entry is for a single property, not a prefix.

And the type of each entry should be the fourth parameter.

Bug: 112386364
Test: m -j
Change-Id: I2ed31c9fd7c7424e3a6a51d44b4e85413ae316b7
2019-03-12 22:38:36 +00:00
Treehugger Robot
460efa2a01 Merge "Add policy for /metadata/apex." 2019-03-12 20:48:49 +00:00
Victor Hsieh
f7bf277313 Allow mini-keyctl to setattr for restricting keyring
This fix the current denial during boot.

Test: no more avd denial in dmesg
Bug: 112038861
Change-Id: Ie3c3788ff011bcee189b83cfccba6137580f804d
2019-03-12 13:46:53 -07:00
Andreas Gampe
7263cb4603 Sepolicy: Give sys_admin for relabel
This requirement slipped through.

Bug: 125474642
Test: m
Test: manual
Change-Id: I8b31bda519632a549574d3057bc49a158e796e2e
2019-03-12 10:49:16 -07:00
Martijn Coenen
5fbbf2613c Add policy for /metadata/apex.
This is an area that apexd can use to store session metadata, which
won't be rolled back with filesystem checkpointing.

Bug: 126740531
Test: builds
Change-Id: I5abbc500dc1b92aa46830829be76e7a4381eef91
2019-03-12 18:31:07 +01:00
Tri Vo
5b60eb6397 vold: write permission to sysfs_devices_block
vold needs write permissions for /sys/block/*/uevent to perform a
coldboot.
https://android.googlesource.com/platform/system/vold/+/refs/heads/master/main.cpp#139

This denial is seen on cuttlefish:
avc: denied { write } for name=uevent dev=sysfs ino=11649
scontext=u:r:vold:s0 tcontext=u:object_r:sysfs_devices_block:s0
tclass=file permissive=1

Pixel devices resolve this denial in device policy, but since coldboot
is performed from platform code, the corresponding permission should be
in /system/sepolicy

Bug: 28053261
Test: boot cuttlefish without above denial
Change-Id: I2de08db603e2d287e8021af70ee8e69266d7736f
2019-03-11 13:36:56 -07:00
Steven Moreland
475f6d143f Merge "Clarify comment on tombstoned exception." 2019-03-08 20:19:43 +00:00
Steven Moreland
981f6c2d5e Clarify comment on tombstoned exception.
The OMX comment here seems unrelated. The linker (system) uses it to
talk to tombstoned.

Fixes: 112606643
Test: N/A
Change-Id: Ib3da832f120d3cc244aa22de5d4d655b874db38b
2019-03-07 15:24:07 -08:00
Jack Yu
bd534ed52b Fixed the inaccessable system properties
Moved the system properties from exported3_default
to exported_radio so that the service from vendor
partition can access that.

Test: Manual
Bug: 126218288
Change-Id: I055c1c26d1e25f5d12f2593b96eecf57be62d871
2019-03-07 21:36:47 +00:00
Tri Vo
131fa73add Restrict access to suspend control
Test: m selinux_policy
Change-Id: Ieccfd2aa059da065ace4f2db1b9634c52dd2cb24
2019-03-07 18:31:58 +00:00
David Anderson
d99b7fd3f9 Add sepolicy for /metadata/password_slots.
The device OS and an installed GSI will both attempt to write
authentication data to the same weaver slots. To prevent this, we can
use the /metadata partition (required for GSI support) to communicate
which slots are in use between OS images.

To do this we define a new /metadata/password_slots directory and define
sepolicy to allow system_server (see PasswordSlotManager) to access it.

Bug: 123716647
Test: no denials on crosshatch
Change-Id: I8e3679d332503b5fb8a8eb6455de068c22eba30b
2019-03-07 16:19:15 +00:00
Luke Huang
a116e1afe5 Merge "Add sepolicy for resolver service" 2019-03-07 05:35:12 +00:00
Treehugger Robot
c67985a067 Merge "Sepolicy: Allow crash_dump to ptrace apexd in userdebug" 2019-03-06 22:12:11 +00:00
Treehugger Robot
a5f5fc5afd Merge "health: allow wake_alarm capability." 2019-03-06 21:41:25 +00:00
Tri Vo
304bafd410 Merge "load selinux mapping ignore file in BOARD_PLAT_PRIVATE_SEPOLICY_DIR" 2019-03-06 20:26:07 +00:00
Yifan Hong
2d0979268f health: allow wake_alarm capability.
CAP_WAKE_ALARM was required for timerfd_create since 4.10 kernel upstream.
Add capability to platform policy for healthd and health HAL.

Fixes: 124210362
Test: boots (sanity)
Change-Id: I8ebb383608eedd59beddec3f476b071e81b80871
2019-03-06 19:10:09 +00:00
Treehugger Robot
452d6a5faa Merge "Add a new system-to-vendor sysprop ro.apex.updatable" 2019-03-06 17:38:46 +00:00
David Anderson
731e104acc Merge "Allow gatekeeperd to read ro.gsid.image_running." 2019-03-06 02:40:03 +00:00
Treehugger Robot
8740465034 Merge "Move mediaswcodec service to APEX" 2019-03-06 02:06:19 +00:00
Chong Zhang
21b40e380e Move mediaswcodec service to APEX
bug: 127499775
test:
- adb shell lshal debug android.hardware.media.c2@1.0::IComponentStore/software
check all software c2 codecs are still listed
- clean-built image shouldn't have mediaswcodec in /system/bin
- atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Change-Id: Ie528fe3b1053d5bfd9dc3b858c996b8e1c708cbc
2019-03-05 14:54:14 -08:00
Andreas Gampe
efece54e06 Sepolicy: Allow crash_dump to ptrace apexd in userdebug
In userdebug, for better diagnostics, allow crash_dump to "connect
to" apexd.

Considering apexd is quite powerful, user devices remain restricted.

Bug: 118771487
Test: m
Change-Id: Id42bd2ad7505cd5578138bfccd8840acba9a334d
2019-03-05 09:59:50 -08:00
Treehugger Robot
51f6075f73 Merge "Fix denials during bugreport." 2019-03-05 17:27:58 +00:00
Luke Huang
524f25ebb0 Add sepolicy for resolver service
Bug: 126141549
Test: built, flashed, booted
Change-Id: I34260e1e5cc238fbe92574f928252680c1e6b417
2019-03-05 15:49:33 +00:00
Changyeon Jo
9c65dc76b8 Merge "Updates hal_evs sepolicy" 2019-03-05 14:22:57 +00:00
Jinguang Dong
e012569944 load selinux mapping ignore file in BOARD_PLAT_PRIVATE_SEPOLICY_DIR
Now it can only load selinux mapping ignore file in system/sepolicy/private,
But for google's partners, we want to add selinux mapping ignore file in BOARD_PLAT_PRIVATE_SEPOLICY_DIR.

Test: it can load load selinux mapping ignore file in BOARD_PLAT_PRIVATE_SEPOLICY_DIR
Change-Id: I983422c21fe027fcb17c175357a26845eb977669
2019-03-05 17:23:24 +08:00
Jiyong Park
48d0793ec0 Add a new system-to-vendor sysprop ro.apex.updatable
The system property is for system to be able to identify vendor
implementation that is ready to support updatable APEXes. When this
sysprop is set to true, the init creates separate mount namespaces for
processes launched before apexd. When unset, default is false.

Bug: 122428178
Test: device boots to the UI
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: I4ae1eac5eec5f5085d8d32ff58300dfa9967c29a
2019-03-05 16:31:23 +09:00
Joel Galenson
3fbd303d1c Reduce the number of parallel compiles.
Running this script sometimes completely hangs all of our computers.
This change seems to work better for me.

Test: Use script to compile many Androids.
Change-Id: I95539034b35a4ff6dbc39cd67856b0bd7e20d587
2019-03-04 14:04:49 -08:00
Joel Galenson
19c90604ad Fix denials during bugreport.
Bug: 124465994
Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t
android.security.cts.SELinuxHostTest#testNoBugreportDenials
Test: Build all policies.

Change-Id: Ic20b1e0fd3a8bdea408d66f33351b1f5ebc5d84c
(cherry picked from commit f24854f8e8)
2019-03-04 14:01:12 -08:00
Treehugger Robot
e146c216cc Merge "Fix typo." 2019-03-04 21:52:58 +00:00
Jayant Chowdhary
bfb9f7caa5 Merge changes from topic "fwk-cameraservice-sepolicy"
* changes:
  Abstract use of cameraserver behind an attribute
  Add selinux rules for HIDL ICameraServer.
2019-03-04 19:43:07 +00:00
Florian Mayer
3b601a5e59 Fix typo.
Change-Id: I03d31ea03d7a1e3e230a97ac1f0ead82d5962f34
2019-03-04 16:43:37 +00:00
Florian Mayer
315d8bfa15 Allow profilable domains to use heapprofd fd and tmpfs.
This is needed to allow to communicate over shared memory.

Bug: 126724929

Change-Id: I73e69ae3679cd50124ab48121e259fd164176ed3
2019-03-04 12:05:35 +00:00