Commit graph

719 commits

Author SHA1 Message Date
TreeHugger Robot
73b7ad4a3c Merge "pixel-selinux: add SJTAG policies" into sc-dev 2021-05-21 00:49:42 +00:00
Maurice Lam
32848785da Merge "DO NOT MERGE. Revert Exo selinux policies for S" into sc-dev 2021-05-20 17:31:08 +00:00
George Lee
3561520ae2 Merge "power: mod sysfs_bcl path" into sc-dev 2021-05-20 15:12:44 +00:00
Ken Huang
560d12c3f1 dumpstate: add sepolicy for hal_dumpstate to access sysfs_display
Allow dumpstate to read panel extra info.

Bug: 183061481
Test: adb bugreport
Change-Id: I1902f28c2edceeb5b74ce655f83c8aea7c60825b
2021-05-20 13:53:39 +00:00
sukiliu
ba92629794 Update avc error on ROM 7380236
Bug: 188752787
Bug: 188752940
Test: PtsSELinuxTestCases
Change-Id: I5b674d4696ef470956301388f3d0fcc4883010c6
2021-05-20 16:52:43 +08:00
Peter Csaszar
8fd76cee44 pixel-selinux: add SJTAG policies
These are the SELinux policies for the sysfs files of the SJTAG
kernel interface. The files are in the following directories:

  /sys/devices/platform/sjtag_ap/interface/
  /sys/devices/platform/sjtag_gsa/interface/

Bug: 184768605
Signed-off-by: Peter Csaszar <pcsaszar@google.com>
Change-Id: I4ecf5cec5bbd08a44d7dbf88de5f3bc58b6c4fe5
2021-05-20 00:00:30 -07:00
George Lee
f7a9784254 power: mod sysfs_bcl path
Recent change in kernel prompted path change.

