Commit graph

853 commits

Author SHA1 Message Date
Roy Luo
371f678632 Revert^2 "Add udc sysfs to udc_sysfs fs context"
This reverts commit 66ba3214b8.

Reason for revert: fix breakage in next build with build-time flag in
selinux policy.

Fixed the following audit logs:
[  285.983545] type=1400 audit(1724270284.724:31): avc:  denied  { read } for  comm="android.hardwar" name="state" dev="sysfs" ino=85740 scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:sysfs_udc:s0 tclass=file permissive=0

Bug: 339241080
Test: tested on Shiba trunk_staging and next builds
Flag: build.RELEASE_USB_UDC_SYSFS_SELINUX_POLICY_ENABLED
Change-Id: Ie4979f408a5bca0bb9b9762048ab716ddeeb4d2f
2024-08-21 22:15:22 +00:00
Gil Liu
cab53ff9d9 Merge "add hal_graphics_composer to access thermal temperature" into main 2024-07-29 06:10:29 +00:00
Treehugger Robot
6dd8b82b22 Merge "Correct the path of tcpm-source-psy device" into main 2024-07-26 02:04:31 +00:00
Manali Bhutiyani
faaaf11fd9 Merge "DisplayPort Stats: add sysfs access permission on Zuma devices" into main 2024-07-25 15:46:01 +00:00
Carlos Rodriguez
6e54536670 DisplayPort Stats: add sysfs access permission on Zuma devices
07-24 18:17:43.428 W/pixelstats-vend( 7494): type=1400 audit(0.0:48): avc:  denied  { read } for  name="fec_dsc_supported" dev="sysfs" ino=71618 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
07-24 18:17:43.428 W/pixelstats-vend( 7494): type=1400 audit(0.0:49): avc:  denied  { read } for  name="fec_dsc_not_supported" dev="sysfs" ino=71619 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
07-24 18:17:43.428 W/pixelstats-vend( 7494): type=1400 audit(0.0:50): avc:  denied  { read } for  name="max_res_other" dev="sysfs" ino=71617 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
07-24 18:17:43.428 W/pixelstats-vend( 7494): type=1400 audit(0.0:51): avc:  denied  { read } for  name="max_res_1366_768" dev="sysfs" ino=71607 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
07-24 18:17:43.428 W/pixelstats-vend( 7494): type=1400 audit(0.0:52): avc:  denied  { read } for  name="max_res_1440_900" dev="sysfs" ino=71608 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
07-24 18:17:43.428 W/pixelstats-vend( 7494): type=1400 audit(0.0:53): avc:  denied  { read } for  name="max_res_1600_900" dev="sysfs" ino=71609 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
07-24 18:17:43.428 W/pixelstats-vend( 7494): type=1400 audit(0.0:54): avc:  denied  { read } for  name="max_res_1920_1080" dev="sysfs" ino=71610 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
07-24 18:17:43.428 W/pixelstats-vend( 7494): type=1400 audit(0.0:55): avc:  denied  { read } for  name="max_res_2560_1080" dev="sysfs" ino=71611 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
07-24 18:17:43.428 W/pixelstats-vend( 7494): type=1400 audit(0.0:56): avc:  denied  { read } for  name="max_res_2560_1440" dev="sysfs" ino=71612 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
.....

Bug: 343602691
Bug: 317486088

Flag: EXEMPT bugfix
Test: Built and flashed, errors are gone.

Change-Id: I49d177d2a997698b05f27bd4c448847ed3110e59
2024-07-24 23:49:52 +00:00
Kyle Tso
4358dc4f7e Correct the path of tcpm-source-psy device
Bug: 353804370
Flag: EXEMPT bugfix
Change-Id: I059a652d13ffdf186fb36edb11ef4c1dc6ac8648
Signed-off-by: Kyle Tso <kyletso@google.com>
2024-07-24 02:13:54 +00:00
gilliu
1dde3ea2ff add hal_graphics_composer to access thermal temperature
type=1400 audit(0.0:77): avc:  denied  { search } for  name="thermal"
dev="tmpfs" ino=1618 scontext=u:r:hal_graphics_composer_default:s0
tcontext=u:object_r:thermal_link_device:s0 tclass=dir permissive=0

type=1400 audit(0.0:74): avc:  denied  { search } for  name="thermal"
dev="sysfs" ino=21594 scontext=u:r:hal_graphics_composer_default:s0
tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0

