Commit Graph

75 Commits

Author SHA1 Message Date
mikairyuu
71c3721b85 sm7250-common: sepolicy: Label remaining wakeup nodes 2022-08-22 17:24:59 +03:00
mikairyuu
6268953703 sm7250-common: Build Pixel Thermal HAL 2022-08-20 15:52:26 +03:00
mikairyuu
d7397d77ef [TEMP] Switch to mock thermal 2022-08-19 12:22:21 +03:00
mikairyuu
acca122455 sm7250-common: sepolicy: resolve some denials 2022-06-20 18:53:30 +10:00
mikairyuu
dd25b98a11 sm7250-common: sepolicy: Properly address multiple denials 2022-06-17 18:49:41 +10:00
iusmac
1ea059b2ea sm7250-common: sepolicy: Adress IORap usap_pool denial
W FinalizerDaemon: type=1400 audit(0.0:532): avc: denied { getopt } for path="/dev/socket/usap_pool_primary" scontext=u:r:radio:s0 tcontext=u:r:zygote:s0 tclass=unix_stream_socket permissive=0

Signed-off-by: iusmac <iusico.maxim@libero.it>
2022-06-17 18:49:41 +10:00
mikairyuu
0d4e6f43f7 sm7250-common: Fix wcnss denial 2022-06-17 18:49:41 +10:00
Aayush Gupta
17a8740165 sm7250-common: sepolicy: Allow hal_health_default required permissions
12-24 22:38:09.476   502   502 I health@2.0-serv: type=1400 audit(0.0:807): avc: denied { read } for name="type" dev="sysfs" ino=37464 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
12-24 22:38:09.476   502   502 I health@2.0-serv: type=1400 audit(0.0:808): avc: denied { open } for path="/sys/devices/platform/1101b000.i2c8/i2c-8/8-001d/power_supply/parallel/type" dev="sysfs" ino=37464 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
12-24 22:38:09.476   502   502 I health@2.0-serv: type=1400 audit(0.0:809): avc: denied { getattr } for path="/sys/devices/platform/1101b000.i2c8/i2c-8/8-001d/power_supply/parallel/type" dev="sysfs" ino=37464 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I697f92611a9c30b34872c792beb1c24c298bb0b1
Signed-off-by: SparXFusion <s2234nadar@gmail.com>
Signed-off-by: Sarthak Roy <sarthakroy2002@gmail.com>
Signed-off-by: Pranav Temkar <pranavtemkar@gmail.com>
Signed-off-by: Joey Huab <joey@evolution-x.org>
2022-06-17 18:49:41 +10:00
Joey Huab
46bde50f28 sm7250-common: sepolicy: Address getopt denials 2022-06-17 18:09:45 +10:00
mikairyuu
d206831937 sm7250-common: Import minimal Pixel Thermal sepolicy
*can't use source one since it conflicts with qcom's
2022-06-17 18:09:45 +10:00
kondors1995
0d8b31cf3e sm7250-common: Add Livedisplay 2.1 2022-06-16 12:56:26 +10:00
SebaUbuntu
a6624039b5 sm7250-common: Move to common Xiaomi fingerprint HIDL
Change-Id: I6c29a831e985ee440c92a98aad8d33f25b9e5b2d
2022-06-05 14:29:13 +02:00
SahilSonar
7ef5f67a7c sm7250-common: sepolicy: Allow power hal to write to f2fs nodes
Change-Id: I988b8b148d2b01523207d705e95c555db6d3c22d
2022-06-05 14:29:13 +02:00
althafvly
39eb7dbc12 sm7250-common: sepolicy: Label thermal_hbm_disabled
Change-Id: I51db20e8d30ba18c8b2e5bcbff09b97339b0fa80
2022-06-05 14:29:13 +02:00
SahilSonar
f3495daf4e sm7250-common: sepolicy: Add vendor_* prefix
* Comply with sepolicy vendor namespace

Change-Id: I5259c450443dc4b107fb6175b6ee43a39cf66ec1
2022-06-05 14:27:56 +02:00
xSylla
a03878433c sm7250-common: remove unneeded fm sepolicy rules
Change-Id: I34871314733cad04f80c76d0c7310e9e553a67d6
2022-06-05 14:27:17 +02:00
Inseob Kim
d593816647 sm7250-common: sepolicy: Attach vendor_property_type to properties
We are going to enforce that each property has an explicit owner, such
as system, vendor, or product. This attaches vendor_property_type to
properties defined under vendor sepolicy directories.

