Commit graph

1522 commits

Author SHA1 Message Date
KRIS CHEN
b4c75c1767 Merge "Allow fingerprint to access the folder /data/vendor/fingerprint" into main 2024-05-08 08:46:30 +00:00
chenkris
44f0166eb6 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: Id3f00d526dbe044f60aad2198fa65fbe3b6b2c60
2024-05-08 06:48:55 +00:00
Enzo Liao
b0daa90c01 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: I568f43ab8ed8f5ab330cbda19cd68bcc12838fdf
2024-04-08 19:37:33 +08:00
kadirpili
ec6f15d812 gs101: telephony property for cbd
Bug: 316817111
Change-Id: Idf85b27d755cff0fb5fffb088d13b105c25beb3b
2024-03-27 07:35:01 +00:00
Hungyen Weng
3a2d59d8a9 Allow modem_svc to access modem files and perfetto
Bug: 331147031
Bug: 330730987

Test: Confirmed that modem_svc is able to access token db files in modem partition
Test: Confiemed that modem_svc can send traces to perfetto
Test: Confirmed v2/pixel-health-guard/device-boot-health-check-extra has no modem_svc avc denials.

Change-Id: I5fabd3177c758be533ca8bdef3cb3305afd6a5a6
2024-03-25 22:15:19 +00:00
Spade Lee
9b44bbebe8 Merge "pixelstats_vendor: add logbuffer_device r_file_perms" into main 2024-03-22 07:30:31 +00:00
Spade Lee
66d3a4ef4e 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: I2c6069f43d17114f937657724dc34e43cf3d48fe
Signed-off-by: Spade Lee <spadelee@google.com>
2024-03-21 00:29:41 +00:00
Spade Lee
9ddb9bab3d 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: I13ef8c4d9b0f84a8641cfbe12a7b5cf89a97d3da
Signed-off-by: Spade Lee <spadelee@google.com>
2024-03-20 18:18:07 +00:00
Treehugger Robot
59b8b15882 Merge "Add AIDL media.c2 into service_contexts" into main 2024-03-05 06:17:02 +00:00
Treehugger Robot
2a9b7e75e3 Merge "add dsim wakeup labels" into main 2024-03-04 02:58:52 +00:00
Krzysztof Kosiński
6f152690d9 Allow camera to acquire wakelocks.
This is already allowed on all other Google chips and used
for a face auth latency optimization.

Fix: 303391687
Test: check logs on raven
Change-Id: I6f70b70d1cf4c055ce9f3e76c1fca0ae0c3e070d
2024-02-23 03:01:52 +00:00
William McVicker
ea03d9909d Merge "Update i2c sepolicy with new device names" into main 2024-02-22 17:54:41 +00:00
Lei Ju
40465c1988 [gs101] Use common settings for Contexthub HAL
The change also labeled files under /data/vendor/chre/ to grant
required access.

Test: compilation
Bug: 248615564
Change-Id: I4db158853764987cf04dc7963ff79c680613f028
2024-02-18 11:41:51 -08:00
Peter Lin
7af07fe0e4 add dsim wakeup labels
Bug: 323086660
Bug: 321733124
test: ls sys/devices/platform/1c2c0000.drmdsim/1c2c0000.drmdsim.0/wakeup -Z
Change-Id: Ic47c14713727de1639e456fb6b2f0fc7d9810dc6
2024-02-17 08:13:04 +00:00
Will McVicker
3ad00c9539 Update i2c sepolicy with new device names
The new names fix uninformative kernel wakelock names.

Bug: 315190967
Bug: 323447554
Change-Id: Iff6eccb677444357f867785f213dadd70fb649c1
2024-02-16 14:54:04 -08:00
Jacky Liu
3a53df7d7a Update i2c device paths
Update i2c device paths with static bus numbers.

