Commit graph

77 commits

Author SHA1 Message Date
martinwu
3785b0d271 [TSV2] Remove tcpdump sepolicy from gs101 and move sepolicy to gs-common
Bug: 264490014
Test: 1. Enable tcpdump_logger always-on function
      2. Dump bugreport
      3. Pull dumpstate_board.bin and chagne it to zip
      4. Unzip dumpstate_board.zip and check if tcpdump files
         are there.
Change-Id: Iea67de1e645592c6993a3ee6f2ca8e6bf3c6c949
Merged-In: Iea67de1e645592c6993a3ee6f2ca8e6bf3c6c949
2023-04-29 13:03:01 +00:00
Martin Wu
e30ee618d6 Revert "Remove tcpdump sepolicy from gs101 and move sepolicy to ..."
Revert submission 22814097-Fix-tcpdump-sepolicy

Reason for revert: build break

Reverted changes: /q/submissionid:22814097-Fix-tcpdump-sepolicy

Change-Id: I3d47d22250b435416c4ca44ff1956569662591ee
2023-04-27 02:20:55 +00:00
martinwu
6be45972bb Remove tcpdump sepolicy from gs101 and move sepolicy to gs-common
Bug: 264490014
Test: 1. Enable tcpdump_logger always-on function
      2. Dump bugreport
      3. Pull dumpstate_board.bin and chagne it to zip
      4. Unzip dumpstate_board.zip and check if tcpdump files
         are there.
Change-Id: I3d0cb388cf9b7c96d2856f46c0440b4017477480
2023-04-27 01:38:04 +00:00
Adam Shih
240c435174 use dumpsate from gs-common
Bug: 273380985
Test: adb bugreport
Change-Id: I9092e2e004e3ad0b3667b948ed4d633cd50d088c
2023-04-07 13:02:21 +08:00
Adam Shih
4d9aa0b28f use devfreq dump from gs-common
Bug: 273380985
Test: adb bugreport
Change-Id: I0ea6767fd7640c2ee1be66f659f94c15cb4766cd
2023-03-21 12:41:23 +08:00
Adam Shih
7d3f25d95b Move display dump to gs-common
Bug: 269212897
Test: adb bugreport
Change-Id: Id40661687bbd04d7eba4790dc5fe17ca5c79e47d
2023-03-07 13:01:05 +08:00
Adam Shih
9a7bb8df86 Move memory dump to gs-common
Bug: 240530709
Test: adb bugreport
Change-Id: I78433d8d170af54a4daee6c9a9218ce35e78e730
2023-02-13 14:56:30 +08:00
Ken Yang
a49c3a5479 WLC: Cleanup the sysfs_wlc policies
The sepolicy must be self-contained without including wirelss_charger to
avoid build break in AOSP

Bug: 263830018
Change-Id: I4eee380ae61f83c5563ee8842a94fd1fb9e520ef
Signed-off-by: Ken Yang <yangken@google.com>
2023-01-10 16:02:31 +00:00
Ken Yang
33f94a5428 WLC: Add gs101 specific sepolicy for wireless_charger
Bug: 237600973
Change-Id: If25a921ba9f0261c7f71cb88425526f307df9064
Signed-off-by: Ken Yang <yangken@google.com>
2022-12-21 00:49:26 +00:00
Adam Shih
35492ad70f use touch dump from gs-common
Bug: 256521567
Test: adb bugreport
Change-Id: I02a5831e6282eb431f2cbf89941ef188e801bd09
2022-11-28 14:08:51 +08:00
Adam Shih
ea632b0eb1 move sensors dump to gs-common
Bug: 250475720
Test: adb bugreport
Change-Id: I1cadc20635358c72c9571a2abaa7055efcc50adc
2022-11-10 15:02:08 +08:00
Adam Shih
07a5f33a8d move brcm gps solution to gs-common
Bug: 254758553
Test: google map can locate on pixel
Change-Id: Iaf954f3af043dc5080b0be473ed8b78b1c6d0e22
2022-10-27 09:37:46 +08:00
Adam Shih
72aa5a98fc move aoc settings to gs-common
Bug: 248426917
Test: boot with aoc launched
Change-Id: I891767f10dfac7528b76e27fd2756b77ed46e45c
2022-10-20 11:41:19 +08:00
Adam Shih
3cd9384799 dump f2fs in gs-common
Bug: 248143736
Test: adb bugreport
Change-Id: I902030f7960b2247e9b8e913e78d447741423efb
2022-09-27 17:03:38 +08:00
Wiwit Rifa'i
443da0523a Add SE policies for HWC logs
Bug: 230361290
Test: adb bugreport
Test: adb shell vndservice call Exynos.HWCService 11 i32 0 i32 308 i32 1
Change-Id: I20ec7ee1856a45d271e0e6ebfd7eb74525b96f77
2022-08-16 13:22:33 +08:00
TreeHugger Robot
a3fc2a745c Merge "HwInfo: Move hardware info sepolicy to pixel common" 2022-08-03 02:57:30 +00:00
Denny cy Lee
ea1580002f HwInfo: Move hardware info sepolicy to pixel common
Bug: 215271971
Test: no sepolicy for hardware info

