Commit graph

28424 commits

Author SHA1 Message Date
Roland Levillain
6e3caf699e Merge "Allow dex2oat to read runtime native flag properties." 2021-02-03 09:54:21 +00:00
Treehugger Robot
c6c237a7d4 Merge "Fix dumpstate hal_*_server denials" 2021-02-02 18:27:24 +00:00
Roland Levillain
d7227d8816 Allow dex2oat to read runtime native flag properties.
This is in prevision of future `dex2oat` feature / experiments flags
set in namespaces `runtime_native` and `runtime_native_boot`.

In Android S, ART is becoming an updatable Mainline module (which will
include `dex2oat`). In the future, we may want to run experiments or
test new features using the Android Experiments framework. Such
experiments/features are enabled via feature flags, implemented as
Android system properties for native code.

To be able to read such properties, we need to give the read
permission to the relevant binaries. At the moment, this can only be
done in the SELinux policy of the Android platform, which cannot be
updated via a Mainline update. To give us the opportunity to conduct
such experiments in `dex2oat` via an ART Mainline Module update after
Android S has shipped (e.g. by having `dex2oat` query a system
property in `persist.device_config.runtime_native.*` ), we need to
have this permission set in the Android S platform now.

Test: mmma system/sepolicy
Change-Id: I0a83e9f0ec19884a99ef9693d55084376bff8762
2021-02-02 15:55:48 +00:00
Kalesh Singh
5bf6faaf94 Fix dumpstate hal_*_server denials
Bug: 178566350
Test: atest CtsSecurityHostTestCases:android.security.cts.SELinuxHostTest#testNoBugreportDenials -- --abi x86_64
Change-Id: I58e050f2e6f978ea5c7e1a89221178f5374d1731
2021-02-01 22:20:44 -05:00
Darryl Johnson
3d4a5081ca Merge "Add app_api_service to device_state service type." 2021-02-01 21:42:07 +00:00
Darryl L Johnson
7aadbf80ed Add app_api_service to device_state service type.
This allow the device_state binder service to be exposed
as a TestApi and a SystemApi to allow usage in CTS and
system applications.

Test: Build, flash, and query device_state service
Bug: 177236115
Bug: 177235528

Change-Id: Ia9f306b8c242e8e754b201f349c274b4ce78dad9
2021-02-01 18:53:09 +00:00
Ryan Savitski
8b26472177 traced_perf: allow RO tracefs access + fix neverallow
We're adding support for counting and/or sampling on the static kernel
tracepoints in traced_perf (via perf_event_open). This requires traslating
a human-readable tracepoint name to its id for the running kernel.
For that, we need to read the "id" files like:
  /sys/kernel/tracing/events/sched/sched_switch/id

While the current implementation should only need "file r_file_perms",
as it constructs the full path to the id file, I've also added the
directory-level rule to allow for a possible change in implementation,
as we might want to enumerate all available events ahead of time, which
would require listing the tracefs events/ dir.

The changed neverallow macro was a copypaste mistake.

Example denials without the change:
  avc: denied { read } for name="id" dev="tracefs" ino=5721
  scontext=u:r:traced_perf:s0 tcontext=u:object_r:debugfs_tracing:s0
  tclass=file permissive=1

  avc: denied { open } for
  path="/sys/kernel/tracing/events/sched/sched_switch/id" dev="tracefs"
  ino=5721 scontext=u:r:traced_perf:s0
  tcontext=u:object_r:debugfs_tracing:s0 tclass=file permissive=1

  avc: denied { getattr } for
  path="/sys/kernel/tracing/events/sched/sched_switch/id" dev="tracefs"
  ino=5721 scontext=u:r:traced_perf:s0
  tcontext=u:object_r:debugfs_tracing:s0 tclass=file permissive=1

Tested: collected a profile sampled on "sched/sched_switch" on
        crosshatch-userdebug.
Bug: 170284829
Bug: 178961752
Change-Id: I75427e848ccfdc200c5f9b679ea18fc78e1669d6
2021-01-31 16:44:00 +00:00
Josh Gao
c01ac10fd7 Merge "Revert "Revert "Let crash_dump read /proc/$PID.""" 2021-01-28 21:15:29 +00:00
Josh Gao
da0d8d82cc Revert "Revert "Let crash_dump read /proc/$PID.""
This reverts commit b400de4d6c.

Test: treehugger
Change-Id: I2d271297fd0ea723a33d1fef5bcf835b8abe2498
2021-01-28 20:56:17 +00:00
Treehugger Robot
883de3cd2e Merge "Add vendor_public_framework_file type to SEPolicy" 2021-01-28 11:41:00 +00:00
Oliver Woodman
bc41c14ffd Merge "Define SOC sysprop policy" 2021-01-28 09:12:52 +00:00
Tianjie Xu
ca2775667a Merge "Set context for hash algorithm properties." 2021-01-28 03:03:21 +00:00
Bob Badour
e1bce3710e Merge "Fix license_type. Contains Apache" 2021-01-27 19:15:16 +00:00
Andrei-Valentin Onea
ef796f6180 Merge "Add data directory for appcompat" 2021-01-27 18:17:20 +00:00
Marco Ballesio
f054268ab1 Merge "Revert^2 "sepolicy: rules for uid/pid cgroups v2 hierarchy"" 2021-01-27 16:40:02 +00:00
Andrei Onea
850842f77c Add data directory for appcompat
This directory is used to store override config, so that they can
persist across reboot.

