Commit graph

182 commits

Author SHA1 Message Date
Sidath Senanayake
72883eff9c Update API 29 prebuilts to include gpu_frequency tracepoint
am: 31056ae11d

Change-Id: I4ff4a43d337dff01e90fcea9d78e7eb241d4aaf5
2019-07-03 17:25:39 -07:00
Sidath Senanayake
31056ae11d Update API 29 prebuilts to include gpu_frequency tracepoint
Bug: 136289121
Change-Id: I2fb013d46ab72b29a83754b5199816d080bce534
2019-07-03 16:32:18 +01:00
Yichi Chen
39efa50184 SF: enable device-specific dataspace for color space agnostic surfaces
To reduce the DPU loading in color conversion, we enable device-specific
dataspace for color space agnostic surfaces. Since the type of surfaces
usually provide gray-level surfaces to users, it can be acceptable to
ignore the color conversion on them.

Bug: 134783740
Bug: 135140940
Test: Check ScreenDecorOverlays in expected dataspace
Test: Play HDR video on C2 and check dataspace
Change-Id: Ief32f0ff3867b2e154fecd6c9ebd6610b0e6ed11
2019-07-03 20:24:42 +08:00
Sidath Senanayake
b1d6eb979e Allow perfetto to access gpu_frequency tracepoint in user
am: 9bfaa1c4dd

Change-Id: Ie0ec9a00dab4c2d8aea365fb95b708aee8ef09d0
2019-07-02 13:00:52 -07:00
Sidath Senanayake
9bfaa1c4dd Allow perfetto to access gpu_frequency tracepoint in user
This will allow Perfetto to capture GPU frequency changes
on the target, which is useful to graphics developers
using Perfetto to profile graphics HW usage.

This change also updates the private prebuilt at version
29.0 to match the update.

Bug: 136062452
Merged-In: Idb7870b2f674f1359ef3b4487dbeff190b394248
Change-Id: Ib98ba10d96caa199d7030be3a17148045576a80c
2019-06-28 20:13:05 +01:00
Todd Kennedy
efc2dbb26e Allow rule to let settings access apex files
am: 9067699d9d

Change-Id: Id3541133ffa48e7685f8e8195f5c585ea8fe9630
2019-06-28 10:32:32 -07:00
Andrew Sapperstein
ea1bd922f6 Merge "Revert "Revert "Allow rule to let settings access apex files""" am: 6eaf8a2d62 am: 48353bf0af
am: 41ca891c57

Change-Id: Idf332f592d50734b9751b145c237f2c9d29e34fe
2019-06-28 10:06:56 -07:00
Cosmo Hsieh
1d84c81370 Merge "Revert "Allow rule to let settings access apex files"" am: 71e1c36956 am: be678acc85
am: 7f1dd65024

Change-Id: Ie1ca6f6bf2e1b7d956583a7eaa32ebbe7c04a89e
2019-06-28 09:39:54 -07:00
Andrew Sapperstein
41ca891c57 Merge "Revert "Revert "Allow rule to let settings access apex files""" am: 6eaf8a2d62
am: 48353bf0af

Change-Id: I91b9edc07fbc1cbefae611017c409a9bfd27bf0e
2019-06-28 09:30:18 -07:00
Cosmo Hsieh
7f1dd65024 Merge "Revert "Allow rule to let settings access apex files"" am: 71e1c36956
am: be678acc85

Change-Id: I29ea36768d5b129777eb41cd3275f25b14f8edf0
2019-06-28 09:16:02 -07:00
Andrew Sapperstein
a8b6c0f0bf Merge "Allow rule to let settings access apex files" am: bfe6fdedba am: f7c9b8a1fc
am: 9b6ad1d5b0

Change-Id: I8384127510e8e45821ea4ec9785e4e784135e506
2019-06-28 09:13:29 -07:00
Andrew Sapperstein
9b6ad1d5b0 Merge "Allow rule to let settings access apex files" am: bfe6fdedba
am: f7c9b8a1fc

