Commit graph

589 commits

Author SHA1 Message Date
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
Jayachandran Chinnakkannu
1c130a7e1d Merge "Allow telephony to access the file descriptor of the priv_apps tcp_socket" into sc-dev 2021-06-12 17:19:33 +00:00
TreeHugger Robot
694694857a Merge "qllow priv-app to access Pixel power HAL extension." into sc-dev 2021-06-12 10:22:24 +00:00
Jayachandran C
5492a92a39 Allow telephony to access the file descriptor of the priv_apps tcp_socket
The priv_apps could register for QOS notifications for its tcp_socket.
This change allows telephony to access the file descriptor for the
tcp_socket so it could double check the source and destination address
of the socket when the QOS indication is received from modem.

This addresses the following SE policy denial
auditd  : type=1400 audit(0.0:219): avc: denied { read write } for
comm="ConnectivitySer" path="socket:[98511]" dev="sockfs" ino=98511
scontext=u:r:radio:s0 tcontext=u:r:priv_app:s0:c512,c768 tclass=tcp_socket
permissive=0

Bug: 190580419
Test: Manual
Change-Id: I35d4e1fb06242eb5fcbcb36439a55c11166b149b
2021-06-12 05:18:15 +00:00
Kris Chen
7db400b679 Add sepolicy to let fingerprint access power service
Fix the following avc denial:
SELinux : avc:  denied  { find } for pid=1055 uid=1000 name=android.hardware.power.IPower/default scontext=u:r:hal_fingerprint_default:s0 tcontext=u:object_r:hal_power_service:s0 tclass=service_manager permissive=0

Bug: 185893477
Test: Observe from systrace that the CPU frequency is boosted when
      running fingerprint algorithm.
Change-Id: I245058b912ec2af3555154934dbe722b445181a9
2021-06-10 21:31:06 +00: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
SHUCHI LILU
61843906c0 Merge "Update avc error on ROM 7444346" into sc-dev 2021-06-10 11:06:35 +00:00
TreeHugger Robot
a501b656dd Merge "gs101-sepolicy: Fix avc denial for sysfs_vendor_sched" into sc-dev 2021-06-10 07:20:58 +00:00
sukiliu
d27e574f3e Update avc error on ROM 7444346
Bug: 190672147
Bug: 190671898
Test: Test: PtsSELinuxTestCases
Change-Id: Ie9400df24f30474915d757b61ddb1c3fb77903c5
2021-06-10 15:16:37 +08:00
Adam Shih
a81732dd6f Merge "reorganize trusty_metricsd settings" into sc-dev 2021-06-10 05:52:40 +00:00
Rick Yiu
797b646234 gs101-sepolicy: Fix avc denial for sysfs_vendor_sched
Fix mediaprovider_app and bluetooth

