Commit graph

90 commits

Author SHA1 Message Date
Shawn Willden
c5fdb59287 Add sepolicy for Trusty keymint
Bug: 177729159
Test: VtsAidlKeyMintTargetTest on P21
Change-Id: I993faa2a829d3ad4f1b920ff59ba4fd5ef8e7db7
2021-05-25 16:37:29 -06:00
iayara
53aff191d2 Transition to using libedgetpu_util.so instead of libedgetpu_darwinn2.so.
bug: b/182303547

Change-Id: Ia84e63fdfdeac5094752dfe9de84b75bd56aa131
2021-05-20 00:10:01 +00:00
Tri Vo
6a558ac02b Merge "Fix file_contexts path for trusty_metricsd" into sc-dev 2021-05-18 22:18:39 +00:00
Tri Vo
970f15b13d Fix file_contexts path for trusty_metricsd
Bug: 188417701
Bug: 173423860
Test: trusty_metricsd starts
Change-Id: I212c2d449441ac4b9238c8f7171982b253d4b6e0
2021-05-18 19:39:42 +00:00
Yu-Chi Cheng
8ebeb48b39 Merge "Renamed edgetpu_service to edgetpu_app_service." into sc-dev 2021-05-18 19:13:21 +00:00
Roger Fang
834331af79 Merge changes from topic "IAudioMetricExt@1.0" into sc-dev
* changes:
  sepolicy: gs101: add IAudioMetricExt settings
  Add permission to access audiometricext hal for grilservice_app
2021-05-18 17:21:48 +00:00
Kevin DuBois
811dbd6611 Merge "sepolicy: update gpu nnhal file" into sc-dev 2021-05-18 15:07:05 +00:00
Roger Fang
9de2688cd4 sepolicy: gs101: add IAudioMetricExt settings
E init    : Could not start service 'audiometricext' as part of class 'hal': File /vendor/bin/hw/vendor.google.audiometricext@1.0-service-vendor(labeled "u:object_r:vendor_file:s0")

vendor.google.a: type=1400 audit(0.0:3): avc: denied { read } for name="u:object_r:hwservicemanager_prop:s0" dev="tmpfs" ino=188 scontext=u:r:hal_audiometricext_default:s0 tcontext=u:object_r:hwservicemanager_prop:s0 tclass=file permissive=1

E SELinux : avc:  denied  { find } for interface=vendor.google.audiometricext::IAudioMetricExt sid=u:r:hal_audiometricext_default:s0 pid=819 scontext=u:r:hal_audiometricext_default:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=1

E SELinux : avc:  denied  { add } for interface=android.hidl.base::IBase sid=u:r:hal_audiometricext_default:s0 pid=795 scontext=u:r:hal_audiometricext_default:s0 tcontext=u:object_r:hidl_base_hwservice:s0 tclass=hwservice_manager permissive=1

Bug: 180627405
Test: manually test passed
Signed-off-by: Roger Fang <rogerfang@google.com>
Change-Id: I91d76eb0ad5850e75ad865304d83f3025b981915
2021-05-18 05:06:58 +00:00
Yu-Chi Cheng
e8ee41f9af Renamed edgetpu_service to edgetpu_app_service.
edgetpu_service was splitted into two in previous change:
edgetpu_service and edgetpu_vendor_service, where the new
vendor service for vendor clients, and the old service keeps
serving app clients.

This change updated the SELinux policy to rename the edgetpu_service
into edgetpu_app_service to make the purpose clearer.

Bug: 188463446
Test: Oriole + GCA
Change-Id: I3a133319edc84fc02ef211934d0542575580da14
2021-05-17 15:38:24 -07:00
Quinn Yan
d2558a05b3 Merge "Add the TPU AIDL NNAPI HAL to the sepolicy." into sc-dev 2021-05-14 20:15:37 +00:00
Kevin DuBois
82408c931b sepolicy: update gpu nnhal file
GPU nnhal needed a file update when update upgrading to 1.3 revision,
modify this so the device uses all the 1.2 rules.

Fixes: 187981206
Test: make sure hal starts
Change-Id: Ie1054fc092f1aa459cd36b6eb0f0a1a5cc032dbc
2021-05-14 10:55:25 -07:00
qinyiyan
989855def7 Add the TPU AIDL NNAPI HAL to the sepolicy.
Test: Created Forrest build and flashed to phone.
Bug: 187846367
Change-Id: I3ada9ecf3f94a594185049ddb95f13a6853841ba
2021-05-13 22:23:48 -07:00
jonerlin
cb3f59b89e bthal: allow bthal to access bluetooth kernel driver logbuffer_btlpm
and logbuffer_btuart device node

