Commit graph

24174 commits

Author SHA1 Message Date
Felix
8c53a331c3 Android.mk: Support SYSTEM_EXT* sepolicy
The new variable name reflects its actual usage.

Keep compatibility with BOARD_PLAT_* because it has been a
convention for years.

Amend the README to document the new variables.

Test: `make selinux_policy` with
      `SYSTEM_EXT_{PUBLIC,PRIVATE}_SEPOLICY_DIRS` set,
      observe additions in `$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/selinux`

Signed-off-by: Felix <google@ix5.org>
Change-Id: If8188feb365eb9e500f2270241fa190a20e9de01
2020-07-14 21:28:51 +02:00
Yifan Hong
f74fa29aed Merge "Correct labels on files / props in vendor_dlkm." 2020-07-14 19:15:13 +00: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
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
Adam Shih
8cc3f8d9ee Let dumpstate access hal_identity
Bug: 158614313
Test: CtsSecurityHostTestCases:android.security.cts.SELinuxHostTest#testNoBugreportDenials
Change-Id: Ic07e64b0bb18f948764e7bde5985eab91747b882
2020-06-24 10:40:44 +08:00
Inseob Kim
ebde47c63f Move ro.audio.* props to audio_config_prop
Bug: 155844385
Test: boot, play sound and see no denials
Change-Id: If457a6a1fe083d77a3387051edcf40fb12a0624c
2020-06-23 23:52:55 +09:00
Inseob Kim
ac791a4621 Add aaudio_config_prop and move aaudio properties
To remove ambiguous context name exported_default_prop

Bug: 71814576
Test: boot and see no denials
Change-Id: I40eb92653fabc509419e07bb4bfa7301a8762352
2020-06-23 22:08:26 +09:00
Treehugger Robot
7a5599ad92 Merge "Move ro.gfx.* properties to graphics_config_prop" 2020-06-23 03:03:42 +00:00
Inseob Kim
5d50daa96b Move ro.gfx.* properties to graphics_config_prop
To clean up bad context names exported*_prop.

Bug: 155844385
Test: boot and see no denials
Change-Id: Ie92e4293b8271bc137222a4c21637c740b06e156
2020-06-23 10:16:09 +09:00
Victor Hsieh
3fcc046e14 Clean up old policy used for patchoat
Patchoat used to generate symlinks in /data/dalvik-cache that is later
referred by dex2oat. Since patchoat has been removed in Q, it should be
safe to remove the policy for reading symlinks.

Test: reboot; dmesg  # no new denial
Test: cmd package compile -m speed -f com.test.app  # no denial
Change-Id: Iad8c48c8bf0d31dcd19d6b321c8c15d3548a9190
2020-06-22 12:38:38 -07:00
Treehugger Robot
9fbb1cd36d Merge "Remove ro.statsd.enable property" 2020-06-22 13:31:09 +00:00
Adithya Srinivasan
82911e9afd Allow gpuservice to be a perfetto producer
To enable GpuMemTracer to emit initial counter packets, gpuservice must
be allowed to advertise a datasource and producer events.

Test: adb shell perfetto --query | grep gpu
Bug: 157142645
Change-Id: Ie7e825d178dfdbfa1eaf0d4cac8f120bad6c2766
2020-06-19 11:02:28 -07:00
Treehugger Robot
72fe73c484 Merge "move mediatranscoding type from public to private" 2020-06-19 17:42:59 +00:00