Bug: 190563839
Bug: 190563916
Test: build pass
Change-Id: I477325ee812d1362db4d5005e999cba989a44216
2021-06-10 04:10:24 +00:00
TreeHugger Robot
d3b0256025 Merge "update wakeup node" into sc-dev 2021-06-10 03:56:50 +00:00
Adam Shih
ef113ab8ac update wakeup node
Bug: 190672147
Test: pts-tradefed run pts -m PtsSELinuxTest
Change-Id: I3a8e8fa8b9007f556a5bfb402c4e8c726499d66f
2021-06-10 03:23:52 +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
22fae537b5 Merge "organize EdgeTPU modules and sepolicy" into sc-dev 2021-06-10 02:53:28 +00:00
SHUCHI LILU
e5c8613686 Merge "Update avc error on ROM 7440434" into sc-dev 2021-06-09 12:05:04 +00:00
sukiliu
6ce3aa9d75 Update avc error on ROM 7440434
Bug: b/190563838
Bug: b/190563916
Bug: b/190563896
Bug: b/190563897
Test: Test: PtsSELinuxTestCases
Change-Id: Idbd0bc0f9a4770b3f976196058a311820e6e3c11
2021-06-09 16:07:32 +08:00
TreeHugger Robot
3c66c45102 Merge "Grant powerhal access to thermal_link_device and sysfs_thermal" into sc-dev 2021-06-09 07:46:26 +00:00
TreeHugger Robot
c5d10f245a Merge "Add sysfs_camera label for powerhint flow to access intcam & tnr clock" into sc-dev 2021-06-09 04:18:05 +00:00
Rick Yiu
2332c6a43f Merge "gs101-sepolicy: Fix tracking_denials of sysfs_vendor_sched" into sc-dev 2021-06-09 03:02:37 +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
Rick Yiu
a457b1d640 gs101-sepolicy: Fix tracking_denials of sysfs_vendor_sched
Bug: 190368350
Test: build pass
Change-Id: Id742e8328f63c04e5448225975897d8f6adc1e13
2021-06-09 01:34:50 +00:00
Adam Shih
86c45c70e6 Merge "modulize hal_neuralnetwork_armnn" into sc-dev 2021-06-08 23:03:04 +00:00
SHUCHI LILU
699d68a092 Merge "Update avc error on ROM 7432667" into sc-dev 2021-06-08 05:50:50 +00:00
sukiliu
bb8b462d7a Update avc error on ROM 7432667
Bug: b/190337281
Bug: b/190337282
Bug: b/190336524
Bug: b/190337295
Bug: b/190337296
Bug: b/190337283
Bug: b/190336723
Bug: b/190336841
Bug: b/190337297
Bug: b/190336525
Test: PtsSELinuxTestCases
Change-Id: I2edda1bf554c0239953b8a31152a09045fb1f15a
2021-06-08 12:48:06 +08:00
Maciej Żenczykowski
b22c6cd04a R4/raven: correctly label wpan0 device as networking
Test: atest, TreeHugger, manual observation of labeling
Bug: 185962988
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I068b7da17590fc9dc914db80263b72cc7536c095
2021-06-07 20:34:05 -07: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
TreeHugger Robot
17b8f5cd4e Merge "Remove unnecessary rules for vendor rcs app" into sc-dev 2021-06-07 19:01:45 +00:00
Long Ling
5afbe4584f Merge "sepolicy: gs101: display: fix dumpstate of displaycolor" into sc-dev 2021-06-07 16:36:32 +00:00
Yu(Swim) Chih Ren
d45ada475b Add sysfs_camera label for powerhint flow to access intcam & tnr clock
Test: 1. build selinux and push related files to phone
      2. Use ls -Z "file" to check if selinux content of file is
      expected
      3. P21 camera checklist
Bug: 168654554

Change-Id: Ie757dd3e8adc151c6340e9ca662efbdf0ccb6110
2021-06-07 06:31:09 +00:00
Long Ling
1064df0f26 sepolicy: gs101: display: fix dumpstate of displaycolor
displaycolor service runs in HW Composer. This change allow displaycolor
to output to dumpstate via pipe fd.

Bug: 189846843
Test: adb bugreport and check displaycolor dump in dumpstate_board.txt
Change-Id: I109db9374124caf9053a9fd7ba6159f83c372038
2021-06-06 22:20:19 -07:00
SalmaxChang
7865bf8577 cbd: Fix avc error
avc: denied { search } for comm="cbd" name="/" dev="sda1" ino=2 scontext=u:r:cbd:s0 tcontext=u:object_r:persist_file:s0 tclass=dir permissive=0