* add sepolicy rules to let bthal can access bluetooth kernel device
  nodes dev/logbuffer_btlpm and dev/logbuffer_tty16 in engineer
  or user debug build

Bug: 177794127
Test: Manually
Change-Id: I5253719df82ca7ef8e64cbd3f2b0ff6d3f088edc
2021-05-12 13:27:40 +08:00
Tri Vo
f7bec8b3c6 Merge "trusty: sepolicy for metrics reporter" into sc-dev 2021-05-06 15:52:51 +00:00
TreeHugger Robot
577f562727 Merge "wlc fwupdate implementation" into sc-dev 2021-05-06 05:41:01 +00:00
Alex Hong
be17ec14cc Merge "sepolicy: Update dumpstate HAL to V1.1" into sc-dev 2021-05-05 06:09:11 +00:00
Tri Vo
1dac39e833 trusty: sepolicy for metrics reporter
Bug: 173423860
Test: m
Change-Id: I42d646c6c9453662e670e7c22712f2bde2368bba
2021-05-05 05:38:34 +00:00
Chris Kuiper
d0d0304443 Merge "sepolicy: gs101: allow usf_reg_edit to run" into sc-dev 2021-05-04 22:33:57 +00:00
Yu-Chi Cheng
7eef8643a3 Merge "Added the SELinux rule for the EdgeTPU vendor service." into sc-dev 2021-05-04 19:39:32 +00:00
Yu-Chi Cheng
b844190a34 Added the SELinux rule for the EdgeTPU vendor service.
To comply with the GSI compliance test, this change
splits the compiler part of the edgetpu_service into a
separate edgetpu_vendor_service under vendor.

The edgetpu_service locates under /system_ext/ and used
to be connected by both applications and vendor clients.
With this change, vendor clients could talk to the vendor
part of this service directly without having to cross
the system and vendor boundary.

Applications will still talk to the system_ext one, which
will forward the requests to the vendor service.

Bug: 185432427
Test: tested on Oriole + GCA.
Change-Id: I1ee47946f1fc3694d5f8b5325c192d6bd720a76e
2021-05-04 10:36:21 -07:00
Alex Hong
ea5b597e3d sepolicy: Update dumpstate HAL to V1.1
Test: $ make selinux_policy
      Check the label after boot completed
Bug: 186539439
Change-Id: I6690e2bc485aceb53dc607b8a7656a4f57edf70e
2021-05-04 17:11:07 +08:00
Ted Lin
69c8212a41 wlc fwupdate implementation
Fix sepolicy problems.

Bug: 183465596
Test: logcat/dmesg grep wlc.
Signed-off-by: Ted Lin <tedlin@google.com>
Change-Id: I834f4d83f822b8189a576ac198bae9a7d77a3e10
2021-05-04 02:09:32 +00:00
Daniel Mentz
2fb432f08c Remove /vendor/lib/modules from file_contexts
Vendor kernel modules were moved to /vendor_dlkm/lib/modules. Let's
remove the old directory /vendor/lib/modules from file_contexts.

Bug: 185184472
Bug: 186777291
Change-Id: I38f1b25cb2d73a804f1cdb113edc9b11f8e516f7
2021-05-03 18:16:05 -07:00
Chris Kuiper
db03875ebe sepolicy: gs101: allow usf_reg_edit to run
Provide necessary permissions to run usf_reg_edit from bugreport.

Bug: 187081112
Test: Run "adb bugreport <zip>" and verify it contains the output
      from "usf_reg_edit save -".
Change-Id: Iade132d93105d461d51273d19fe570d48cce46fe
2021-05-03 16:34:58 -07:00
Daniel Mentz
a3c0b2ba9e Revert "remove wildcard on kernel modules"
This reverts commit a346a7fa34.

Let's move back to wildcards for kernel modules. This better supports
kernel pre-submit testing and local kernel development where the script
build.sh from the kernel repo is used to create the vendor_dlkm parition
image.  With build.sh, the path to a .ko file includes the kernel
version as well as additional directory components like "extra/" that
describe where in the kernel source key the module is located. Example:

/vendor_dlkm/lib/modules/5.10.33-g2f01cf4c7282-dirty/extra/ftm5.ko