Bug: 159097992
Test: m selinux_policy && boot device
Change-Id: I33c40ca345365d8f01f43d3ce7f1f3434b1edfd5
2022-06-05 14:24:13 +02:00
Sebastiano Barezzi
cedd2fecf6 sm7250-common: Move to AOSP NXP NFC HAL
* NXP added snxxx support in AOSP, \o/

Change-Id: Id1b9cdbe1f29d1ff61af8182ae2f8370e5210426
2022-06-05 14:24:12 +02:00
Sebastiano Barezzi
ddfe70d9ae sm7250-common: sepolicy: Reorder {hwservice|vndservice}_contexts
Change-Id: I9765603ba9e053f125f7dc056932569e3603db6b
2022-06-05 14:24:12 +02:00
Sebastiano Barezzi
ad39ce21ee sm7250-common: sepolicy: Bringup property_contexts for Android 12
* Except MIUI global props, they all appear unused/only used for debug/only used with MIUI

Change-Id: I60070ba7658ce262be66ee3bdd0cb6cdcf9b8c49
2022-06-05 14:24:12 +02:00
Sebastiano Barezzi
34db6ec7e6 sm7250-common: Unlabel ro.product.system.manufacturer
* host_init_verifier: Unable to serialize property contexts: Duplicate exact match detected for 'ro.product.system.manufacturer'

Change-Id: I21328a460568217a6b1f445c8a98cd9e4d623426
2022-06-05 14:24:12 +02:00
TheScarastic
e2acea18d7 sm7250-common: biometrics/fod: Uprev to 2.3
* [SebaUbuntu]: Move fingerprint HIDL to 2.3
 * Remove Lineage FOD HIDL
 * Rename fodextension to udfpsextension

Change-Id: I292bbb9509de89eb9031daebab3cb5b2e5411d21
2022-06-05 14:24:12 +02:00
Sebastiano Barezzi
ede9a7fff1 sm7250-common: Move to common Xiaomi light AIDL
Change-Id: I1edcfafce4ea7a76327f8466f8535e63cfc8ed39
2022-06-05 14:22:33 +02:00
LuK1337
a3142c6513 sm7250-common: Drop SSR props & references and set SSR restart_level in init.qcom.rc
Change-Id: I32fc08c9ad36b9c8ebfc019fc87a19eece18f0b4
2021-12-21 01:29:41 +01:00
xSylla
f8582d196e Revert "sm8250-common: biometrics: Implement boosting on authentication"
This reverts commit 1b3fbae7b0.
2021-12-01 16:43:29 +01:00
luk1337
5fe472245e sm7250-common: sepolicy: Regenerate labels for wakeup dirs
The list of folders for genfscon was generated using following script:
  for f in `adb shell "find /sys/devices -name wakeup -type d"`; do
      adb shell "ls -Z '$f' | grep -qv u:object_r:sysfs:s0 || echo '$f'"
  done

While list for regular file_contexts was just a simple grep "wakeup[0-9]".

Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 16:43:28 +01:00
SebaUbuntu
01e51ccb10 sm7250-common: sepolicy: Generic-ify dynamic FPS nodes
Change-Id: Id6df844498c08d7b40fe46045ed8f5f883387bc9
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
ddece61c69 sm7250-common: sepolicy: Remove fod_ui labeling
* We got it covered with vendor_sysfs_graphics

