Commit graph

123 commits

Author SHA1 Message Date
Ankit Goyal
0f9820830c Add SE policies for memtrack HAL
Bug: 191966412
Test: adb shell dumpsys meminfo
Change-Id: Ia7ec64840d2bb7c3ae0d61304e109d2ceb9e5f78
2021-07-24 02:18:36 +08:00
Petri Gynther
d12714ccc0 Add vbmeta_vendor_[ab] to file_contexts
Bug: 181909612
Test: build + install + boot to home
Change-Id: Ibb7bd8e5a61d86de1b51a3780a5bfa8cf4caf59b
2021-07-20 23:41:31 -07:00
TreeHugger Robot
f8b8e0cb53 Merge "Add cpm/pca9468 logbuffer directories so that bugreports can take a snapshot" into sc-dev 2021-07-19 20:54:38 +00:00
Andrew LeCain
ff13d1adee Merge "sepolicy allow fingerprint hal to read mfg_data" into sc-dev 2021-07-19 17:46:18 +00:00
Stephane Lee
022b61751e Add cpm/pca9468 logbuffer directories so that bugreports can take a snapshot
Test: adb bugreport; check "dumpstate_board.txt"
Bug: 193894298
Change-Id: I222405ab6d78bd4367a91cc0f13b8d8a0f1ca578
2021-07-16 16:27:42 -07:00
Alex Hong
ea6934fda9 Merge "sepolicy: gs101: support tetheroffload hal version 1.y" into sc-dev 2021-07-16 06:28:32 +00:00
Namkyu Kim
4055c31faf sepolicy: gs101: support tetheroffload hal version 1.y
Support both 1.0 and 1.1.

Bug: 186539538
Test: run vts -m VtsHalTetheroffloadControlV1_0TargetTest
      run vts -m VtsHalTetheroffloadControlV1_1TargetTest

Signed-off-by: Namkyu Kim <namkyu78.kim@samsung.com>
Change-Id: I76a26dcd22e1c8985d470a39b9aeae618f459d00
2021-07-16 04:05:21 +00:00
Stephane Lee
ea6996bc52 Merge "odpm: Rename the odpm_config sepolicies to be more consistent" into sc-dev 2021-07-16 01:55:33 +00:00
Andrew LeCain
d8d8580281 sepolicy allow fingerprint hal to read mfg_data
declares new device context for mfg_data_block_device
give fp HAL permission to read/write/open
give fp HAL permission to search block_device dir

Bug: 189135413
Test: sideload calibration in enforcing mode.
Change-Id: I19e0cd13fc452b42c3f35772c4bafd433dbcc8b1
2021-07-15 10:58:53 -07:00
Darren Hsu
3050ed8ed9 Set sepolicy for shell script of disabling contaminant detection
The avc denials are listed in b/192208389#comment10.

Bug: 192208389
Test: Manually tested
Change-Id: Ib2e3cf498851c0c9e5e74aacc9bf391549c0ad1a
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2021-07-15 11:11:11 +08:00
Stephane Lee
c7342a7824 odpm: Rename the odpm_config sepolicies to be more consistent
Test: Ensure that there are no sepolicy errors on odpm_config
Bug: 192674986
Change-Id: I3043a544511c8c3051e1bd10e9f6b668b251cf5f
2021-07-14 16:11:51 -07:00
Maciej Żenczykowski
714075eba7 add sepolicy for set_usb_irq.sh
Bug: 185092876
Test: TreeHugger, booted on oriole, enabled/disabled tethering
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I7361a4390197e04b27eaf153a696e3f800f79b55
2021-07-07 16:22:33 +00:00
Adam Shih
99bfde4f38 Merge "modularize dmd" into sc-dev 2021-06-25 01:12:50 +00:00
Adam Shih
9b0b96b907 Merge "modularize pktrouter" into sc-dev 2021-06-24 07:24:45 +00:00
Adam Shih
8b326703e1 modularize dmd
Bug: 190331463
Test: build ROM and make sure dmd is launched
Change-Id: If1e51b6bc100e870a15a40f5e0d93a75fe68bac3
2021-06-24 14:17:29 +08:00
Denny cy Lee
0b21a2d44a Pixelstat: battery history access premission
Test: manually, relate seploicy not show; battery history log printed
      05-24 13:29:19.637  2829  2829 D pixelstats_BatteryEEPROM:
      checkAndReport: 0940 0a80 0500 0200 0200 0000
Bug: 189050725
Change-Id: I20567e168db43fe2168a9a30ac7a4b0cec65a665
Signed-off-by: Denny cy Lee <dennycylee@google.com>
2021-06-23 13:50:32 +08:00
Adam Shih
a70819d2f0 modularize pktrouter
Bug: 190331212
Test: make sure pktrouter gets initialized
06-23 13:21:19.372  1 1 I init : Parsing file /vendor/etc/init/pktrouter.rc...
06-23 13:21:23.510     1     1 I init    : processing action (vendor.pktrouter=1) from (/vendor/etc/init/pktrouter.rc:7)
06-23 13:21:23.510     1     1 I init    : starting service 'pktrouter'...
Change-Id: Icc7ab88505aea47cfed5ffc5182d0625b7a7609d
2021-06-23 05:24:01 +00:00
Adam Shih
d74e989739 modulize init.radio.sh
Bug: 190331600
Test: build ROM and make sure the file is there and functional.
Change-Id: Icb3e0e590ae315d53eb5251fd5e74d6aacab1fe2
2021-06-23 01:07:26 +00:00
Adam Shih
d77bc5a970 organize confirmationui settings
Bug: 190331547
Bug: 190331370
Test: build ROM and make sure file and sepolicy is still there
Change-Id: I4cabf9280ab5e21038bcb72615799b7ed0fb1670
2021-06-18 12:56:05 +08:00
Badhri Jagan Sridharan
eb3881dbe7 Add file context for /dev/logbuffer_tcpm
/dev/logbuffer_tcpm gets accessed by dumpstate while bugreport
generation.