Test: atest CompatConfigTest
Bug: 145509340
Change-Id: I5e8f2b3093daeccd6c95dff24a8c6c0ff31235ca
2021-01-27 15:04:31 +00:00
Oliver Woodman
164ba2bd39 Define SOC sysprop policy
BUG: 158284209
Test: atest android.os.cts.BuildTest
Change-Id: I7df7e575072c37ca379b97f60cc6c0850a02bcd1
2021-01-27 13:49:00 +00:00
Treehugger Robot
09c0808984 Merge "Fix sepolicy to netd." 2021-01-27 11:21:23 +00:00
steven_fann
d3e8f6fc84 Fix sepolicy to netd.
Allow netd to get adb port from property service.adb.tcp.port

Bug: b/161861298
Test: atest android.net.cts.Ikev2VpnTest#testStartStopVpnProfileV4

Change-Id: I05ce21683b01cf05a16b9fb30030cf4fc879fb20
2021-01-27 17:34:01 +08:00
Howard Chen
f4f29d36ef Merge "Add permissions required to install the DSU to a SD card" 2021-01-27 08:40:34 +00:00
Howard Chen
4db8cbd552 Add permissions required to install the DSU to a SD card
Bug: 171861574
Test: execute following command on a device with a SD card inserted
       adb shell am start-activity \
        -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
        -a android.os.image.action.START_INSTALL \
        -d file:///storage/emulated/0/Download/system.raw.gz \
        --el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
        --el KEY_USERDATA_SIZE 4294967296

Change-Id: I5c1c170ade9c570c7dab7cb7aff5f099db4b3d8c
2021-01-27 06:36:12 +00:00
Marco Ballesio
a54bed6907 Revert^2 "sepolicy: rules for uid/pid cgroups v2 hierarchy"
51c04ac27b

Change-Id: Idc35a84b5faabfb9bdd7a7693f51b11938eb0489
2021-01-27 06:07:48 +00:00
Bob Badour
183cf5b834 Fix license_type. Contains Apache
See: http://go/android-license-checking-v2-lsc

Test: m all

Bug: 151953481
Bug: 151177513
Bug: 67772237
Change-Id: I62bf6566b54074f39d0d3b94eef8df67ebe7d36b
2021-01-26 17:01:32 -08:00
Treehugger Robot
4fb66f04d7 Merge "Add sepolicy for app hibernation system service" 2021-01-26 22:23:13 +00:00
Amy Zhang
7a7c41b3bc Merge "Allow TunerService to find and call TunerResourceManager Service" 2021-01-26 20:59:58 +00:00
Amy Zhang
ec7079b1ed Allow TunerService to find and call TunerResourceManager Service
Test: atest android.media.tv.tuner.cts
Bug: 159067322
Change-Id: I00982a9b7ddc68ea8bf89c7e24b65a00d3d14646
2021-01-26 19:14:33 +00:00
Jerome Gaillard
9d4470e7c2 Merge "Revert "Let crash_dump read /proc/$PID."" 2021-01-26 16:49:53 +00:00
Dorin Drimus
84cd7087d5 Add vendor_public_framework_file type to SEPolicy
And allow access from system apps to vendor libs public only for system.
These files should be marked individually by OEMs. Maintainance
ownership for these libraries is also OEM's responsability.
Similar with vendor_public_libs_file type, this allows for an explicit
labeling of OEM system apps that can access libs from vendor.

Bug: 172526961
Test: build-only change, policy builds
Change-Id: I7d4c8232e0b52e73f373d3347170c87ab2dcce52
2021-01-26 15:59:37 +01:00
Kalesh Singh
d37f2e9d65 Merge "Sepolicy for mm events trace instance" 2021-01-26 14:33:39 +00:00
Jerome Gaillard
b400de4d6c Revert "Let crash_dump read /proc/$PID."
Revert submission 1556807-tombstone_proto

Reason for revert: b/178455196, Broken test: android.seccomp.cts.SeccompHostJUnit4DeviceTest#testAppZygoteSyscalls on git_master on cf_x86_64_phone-userdebug

Reverted Changes:
Ide6811297:tombstoned: switch from goto to RAII.
I8d285c4b4:tombstoned: make it easier to add more types of ou...
Id0f0fa285:tombstoned: support for protobuf fds.
I6be6082ab:Let crash_dump read /proc/$PID.
Id812ca390:Make protobuf vendor_ramdisk_available.
Ieeece6e6d:libdebuggerd: add protobuf implementation.