Bug: 323447554
Test: Boot to home
Change-Id: I5aacc4db4726f7608b2049bd2efb1d8732d3cdcf
2024-02-06 16:17:08 +00:00
Wonsik Kim
811682e50f Add AIDL media.c2 into service_contexts
Bug: 321808716
Test: adb shell dumpsys android.hardware.media.c2.IComponentStore/default
Test: adb shell dumpsys android.hardware.media.c2.IComponentStore/default1
Change-Id: Ifef80e6d12e1b0c9e5d2ce6b33a61b51239683de
2024-01-29 22:43:51 +00:00
Darren Hsu
7ea71a9c1c sepolicy: allow hal_power_stats to read sysfs_display
avc:  denied  { read } for  name="available_disp_stats"
dev="sysfs" ino=76162 scontext=u:r:hal_power_stats_default:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

Bug: 321848496
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I869e80af8994408e7eef279b6a5eb59d6d2c406b
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2024-01-29 11:49:47 +08:00
Treehugger Robot
59e8449b01 Merge "Correct the path of tcpm wakelock" into main 2024-01-18 10:16:20 +00:00
Kyle Tso
29021574e6 Correct the path of tcpm wakelock
Bug: 315190967
Change-Id: I01f8da9e0467f34cd0229bf9c5370d062ca78130
Signed-off-by: Kyle Tso <kyletso@google.com>
2024-01-15 15:56:39 +08:00
Mahesh Kallelil
dc869395ad Merge "Fix SELinux error in dump_modem" into main 2024-01-12 06:36:51 +00:00
Mahesh Kallelil
ea7ccea15c Fix SELinux error in dump_modem
The cpif logbuffer did not have the right context and was
missing as part of the bugreport.

Test: Tested bugreport on device
Bug: 305600375
Change-Id: I2101037d0044e706969f2582e29f923ae029458b
Signed-off-by: Mahesh Kallelil <kallelil@google.com>
2024-01-11 09:24:22 -08:00
Ken Yang
6073bb0ff8 selinux: label wakeup for BMS I2C 0x36, 0x69
Bug: 319035561
Change-Id: Ib339ce27cc89a02825be51f1bf49fe727ac9fb67
Signed-off-by: Ken Yang <yangken@google.com>
2024-01-10 06:13:47 +00:00
Wen Chang Liu
4a0a6e1d78 Merge "gs101: move mediacodec_samsung sepolicy to gs-common" into main 2024-01-09 14:49:59 +00:00
wenchangliu
da91eed387 gs101: move mediacodec_samsung sepolicy to gs-common
remove mediacodec_samsung sepolicy in legacy path since we will include it from gs-common.

Bug: 318793681
Test: build pass, camera record, youtube
Change-Id: Idc0e19348d1e113e95305279aebbbaf82c79d730
2024-01-05 10:14:32 +00:00
Chi Zhang
0212befe1e Allow GRIL to get power stats.
AVC log: SELinux : avc:  denied  { find } for pid=3147 uid=10219 name=android.hardware.power.stats.IPowerStats/default scontext=u:r:grilservice_app:s0:c219,c256,c512,c768 tcontext=u:object_r:hal_power_stats_service:s0 tclass=service_manager permissive=0

Bug: 286187143
Test: build and boot
Change-Id: Iff51df55ad0011815b764b334801dedc6a6d1cbc
2023-12-19 12:20:20 -08:00
Boon Jun Soh
548c2f184d Fix rlsservice sepolicy
Allows bugreport generation

Bug: 315255760
Bug: 309379598
Test: abd bugreport & ensure lack of rls avc denied logs
Change-Id: Ib3fc7b089c7aea4aea69f219d4c19847d39b0729
2023-12-11 14:39:32 +08:00
David Drysdale
422638059a Merge "Add Secretkeeper HAL" into main 2023-12-06 10:21:03 +00:00
David Drysdale
03785012ed Add Secretkeeper HAL
Test: VtsAidlAuthGraphSessionTest
Bug: 306364873
Change-Id: I72d9d9afd57d265bd2a019a02d6aa364deb4acb4
2023-12-05 10:38:01 +00:00
Jason Chiu
3f3bfddaff gs101: move common sepolicy related to bootctrl hal to gs-common
Bug: 265063384
Change-Id: I2e7bee9c6be4a6802a759bf52fb412dd73f868bd
Signed-off-by: Jason Chiu <jasoncschiu@google.com>
2023-12-05 01:24:03 +08:00
Khoa Hong
213b76e9b8 Suppress avc error log on debugfs's usb folder.
The XHCI driver in kernel will write debugging information to DebugFS on
some USB host operations (for example: plugging in a USB headphone). We
are not using those information right now.