Bug: 189792358
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: Ica0f3557ad9c41844f8411b0bdf68d66fbba00e5
2021-06-17 16:11:28 -07:00
Adam Shih
2cdde93f15 Merge "remove vcd from user ROM" into sc-dev 2021-06-16 06:40:28 +00:00
Wenhao Wang
dc0cdc36f3 Use label persist_ss_file
The label "persist_ss_file" was created for "/mnt/vendor/persist/ss(/.*)?".
But we erroneously didn't assign the label to the path.
This patch fixes the error.

Bug: 173971240
Bug: 173032298
Test: Trusty storage tests
Change-Id: I8e891ebd90ae47ab8a4aad1c2b0a3bbb734174d8
2021-06-15 17:24:01 -07:00
Armelle Laine
10e8126e2d Merge "add se-policy to /dev/trusty-log0 so it can be accessed by dumpstate hal" into sc-dev 2021-06-15 14:35:43 +00:00
Armelle Laine
5bb07db1de add se-policy to /dev/trusty-log0 so it can be accessed by dumpstate hal
reuse logbuffer_device group as dumpstate hal already has read perms
on this group.

Bug: 188285071
Test: adb bugreport to include a trusty section in dumpstate_board.txt
Change-Id: I623a5d450bdbe2ceef4fe460bf31bfe740d847b2
2021-06-13 23:59:37 +00:00
Richard Hsu
753e62f39c Merge "[BugFix] SEPolicy for libedgetpu_darwinn2.so logging to stats service" into sc-dev 2021-06-13 06:11:41 +00:00
Adam Shih
d0bb828434 remove vcd from user ROM
Bug: 190331325
Test: build all ROM variants with only user ROM without vcd
Change-Id: If9dc555ee8582b605ccdf9d60c3a9c89cd6634d8
2021-06-11 11:46:22 +08:00
Richard Hsu
8c979899cc [BugFix] SEPolicy for libedgetpu_darwinn2.so logging to stats service
In order to access the darwinn metrics library from the google camera
app (product partition), we need to create an SELinux exception for
the related shared library (in vendor) it uses. This CL adds the same_process_hal_file tag to allow this exception.

Bug: 190661153, 151063663

Test: App can load the .so and not crash after this change.
Before: No permission to access namespace.
(https://paste.googleplex.com/6602755121610752)
After: GCA doesn't crash on load.

Change-Id: I8671732184bbbe283c94d1acd3bb1ff397fe651c
2021-06-10 19:36:35 -07:00
Sung-fang Tsai
985aa698c7 qllow priv-app to access Pixel power HAL extension.
SELinux issues to solve:

native  : aion.cc:780 Error loading lib_aion_buffer.so dlopen failed: library "pixel-power-ext-V1-ndk_platform.so" not found: needed by /vendor/lib64/lib_aion_buffer.so in namespace sphal

05-23 10:11:32.055   420   420 E SELinux : avc:  denied  { find } for pid=6630 uid=10089 name=android.hardware.power.IPower/default scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:hal_power_service:s0 tclass=service_manager permissive=0

Bug: 187373665
Test: Passed, procedure listed in b/187373665#comment8 with forrest.
Change-Id: Ice7c69bca4a029a61ca1ccb7087ea01948ae5f24
2021-06-10 17:56:17 +00:00
Adam Shih
8947d2dfeb reorganize trusty_metricsd settings
Bug: 190331503
Test: build ROM and see the file and sepolicy settings are still there
Change-Id: Ib157f64428166232c3bbbd176d3c1fbed4ac31d6
2021-06-10 02:54:00 +00:00
Adam Shih
e7ed46c52c organize EdgeTPU modules and sepolicy
Bug: 190331327
Bug: 190331548
Bug: 189895600
Bug: 190331108
Bug: 182524105
Bug: 183935302
Test: build ROM and check if the modules and sepolicy are still there
Change-Id: I40391a239a16c4fe79d58fab209dcbd1a8f25ede
2021-06-09 10:39:04 +08:00
Adam Shih
02f93b6096 modulize hal_neuralnetwork_armnn
Bug: 189895314
Bug: 171160755
Bug: 171670122
Bug: 180858476
Test: make sure all affected devices' armnn module has the right label
Change-Id: I6ca736f156497738167ba5eea5606a0e654611b9
2021-06-08 11:17:22 +08:00
Adam Shih
c8b02fc4c3 Remove obsolete context
Bug: 190330778
Test: make selinux_policy with such entry gone
Change-Id: I28844c361a951de35d509ce042e64e090188e755
2021-06-08 11:17:17 +08:00
Sean Callanan
77432c5015 whitechapel: make vframe-secure a system heap
The GPU driver uses vframe-secure for secure allocations, so the
corresponding DMA heap file should be visible to all processes so
use the dmabuf_system_secure_heap_device type instead.

In order for this type to be used, we need to ensure that the HAL
Allocator has access to it, so update hal_graphics_allocator_default.te

Finally, since there are no longer any buffer types associated with the
vframe_heap_device type, remove it.

Bug: 182090311
Test: run cts-dev -m CtsDeqpTestCases --module-arg CtsDeqpTestCases:include-filter:dEQP-VK.protected_memory.stack.stacksize_64 and ensure secure allocations succeed
Test: Play DRM-protected video in ExoPlayer and ensure videos render correctly via MFC->DPU.
Change-Id: Id341e52322a438974d4634a4274a7be2ddb4c9fe
2021-06-04 18:01:34 +00:00
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