Signed-off-by: Denny cy Lee <dennycylee@google.com>
Change-Id: Ia7bfd171fe724848e9a6f0c1adab59402d2788a9
2022-08-02 07:43:56 +00:00
Roger Liao
5ea60d6348 Fix build break if BOARD_WITHOUT_RADIO
Fix ERROR 'unknown type radio_vendor_data_file'

Bug: 235907512
Change-Id: I55e88c9364b42db262c057a2aa85816944c1c761
2022-07-28 17:59:28 +08:00
Jidong Sun
f276625942 gs101: Allow BootControl to access sysfs blow_ar
Bug: 232277507
Signed-off-by: Jidong Sun <jidong@google.com>
Change-Id: I120672722a5ab8b5cadf0dce6d872e00c9fae642
2022-06-04 01:23:40 +00:00
Lily Lin
59f29edf92 Add selinux permissions to r/w sysfs st33spi_state
Bug: 228655141
Test: Confirm can read/write st33spi_state
Change-Id: I65299414d6268580dc532170759459147378418b
2022-05-10 16:32:45 +08:00
Wei Wang
1291c3cec9 Grant trusty to power hal
Bug: 229350721
Test: UDFPS with stress
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Ia88d6cff1d21940e22ae5122dbfcf52de27ad700
2022-04-24 04:30:03 +00:00
Jason Macnak
f2be252260 Remove sysfs_gpu type definition
... as it has moved to system/sepolicy.