Bug: 186879633
Test: adb bugreport
dumpstate_board.txt shows:
------ Mitigation Stats (/vendor/bin/sh -c echo "Source\t\tCount\tSOC\tTime\tVoltage"; for f in `ls /sys/devices/virtual/pmic/mitigation/last_triggered_count/*` ; do count=`cat $f`; a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/last_triggered_count\//}; b=${f/last_triggered_count/last_triggered_capacity}; c=${f/last_triggered_count/last_triggered_timestamp/}; d=${f/last_triggered_count/last_triggered_voltage/}; cnt=`cat $f`; cap=`cat ${b/count/cap}`; ti=`cat ${c/count/time}`; volt=`cat ${d/count/volt}`; echo "${a/_count/} \t$cnt\t$cap\t$ti\t$volt" ; done) ------
Source		Count	SOC	Time	Voltage
batoilo 	0	0	0	0
ocp_cpu1 	0	0	0	0
ocp_cpu2 	0	0	0	0
ocp_gpu 	0	0	0	0
ocp_tpu 	0	0	0	0
smpl_warn 	0	0	0	0
soft_ocp_cpu1 	0	0	0	0
soft_ocp_cpu2 	0	0	0	0
soft_ocp_gpu 	0	0	0	0
soft_ocp_tpu 	0	0	0	0
vdroop1 	0	0	0	0
vdroop2 	0	0	0	0
------ Clock Divider Ratio (/vendor/bin/sh -c echo "Source\t\tRatio"; for f in `ls /sys/devices/virtual/pmic/mitigation/clock_ratio/*` ; do ratio=`cat $f`; a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/clock_ratio\//}; echo "${a/_ratio/} \t$ratio" ; done) ------
Source		Ratio
cpu0_clk 	0xf041c3
cpu1_heavy_clk 	0xf041c3
cpu1_light_clk 	0xf041c5
cpu2_heavy_clk 	0xf041c3
cpu2_light_clk 	0xf041c5
gpu_heavy_clk 	off
gpu_light_clk 	off
tpu_heavy_clk 	off
tpu_light_clk 	off
------ Clock Stats (/vendor/bin/sh -c echo "Source\t\tStats"; for f in `ls /sys/devices/virtual/pmic/mitigation/clock_stats/*` ; do stats=`cat $f`; a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/clock_stats\//}; echo "${a/_stats/} \t$stats" ; done) ------
Source		Stats
cpu0_clk 	0x101
cpu1_clk 	0x101
cpu2_clk 	0x101
gpu_clk 	off
tpu_clk 	off
------ Triggered Level (/vendor/bin/sh -c echo "Source\t\tLevel"; for f in `ls /sys/devices/virtual/pmic/mitigation/triggered_lvl/*` ; do lvl=`cat $f`; a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/triggered_lvl\//}; echo "${a/_lvl/} \t$lvl" ; done) ------
Source		Level
ocp_cpu1 	7000mA
ocp_cpu2 	12000mA
ocp_gpu 	12000mA
ocp_tpu 	10500mA
smpl 	2900mV
soft_ocp_cpu1 	7000mA
soft_ocp_cpu2 	12000mA
soft_ocp_gpu 	12000mA
soft_ocp_tpu 	10500mA

Change-Id: Ibe303ad69ffb29f3c3bbd79d557d04138cd09bd7
2021-05-20 02:07:55 +00: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
TreeHugger Robot
dc4db7d1cc Merge "logger_app: Fix avc error" into sc-dev 2021-05-19 08:31:39 +00:00
SalmaxChang
b486ddedc5 logger_app: Fix avc error
avc: denied { search } for name="ramdump" dev="dm-7" ino=316 scontext=u:r:logger_app:s0:c17,c257,c512,c768 tcontext=u:object_r:ramdump_vendor_data_file:s0 tclass=dir permissive=0
avc: denied { search } for name="ssrdump" dev="dm-11" ino=292 scontext=u:r:logger_app:s0:c23,c257,c512,c768 tcontext=u:object_r:sscoredump_vendor_data_crashinfo_file:s0 tclass=dir permissive=0

Bug: 188601292
Bug: 188611595

Change-Id: If6b204bf0d5c502cf09c9fe70bcd572cfe2db016
2021-05-19 07:39:36 +00:00
yixuanjiang
494ac0cfe3 Add sepolicy for aocdump to access wlan_logs folder
Add related sepolicies on aoc dump when pixel logger using
wlan config

Bug: 188411088
Signed-off-by: yixuanjiang <yixuanjiang@google.com>
Change-Id: I7a786f25b9094cc9ebeef79e4aff5522bde17d19
2021-05-19 14:11:42 +08:00
Jinting Lin
c57a3fc989 Merge "logger_app: Fix avc errors" into sc-dev 2021-05-19 02:18:39 +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
jintinglin
3be06b2ec9 logger_app: Fix avc errors
avc: denied { read } for name="level" dev="sysfs" ino=57112 scontext=u:r:logger_app:s0:c29,c257,c512,c768 tcontext=u:object_r:sysfs_sscoredump_level:s0 tclass=file permissive=0 app=com.android.pixellogger

Bug: 187909426
Change-Id: I2037b1d2613736c8e1789bc96bfd4be0168444e0
2021-05-18 18:46:00 +08: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
Gary Jian
b9e4f7a759 Add permission to access audiometricext hal for grilservice_app
Bug: 182526894
Test: Manual
Change-Id: I3ca85be7e5ab244e2dea2c6f7768f59c07b44525
2021-05-18 02:18:56 +00:00
TreeHugger Robot
ac53196839 Merge "genfs_contexts: Specify correct GPU clock hint node" into sc-dev 2021-05-18 00:50:53 +00:00
TreeHugger Robot
09a98d233d Merge "Grant dumpstate hal read permission of camera hal dump files" into sc-dev 2021-05-18 00:42:12 +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
Zhijun He
a8ceb3a751 Grant dumpstate hal read permission of camera hal dump files
Test: Build and capture bugreport
Bug: 178737594
Change-Id: Iae9792a75dec574ff9fe0d246a7c166221565b16
2021-05-17 14:23:46 -07:00
Minchan Kim
304a32c17e sepolicy: gs101: allow duump page_pinner
Provide necessary sepolicy for dumpreport to access page_pinner
information in /sys/kernel/debug/page_pinner/{longterm_pinner,
alloc_contig_failed}

Bug: 187552095
Test: Run "adb bugreport <zip>" and verify it contains the output
      from page_pinner.
Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: I2abc48f2a156718fd4bed3b51bdd285c6bf9f175
2021-05-17 09:18:50 -07:00
Sidath Senanayake
828114d410 genfs_contexts: Specify correct GPU clock hint node
Bug: 188404581
Bug: 188034128
Signed-off-by: Sidath Senanayake <sidaths@google.com>
Change-Id: Id69f5cf8c95081fea7784520838a3f85aa58589c
2021-05-17 15:44:19 +01:00
qinyiyan
bfbf29c18c Allows the edgetpu_logging service to write to the edgetpu sysfs.
Test: make selinux_policy -j128
Bug: 151063663
Change-Id: I5ac619b34bb6fb17caa4c00ac62ac6802c776d84
2021-05-14 13:54:04 -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
SHUCHI LILU
60bf6343be Merge "Update avc error on ROM 7358093" into sc-dev 2021-05-14 08:31:59 +00:00
sukiliu
53c9a79002 Update avc error on ROM 7358093
Bug: 188114822
Bug: 188114896
Test: PtsSELinuxTestCases
Change-Id: Ic5e865a921d0db981acfd936e1599a0ab220b975
2021-05-14 14:23:22 +08:00
Midas Chien
b610fd307e Merge "Allowed PowerHAL service access Display node" into sc-dev 2021-05-14 05:47:32 +00: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
SalmaxChang
30b9f8f277 rfsd: fix permission error
[RfsService::File] Failed to open file (4) (reason:Permission denied)

Bug: 187148595
Change-Id: Ia553bbc1e1c86b7740b3925679a2da65d3314714
2021-05-14 04:19:50 +00:00
Manish Varma
705ecbe0ab genfs_contexts: fix path for st21nfc i2c devices
Due to recent changes which modifies the device name for i2c devices,
st21nfc device names are now changed from ?-0008 to "i2c-st21nfc"

Bug: 188078957
Test: Verified haptic works and no avc denials when running following command:
$ dmesg | grep avc | grep sysfs
Signed-off-by: Manish Varma <varmam@google.com>
Change-Id: I17464d2d01fb64447dd8828eb8f91e38717fac4c
2021-05-13 17:43:26 -07:00
Manish Varma
fd2a6b9a74 genfs_contexts: fix path for s2mpg1X i2c devices
Due to recent changes which modifies the device name for i2c devices,
s2mpg1xmfd device names are now changed from ?-00?f to "i2c-s2mpg10mfd" or
"i2c-s2mpg11mfd"

Bug: 188078957
Test: Verified no avc denials when running following command:
$ dmesg | grep avc | grep sysfs

Signed-off-by: Manish Varma <varmam@google.com>
Change-Id: I2c58773613071147336b4f338e4c4034ce90e9bd
2021-05-13 17:42:08 -07:00
Manish Varma
194fef8b5a genfs_contexts: fix path for cs40l25a i2c devices
Due to recent changes which modifies the device name for i2c devices,
cs40l25a device names are now changed from ?-0043 to "i2c-cs40l25a"

Bug: 188078957
Test: Verified haptic works and no avc denials when running following command:
$ dmesg | grep avc | grep sysfs

Signed-off-by: Manish Varma <varmam@google.com>
Change-Id: I47c423661d788c467d4cd1602fbc145bd715c67a
2021-05-13 17:37:32 -07:00
Manish Varma
3868f8aa88 genfs_contexts: fix path for max77759tcpc i2c devices
Due to recent changes which modifies the device name for i2c devices,
max77759tcpc device names are now changed from ?-0025 to "i2c-max77759tcpc"

Bug: 188078957
Test: Verified charging works and no avc denials when running
$ dmesg | grep avc | grep sysfs

Signed-off-by: Manish Varma <varmam@google.com>
Change-Id: Ic1f6d018ce74348b4faa937720b50c7924bf9b7a
2021-05-13 17:36:59 -07:00
Manish Varma
b08c98c2b4 genfs_contexts: fix path for p9412 i2c devices
Due to recent changes which modifies the device name for i2c devices,
p9412 device names are now changed from ?-003c to "i2c-p9412"

Bug: 188078957
Test: Verified wlc works and no avc denials when running following command:
$ dmesg | grep avc | grep sysfs

Signed-off-by: Manish Varma <varmam@google.com>
Change-Id: Id0af1122f7182a866ab28c5317db139d8083a45d
2021-05-13 17:36:24 -07:00
Maurice Lam
a1bf959f13 DO NOT MERGE. Revert Exo selinux policies for S
Bug: 188074060
Test: Forrest
Change-Id: I3465d10c3731ae49fec6e6fb7f2873cf2e5b9c23
2021-05-13 19:32:57 +00:00
TreeHugger Robot
775771b811 Merge changes from topic "186500818-set1" into sc-dev
* changes:
  Let debugfs be accessed only for non-user builds
  Label debugfs files correctly
2021-05-13 07:07:13 +00:00
Vineeta Srivastava
14a07e230a Merge "Add sepolicy for the UDFPS antispoof property" into sc-dev 2021-05-12 21:45:44 +00:00
TreeHugger Robot
d4f9ef4303 Merge "Grant vendor_sched sysfs nodes access" into sc-dev 2021-05-12 18:28:51 +00:00
Grace Chen
4b59c5b98e Add selinux permissions for NFC/eSIM firmware upgrade and recovery
Bug: 181246088
Test: Confirm selinux permissions.
Change-Id: I71c59d1afc50e273b840cd2df7600b4e806c0661
2021-05-12 10:07:55 -07:00
TreeHugger Robot
1f594ec562 Merge "Add SELinux policy for allowing dumping GSC info" into sc-dev 2021-05-12 10:02:28 +00:00
TreeHugger Robot
7fd939fdd7 Merge "correctly label networking gadgets" into sc-dev 2021-05-12 07:38:42 +00:00
TreeHugger Robot
9b8e2b7ba8 Merge "bthal: allow bthal to access bluetooth kernel driver logbuffer_btlpm and logbuffer_btuart device node" into sc-dev 2021-05-12 07:06:45 +00:00
TreeHugger Robot
e2a0158fdf Merge "com.qorvo.uwb: signed with dedicated key and running as android.uid.uwb uid" into sc-dev 2021-05-12 06:22:21 +00: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
Thierry Strudel
03f4884884 com.qorvo.uwb: signed with dedicated key and running as android.uid.uwb uid
Test:
05-11 21:05:48.077   786   786 I qorvo.uwb.main: UWB HAL start
05-11 21:05:48.078   412   412 I servicemanager: Found hardware.qorvo.uwb.IUwb/default in device VINTF manifest.
05-11 21:05:50.960  1639  1639 W PackageSettings: Missing permission state for package: com.qorvo.uwbtestapp.system
05-11 21:05:53.530  1639  1639 V StorageManagerService: Package com.qorvo.uwb does not have legacy storage
05-11 21:05:53.548  1639  1639 V StorageManagerService: Package com.qorvo.uwbtestapp.system does not have legacy storage
05-11 21:05:56.571  1639  1902 I am_proc_start: [0,3055,1083,com.qorvo.uwb,added application,com.qorvo.uwb]
05-11 21:05:56.571  1639  1902 I ActivityManager: Start proc 3055:com.qorvo.uwb/1083 for added application com.qorvo.uwb
05-11 21:05:56.653  1639  2264 I am_proc_bound: [0,3055,com.qorvo.uwb]
05-11 21:05:56.709  3055  3055 I TetheringManager: registerTetheringEventCallback:com.qorvo.uwb
05-11 21:05:56.710  3055  3055 V GraphicsEnvironment: ANGLE Developer option for 'com.qorvo.uwb' set to: 'default'
05-11 21:06:05.045  1639  1900 I am_pss  : [3055,1083,com.qorvo.uwb,5719040,4239360,0,88702976,2,0,6]
05-11 21:06:07.233  1639  1981 I am_compact: [3055,com.qorvo.uwb,all,84816,39052,44628,0,-816,0,-816,816,26,0,0,-800,0,1921532,-768]
05-11 21:06:38.442   786   786 I qorvo.Uwb: open
05-11 21:06:38.443   786   786 I qorvo.uwb.McpsUtils: ListHardware
05-11 21:06:38.443   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse
05-11 21:06:38.443   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse: Read message
05-11 21:06:38.443   786   786 I qorvo.uwb.IeeeUtils: ListDevices
05-11 21:06:38.443   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse
05-11 21:06:38.443   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse: Read message
05-11 21:06:38.443   786   786 I qorvo.uwb.UwbIface: Load calibration on wpan0, hw index: 0
05-11 21:06:38.445   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse
05-11 21:06:38.445   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse: Read message
05-11 21:06:38.445   786   786 I qorvo.uwb.UwbIface: Load properties on wpan0, hw index: 0
05-11 21:06:38.446   786   786 I qorvo.Uwb: getIface
05-11 21:06:38.449   786   786 I qorvo.uwb.UwbIface: firaController
05-11 21:06:38.449   786   786 I qorvo.Uwb: listHardwareIndex
05-11 21:06:38.449   786   786 I qorvo.uwb.McpsUtils: ListHardware
05-11 21:06:38.449   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse
05-11 21:06:38.450   786   786 I qorvo.uwb.NlSocket: SendAndAwaitResponse: Read message
05-11 21:06:38.450   786   786 I qorvo.Uwb: getIface
05-11 21:06:38.450   786   786 I qorvo.uwb.UwbIface: cccController

Bug: 187766150
Signed-off-by: Thierry Strudel <tstrudel@google.com>
Change-Id: Ie667a666a445e907aa99542f1c52046522b5dd02
2021-05-12 04:07:58 +00:00