Commit graph

24183 commits

Author SHA1 Message Date
Inseob Kim
3dbf3d8ac8 Add wifi_hal_prop and remove exported_wifi_prop
To remove bad context names "exported*_prop"

Bug: 155844385
Test: boot and see no denials
Change-Id: Icd30be64355699618735d4012461835eca8cd651
Merged-In: Icd30be64355699618735d4012461835eca8cd651
(cherry picked from commit 37c2d4d0c9)
(cherry picked from commit 3b66e9b9f8)
2020-07-17 17:38:13 +09:00
Inseob Kim
d2c0b7bf9e Remove redundant get_prop rule
The rule "get_prop(coredomain, vts_status_prop)" is duplicated by
mistake. It's already in coredomain.te, and it should be deleted from
app.te

Bug: N/A
Test: m selinux_policy
Change-Id: I816c8da74940fc6ccdd50fe377aa54eae36237b4
2020-07-16 16:10:57 +00:00
Inseob Kim
98fe6847bd Merge "Add property contexts for vts props" 2020-07-16 10:24:08 +00:00
Inseob Kim
212e2b621a Add property contexts for vts props
vts_config_prop and vts_status_prop are added to remove exported*_prop.
ro.vts.coverage becomes vts_config_prop, and vts.native_server.on
becomes vts_status_prop.

Bug: 155844385
Test: Run some vts and then getprop, e.g. atest \
      VtsHalAudioEffectV4_0TargetTest && adb shell getprop
Test: ro.vts.coverage is read without denials
Change-Id: Ic3532ef0ae7083db8d619d80e2b73249f87981ce
2020-07-16 16:26:17 +09:00
Tom Cherry
aed2a79fb5 Merge "add logd. as logd_prop" 2020-07-15 22:58:33 +00:00
Calin Juravle
de7244cf23 Fix sepolicy for secondary dex files
dexoptanalyzer need read access on the secondary
dex files and of the main apk files in order to successfully evaluate
and optimize them.

Example of denial:
audit(0.0:30): avc: denied { read } for
path="/data/app/~~Zux_isdY0NBkRWPp01oAVg==/com.example.secondaryrepro-wH9zezMSCzIjcKdIMtrw7A==/base.apk"
dev="vdc" ino=40966 scontext=u:r:dexoptanalyzer:s0
tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=0
app=com.example.secondaryrepro

Test: adb shell cmd package compile -r bg-dexopt --secondary-dex app
Bug: 160471235
Bug: 160351055
Change-Id: Id0bda5237d3ce1620d4f6ee89595836b4e1f3abf
2020-07-15 16:43:40 +00:00
Ken Chen
62f0a4d306 Merge "Add dontaudit statement to suppress denials" 2020-07-15 08:42:48 +00:00
Wei Wang
926145161a Allow thermal tracing in user build
Bug: 160818586
Test: Build and check label
Change-Id: I30b13af585daaf9a85f45ab3b41d0b5e060b4bf4
2020-07-14 23:43:09 +00:00
Yifan Hong
f74fa29aed Merge "Correct labels on files / props in vendor_dlkm." 2020-07-14 19:15:13 +00:00
Tom Cherry
d45249e4a9 add logd. as logd_prop
We already have ro.logd. and persist.logd. as logd_prop, but not
logd. so this change adds it.  New properties should be read-write by
default so logd. should be preferred to ro.logd.

Test: set logd.buffer_type appropriately.
Change-Id: I51ed19f0093a0302709116944153f37067814d08
2020-07-14 11:08:32 -07:00
Inseob Kim
792219e48d Allow charger to read minui properties
Failing to read minui properties causes charger crash.

Bug: N/A
Test: enter charger mode with blueline
Change-Id: Ic174cd1116edd510499836ab42675d6fabc63324
2020-07-14 18:06:54 +09:00
Inseob Kim
1ef68a4852 Merge "Add charger related property contexts" 2020-07-14 07:07:38 +00:00
Ken Chen
e49acfa33b Add dontaudit statement to suppress denials
A few netd avc denials are observed. Supress audit messages since they
don't cause a problem.