Change-Id: Ie8a88d458f234477d2311a6a8f0f9fde3533de5c
2019-06-28 09:03:26 -07:00
Andrew Sapperstein
544a9b1c51 Revert "Revert "Allow rule to let settings access apex files""
This reverts commit e47d2365a8.

Reason for revert: Original CL was not the cause of the breakage. It went green before this revert landed. https://android-build.googleplex.com/builds/branches/aosp-master/grid?

Original CL went in 5695273.
Went green in 5695399.
Revert went in 5695588.

Change-Id: Ie4d7065fe7d3c58cdff99c2b7d76b50b941895bb
2019-06-28 15:28:28 +00:00
Cosmo Hsieh
e47d2365a8 Revert "Allow rule to let settings access apex files"
This reverts commit 0c0ba46192.

Reason for revert: <Broken build 5695273 on aosp-master on aosp_x86_64-eng>

Change-Id: I763f19aa5b72f2e1aaebbc78bb8ab3020c3d2a7b
2019-06-28 09:51:28 +00:00
Todd Kennedy
0c0ba46192 Allow rule to let settings access apex files
In order to show licensing information, we need to read it from
an asset stored in the .apex file.

Bug: 135183006
Test: Manual; settings can access apex files stored on /data
Change-Id: I71fbde6e295d9c890c9b9b0449e5150834a6680e
2019-06-27 18:34:25 +00:00
Todd Kennedy
9067699d9d Allow rule to let settings access apex files
In order to show licensing information, we need to read it from
an asset stored in the .apex file.

Bug: 135183006
Test: Manual; settings can access apex files stored on /data
Change-Id: I71fbde6e295d9c890c9b9b0449e5150834a6680e
Merged-In: I71fbde6e295d9c890c9b9b0449e5150834a6680e
2019-06-27 11:32:49 -07:00
Oliver Nguyen
bf513525a4 Merge "In native coverage builds, allow all domains to access /data/misc/trace" into qt-dev am: 72a75ffe19
am: 75f2c87c8a

Change-Id: Iae83e01bc56d5bc0c631251be18f7395a6d1bd87
2019-06-20 16:17:04 -07:00
Oliver Nguyen
0012d6574c Merge "In native coverage builds, allow all domains to access /data/misc/trace" into qt-dev
am: 72a75ffe19

Change-Id: I93de590b94ce57c8ad87361ddb3b6188552854c7
2019-06-20 15:42:32 -07:00
Oliver Nguyen
75f2c87c8a Merge "In native coverage builds, allow all domains to access /data/misc/trace" into qt-dev
am: 72a75ffe19

Change-Id: I86d660a7402876aa9bfad72ef6c6e75771f376cd
2019-06-20 15:38:24 -07:00
Oliver Nguyen
72a75ffe19 Merge "In native coverage builds, allow all domains to access /data/misc/trace" into qt-dev 2019-06-20 19:07:41 +00:00
Kevin Chyn
741f8214cb Add rules to dump hal traces am: 6d976f4d5d
am: 20ca587019

Change-Id: Ia6bd656a5cfaf4f408178352a5c164e979ad4c74
2019-06-19 19:59:58 -07:00
Kevin Chyn
15ff564438 Add rules to dump hal traces
am: 6d976f4d5d

Change-Id: Ia0e7b39d215b9306b724135f7d888593f3c76aae
2019-06-19 19:06:04 -07:00
Kevin Chyn
20ca587019 Add rules to dump hal traces
am: 6d976f4d5d

Change-Id: I7077ceb75ff9e5c4d13acebbffe03089b9952a99
2019-06-19 18:39:21 -07:00
Pirama Arumuga Nainar
b65824642b In native coverage builds, allow all domains to access /data/misc/trace
Bug: http://b/135139675

Coverage files are written to /data/misc/trace (governed by the
method_trace_data_file selinux type).  Allow all domains to access
(create directories, access files) this directory when native coverage
is enabled (by setting NATIVE_COVERAGE to true) in an userdebug or eng
build.

Also relax neverallow constraints to allow access to
method_trace_data_file for native coverage builds.