type=1400 audit(0.0:74): avc:  denied  { read } for  name="temp"
dev="sysfs" ino=73536 scontext=u:r:hal_graphics_composer_default:s0
tcontext=u:object_r:sysfs_thermal:s0 tclass=file permissive=0

type=1400 audit(0.0:74): avc:  denied  { getattr } for
path="/sys/devices/virtual/thermal/thermal_zone12/temp" dev="sysfs"
ino=73537 scontext=u:r:hal_graphics_composer_default:s0
tcontext=u:object_r:sysfs_thermal:s0 tclass=file permissive=0

Bug: 343141590
Test: check no avc pattern on logcat from test image
Flag: NONE add permission
Change-Id: I87fce47644b07342d756e7594685eea0dded1926
2024-07-23 09:05:16 +00:00
Roy Luo
66ba3214b8 Revert "Add udc sysfs to udc_sysfs fs context"
Revert submission 27445245-339241080

Reason for revert: break husky-next-user (linux) build 12111903

Reverted changes: /q/submissionid:27445245-339241080
Bug: 339241080
Change-Id: If558e5bef47a0e617e4b4997f0ad9c8154b43ee9
2024-07-19 01:16:47 +00:00
Roy Luo
eb5a3cd47a Add udc sysfs to udc_sysfs fs context
This is needed for system server to monitor usb gadget state.
Grant hal_usb_impl read access as it's needed by UsbDataSessionMonitor.

Bug: 339241080
Test: tested on Shiba
Flag: android.hardware.usb.flags.enable_udc_sysfs_usb_state_update
Change-Id: Iab3c20569cb22d7524ca303f6cb3eaf40aa2161d
2024-07-18 22:56:15 +00:00
Vishvam Mazumdar
c802ed6d63 Merge "Add SELinux policy to allow CPU Idle Histogram Stats in dumpstate." into main 2024-07-10 21:41:10 +00:00
Vishvam Mazumdar
1dac9a1726 Add SELinux policy to allow CPU Idle Histogram Stats in dumpstate.
This change is to allow the CPU Idle Histogram Stats to be dumped in
bugreports so that there is more insight into the idle behavior of
devices in the field.

Test: build/flash
Test: adb bugreport
Bug: 344908619
Flag: EXEMPT bugfix
Change-Id: Ic1096564423a009a0180d7f771da8184688c1842
Signed-off-by: Vishvam Mazumdar <vmazumdar@google.com>
2024-07-10 21:39:07 +00:00
Treehugger Robot
a44d754cfa Merge "Give bthal permission to read AoC version." into main 2024-06-28 05:50:59 +00:00
Madhav Iyengar
00484704f8 Give bthal permission to read AoC version.
Bug: 349661931
Flag: com.android.bluetooth.hal.flags.pixel_bt_aoc_offload_efw_xport
Test: Allows bthal to choose between USF and EFW transports to
communicate with AoC based on version.

Change-Id: I3edbcafd4ee5d0c875618c1a1c1b89e1bbd4d1ec
2024-06-28 01:15:50 +00:00
Sergey Volk
77518a2614 Add sepolicy for DisplayPort wakeup node
Bug: 348125717
Test: ls -Z /sys/devices/platform/110f0000.drmdp/wakeup
Flag: NONE (follow up fix for merged non-flagged CL pa/2839256)
Change-Id: I9181b2344f2448b9debe1522528545ce90de8768
2024-06-26 20:53:57 +00:00
Cheng Chang
7969077e3b gps: Move hal_gnss_pixel declaration to device folder am: 5ff76196c8
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zuma-sepolicy/+/27576137

Change-Id: Ic16f628926a47350f0e0caf7293e1cfa4521a7fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-12 07:27:17 +00:00
Cheng Chang
5ff76196c8 gps: Move hal_gnss_pixel declaration to device folder
Bug: 343280252
Test: b/343280252 compile and abtd test
Change-Id: Ief591d28aaea4223f05917d29bc896edec065613
2024-06-11 06:23:21 +00:00
chenkris
090928722e Add sepolicy for fingerprint HAL to check NSP file
Fix the following avc denials:
avc:  denied  { search } for  name="copied" dev="dm-58" ino=428
scontext=u:r:hal_fingerprint_default:s0
tcontext=u:object_r:modem_efs_image_file:s0 tclass=dir