Bug: 185184472
Bug: 186777291
Change-Id: I32f85dae7ca60d9063ad6c63f21ffdaecbb66039
2021-05-03 15:38:56 -07:00
Eddie Lan
2d4071ca8c Merge "Add sepolicy for fpc AIDL HAL" into sc-dev 2021-05-03 03:48:40 +00:00
Anthony Stange
836f25d64b Update gs101 sepolicy for contexthub HAL
Bug: 168941570
Test: Load nanoapp via HAL
Change-Id: If133a3290e4fc02677523d737980ee5944885c36
2021-04-29 16:59:36 +00:00
Chris Fries
2d2adb3e56 Fix android.hardware.drm@1.4-service.clearkey label
Bug: 186617617
Change-Id: Icad8008686ef57d4b6c3fca27af41e2b2991f74f
2021-04-28 14:40:02 -05:00
Roger Fang
66634d4d20 sepolicy: gs101: allows pixelstat to access audio metrics nodes
audio.service: type=1400 audit(0.0:30): avc: denied { read write } for name="amcs" dev="tmpfs" ino=739 scontext=u:r:hal_audio_default:s0 tcontext=u:object_r:amcs_device:s0 tclass=chr_file permissive=0

pixelstats-vend: type=1400 audit(0.0:9): avc: denied { read } for name="speaker_impedance" dev="sysfs" ino=67611 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

HwBinder:696_2: type=1400 audit(0.0:8): avc: denied { open } for path="/dev/amcs" dev="tmpfs" ino=766 scontext=u:r:hal_audio_default:s0 tcontext=u:object_r:amcs_device:s0 tclass=chr_file permissive=0

Bug: 171854614
Test: manually test, no avc: denied.
Change-Id: I82ebd22f167200ab3cf59e6525ef43c0be8f722a
2021-04-28 10:52:06 +08:00
eddielan
09e529d78c Add sepolicy for fpc AIDL HAL
Bug: 185464439
Test: Build Pass
Change-Id: I7ac26b2bf50fdfc1d32fb88efc2bee07f0525b0c
2021-04-22 22:01:32 +08:00
Wenhao Wang
a16b1668be Merge "Fix selinux for RPMB daemon" into sc-dev 2021-04-20 17:20:50 +00:00
Tai Kuo
0e9abb4ef2 sepolicy: add cs40l26 haptics modules
Fix the following avc denial:
avc: denied { module_load } for comm="insmod" path="/vendor_dlkm/lib/modules/cl_dsp.ko" dev="overlay" ino=41 scontext=u:r:init-insmod-sh:s0 tcontext=u:object_r:vendor_file:s0 tclass=system permissive=1

Bug: 184610991
Test: Full built. Check if the avc denial was gone.
Signed-off-by: Tai Kuo <taikuo@google.com>
Change-Id: Ic41ea6a6add818bfdf95e71e20df77b9e06db6c1
2021-04-20 11:43:03 +00:00
Wenhao Wang
f5277482c1 Fix selinux for RPMB daemon
Secure persistent storage has been moved to persist root.
The corresponding pathes on SELinux policy has to be updated.

Bug: 173971240
Bug: 173032298
Test: Trusty storage tests
Change-Id: I0e7756f3b4d5c6be705a87e1d7d80247df1ec4bb
2021-04-20 13:01:23 +08:00
Adam Shih
99988c4c5f remove obsolete domains
Bug: 168013500
Test: Check that abox and rpmbd are not in ROM anywhere in oriole, raven user,
userdebug and factory ROM

Change-Id: Ie091a1036ba6c25a3c7f0ef0b8f69cc9fc4e306a
2021-04-19 11:14:54 +08:00
Jenny Ho
9ec58d031a Merge "Allow to dump pps-dc" into sc-dev 2021-04-15 10:26:57 +00:00
Charlie Chen
742daf873c Merge changes from topic "remove_video_system_heap" into sc-dev
* changes:
  Formatting file_contexts
  remove video_system_heap