Test: Build 32-bit cuttlefish with coverage:
          m NATIVE_COVERAGE=true COVERAGE_PATHS="*"
      and verify that there are no selinux denials in kernel log and
      logcat.

Change-Id: I3fe7c77612854b9de7de7a0ddd5cbf44a2f5c21e
(cherry picked from commit ce9c0c5a5f)
2019-06-19 16:27:17 -07:00
Kevin Chyn
6d976f4d5d Add rules to dump hal traces
Test: manual
Bug: 126802513

Change-Id: If037483f305e161a158e30f6322d5e25b7770952
2019-06-19 19:55:14 +00:00
Benjamin Schwartz
f324a869a7 Merge "Add power stats HAL to ANR list" into qt-r1-dev
am: 9af52722db

Change-Id: I94fb6bd5122593180359df4437689ab912e12f9c
2019-06-19 12:07:36 -07:00
TreeHugger Robot
9af52722db Merge "Add power stats HAL to ANR list" into qt-r1-dev 2019-06-19 18:53:05 +00:00
Benjamin Schwartz
8273f1915f Add power stats HAL to ANR list
Bug: 135111122
Test: Ran "adb shell am hang" and verified that power.stats HAL
information is in /data/anr/<anr_file>
Change-Id: I60a6191626a20c737124033e8ad453fa91425e39
2019-06-19 15:36:22 +00:00
Tao Bao
1520895967 Merge "Add persist.sys.theme." into qt-dev
am: 890dba4999

Change-Id: Ia747bf55b5275a8b05a3dbb971c82747b4292807
2019-06-18 20:25:32 -07:00
Tao Bao
a999e39423 Add persist.sys.theme.
This property will be set by system_server (to indicate the currently
selected theme for device), and can be accessed by vendor init.rc.

avc:  denied  { read } for property=persist.sys.theme pid=0 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:theme_prop:s0 tclass=file

Bug: 113028175
Test: Set a vendor init trigger that waits on `persist.sys.theme`. Check
      that the trigger fires without denial.
Change-Id: Ia85b1a8dfc118efdbb9337ca017c8fb7958dc386
Merged-In: Ibb4e392d5059b76059f36f7d11ba82cd65cbe970
(cherry picked from commit 75182a1ea6)
2019-06-18 17:36:21 -07:00
Tao Bao
890dba4999 Merge "Add persist.sys.theme." into qt-dev 2019-06-19 00:36:03 +00:00
Hridya Valsaraju
351f85a4ee Add permission required by libdm_test
am: 9bb71537ac

Change-Id: I18326abc7713f95ee027e476a96ce32905a9525f
2019-06-17 21:15:34 -07:00
Hridya Valsaraju
9bb71537ac Add permission required by libdm_test
This CL fixes the following denials during libdm_test
that is part of VTS.

avc: denied { read } for comm="loop1" path=2F6D656D66643A66696C655F32202864656C6574656429
dev="tmpfs" ino=97742 scontext=u:r:kernel:s0 tcontext=u:object_r:appdomain_tmpfs:s0
tclass=file permissive=0
W loop1   : type=1400 audit(0.0:371): avc: denied { read } for
path=2F6D656D66643A66696C655F32202864656C6574656429 dev="tmpfs" ino=97742 scontext=u:r:kernel:s0
tcontext=u:object_r:appdomain_tmpfs:s0 tclass=file permissive=0

Bug: 135004816
Test: adb shell libdm_test
Change-Id: Ifb6d58ee6f032cdf3952a05667aa8696d6e2a2fa
2019-06-17 22:46:03 +00:00
Tao Bao
75182a1ea6 Add persist.sys.theme.
This property will be set by system_server (to indicate the currently
selected theme for device), and can be accessed by vendor init.rc.

avc:  denied  { read } for property=persist.sys.theme pid=0 uid=0 gid=0 scontext=u:r:vendor_init:s0 tcontext=u:object_r:theme_prop:s0 tclass=file

Bug: 113028175
Test: Set a vendor init trigger that waits on `persist.sys.theme`. Check
      that the trigger fires without denial.