Bug: 77870037
Test: build, flash, boot
Change-Id: I019c5af62630fcd0a35e22c560b9043bba58f6f1
2020-07-14 09:49:06 +08:00
Alexander Mishkovets
abe9923ef5 Merge "Define sepolicy for locale filter property" 2020-07-13 16:06:00 +00:00
Jeff Vander Stoep
3e2b91d672 gmscore_app is attempting to access /dev/ashmem
This is not allowed for apps with targetSdkVersion>=Q.

Allow this failure until gmscore fixes.

Bug: 160984921
Test: build
Change-Id: I1e9f2af091b22eef2bc05ae1e571fb45dec05cfe
2020-07-13 14:57:52 +02:00
Inseob Kim
00a87e48d1 Merge "Add tombstone_config_prop and move related prop" 2020-07-10 11:48:05 +00:00
Jeffrey Vander Stoep
771376b7e2 Merge "netd: suppress dir write to /system" 2020-07-10 09:47:12 +00:00
Jeff Vander Stoep
f8155a0c34 netd: suppress dir write to /system
avc:  denied  { write } for  pid=661
comm="iptables-restor" name="etc" dev="overlay" ino=55668
scontext=u:r:netd:s0 tcontext=u:object_r:system_file:s0 tclass=dir
permissive=0

Occurs after an adb remount and running netd unit tests.

Bug: 160562747
Test: build tests
Change-Id: I4c8ea7ef8d00e214bf0dab1496a6b8dcc449f59e
2020-07-10 09:12:00 +02:00
Inseob Kim
8ef4792f01 Add charger related property contexts
ro.enable_boot_charger_mode and sys.boot_from_charger_mode are moved to
new property contexts for charger props to remove exported*_prop.

Bug: 155844385
Test: boot device with ro.enable_boot_charger_mode
Change-Id: I17d195d3c9c002a42125d46a5efcdb890f1c2a5c
2020-07-10 14:15:15 +09:00
Yifan Hong
85aba14765 Correct labels on files / props in vendor_dlkm.
All files under vendor_dlkm are tagged vendor_file.
All build props for vendor_dlkm are mapped as build_vendor_prop.

Test: build and
    `ls /vendor_dlkm -lZ`
    `adb shell getprop -Z | grep vendor_dlkm`

Bug: 154633114

Change-Id: Ie9dc26d948357767fec09aca645606310ad3425c
2020-07-09 15:02:00 -07:00
Alexander Mishkovets
f0be89be1d Define sepolicy for locale filter property
Bug: 154133013
Test: Manual
Change-Id: I28ae279e4fd47553fcf4ab9421944f552490b49f
2020-07-09 20:32:58 +02:00
Inseob Kim
881f8c6b2d Merge "Relabel media.recorder.show_manufacturer_and_model" 2020-07-08 08:18:48 +00:00
Inseob Kim
dddf6f561f Relabel media.recorder.show_manufacturer_and_model
To remove exported*_default_prop

Bug: 155844385
Test: capture video
Test: atest writerTest
Change-Id: I74223c8daa44acf0aba33bff31cfe21f6242f941
2020-07-08 15:32:57 +09:00
Treehugger Robot
f1d02d4230 Merge "simplify neverallowxperm for tun_device" 2020-07-08 04:33:34 +00:00
Inseob Kim
d702d3fae1 Merge "Add keyguard_config_prop for keyguard property" 2020-07-08 03:22:12 +00:00
Maciej Żenczykowski
e346fbc044 simplify neverallowxperm for tun_device
Test: builds, atest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia92fc0b9a805763779a13cad6ad3137c9327ca61
2020-07-07 18:41:56 -07:00
Treehugger Robot
1786098e96 Merge "Add export of ro.hdmi.cec_device_types" 2020-07-07 21:51:53 +00:00
Treehugger Robot
7b4027a826 Merge "Update prebuilt/seapp_contexts" 2020-07-07 20:09:18 +00:00
Ashwini Oruganti
a9ab9362d4 Update prebuilt/seapp_contexts
The seinfo=platform bit seems to have been missed in a previous update.