Bug: 311088739
Test: No error when plugging a USB headphone in.
Change-Id: If7c511f4466959d819f2672ae8f82a8a8dae83e4
2023-11-30 15:01:37 +08:00
Randall Huang
ec6ba5806d Move sg_device related policy
Bug: 312582937
Test: make selinux_policy
Change-Id: I27a86d47777a6d769b93fc1c40ae27dacf83ab10
Signed-off-by: Randall Huang <huangrandall@google.com>
2023-11-22 14:01:33 +08:00
Bryan Lavrich
a1bff1c2e9 Merge "aoc: add sysfs file entry" into main 2023-11-20 20:22:27 +00:00
Devika Krishnadas
4ed070d0aa Merge "Add Pixel Mapper as a sp-HAL" into main 2023-11-20 18:17:28 +00:00
Devika Krishnadas
1f9e3a93e1 Add Pixel Mapper as a sp-HAL
Bug: 267352318

Change-Id: I77b064c3eae2b47677ee83df8483e6f7aba08e6e
Signed-off-by: Devika Krishnadas <kdevika@google.com>
2023-11-16 01:17:05 +00:00
Daniel Norman
c9fcb3e550 Merge "Removes duplicate hidraw_device type definition." into main 2023-11-14 19:05:05 +00:00
Lei Ju
406bfbcee7 Merge "Set up sepolicy for CHRE HAL process" into main 2023-11-14 17:58:30 +00:00
Daniel Norman
e948bb326a Removes duplicate hidraw_device type definition.
This type is now defined by the platform.

Bug: 303522222
Change-Id: I3e1fc7cb102fa9e9a80b8751eb0da505e3b3d69f
Test: ls -z /dev/hidraw0
2023-11-10 22:53:15 +00:00
Lei Ju
89dd17c9ad Set up sepolicy for CHRE HAL process
Contexthub (CHRE) team is removing the chre daemon and incorporating
its functionalities into the next gen HAL. This CL copied the
permissions we received in whitechapel/vendor/google/chre.te to
hal_contexthub.te to enable the same set of permissions on gs101.

Bug: 247124878
Test: launch the hal process on oriole and verify it can perform
required operations such as loading nanoapps holding wakelocks,
query nanoapps, etc.

Change-Id: I8ce6b4f7f411e50cf454bb5f1286f73d4d46aced
2023-11-10 14:18:05 -08:00
Alex Iacobucci
8966bfa237 aoc: add sysfs file entry
Test: on device
Bug: 309950738
Change-Id: I7e2ceaa61c7870ace37014ad39f3a119f3712569
Signed-off-by: Alex Iacobucci <alexiacobucci@google.com>
2023-11-10 18:28:51 +00:00
Mike Wang
a6c7f726b5 Change the MDS to platform app in selinux ap context.
The MDS will be signed with platform key and become a platform app. To
make the selinux rules for modem_diagnostic_app work, need to set it to
platform app in app context.

Bug: 287683516

Test: Tested with both dev key or platform key signed MDS apps and the selinux rules works.
Change-Id: If890f7caaac33e5ddc6c02cc8084654a10cea416
2023-11-09 07:17:07 +00:00
Rick Chen
04e4ac1717 sensors: Move USF related sepolicy to gs-common.
Bug: 305120274
Test: Compile pass. Flash the build to WHI devices and no sensor
      related avc denied log.
Change-Id: I56174a24d159968c01d1572e84f4bcdd7930a709
Signed-off-by: Rick Chen <rickctchen@google.com>
2023-11-07 10:50:48 +08:00
JimiChen
ea198bd127 Update SELinux policies for rlsservice
1. Move rls_service context from vndservice_contexts to
   service_contexts.
2. Allow binder calls from rlsservice to servicemanager
3. Change rls_service type from vndservice_manager_type to
   service_manager_type.

Bug: 301520085
Test: GCA
Change-Id: I7badfe2ddb73b13884b54d2c8972e1921af6ea38
2023-11-01 18:20:45 +08:00
Will McVicker
f0047396de Move i2c-cs40l26a to gs101-sepolicy
The i2c-7/7-0043 label is shared with both i2c-7/i2c-cs40l25a and
i2c-7/i2c-cs40l26a nodes. To make it clear that these all are related,
let's move i2c-7/i2c-cs40l26a to gs101-sepolicy and have all the gs101
vibrator policy labels together.