avc:  denied  { search } for  name="persist" dev="dm-58" ino=443
scontext=u:r:hal_fingerprint_default:s0
tcontext=u:object_r:persist_file:s0 tclass=dir

avc:  denied  { search } for  name="ss" dev="dm-58" ino=445
scontext=u:r:hal_fingerprint_default:s0
tcontext=u:object_r:persist_ss_file:s0 tclass=dir

avc:  denied  { read } for  name="nsp" dev="dm-58" ino=15500
scontext=u:r:hal_fingerprint_default:s0
tcontext=u:object_r:persist_ss_file:s0 tclass=file

avc:  denied  { open } for  path="/data/vendor/copied/persist/ss/nsp"
dev="dm-58" ino=15500
scontext=u:r:hal_fingerprint_default:s0
tcontext=u:object_r:persist_ss_file:s0 tclass=file

Bug: 335525798
Test: Use UDFPS repair tool to update calibration files
Change-Id: Ic233a07ced8fd828c0e4b4ae1cffa93763a83b42
2024-05-29 04:39:37 +00:00
Shiyong Li
0455a656b7 Merge "Add sepolicy for power_state node" into 24D1-dev am: 7107af6af0
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zuma-sepolicy/+/27057168

Change-Id: Iebbdf2275b4d0460ac58100db1ab1b865ed63d04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-09 05:21:38 +00:00
Shiyong Li
7107af6af0 Merge "Add sepolicy for power_state node" into 24D1-dev 2024-05-09 05:16:16 +00:00
KRIS CHEN
3cbe2de42c Merge "Allow fingerprint to access the folder /data/vendor/fingerprint" into main 2024-05-08 08:46:30 +00:00
chenkris
4035d467ad Allow fingerprint to access the folder /data/vendor/fingerprint
Fix the following avc denial:
android.hardwar: type=1400 audit(0.0:20): avc:  denied  { write } for  name="fingerprint" dev="dm-56" ino=36703 scontext=u:r:hal_fingerprint_default:s0 tcontext=u:object_r:vendor_data_file:s0 tclass=dir permissive=0

Bug: 267766859
Test: Tested fingerprint under enforcing mode
Change-Id: Iadd058432b7db8c20a949aeda1df5f8309663004
2024-05-08 06:48:41 +00:00
Pechetty Sravani
2bf59857da Revert "Add necessary sepolicy for convert_modem_to_ext4"
Revert submission 26822004

Reason for revert: <Potential culprit for b/339099720- verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>

Reverted changes: /q/submissionid:26822004

Change-Id: I90e3bf5ecbdf6c058c56293cfba59c628ccc7aba
2024-05-07 08:50:45 +00:00
Enzo Liao
c3c5b0fb90 Merge "Move SELinux policies of RamdumpService and SSRestartDetector to /gs-common." into 24D1-dev 2024-04-25 08:22:06 +00:00
Spade Lee
52df1a478b pixelstats_vendor: add logbuffer_device r_file_perms
avc: denied { read } for name="logbuffer_maxfg_monitor" dev="tmpfs" ino=1034 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:logbuffer_device:s0 tclass=chr_file permissive=0

Bug: 329174074
Test: no denied log, and able to read logbuffer in pixelstats_vendor
Signed-off-by: Spade Lee <spadelee@google.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3f707d13c29300fab31a1ba6a8657771ba4946a8)
Merged-In: Ieca53f3092355c72784d4216c138cbb7cc9c7fa4
Change-Id: Ieca53f3092355c72784d4216c138cbb7cc9c7fa4
2024-04-25 06:11:20 +00:00
Kevin Ying
a78ae51ef1 Add sepolicy for power_state node
Bug: 329703995
Test: manual - used camera
Change-Id: I1f156fe7f10210b933f360fef771cb37ff3cbedb
Signed-off-by: Kevin Ying <kevinying@google.com>
2024-04-24 19:10:19 +00:00
Kelvin Zhang
276b386b6f Add necessary sepolicy for convert_modem_to_ext4
Test: reformat data as ext4, reboot
Bug: 293313353
Change-Id: Iede84b1827166f1581d80077fe1c4d93d01a815b
2024-04-22 10:14:13 -07:00
Kelvin Zhang
c1341de4c3 Add necessary sepolicy for ro.vendor.persist.status
This prop will be set to "mounted" after /mnt/vendor/persist mounts.
Need this prop to synchronize different actions in init.rc script.