Test: builds
Change-Id: I0d8faeb8ca1ed326ab958e5da329288b91719206
2020-07-07 11:48:26 -07:00
Paul Crowley
42f9a5337a Merge "Uncrypt: Allow uncrypt to write on ota_package_file." 2020-07-07 15:27:29 +00:00
Inseob Kim
14a71fb162 Add tombstone_config_prop and move related prop
tombstoned.max_tombstone_coun becomes tombstone_config_prop to remove
exported*_default_prop

Bug: 155844385
Test: tombstoned is running and logcat shows no denials
Change-Id: I57bebb5766d790dc52d40a6d106f480e0e34fa4e
2020-07-07 14:17:40 +09:00
Inseob Kim
04f435ca52 Add keyguard_config_prop for keyguard property
keyguard.no_require_sim becomes keyguard_config_prop to remove
exported*_default_prop

Bug: 155844385
Test: boot and see no denials
Change-Id: Icffa88b650a1d35d8c1cd29f89daf0644a79ddd3
2020-07-07 12:46:24 +09:00
P.Adarsh Reddy
916bd874d6 Uncrypt: Allow uncrypt to write on ota_package_file.
This adds sepolicy rule to allow uncrypt module to write
on OTA zip (for f2fs_pin_file functionality).

Also, add a few dontaudit rules to suppress harmless denials.

Denials:
I uncrypt : type=1400 audit(0.0:177): avc: denied { write } for name="update.zip" dev="dm-10" ino=7727 scontext=u:r:uncrypt:s0 tcontext=u:object_r:ota_package_file:s0 tclass=file permissive=0

I uncrypt : type=1400 audit(0.0:175): avc: denied { search } for name="/" dev="sda9" ino=2 scontext=u:r:uncrypt:s0 tcontext=u:object_r:metadata_file:s0 tclass=dir permissive=0

I uncrypt : type=1400 audit(0.0:176): avc: denied { search } for name="gsi" dev="sda9" ino=19 scontext=u:r:uncrypt:s0 tcontext=u:object_r:gsi_metadata_file:s0 tclass=dir permissive=0

Bug: 158070965
Change-Id: I473c5ee218c32b481040ef85caca907a48aadee6
2020-07-07 00:03:11 +00:00
Nicolas Geoffray
612ce87b51 Fix sepolicy of ART module.
The dex2oat debug binary ends with the bitness.

Bug: 160137482
Test: adb shell cmd package bg-dexopt-job
Change-Id: If78cd100eb1c0245e425361d56e1936f1c6c98a6
2020-07-06 10:15:39 +01:00
Jooyung Han
66158f9817 Merge "allow apexd to mount apex-info-list.xml file" 2020-07-03 06:40:51 +00:00
Treehugger Robot
da5d688917 Merge changes Ieee1d7de,Ie7780128
* changes:
  perfetto: don't audit isatty() check on shell pipes
  update 30.0 prebuilts for commit 2b2cde7592
2020-07-02 16:24:33 +00:00
Jooyung Han
8c18009ae2 allow apexd to mount apex-info-list.xml file
apexd runs in two separate mount namespaces: bootstrap & default.
To support separate apex-info-list.xml for each mount namespaces, apexd
needs to emit separate .xml file according to the mount namespace and
then bind-mount it to apex-info-list.xml file.

Bug: 158964569
Test: m & boot
      nsenter -m/proc/1/ns/mnt -- ls -lZ /apex/apex-info-list.xml
      nsenter -m/proc/2/ns/mnt -- ls -lZ /apex/apex-info-list.xml
      => shows the label apex_info_file correctly