Change-Id: Ibb4e392d5059b76059f36f7d11ba82cd65cbe970
2019-06-17 10:48:21 -07:00
Jeff Vander Stoep
b4ad398ca9 Merge "system_server_startup: allow SIGCHLD to zygote" into qt-dev
am: 6dc831d2fb

Change-Id: I1f83d7940955d3c20bc025f106cd9580a5811d7f
2019-06-15 17:45:03 -07:00
TreeHugger Robot
6dc831d2fb Merge "system_server_startup: allow SIGCHLD to zygote" into qt-dev 2019-06-16 00:29:00 +00:00
Jeff Vander Stoep
e0d9e50c96 system_server_startup: allow SIGCHLD to zygote
avc: denied { sigchld } for comm="main"
scontext=u:r:system_server_startup:s0 tcontext=u:r:zygote:s0
tclass=process permissive=0

Test: build
Bug: 134496658
Change-Id: I98c106b17ba1740f953c3108bd0fc927c150096f
(cherry picked from commit 67dc274f87)
2019-06-14 16:56:05 -07:00
Ryan Savitski
72f247f5ff userdebug: support perfetto traces as a section in incident reports
This set of patches adds a way for the perfetto command line client to
save a trace to a hardcoded location,
/data/misc/perfetto-traces/incident-trace, and call into incidentd to
start a report, which will include said trace in a new section.

This is not a long-term solution, and is structured to minimize changes
to perfetto and incidentd. The latter is currently architected in a way
where it can only pull pre-defined information out of the system, so
we're resorting to persisting the intermediate results in a hardcoded
location.

This will introduce at most two more linked files at the same time.

Bug: 130543265
Bug: 134706389
Tested: manually on crosshatch-userdebug
Merged-In: I2aa27e25f0209b3a5cdf5d550d0312693932b808
Change-Id: I2aa27e25f0209b3a5cdf5d550d0312693932b808
(cherry picked from commit ce3a33ff18)
2019-06-07 16:59:49 +01:00
Tri Vo
6cbe828e13 Reland "Add 29.0 mapping files" am: 50aa029f4b
am: 5d1701a3ee

Change-Id: Ibdfcb99c0a49eca4107ea19e06e480d9a893a34a
2019-06-02 18:14:46 -07:00
Tri Vo
50aa029f4b Reland "Add 29.0 mapping files"
Steps taken to produce the mapping files:

1. Add prebuilts/api/29.0/[plat_pub_versioned.cil|vendor_sepolicy.cil]
plat_pub_versioned.cil contains all public attributes and types from Q
Leave vendor_sepolicy.cil is empty.

2. Add new file private/compat/29.0/29.0.cil by doing the following:
- copy /system/etc/selinux/mapping/29.0.cil from pi-dev aosp_arm64-eng
device to private/compat/29.0/29.0.cil
- remove all attribute declaration statement (typeattribute ...) and
sort lines alphabetically
- some selinux types were added/renamed/deleted w.r.t 29 sepolicy.
Find all such types using treble_sepolicy_tests_29.0 test.
- for all these types figure out where to map them by looking at
28.0.[ignore.]cil files and add approprite entries to 29.0.[ignore.]cil.

This change also enables treble_sepolicy_tests_29.0 and installs
29.0.cil mapping file onto the device.

Bug: 133155528
Bug: 133196056
Test: m treble_sepolicy_tests_29.0
Test: m 29.0_compat_test
Test: m selinux_policy
Change-Id: I9e83e9bf118c8b8f8fcf84d5c0dcb6eb588e0d55
2019-06-01 17:20:34 -07:00
Tri Vo
336d0fed4e Reland "Fake 29.0 sepolicy prebuilts"
I took current AOSP policy as base, then removed sepolicy so that the
set of type and attributes was a subset of types and attributes in Q
sepolicy, with exception of those that have not yet been cleand up in
current AOSP:

mediaswcodec_server
netd_socket
mediaextractor_update_service
thermalserviced
thermalserviced_exec

