Commit graph

741 commits

Author SHA1 Message Date
Ocean Chen
b8aebc85e1 storage: update sepolicy for hardwareinfoservice
avc: denied { search } for name="0:0:0:0" dev="sysfs" ino=57525 scontext=u:r:hardware_info_app:s0:c512,c768 avc: denied { search } for name="health_descriptor" dev="sysfs" ino=57017 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:sysfs_scsi_devices_0000:s0 tclass=dir permissive=0 app=com.google.android.hardwareinfo
avc: denied { search } for name="health_descriptor" dev="sysfs" ino=57017 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:sysfs_scsi_devices_0000:s0 tclass=dir permissive=0 app=com.google.android.hardwareinfo

avc: denied { read } for name="vpd_pg80" dev="sysfs" ino=57559 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:sysfs_scsi_devices_0000:s0 tclass=file permissive=0 app=com.google.android.hardwareinfo
avc: denied { read } for name="model" dev="sysfs" ino=57534 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:sysfs_scsi_devices_0000:s0 tclass=file permissive=0 app=com.google.android.hardwareinfo
avc: denied { read } for name="vendor" dev="sysfs" ino=57533 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:sysfs_scsi_devices_0000:s0 tclass=file permissive=0 app=com.google.android.hardwareinfo
avc: denied { read } for name="rev" dev="sysfs" ino=57535 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:sysfs_scsi_devices_0000:s0 tclass=file permissive=0 app=com.google.android.hardwareinfo
avc: denied { read } for name="eol_info" dev="sysfs" ino=57020 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:sysfs_scsi_devices_0000:s0 tclass=file permissive=0 app=com.google.android.hardwareinfo
avc: denied { read } for name="life_time_estimation_a" dev="sysfs" ino=57021 scontext=u:r:hardware_info_app:s0:c512,c768 tcontext=u:object_r:sysfs_scsi_devices_0000:s0 tclass=file permissive=0 app=com.google.android.hardwareinfo

Bug: 188755652
Test: reboot then check hardwareinfo and avc denined log
Change-Id: Ia03ebdd6b0b46b4c9ace5fbf1fc47a455a55abcb
2021-05-25 16:57:20 +08:00
Roger Fang
292faf8ed3 Merge "sepolicy: gs101: add permission for the hardware info dsp part number" into sc-dev am: 56cbfd5a0a
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14696016

Change-Id: I929b5c4b1f37c2e0d8bee655fc0141a5a0bbbd4e
2021-05-25 01:24:04 +00:00
Roger Fang
56cbfd5a0a Merge "sepolicy: gs101: add permission for the hardware info dsp part number" into sc-dev 2021-05-25 01:02:39 +00:00
Ines Ayara
1a7f873b06 Merge "Transition to using libedgetpu_util.so instead of libedgetpu_darwinn2.so. bug: b/182303547" into sc-dev am: dfb3783187
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14652412

Change-Id: I46ee22509e42f4baf7df226b2e2eedcf3ecfaa6c
2021-05-25 00:18:54 +00:00
Vinay Kalia
68849437bd Allow mediacodec to access the vframe-secure DMA-BUF heap
This patch fixes the following denial:

HwBinder:751_2: type=1400 audit(0.0:9): avc: denied { open } for
path="/dev/dma_heap/vframe-secure" dev="tmpfs" ino=734
scontext=u:r:mediacodec:s0 tcontext=u:object_r:vframe_heap_device:s0
tclass=chr_file permissive=0

Bug: 188121584
Test: AV1 secure video playback

Signed-off-by: Vinay Kalia <vinaykalia@google.com>
Change-Id: I455b39914dd4316a427f5f756b4fb94a2c4db204
2021-05-24 23:57:28 +00:00
Ines Ayara
dfb3783187 Merge "Transition to using libedgetpu_util.so instead of libedgetpu_darwinn2.so. bug: b/182303547" into sc-dev 2021-05-24 23:55:32 +00:00
Roger Fang
a97bfcc1e1 sepolicy: gs101: add permission for the hardware info dsp part number
Bug: 188757638
Test: Manually test passed