Bug: 180687795
Change-Id: I149163760fa47378d03dc2d8c8a00c590788796c
2021-06-07 01:40:59 +00:00
Rick Yiu
f275064208 Merge "gs101-sepolicy: Fix avc denials for sysfs_vendor_sched" into sc-dev 2021-06-07 00:38:36 +00:00
TreeHugger Robot
77cbbc1237 Merge "Add CccDkTimeSyncService" into sc-dev 2021-06-04 21:23:24 +00:00
Hui Wang
724ea61092 Remove unnecessary rules for vendor rcs app
Bug: 190194610
Test: make, manual
Change-Id: I99f624a70a36ad6cf47806faf0eed693383dac5f
2021-06-04 14:03:31 -07:00
TreeHugger Robot
aa7a8405e2 Merge "whitechapel: make vframe-secure a system heap" into sc-dev 2021-06-04 18:02:34 +00: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
TreeHugger Robot
29a5be5603 Merge "storage: update sepolicy for hardwareinfoservice" into sc-dev 2021-06-04 10:45:34 +00:00
TreeHugger Robot
be1f56dba1 Merge "[RCS] Add sepolicy for RCS as non-system app" into sc-dev 2021-06-04 06:22:03 +00:00
Maciej Żenczykowski
729e8901ab allow hal_usb_impl configfs:dir { create rmdir };
This is needed to allow USB HAL to create multi-config gadget
(ie. rndis + ncm).

Bug: 172793258
Test: built and booted on oriole
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifb98b23138122ad4e0aeea8dd9c93d7b3e16d3aa
2021-06-04 02:53:11 +00:00
jznpark
3d127f9224 [RCS] Add sepolicy for RCS as non-system app
As shannon-rcs has been changed from system app
to non-system app, sepolicy has to be updated.

Bug: 186135775
Bug: 189707387
Test: sanity test
Signed-off-by: jznpark <jzn.park@samsung.com>
Change-Id: I32cce90611c619494136a6b1d01b3fb48330d169
2021-06-03 13:30:26 -07:00
Rick Yiu
a4dbe2ef40 gs101-sepolicy: Fix avc denials for sysfs_vendor_sched
Bug: 190011861
Bug: 190011862
Bug: 190011863
Bug: 190012301
Bug: 190012320
Test: boot to home
Change-Id: Icddb42fb194547211e33cf1d871e839a954b0919
2021-06-03 17:55:17 +08:00
Chiawei Wang
9cfc661bee Merge "pixelstats: fix permission errors" into sc-dev 2021-06-03 08:45:12 +00:00
Chiawei Wang
9d5830ac19 pixelstats: fix permission errors
1. sysfs_dma_heap erros are fixed by ag/13926718
2. debugfs_mgm error is fixed by ag/14683912

Bug: 188114896
Bug: 183338421
Bug: 188495492
Test: pts-tradefed run pts -m PtsSELinuxTest
      http://sponge2/6cbd0af0-5414-4f2c-aea0-99b4981360a4

Signed-off-by: Chiawei Wang <chiaweiwang@google.com>
Change-Id: Icd2fa4e7f168d15fd4cec3000bc0e7a33eab4d3e
2021-06-03 02:52:33 +00:00
Rick Yiu
b530a26f1f Merge "gs101-sepolicy: Refine policy for sysfs_vendor_sched" into sc-dev 2021-06-03 00:56:00 +00:00
Peter Csaszar
7ea6a44719 pixel-selinux: Add mlstrustedobject for SJTAG
This CL adds the "mlstrustedobject" to types for files involved in the
SJTAG authentication flow, in order to address MLS-based AVC denials.

Bug: 189466122
Test: No more AVC denials when activating SJTAG in BetterBug
Signed-off-by: Peter Csaszar <pcsaszar@google.com>
Change-Id: Ieb88653830ce95751eee5cf26c26fd6302067bce
2021-06-02 12:23:01 -07:00
Rick Yiu
9e8bd699e9 gs101-sepolicy: Refine policy for sysfs_vendor_sched
Chagne it to directory based.

Bug: 182509410
Test: device boot normally
Change-Id: I1cfaa95cf07e1e829e747eb99ed39ab64d3ddac1
2021-06-02 04:52:45 +00:00
Aaron Ding
9f8d552411 pixel-selinux: add SJTAG policies
This reverts commit b078284e5d.

Bug: 184768605
Change-Id: Ib0080e2ba3edf7fa654155fb4a7403d52ad2494a
2021-06-02 10:25:51 +08:00
Aaron Ding
2dbe515943 remove sysfs_type from vendor_page_pinner_debugfs
Bug: 186500818
Change-Id: If97126a3d46d96342faf89b9698218b6a480a84b
2021-06-01 17:38:28 +08:00