Bug: 133196056
Test: n/a
Change-Id: I863429d61d3fad0272c1d3f1e429cd997513a74a
Merged-In: I3e091652fa8d1757b1f71f7559186d5b32f000d5
2019-06-01 17:20:18 -07:00
Tri Vo
9c253a7a5a Merge "Revert "Add 29.0 mapping files"" am: 6d47c27458
am: a0f8c64834

Change-Id: Ia077642a42c86a970335e97b4129b637ce2c9a9f
2019-05-28 18:29:16 -07:00
Tri Vo
6d47c27458 Merge "Revert "Add 29.0 mapping files"" 2019-05-29 01:12:15 +00:00
Tri Vo
bf5ef59e10 Merge "Revert "DO NOT MERGE Fake 29.0 sepolicy prebuilts"" 2019-05-29 01:12:15 +00:00
Tri Vo
8043136f7f Revert "Add 29.0 mapping files"
This reverts commit 5702e9d758.

Reason for revert: breaks build

Change-Id: I2a1772545ec4aae8723ecce93c9bf9d49e905986
2019-05-29 01:10:07 +00:00
Tri Vo
9ea0af1e9a Revert "DO NOT MERGE Fake 29.0 sepolicy prebuilts"
This reverts commit bc8dc3aa9d.

Reason for revert: breaks build

Change-Id: I4163392f3a0f56add59d0d2a1d2695cee09cc32e
2019-05-29 01:09:16 +00:00
Tri Vo
f8433484fa Merge changes from topic "29_mapping" am: da3fbc60cc
am: c00dd3a1ea

Change-Id: Ia075ae7e61a73d244ab03678238240cd5617b556
2019-05-28 17:17:57 -07:00
Tri Vo
c00dd3a1ea Merge changes from topic "29_mapping"
am: da3fbc60cc

Change-Id: I4bc844582f8825496b92b9adc7477c21bf460905
2019-05-28 17:13:58 -07:00
David Anderson
51fae66027 Allow init to mkdir inside /data/gsi.
Bug: 133435561
Test: adb shell gsi_tool install
Change-Id: Iaa610c72d8098e157bb89e321624369f86f4ea19
Merged-In: Iaa610c72d8098e157bb89e321624369f86f4ea19
2019-05-28 13:42:42 -07:00
Tri Vo
5702e9d758 Add 29.0 mapping files
Steps taken to produce the mapping files:

1. Add prebuilts/api/29.0/[plat_pub_versioned.cil|vendor_sepolicy.cil]
plat_pub_versioned.cil contains all public attributes and types from Q
Leave vendor_sepolicy.cil is empty.

2. Add new file private/compat/29.0/29.0.cil by doing the following:
- copy /system/etc/selinux/mapping/29.0.cil from pi-dev aosp_arm64-eng
device to private/compat/29.0/29.0.cil
- remove all attribute declaration statement (typeattribute ...) and
sort lines alphabetically
- some selinux types were added/renamed/deleted w.r.t 29 sepolicy.
Find all such types using treble_sepolicy_tests_29.0 test.
- for all these types figure out where to map them by looking at
28.0.[ignore.]cil files and add approprite entries to 29.0.[ignore.]cil.

This change also enables treble_sepolicy_tests_29.0 and installs
29.0.cil mapping file onto the device.

Bug: 133155528
Bug: 133196056
Test: m treble_sepolicy_tests_29.0
Test: m 29.0_compat_test
Test: m selinux_policy
Change-Id: I59f6251e9baa6527a358dec024e9fae62388db2b
2019-05-26 14:28:40 -07:00
Tri Vo
bc8dc3aa9d DO NOT MERGE Fake 29.0 sepolicy prebuilts
I took current AOSP policy as base, then removed sepolicy so that the
set of type and attributes was a subset of types and attributes in Q
sepolicy, with exception of those that have not yet been cleand up in
current AOSP:

mediaswcodec_server
netd_socket
mediaextractor_update_service
thermalserviced
thermalserviced_exec