Signed-off-by: Roger Fang <rogerfang@google.com>
Change-Id: Id0c3226411b058b613b92e67174f14e64c6c3a2b
2021-05-24 08:16:34 +00:00
Chase Wu
80ab102382 Merge "genfs_contexts: fix path for cs40l25a i2c devices" into sc-v2-dev 2021-05-24 01:03:51 +00:00
Rick Yiu
5aeb1b9e45 gs101-sepolicy: Allow dumping vendor groups values
Fix:
avc: denied { read } for name="vendor_sched" dev="sysfs" ino=45566 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0

avc: denied { read } for name="dump_task_group_ta" dev="proc" ino=4026532542 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:proc:s0 tclass=file permissive=0

Bug: 172112042
Test: dump data as expected
Change-Id: I9945953dba4afddd34c1535c12193b1f00fdcef9
2021-05-22 21:30:47 +08:00
Grace Chen
ebadda8749 Merge "Add selinux permissions for NFC/eSIM firmware upgrade and recovery" into sc-dev am: 16a38b2b6c
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14514065

Change-Id: I62e7a0b9ff71f63221d6eaaad17a9333183912ec
2021-05-21 19:15:18 +00:00
Grace Chen
16a38b2b6c Merge "Add selinux permissions for NFC/eSIM firmware upgrade and recovery" into sc-dev 2021-05-21 19:10:52 +00:00
chasewu
168a6b0c72 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 and ?-0042 to
"i2c-cs40l25a" and "i2c-cs40l25a-dual"

Bug: 188078957
Bug: 188651116
Test: manual check avc denied logs
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: I97d3a030c94166f8e2cda7daa38166b1532b6d9f
2021-05-21 17:32:53 +08:00
TreeHugger Robot
257af6acb7 Merge "Grant sepolicy for Bluetooth Ccc Timesync feature" into sc-dev am: b42a03fa9e
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14160586

Change-Id: I57862e73bb90e64631501678dac852a7e4d96d45
2021-05-21 06:59:14 +00:00
TreeHugger Robot
b42a03fa9e Merge "Grant sepolicy for Bluetooth Ccc Timesync feature" into sc-dev 2021-05-21 06:41:20 +00:00
SHUCHI LILU
d041f55312 Merge "Update avc error on ROM 7380236" into sc-dev am: 5128ec7db7
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14660737

Change-Id: Ifa70b0837abb760f0d98ed67c2ecb00687e4ba04
2021-05-21 02:24:48 +00:00
SHUCHI LILU
5128ec7db7 Merge "Update avc error on ROM 7380236" into sc-dev 2021-05-21 02:08:56 +00:00
TreeHugger Robot
69ccb014e3 Merge "pixel-selinux: add SJTAG policies" into sc-dev am: 73b7ad4a3c
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14604512

Change-Id: Idf3d758f0b1f6781bd8771d8bc82af7f599a42be
2021-05-21 01:14:52 +00:00
TreeHugger Robot
73b7ad4a3c Merge "pixel-selinux: add SJTAG policies" into sc-dev 2021-05-21 00:49:42 +00:00
Maurice Lam
370ca9d7c9 [automerger skipped] Merge "DO NOT MERGE. Revert Exo selinux policies for S" into sc-dev am: 32848785da -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14533075

Change-Id: I58c7628b630bb1c3b0d1433aa3dc0f5bf08a1c0a
2021-05-20 17:51:46 +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
a3b5872145 Merge "power: mod sysfs_bcl path" into sc-dev am: 3561520ae2
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14655334

Change-Id: Id3f7f4b34fdae339edb5005028f6b930347b8574
2021-05-20 15:31:16 +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
Maurice Lam
d733108c8f DO NOT MERGE. Revert Exo selinux policies for S
Bug: 188074060
Test: Forrest
Change-Id: I3465d10c3731ae49fec6e6fb7f2873cf2e5b9c23
2021-05-19 09:07:56 +00:00
TreeHugger Robot
34471d4e60 Merge "logger_app: Fix avc error" into sc-dev am: dc4db7d1cc
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14636312

Change-Id: Id6de718c78cbca19c45ef9a1a9feda9d95ecb476
2021-05-19 08:38:09 +00:00
yixuanjiang
ddb8f48006 Add sepolicy for aocdump to access wlan_logs folder am: 494ac0cfe3
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/14636311

Change-Id: I86a482f9ad157738fd4163d4490069ebb764e21e
2021-05-19 08:36:16 +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