Change-Id: I4a9d5171e978053150404956ede18656058d1ac1
2021-01-26 12:36:12 +00:00
Alex Agranovich
93fcd51689 Merge "Change SELinux policy for texttospeech manager service." 2021-01-26 12:26:31 +00:00
Josh Gao
a3b3415bdd Merge "Let crash_dump read /proc/$PID." 2021-01-25 22:18:48 +00:00
Winson Chiu
f8ad8c08ea Add domain_verification_service
For upcoming @SystemApi DomainVerificationManager.

Test: manual, accessing new manager from test app works

Change-Id: Ic73733dce3e9152af9c6f08fb7e460fa5a01ebdf
2021-01-25 19:09:50 +00:00
Kalesh Singh
aab7a73868 Sepolicy for mm events trace instance
Allow traced_probes read write access to configure
mm_events trace instance and poll trace_pipe_raw

Bug: 155928119
Test: No denials in logcat
Change-Id: Ib65ab2e7be8daa6b8c412ffea909072583db7002
2021-01-25 12:01:27 -05:00
Randall Huang
29c54ec937 Merge "Allow vold to check apex files" 2021-01-25 09:13:45 +00:00
Seigo Nonaka
1237d422ef Merge "Add /data/fonts/files directory" 2021-01-25 05:47:03 +00:00
Yo Chiang
1e6e1bd7b5 Merge "Revert "Suppress avc denials due to missing kernel config on mixed version boot test"" 2021-01-24 23:37:12 +00:00
Alex Agranovich
39ad3df3eb Change SELinux policy for texttospeech manager service.
Bug: 178112052
Test: Manual verification ($ adb shell service list)
Change-Id: Ibaf5d3f3c0565d9c61d03ffec62d8e222c9f5975
2021-01-24 16:18:28 +02:00
Linzhao Ye
bab989d315 Merge "Add SePolicy for system_server accessing sysfs uhid." 2021-01-23 17:08:47 +00:00
Josh Gao
46a9721673 Let crash_dump read /proc/$PID.
The immediate use is to read the dumped process's selinux label, but
we'll want to add more information that relies on this (e.g. process
uptime via parsing /proc/$PID/stat).

Test: treehugger
Change-Id: I6be6082abd2091366517c17d02154678652058d6
2021-01-22 13:10:55 -08:00
Seigo Nonaka
9c3707f76a Add /data/fonts/files directory
The updated font files will be stored to /data/fonts/files and
all application will read it for drawing text.
Thus, /data/fonts/files needs to be readable by apps and only writable
by system_server (and init).

Bug: 173517579
Test: atest CtsGraphicsTestCases
Test: Manually done
Change-Id: Ia76b109704f6214eb3f1798e8d21260343eda231
2021-01-22 11:58:55 -08:00
Alex Salo
e2808169e5 Merge "Add a new selinux policy for the resolver service" 2021-01-22 18:20:23 +00:00
Chris Ye
c0e7206c73 Add SePolicy for system_server accessing sysfs uhid.
Add SePolicy to allow Android input manager accessing sysfs uhid folder.

Bug: 161633432
Test: dumpsys input and watch for input device battery status.
Change-Id: I6ed1ab45f1cff409982c36627e12e62667819f37
2021-01-22 17:56:45 +00:00
Yo Chiang
a14b839cf5 Revert "Suppress avc denials due to missing kernel config on mixed version boot test"
This reverts commit f3f4985479.

Reason for revert: selinux denial should be fixed by aosp/1554151

Change-Id: I9393b45a6adbfe94b24c23542c3a424a002be573
2021-01-22 11:05:43 +00:00
ChengYou Ho
291890a954 Add sepolicy for weaver aidl HAL service
Bug: 176107318
Change-Id: I9ca1a68e45b462c9b6ac912debb196b3a3ca45ba
2021-01-22 06:34:41 +00:00
Yi Jiang
7d7951bcbd Add a new selinux policy for the resolver service
Bug: 178151184
Test: manual
Change-Id: Ia44c50d24b3b5403b02ccc1b7873c7024b10e023
2021-01-21 16:55:49 -08:00
Tianjie Xu
d06dfa3320 Merge "Make system server a client of boot control HAL" 2021-01-21 23:18:55 +00:00
Kevin Han
4cead73a86 Add sepolicy for app hibernation system service
Add selinux policy so the app hibernation system service can be accessed
by other processes/apps.

Bug: 175829330
Test: builds
Change-Id: I96ea9dd977ec007bc11560601554547749b4df03
2021-01-21 13:22:27 -08:00
Yurii Zubrytskyi
314e6d9450 Merge "IncFS: update SE policies for the new API" 2021-01-21 18:00:33 +00:00
Tianjie
c3752cf5dd Set context for hash algorithm properties.
Also move verity_status_prop to system_restricted_prop since we
need to query it in cts tests

Bug: 175236047
Test: atest CtsNativeVerifiedBootTestCases
Change-Id: I82b26edaf5c5ad233bd83dff77eaafb9174646ef
2021-01-20 19:06:47 -08:00