Bug: 133196056
Test: n/a
Change-Id: I2cbe749777684146114c89e1e6fc3f07400c0ae5
2019-05-26 14:19:26 -07:00
Alistair Strachan
4cd2db897d Merge "Fix selinux denials when applying updates in recovery." into qt-dev 2019-05-24 17:50:56 +00:00
Anton Hansson
3236d886e3 Merge "sepolicy: Add policy for migrate_legacy_obb_data.sh" into qt-dev
am: 097f48c810

Change-Id: Id7d5d98047f69f55d60bc8b8c4769e7f191ab7d7
2019-05-24 04:24:54 -07:00
Anton Hansson
097f48c810 Merge "sepolicy: Add policy for migrate_legacy_obb_data.sh" into qt-dev 2019-05-24 11:06:50 +00:00
Pawin Vongmasa
e7e6fffb86 Merge "Properly define hal_codec2 and related policies" into qt-dev
am: cf48bfd082

Change-Id: I974ad8ddfa1c1ec9bacc120e6f892ed0e760df57
2019-05-24 00:33:45 -07:00
TreeHugger Robot
cf48bfd082 Merge "Properly define hal_codec2 and related policies" into qt-dev 2019-05-24 07:21:23 +00:00
Max Dashouk
d0482ba4ba Allows StatsCompanionService to pipe data to statsd.
Bug: 132444397
Test: manually tested with ag/7555609

Change-Id: I9e5f0a9d501a6728af3f27241300b3bb5c5c2123
Merged-In: I9e5f0a9d501a6728af3f27241300b3bb5c5c2123
(cherry picked from commit febfa8f22d)
2019-05-23 20:35:34 +00:00
David Anderson
115aafa7ab Fix selinux denials when applying updates in recovery.
These lines are copied from update_engine.te, and are needed to update
dynamic partitions in recovery.

Bug: 132943965
Test: sideload OTA on cuttlefish
Change-Id: Id03a658aac69b8d20fa7bb758530a4469c75cf9c
Merged-In: Id03a658aac69b8d20fa7bb758530a4469c75cf9c
2019-05-23 13:20:03 -07:00
Narayan Kamath
0574e4cdab sepolicy: Add policy for migrate_legacy_obb_data.sh
.. and let installd execute it. Required to migrate legacy obb contents

Bug: 129167772
Test: make

Change-Id: I35d35016680379e3a9363408704ee890a78a9748
2019-05-23 17:26:08 +01:00
Pawin Vongmasa
609c243dd0 Properly define hal_codec2 and related policies
Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice

Bug: 131677974
Change-Id: I59c3d225499a8c53c2ed9f3bd677ff3d7423990b
2019-05-23 03:53:47 -07:00
Tri Vo
2a510b9d98 Merge "sepolicy: allow hal_omx to access audio devices" into qt-dev
am: ab2e89a695

Change-Id: I13ba841855501390680b242e2c08bd369956f7dc
2019-05-22 16:15:40 -07:00
Tri Vo
ab2e89a695 Merge "sepolicy: allow hal_omx to access audio devices" into qt-dev 2019-05-22 21:49:49 +00:00
Alec Mouri
264eff1efe Merge "Add support_kernel_idle_timer to sepolicy" into qt-dev
am: 63ab8cd63c

Change-Id: I3edcc2b1c2e49d7222d9a90a90832ca67f9b06df
2019-05-22 14:29:22 -07:00
Tao Bao
2f205a5519 Merge changes from topic "darkboot-sepolicy" into qt-dev
am: 0ad88f096a

Change-Id: Ia3ab63ac9a6c32cdf8764d08dacab3e938cf1e3e
2019-05-22 14:28:15 -07:00
Tao Bao
60f509097a Add persist.sys.device_provisioned change to API 29 prebuilts.
am: ab8db0999c