Bug: b/161819018
Test: presubmit
Change-Id: I6fcafa87541ed0cbaf3ba74fa5ff4dbdebd533f7
Merged-In: I6fcafa87541ed0cbaf3ba74fa5ff4dbdebd533f7
2022-04-18 22:45:55 +00:00
Bart Van Assche
3a1c10bb76 Stop using the bdev_type and sysfs_block_type SELinux attributes
Stop using these attributes since these will be removed soon. This
commit reverts 37b5741301 ("Add the 'bdev_type' attribute to all block
device types").

Bug: 202520796
Test: Untested.
Change-Id: I00f10d1fd164b6ca01ecd5cffd2012acfc05eeca
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-15 14:20:18 -07:00
Edwin Tung
ffe990fd82 Merge "gps: add sepolicy to allow gps access pps gpio" into sc-qpr1-dev am: 6c249e4a9f am: 14719fc742 am: 2200881a2b
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/15897560

Change-Id: I627aac1ebcb4cab000b40aa9a5d5c715d9188e0d
2021-09-30 14:50:55 +00:00
George Chang
8f3fb5c47f Update SecureElement Sepolicy
Add rules for sysfs_st33spi
Separate hal_secure_element_st54spi and st33spi form default

Bug: 193417907
Test: VtsHalSecureElementV1_2TargetTest,
      VtsHalSecureElementV1_1TargetTest,
      VtsHalSecureElementV1_0TargetTest,
      CtsOmapiTestCases
Change-Id: I444af2e38fc120d173445bce48b7e4d381201a91
2021-09-30 17:41:32 +08:00
Edwin Tung
4d6a7023e1 gps: add sepolicy to allow gps access pps gpio
Bug: 175086879
Test: no avc deny
Change-Id: I960940d7223c25732021ff4d92ae72255c044291
2021-09-30 12:41:17 +08:00
Victor Liu
29aa981623 uwb: permissions for factory uwb calibration file
add permission to:
copy factory uwb calib files from persist to /data/vendor/uwb
convert copied file to proper format for uwb stack to consume

Bug: 195659525
Signed-off-by: Victor Liu <victorliu@google.com>
Change-Id: I3e5282477fd391b483e03242ce0b806bd447dc54
Merged-In: I3e5282477fd391b483e03242ce0b806bd447dc54
2021-08-25 19:14:10 +00:00
Victor Liu
8383d9e13f uwb: permissions for factory uwb calibration file
add permission to:
copy factory uwb calib files from persist to /data/vendor/uwb
convert copied file to proper format for uwb stack to consume

Bug: 195659525
Signed-off-by: Victor Liu <victorliu@google.com>
Change-Id: I3e5282477fd391b483e03242ce0b806bd447dc54
2021-08-25 19:12:44 +00:00
Bart Van Assche
37b5741301 Add the 'bdev_type' attribute to all block device types
The following patch introduces code that iterates over all block
devices:
https://android-review.googlesource.com/c/platform/system/core/+/1783847/9

The following patch grants 'init' and 'apexd' permission to iterate over
all block devices:
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1783947

The above SELinux policy change requires to add the 'bdev_type'
attribute to all block devices. Hence this patch.

Bug: 194450129
Bug: 196982345
Test: Built Android images that include this change and verified that neither init nor apexd triggers any SELinux access denied errors.
Change-Id: I6ce1127f199c5b33812f15fe280d86594d7d7ebf
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-08-17 15:23:23 -07:00
Jack Wu
d6c1a50bba sepolicy: gs101: allows pixelstat to access pca file nodes
07-23 14:24:45.512  1000  3001  3001 I pixelstats-vend: type=1400 audit(0.0:10): avc: denied { open } for path="/sys/devices/platform/10d50000.hsi2c/i2c-5/5-0057/chg_stats" dev="sysfs" ino=72245 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
07-23 14:24:45.512  1000  3001  3001 I pixelstats-vend: type=1400 audit(0.0:11): avc: denied { getattr } for path="/sys/devices/platform/10d50000.hsi2c/i2c-5/5-0057/chg_stats" dev="sysfs" ino=72245 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
07-23 14:24:57.536  1000  3001  3001 I pixelstats-vend: type=1400 audit(0.0:12): avc: denied { read } for name="chg_stats" dev="sysfs" ino=72245 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
07-23 14:24:57.536  1000  3001  3001 I pixelstats-vend: type=1400 audit(0.0:13): avc: denied { open } for path="/sys/devices/platform/10d50000.hsi2c/i2c-5/5-0057/chg_stats" dev="sysfs" ino=72245 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
07-23 14:24:57.536  1000  3001  3001 I pixelstats-vend: type=1400 audit(0.0:14): avc: denied { getattr } for path="/sys/devices/platform/10d50000.hsi2c/i2c-5/5-0057/chg_stats" dev="sysfs" ino=72245 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
07-23 14:24:57.536  1000  3001  3001 I pixelstats-vend: type=1400 audit(0.0:15): avc: denied { write } for name="chg_stats" dev="sysfs" ino=72245 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1

Bug: 194386750
Test: manually test, no avc: denied
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: I1a16edb5bb7820f62b3ce598aa50eba2d9455927
2021-07-24 06:42:39 +00:00
Badhri Jagan Sridharan
49804d8d6f Merge "Update Usb hal permissions to allow pushing overheat suez events" into sc-dev 2021-07-22 20:31:13 +00:00
Badhri Jagan Sridharan
1ebd84703b Update Usb hal permissions to allow pushing overheat suez events
Usb hal now pushes the Usb port overheat event through statsd.
Usb hal also accesses usbc-throttling stats to gather info.

Bug: 193615568
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I4918458bc7a8a25d7655b66d1fe40eafc7ccb070
2021-07-21 14:38:55 -07: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
Ilya Matyukhin
f9828a9944 Merge "raviole: transition SystemUI to use HWC for LHBM" into sc-dev 2021-06-25 01:12:52 +00:00
Ilya Matyukhin
2460cdcc9f raviole: transition SystemUI to use HWC for LHBM
This change removes direct access to the LHBM sysfs node from SystemUI,
but allows SystemUI to make binder calls to the hardware composer (HWC),
which can be used to enable or disable LHBM.

Bug: 191132545
Bug: 190563896
Bug: 184768835
Test: no avc denials
Change-Id: I5417377ff096e869ad772e4fd2fb23f8c1fd4f1e
2021-06-23 23:38:27 -07: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
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
Craig Dooley
7fe9d053e8 Merge "Allow hal_dumpstate to collect AoC statistics" into sc-dev 2021-06-17 16:32:38 +00:00
Craig Dooley
3031b077a3 Allow hal_dumpstate to collect AoC statistics
Bug: 188114650
Signed-off-by: Craig Dooley <dooleyc@google.com>
Change-Id: Iba5525af2c651070b9a5f7769c0439ef320d666b
2021-06-16 17:18:55 +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
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
Adam Shih
22fae537b5 Merge "organize EdgeTPU modules and sepolicy" into sc-dev 2021-06-10 02:53:28 +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
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
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
Aaron Ding
2dbe515943 remove sysfs_type from vendor_page_pinner_debugfs
Bug: 186500818
Change-Id: If97126a3d46d96342faf89b9698218b6a480a84b
2021-06-01 17:38:28 +08: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
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
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
Hridya Valsaraju
9e6528da08 Label debugfs files correctly
A few debugfs files are labelled as belonging to both debugfs_type and
sysfs_type. Hence, any client that is provided access to sysfs_type will
automatically be provided access to these files. This patch corrects the
labelling for these files to prevent this.

Test: build
Bug: 186500818
Change-Id: I364a73a960824cc9051610032179fd5caeca09de
2021-05-11 17:35:17 -07:00