Test: th
Bug: 319335586
Change-Id: I9e8bd5e875956393d610b7def6be713565543d05
2024-04-22 10:14:12 -07:00
Enzo Liao
7c420c0703 Move SELinux policies of RamdumpService and SSRestartDetector to /gs-common.
New paths (ag/26620507):
  RamdumpService: device/google/gs-common/ramdump_app
  SSRestartDetector: device/google/gs-common/ssr_detector_app

Bug: 298102808
Design: go/sys-software-logging
Test: Manual
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:df85139d173644b7ec44cb7151845026872a1648)
Merged-In: Id42c4de6c29d4a95f8a68a5732c4732edfb71da8
Change-Id: Id42c4de6c29d4a95f8a68a5732c4732edfb71da8
2024-04-22 03:02:53 +00:00
Martin Liu
e028d802db move common MM policy to gs common folder
Bug: 332916849
Bug: 309409009
Test: boot
Change-Id: I05803943752f7b021c9d4f97b475b493f6ceadcb
Signed-off-by: Martin Liu <liumartin@google.com>
2024-04-18 01:59:46 +00:00
Krzysztof Kosiński
d4f04d19cc Remove rlsservice sepolicy. am: 41c22587a2
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zuma-sepolicy/+/26948256

Change-Id: I60d0c43786dc869f9d69ce7c95e2199652efda3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-15 21:58:31 +00:00
Krzysztof Kosiński
41c22587a2 Remove rlsservice sepolicy.
rlsservice is not included on zuma and later, only gs101/gs201.
Relevant code search link:
https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:vendor/google/services/LyricCameraHAL/src/apex/Android.bp;l=26;drc=e4b49a6d945df6d5210c35251de8046b162d799d

Bug: 278627483
Test: presubmit
Change-Id: I15398ddeea8c0a10920c987e55789ba4a8322774
2024-04-12 22:03:22 +00:00
Treehugger Robot
32ce8f9878 Merge "allow vendor init to access compaction_proactiveness" into main 2024-04-12 15:03:00 +00:00
Martin Liu
fb44539d8d allow vendor init to access compaction_proactiveness
Bug: 332916849
Test: boot
Change-Id: If1930fe0f174f2794296ded69d29420f2e59f6c2
Signed-off-by: Martin Liu <liumartin@google.com>
2024-04-10 23:34:49 +00:00
Enzo Liao
df85139d17 Move SELinux policies of RamdumpService and SSRestartDetector to /gs-common.
New paths (ag/26620507):
  RamdumpService: device/google/gs-common/ramdump_app
  SSRestartDetector: device/google/gs-common/ssr_detector_app

Bug: 298102808
Design: go/sys-software-logging
Test: Manual
Change-Id: Id42c4de6c29d4a95f8a68a5732c4732edfb71da8
2024-04-08 19:21:13 +08:00
Treehugger Robot
0a3562a15c Merge "display: low-light blocking zone support" into 24D1-dev 2024-04-04 02:46:42 +00:00
cweichun
495b0120ea display: low-light blocking zone support
Bug: 315876417
Test: verify the functionality works
Change-Id: Id8972d4c9057aa76f72dd32d47a5d07c0822645b
2024-04-02 15:25:43 +00:00
Spade Lee
0ac2d9f7bc sepolicy: allow kernel to search vendor debugfs
audit: type=1400 audit(1710259012.824:4): avc:  denied  { search } for  pid=128 comm="kworker/3:1" name="max77779fg" dev="debugfs" ino=24204 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=dir permissive=0
audit: type=1400 audit(1710427790.680:2): avc:  denied  { search } for  pid=10 comm="kworker/u16:1" name="gvotables" dev="debugfs" ino=10582 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_votable_debugfs:s0 tclass=dir permissive=1
audit: type=1400 audit(1710427790.680:3): avc:  denied  { search } for  pid=211 comm="kworker/u16:4" name="google_charger" dev="debugfs" ino=16673 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_charger_debugfs:s0 tclass=dir permissive=1