Change-Id: I40f13e1aa8dc6fb6d04118c0f8bcee9fa66efaa4
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
8e30fb19cc sm7250-common: sepolicy: Label more wakeup/bq2597x-standalone nodes
Change-Id: Id55786785f7fc7446f454b3deb338d77036a14bb
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
7b49ef927c sm7250-common: sepolicy: Fix rx_swr_ctrl/wakeup label indentation
Change-Id: Idc10f662f8ea108e4f22315422652661c99cc5f2
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
9e9a8fcdc9 sm7250-common: sepolicy: Label /data/gf_data
Change-Id: I16097514f7be098c2cd12b290f3db4c803161011
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
8e67d730cf sm7250-common: sepolicy: Don't grant batterysecret access to generic sysfs
Change-Id: I40a8516f241b2cade49f5dc6e83a2c2ca1165796
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
e37967e388 sm7250-common: sepolicy: Label bq2597x-standalone in another I2C address
Change-Id: Ia6bc16624d7505b468c8a978536e4e77f9855a45
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
943e46aa39 sm7250-common: sepolicy: Redo indentation in property_contexts
Change-Id: Icd49f4a9203fd9764c7f784379fdd8ea06508144
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
79d856e00c sm7250-common: sepolicy: Remove comments from property.te
Change-Id: Iaf899224f9037d412f047e8302f15e0f9906ef19
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
5457b1b1cd sm7250-common: sepolicy: Remove duplicated allow
Change-Id: I384fead88397fad98b3446fa16900b9d371fd1da
2021-12-01 16:43:28 +01:00
Sebastiano Barezzi
dd29f9fc7e sm7250-common: sepolicy: Reorder file.te
Change-Id: I99e4fe688dacc0e02e4f7bfecfc843edad907e32
2021-12-01 16:43:28 +01:00
erfanoabdi
2d98c6494f sm7250-common: Add support for FMRadio
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 16:43:28 +01:00
Adithya R
595f021689 sm7250-common: Address more battery secret denials
[   19.924855] type=1400 audit(1617105165.784:140): avc: denied { getattr } for comm="batterysecret" path="/dev/kmsg" dev="tmpfs" ino=12292 scontext=u:r:batterysecret:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0

Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>
Change-Id: I9fdd78449973ac8f8f466402d82bc1e77de4d8f3
2021-12-01 13:02:03 +01:00
xSylla
369187b6df sm7250-common: sepolicy: Label few more wakeup nodes
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
xSylla
6943ddddd2 sm7250-common: sepolicy: Label more wakeup nodes
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
SebaUbuntu
fd28bafa34 sm7250-common: sepolicy: Remove generic sysfs references
* We labeled everything

+

* Remove RTC label as we have a duplicate of it

Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
Albert I
040196370d sm7250-common: sepolicy: Allow neural networks HAL to read ADSP properties
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I3fa6f51b746703bab2faf3f5fd6334b221a8636c
2021-12-01 13:02:03 +01:00
Albert I
cd57ddd383 sm7250-common: sepolicy: Allow apps and camera HAL access to secure ADSP domain
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: Ibb1071299632ab53726638dbcc134d4bca59fc52
2021-12-01 13:02:03 +01:00
Albert I
40add99394 sm7250-common: sepolicy: Label more hwservice properties
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I8a791255b46858544c9bedff0cbb764c4c87451e
2021-12-01 13:02:03 +01:00
xSylla
5851056517 sm7250-common: sepolicy: Address more denials
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I17da4904e7571229aef9e2a2b952a6b97b89d032
2021-12-01 13:02:03 +01:00
Albert I
dfb7c8454a sm7250-common: sepolicy: Address more sysfs_wakeup denials
* Also fix some rather botched policy and wrong labelling

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: Ie0d80a7e4c0eadf37364a8cc2593c255b8f48e9a
2021-12-01 13:02:03 +01:00
Albert I
779828ff23 sm7250-common: Set Bluetooth MAC address using persist property
The idea is to allow us to not depend on stock QTI Bluetooth HAL, as MAC
addresses fetched from NVRAM by nv_mac script will be saved as hex-encoded
files. We can decode back saved files to then the Bluetooth one be set using
persist property so it can be read by Bluetooth HAL.

This is loosely based on similar techniques used on Mi 9 and ZenFone Max Pro M2.

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I74d07c3c3125a04962c37fe8bfcc8385d1fd3398
2021-12-01 13:02:03 +01:00
dianlujitao
09bb619041 sm7250-common: Make fastrpc_shell_3 publicly available
* Used by GCAM for DSP-accelerated HDR processing
 * Arguably we should label /vendor/dsp/cdsp/fastrpc_shell_3 to
   same_process_hal_file like Pixels, but the partition is prebuilt thus
   we're unable to relabel it.
 * Copy the file to writable tmpfs, setup attributes and bind mount back
   to workaround the limitation.

[ghostrider-reborn]:
Allow adsp/cdsprpcd and neuralnetworks HAL to access fastrpc_shell_3

[kras edit:
 1. rename some contexts as per qva/kona
 2. extend to allow camera HAL and VPP service to access it as well]

Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Change-Id: Ide90e5c7307d413db5ece736e859559f06679545
2021-12-01 13:02:03 +01:00
Albert I
f99724e748 sm7250-common: Import NVRAM blobs
Required to retrieve MAC addresses and save them somewhere in /data/vendor
so stock QTI Bluetooth HAL can read and set correct one, otherwise the HAL
will set a randomized one that always starts with ff:dd.

cnss-daemon isn't affected since nv_mac will write directly to
/mnt/vendor/persist/wlan_mac.bin to be read by WLAN driver.

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I2d95de397c3bab9e3c55171bf0ff833346bef32e
2021-12-01 13:02:03 +01:00