Bug: 302549624
Bug: 291606723
Test: Verify i2c nodes on r4
Fixes: ccdd975a88d0 ("Update the cs40l26a i2c device node sepolicy labeling")
Change-Id: I2950a2c064e31e300d07f124cf1a7bfc00ae58c3
2023-09-29 09:21:48 -07:00
Will McVicker
d17c49fd0a Update the i2c device node sepolicy labeling
This change needs to be merged with the corresponding kernel change that
sets the i2c bus aliases correctly to match the existing v5.10 bus
probe ordering.

To verify the sepolicy labeling doesn't change, run the below commands
and diff the stdout on builds with and without the changes. For extra
credit, verify the nodes are labeled the same when upgrading the kernel
to v6.1 (with the correct i2c aliases to match the existing policy):

  acpm_bus_array=("acpm_mfd_bus@17500000" "acpm_mfd_bus@17510000")
  for bus in ${acpm_bus_array[@]}; do
    adb shell ls -ZR /sys/devices/platform/${bus}/i2c-*;
  done

  bus_array=("10960000" "10970000" "10d50000" "10900000")
  for bus in ${bus_array[@]}; do
    adb shell ls -ZR /sys/devices/platform/${bus}.hsi2c/i2c-*;
  done

Test: verify on r4
Bug: 291606723
Change-Id: Ifbfc53fbeb39a47cda4263fc706f11af6675d90e
2023-09-29 09:21:44 -07:00
Roy Luo
fb8d2f7d73 Revert "Update the i2c device node sepolicy labeling"
Revert submission 24855741-gs101-i2c-bus-fixes

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_main&target=bluejay-trunk_food-userdebug&lkgb=10876543&lkbb=10876988&fkbb=10876587, bug b/302549624.

Reverted changes: /q/submissionid:24855741-gs101-i2c-bus-fixes

Change-Id: Iea8fe5b374609225ab07aa13effcb1d6e8d13468
BUG: 302549624
2023-09-28 18:00:13 +00:00
Will McVicker
421a5fef33 Update the i2c device node sepolicy labeling
This change needs to be merged with the corresponding kernel change that
sets the i2c bus aliases correctly to match the existing v5.10 bus
probe ordering.

To verify the sepolicy labeling doesn't change, run the below commands
and diff the stdout on builds with and without the changes. For extra
credit, verify the nodes are labeled the same when upgrading the kernel
to v6.1 (with the correct i2c aliases to match the existing policy):

  acpm_bus_array=("acpm_mfd_bus@17500000" "acpm_mfd_bus@17510000")
  for bus in ${acpm_bus_array[@]}; do
    adb shell ls -ZR /sys/devices/platform/${bus}/i2c-*;
  done

  bus_array=("10960000" "10970000" "10d50000" "10900000")
  for bus in ${bus_array[@]}; do
    adb shell ls -ZR /sys/devices/platform/${bus}.hsi2c/i2c-*;
  done

Test: verify on r4
Bug: 291606723
Change-Id: Id5b9021cdbf4b9d3578d5e9ee655463ab62dcd12
2023-09-25 13:04:31 -07:00
Treehugger Robot
a4ceb907b6 Merge "Move coredomain seapp ctx and types to system_ext" into main 2023-09-05 23:21:35 +00:00
Inseob Kim
fb3a116366 Move coredomain seapp ctx and types to system_ext
Coredomain apps shouldn't be labeled with vendor sepolicy, due to Treble
violation.

Bug: 280547417
Test: build bluejay and boot test
Change-Id: I48441749de4eb1de90ce5a307b1d47ae3cb9592d
2023-09-05 04:20:00 +00:00
yixuanjiang
a785706208 Label AoC wakeup for system suspend
Bug: 291237382
Change-Id: Iddcee44cbe921b590a240c75504a0a44634a244d
Signed-off-by: yixuanjiang <yixuanjiang@google.com>
2023-09-05 03:01:07 +00:00