Change-Id: Iff1c05b9144d6cbb1b2c25d60952bb78a3b0a161
2019-05-22 14:27:07 -07:00
TreeHugger Robot
63ab8cd63c Merge "Add support_kernel_idle_timer to sepolicy" into qt-dev 2019-05-22 18:47:52 +00:00
Tao Bao
0ad88f096a Merge changes from topic "darkboot-sepolicy" into qt-dev
* changes:
  Add vendor_misc_writer change to API 29 prebuilts.
  Add vendor_misc_writer.
  Add persist.sys.device_provisioned change to API 29 prebuilts.
  Set persist.sys.device_provisioned vendor-init-readable.
2019-05-22 18:35:19 +00:00
Vignesh Kulothungan
ce9fc89865 sepolicy: allow hal_omx to access audio devices
hal_omx needs to access audio devices to use OMX HW decoders and
encoders. Allow hal_omx to access audio devices.

authored-by: Banajit Goswami <bgoswami@codeaurora.org>

Bug: 133224154
Change-Id: I742c29c4105e5647ca1a7e017e311559a0567b52
(cherry picked from commit 155ca12879)
2019-05-22 10:35:16 -07:00
TreeHugger Robot
41372ad8b8 Merge "atrace: debug: allow notifying camera HAL of a change in sysprops" into qt-dev 2019-05-22 16:48:22 +00:00
Nikita Ioffe
84044e5078 selinux: Allow dumpstate send signals to vold
am: f7c3d19d29

Change-Id: I998299e0adfa91d7f6841a9c2bec5542562d9ff0
2019-05-21 13:40:41 -07:00
TreeHugger Robot
dc42fed227 Merge "Allow init to set context for super_block_device" into qt-dev 2019-05-21 20:10:56 +00:00
Hridya Valsaraju
6d66c0214f Allow init to set context for super_block_device
Fixes the following denial during boot:

[    1.358156] selinux: SELinux: Could not set context for
/dev/block/platform/soc/1d84000.ufshc/by-name/super:  Permission denied\x0a
[    1.358275] audit: type=1400 audit(951562.676:7):
avc:  denied  { relabelto } for  pid=1 comm="init" name="super"
dev="tmpfs" ino=17657 scontext=u:r:init:s0 tcontext=u:object_r:super_block_device:s0
tclass=lnk_file permissive=0