Bug: 328016570
Bug: 329317898
Test: check all debugfs folders are correctly mounted
Change-Id: I0e0c2fee4d508cc4e76714df0efbe5eca7ca5966
Signed-off-by: Spade Lee <spadelee@google.com>
2024-04-02 07:35:39 +00:00
Treehugger Robot
2a01ceedb9 Merge "display: low-light blocking zone support" into main 2024-04-02 04:21:29 +00:00
cweichun
e9c8f2af69 display: low-light blocking zone support
Bug: 315876417
Test: verify the functionality works
Change-Id: Id8972d4c9057aa76f72dd32d47a5d07c0822645b
2024-04-01 22:31:48 +00:00
Albert Wang
c24ead7ce9 usb: correct the xhci wakeup path
Error log:
Error opening kernel wakelock stats for: wakeup177 (...xhci-hcd-exynos.5.auto/usb1/1-1/wakeup/wakeup177): Permission denied

bug: 311087938
Test: boot to home and host mode works well
Change-Id: I8bdd38499dec3852ba33510f40e58cebd3a4560f
2024-03-27 10:26:45 +00:00
Spade Lee
dbc39c622b Merge "pixelstats_vendor: add logbuffer_device r_file_perms" into main 2024-03-22 07:30:31 +00:00
Spade Lee
6ad6fb5edb sepolicy: allow kernel to search vendor debugfs
audit: type=1400 audit(1710259012.824:4): avc:  denied  { search } for  pid=128 comm="kworker/3:1" name="max77779fg" dev="debugfs" ino=24204 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_maxfg_debugfs:s0 tclass=dir permissive=0
audit: type=1400 audit(1710427790.680:2): avc:  denied  { search } for  pid=10 comm="kworker/u16:1" name="gvotables" dev="debugfs" ino=10582 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_votable_debugfs:s0 tclass=dir permissive=1
audit: type=1400 audit(1710427790.680:3): avc:  denied  { search } for  pid=211 comm="kworker/u16:4" name="google_charger" dev="debugfs" ino=16673 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_charger_debugfs:s0 tclass=dir permissive=1

Bug: 328016570
Bug: 329317898
Test: check all debugfs folders are correctly mounted
Change-Id: I0e0c2fee4d508cc4e76714df0efbe5eca7ca5966
Signed-off-by: Spade Lee <spadelee@google.com>
2024-03-20 18:16:41 +00:00
Spade Lee
3f707d13c2 pixelstats_vendor: add logbuffer_device r_file_perms
avc: denied { read } for name="logbuffer_maxfg_monitor" dev="tmpfs" ino=1034 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:logbuffer_device:s0 tclass=chr_file permissive=0

Bug: 329174074
Test: no denied log, and able to read logbuffer in pixelstats_vendor
Change-Id: Ieca53f3092355c72784d4216c138cbb7cc9c7fa4
Signed-off-by: Spade Lee <spadelee@google.com>
2024-03-14 03:31:14 +00:00
John Chang
28e6526f84 display: change vrr.enabled to xrr.version
Bug: 328001545
Test: Test MRR Version 2 is properly configured
Change-Id: Ide6493d77a6047023f20fbd9c5723a36033e3691
2024-03-07 22:19:51 +00:00
John Chang
7baab4b7e7 display: change vrr.enabled to xrr.version
Bug: 328001545
Test: Test MRR Version 2 is properly configured
Change-Id: Ide6493d77a6047023f20fbd9c5723a36033e3691
2024-03-06 16:13:39 +00:00
Treehugger Robot
10dcc53e99 Merge "Add AIDL media.c2 into service_contexts" into main 2024-03-05 06:17:02 +00:00
Sungtak Lee
84531ff361 Add AIDL media.c2 into service_contexts
Bug: 321808716
Change-Id: I7c79bc46112b8330c6d2a62db030ecc13d1cece4
2024-02-27 18:05:41 +00:00
Treehugger Robot
48a81fa140 Merge "add dsim wakeup labels" into main 2024-02-27 13:14:49 +00:00
Peter Lin
161bbcd1e6 add dsim wakeup labels
Bug: 320693841
Bug: 321733124
test: ls sys/devices/platform/19440000.drmdsim/19440000.drmdsim.0/wakeup -Z
Change-Id: Ie99007455ef3879c8ee0aa1fa20801e4baf5e978
2024-02-17 08:11:13 +00:00
Will McVicker
1d8864cdee Update tcpm i2c sepolicy with new device name
The new names fix uninformative kernel wakelock names.

Bug: 315190967
Bug: 323447554
Change-Id: I5e0a4e13484c9886be398782e580313892987e2f
2024-02-16 15:15:55 -08:00