2021-04-15 07:56:19 +00:00
Charlie Chen
01a33d0cb7 Formatting file_contexts
Test: Youtube playback, video recording, ExoPlayer playback
Bug: 181380463
Change-Id: I9eeb08987794336aafa7945a9d648a38f0e7989a
2021-04-15 11:08:10 +08:00
Taehwan Kim
9d20b97534 remove video_system_heap
Test: Youtube playback, video recording, ExoPlayer playback
Bug: 181380463
Signed-off-by: Taehwan Kim <t_h.kim@samsung.com>
Change-Id: If2aad557365755156e4c088048dc351bc66df281
2021-04-15 11:07:20 +08:00
Benjamin Schwartz
dde4b6bf1f Allow power stats HAL to read gnss stats
Bug: 181577366
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Iea8c332f9b73358e1a6464d69cbef6af4a603f84
2021-04-14 17:28:02 -07:00
Sidath Senanayake
7c8d4d86e8 Fix Android GPU Inspector (AGI) support
In order for AGI to work, it needs to dlopen the libgpudataproducer.so
shared object.

Bug: 185127179
Bug: 175593589
Change-Id: I9ad9c587f10e0fd6e27c4743c1d4cb85c896c41d
2021-04-12 17:41:01 +01:00
Ted Lin
cd12670940 Allow to dump pps-dc
Bug:185041587
Test: adb bugreport
Change-Id: Ia4adcc335b05f5f7d06625c274842e6a9f5d2637
Signed-off-by: Ted Lin <tedlin@google.com>
2021-04-12 18:27:20 +08:00
Jenny Ho
b94e7586ce Fix avc denied for maxfg_base/flip and wireless dump
Bug: 184780667
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: Ice4102cf541dc80c85beb05ad5c523a4306a77bc
2021-04-09 18:24:32 +08:00
Eddie Tashjian
5bbdd82a4e Merge "Add TCP dump permissions." into sc-dev 2021-04-08 18:25:30 +00:00
Craig Dooley
cd888e847f Merge "Fix SELinux errors with aocd" into sc-dev 2021-04-08 17:27:56 +00:00
Craig Dooley
3d4d9159c9 Fix SELinux errors with aocd
Add inotify support for /dev
Fix the aoc vendor property

Bug: 184173298
Change-Id: I40a71edd56b2d51f848085c43ae1d10a4c2c0c4b
2021-04-08 03:59:23 +00:00
Eddie Tashjian
b2fb9cdace Add TCP dump permissions.
Copy selinux policy for tcp dump binary from previous Pixel to support
TCP logging on P21 through PixelLogger.

Bug: 184777243
Test: Check PixelLogger TCP dump works.
Change-Id: Id958c8a3e6375a7aae569d6fc94deb9f8072b57b
2021-04-08 03:13:55 +00:00
Adam Shih
a346a7fa34 remove wildcard on kernel modules
Bug: 170786122
Test: Boot with all kernal modules loaded
Change-Id: I0d1d861af290181231223630497788c051c83ecb
2021-04-07 14:10:00 +08:00
Cheng Gu
72011a8a87 gs101-sepolicy: Allow rlsservice to access range sensor
Fix: 184295618
Test: rlsservice_test
Change-Id: Iee4cc5376e0eb67e75ae94cd15b5211a7ec819ef
2021-04-02 22:27:48 +00:00
Krzysztof Kosiński
8a1f0bed01 Mark libGralloc4Wrapper.so as same-process HAL.
Updating the library name after upgrade to gralloc version 4.

Bug: 178656396
Test: GCA on oriole
Change-Id: I638b3cd0d7f4759f89a62a1d102cc98d9a3db622
2021-04-01 22:21:44 -07:00
Charlie Chen
5602dfde45 SELinux error coming from mediacodec when using GCA and secure playback
Fixes the following denials:

avc: denied { read } for name="name" dev="sysfs" ino=63727 \
scontext=u:r:mediacodec:s0 tcontext=u:object_r:sysfs:s0 tclass=file \
permissive=0

avc: denied { read } for name="name" dev="sysfs" ino=63743 \
scontext=u:r:mediacodec:s0 tcontext=u:object_r:sysfs:s0 tclass=file \
permissive=0

avc: denied { read } for name="name" dev="sysfs" ino=64010 \
scontext=u:r:mediacodec:s0 tcontext=u:object_r:sysfs:s0 tclass=file \
permissive=0

avc: denied { search } for name="video6" dev="sysfs" ino=64587 \
scontext=u:r:mediacodec:s0 tcontext=u:object_r:sysfs_video:s0 \
tclass=dir permissive=0

Bug: 182525521
Bug: 184145552
Test: GCA recording works properly, \
      Netflix and ExoPlayer can play videos
Change-Id: Ib7220feedc5031fb0e5c05a2b487da2ddf8b98cd
2021-04-01 02:53:24 +00:00