Bug: 124410201
Test: make
Change-Id: Ib6752b8a6ae4211ba8c0a7417295b8144a2fed67
Merged-In: Ib6752b8a6ae4211ba8c0a7417295b8144a2fed67
2019-05-21 16:53:39 +00:00
Tao Bao
e618874192 Add vendor_misc_writer change to API 29 prebuilts.
This is a matching change for commit 8f39cce73a ("Add
vendor_misc_writer."), which updates the prebuilts for API 29.

Bug: 132906936
Test: Build crosshatch that includes misc_writer module. Invoke
      /vendor/bin/misc_writer to write data to /misc.
Change-Id: Id12a1ed45c8cef6e4039a9dda6a1fb41f9e014de
2019-05-21 07:11:36 -07:00
Tao Bao
ab8db0999c Add persist.sys.device_provisioned change to API 29 prebuilts.
This is a matching change for commit 97d4561941 ("Set
persist.sys.device_provisioned vendor-init-readable."), which updates
the prebuilts for API 29.

Bug: 131702833
Bug: 132906936
Test: Set an init trigger that waits on `persist.sys.device_provisioned`.
      Check that there's no longer a denial.
Change-Id: I2cea3d000b7faa471fa524dcd7a3d4843ae5960f
2019-05-21 07:04:37 -07:00
Nikita Ioffe
f7c3d19d29 selinux: Allow dumpstate send signals to vold
Test: adb bugreport
Test: verified vold stacktrace is present in bugreport
Bug: 132344997
Change-Id: I0ebf7f171d854b9aaf894ccb8c7a5f68f18e692b
2019-05-21 13:03:55 +01:00
Alec Mouri
2e4dd2b6f2 Add support_kernel_idle_timer to sepolicy
Bug: 130684082
Test: boots
Change-Id: I7ee84a5ff1024162037634d6f5efe7b09557e18a
2019-05-20 10:34:40 -07:00
Ryan Savitski
37f0662413 atrace: debug: allow notifying camera HAL of a change in sysprops
Similar to aosp/961857, but enables the logging of atrace events from
the camera HAL (primarily HIDL interactions, but also a couple of ION
events).

Keeping it confined to userdebug_or_eng. Longer-term planning belongs on
b/78136428.

Not adding fwk_camera_hwservice, as it is a HIDL interface to
cameraserver (which is already covered above).

Plus slight reorganization of existing atrace.te contents, and donaudits
to reduce logspam from denials (including pre-existing ones that were
hitting the rate limiter).

Specific denials addressed (listing HALs, finding camera HAL, notifying it):
05-15 18:07:19.684   618   618 E SELinux : avc:  denied  { list } for  scontext=u:r:atrace:s0 tcontext=u:r:hwservicemanager:s0 tclass=hwservice_manager permissive=1
05-15 18:07:19.701   618   618 E SELinux : avc:  denied  { find } for interface=android.hardware.camera.provider::ICameraProvider sid=u:r:atrace:s0 pid=10137 scontext=u:r:atrace:s0 tcontext=u:object_r:hal_camera_hwservice:s0 tclass=hwservice_manager permissive=1
05-15 18:07:19.698 10137 10137 I atrace  : type=1400 audit(0.0:273): avc: denied { call } for scontext=u:r:atrace:s0 tcontext=u:r:hal_camera_default:s0 tclass=binder permissive=1

Bug: 130543265
Tested: flashed blueline-userdebug, took a trace with perfetto, confirmed HIDL atrace slices present in camera hal trace.
Merged-In: I0f8ce989355603e41d6c05c3de07e7dd615555eb
Change-Id: I0f8ce989355603e41d6c05c3de07e7dd615555eb
(cherry picked from commit 19459a3802)
2019-05-19 16:50:59 +01:00
Ady Abraham
24f80d1d50 Merge "Add ro.surface_flinger.set_touch_timer_ms to sepolicy" into qt-dev
am: 676d9590f4

Change-Id: Iee0fd3f4844b21faabca2a25a1d045afe622424d
2019-05-17 10:45:51 -07:00
Ady Abraham
676d9590f4 Merge "Add ro.surface_flinger.set_touch_timer_ms to sepolicy" into qt-dev 2019-05-17 17:20:12 +00:00
Ady Abraham
a6ba39bde1 Add ro.surface_flinger.set_touch_timer_ms to sepolicy
Test: set ro.surface_flinger.set_touch_timer_ms from init
Bug: 131906818
Change-Id: If489ae4ac993984305f764fb172014f42c41df67
2019-05-16 14:07:32 -07:00
Ryan Savitski
fb897428f6 atrace.te: allow notifying cameraserver of a change in sysprops
This allows the atrace cmd to notify cameraserver (the host of
media.camera service) that the set of tracing-related system properties
have changed. This allows the cameraserver to notice that it might need
to enable its trace events.

The atrace cmd has the necessary permission when running as shell, but
not when it is running as the "atrace" domain (notably when exec'd by
perfetto's traced_probes).

We're adding cameraserver to the whitelist as it contains important
events for investigating the camera stack.

Example denial:
05-14 22:29:43.501  8648  8648 W atrace  : type=1400 audit(0.0:389): avc: denied { call } for scontext=u:r:atrace:s0 tcontext=u:r:cameraserver:s0 tclass=binder permissive=0

Tested: flashed blueline-userdebug, captured a perfetto trace with "camera" atrace category, confirmed that userspace atrace events are included in the trace.
Bug: 130543265
Merged-In: Ifd3fd5fd3a737c7618960343b9f89d3bf7141c94
Change-Id: Ifd3fd5fd3a737c7618960343b9f89d3bf7141c94
(cherry picked from commit 232295e8db)
2019-05-16 14:45:55 +01:00
Ian Pedowitz
94b7372534 SEPolicy Prebuilts for Q
Bug: 129943426
Test: Build
Change-Id: I3e091652fa8d1757b1f71f7559186d5b32f000d5
2019-05-14 21:42:22 -07:00