Change-Id: I25c7445da570755ec489edee38b0c6af5685724b
2020-07-02 22:22:05 +09:00
Justin Yun
088587886c Label /system_ext/lib(64)/* as system_lib_file
This needs to be updated to api 30.0 which introduced the system_ext.

Bug: 160314910
Test: build and boot
Change-Id: I08c4aed640467d11482df08613039726e7395be0
2020-07-02 04:07:12 +00:00
Yi Kong
5e8c92003f Merge "Add sepolicy for profcollectd" 2020-07-02 01:48:26 +00:00
Yi Kong
239c85dd0d Add sepolicy for profcollectd
This does not yet list all the required capabilities for profcollectd,
but it at least allows the service to start under permissive mode.

Bug: 79161490
Test: start profcollectd
Change-Id: I92c6192fa9b31840b2aba26f83a6dc9f9e835030
2020-07-01 23:44:37 +08:00
Inseob Kim
e3b14def2b Merge "Allow apps to read packagemanager_config_prop" 2020-07-01 04:17:02 +00:00
Inseob Kim
5eacf72460 Allow apps to read packagemanager_config_prop
To fix regression of CTS privappPermissionsMustBeEnforced

Bug: 159647344
Test: atest PrivappPermissionsTest#privappPermissionsMustBeEnforced
Change-Id: I88af05305f9aef6e813d0a72adad63b6b8f99487
Merged-In: I88af05305f9aef6e813d0a72adad63b6b8f99487
2020-07-01 02:29:53 +00:00
Ricky Wai
15fb633cb5 Allow zygote to read storage properties
Bug: 151316657
Test: Able to boot without warnings
Change-Id: If53e472b560d5cf73c145d668bc462ca6881fe4e
2020-06-30 10:27:58 +01:00
Ryan Savitski
58c8751cf7 perfetto: don't audit isatty() check on shell pipes
CTS runs are being polluted by denial logs from the best-effort isatty (
-> TCGETS ioctl) check done by the perfetto's log formatter.

This patch suppresses the denial.

I believe that what's actually being denied is the ioctl itself, NOT the
TCGETS aspect of it (there is a domain-wide fifo_file TCGETS allowxperms
rule in domain.te:303). But the "dontauditxerms" suppresses the denial
anyway.

Bug: 159988048
Merged-In: Ieee1d7de8b023dd632d0e37afa3a2434cfd1a3a1
Change-Id: Ieee1d7de8b023dd632d0e37afa3a2434cfd1a3a1
(cherry picked from commit 8519c6d316)
2020-06-29 23:10:40 +01:00
Ryan Savitski
837e1f9bc7 update 30.0 prebuilts for commit 2b2cde7592
The non-prebuilt files are already up-to-date, as this change exists in
aosp/master as aosp/1267820.

Bug: 159988048
Merged-In: Ie7780128fcd80a051e809bfc98f21179cb3f0ecc
Change-Id: Ie7780128fcd80a051e809bfc98f21179cb3f0ecc
(cherry picked from commit 2b2cde7592)
2020-06-29 22:54:19 +01:00
Treehugger Robot
eed690476b Merge "Move ro.audio.* props to audio_config_prop" 2020-06-29 01:18:43 +00:00
Inseob Kim
a24f99f5bd Merge "Add aaudio_config_prop and move aaudio properties" 2020-06-26 01:47:57 +00:00
Mark Salyzyn
c86d3886ab modprobe: add -s/--syslog flag
There is a desire to ensure that modprobe as a service can log to
kmesg to help triage issues, so add support for the -s or --syslog
flag to do so.

Bug: 159424228
Bug: 151950334
Test: use modprobe as a service to load modules, check logs
Change-Id: I884995f364b0fc604861797eb90d7225a372f864
2020-06-25 11:30:24 -07:00
Yiwei Zhang
f44b20a922 GPU Memory: allow tracing gpu_mem/gpu_mem_total on user build
Bug: 157142826
Test: enable the tracepoint on user build
Change-Id: I61560003c5cc92f2563fb98bdaee9bfd4807f46a
2020-06-24 20:42:39 -07:00
Treehugger Robot
180f5b0ceb Merge "Allow gpuservice to be a perfetto producer" 2020-06-24 18:25:12 +00:00