Commit graph

18997 commits

Author SHA1 Message Date
Treehugger Robot
4fd03ba7b3 Merge "Enable Kernel log from linkerconfig" 2019-07-23 10:27:35 +00:00
Kiyoung Kim
2d5f2e242d Enable Kernel log from linkerconfig
LinkerConfig generator runs from early init, so if there is any warning
/ error then logs can be only found from kernel log. To enable kernel
logging from linkerconfig, specific policy should be added.

Test: m -j && Tested from Cuttlefish
Change-Id: I6c49d7693e0334ae8550891b72bcb04e37c16d89
2019-07-23 13:42:55 +09:00
Treehugger Robot
386701db0a Merge "fix data/asan/product/lib(64) can't access by platform_app issue" 2019-07-19 23:02:40 +00:00
Wei Wang
0962dd9e91 Merge "Fix: dumpstate HAL service property context" 2019-07-19 19:46:55 +00:00
David Anderson
23ba03fc8d Merge "Allow gsid to create and access loop devices." 2019-07-19 19:35:26 +00:00
Tom Cherry
aa4af2c082 Merge "Allow domain access r_file_perms for passwd and group files" 2019-07-19 18:00:41 +00:00
Tom Cherry
da05f1d6b8 Allow domain access r_file_perms for passwd and group files
In b/73062966, we add new AID ranges for each partition that doesn't
yet have them (system, system_ext, odm, product).  We also add group
and passwd files to these partitions to be able to map these AIDs into
human readable user and group names, and vice versa.

All processes should be able to read all users and groups.  We divide
the ranges into non-overlapping regions for each partition and we
namespace the names with the partition name as a prefix.

Allow domain r_file_perms to
/(system|product|system_ext)/etc/(group|passwd).

Vendor and odm passwd and group files already have this access, since
/(vendor|odm)/etc/* is already domain readable.

Example contents:
blueline:/ $ cat /system/etc/passwd
system_tom::6050:6050::/:/bin/sh
blueline:/ $ cat /product/etc/passwd
product_tom::7013:7013::/:/bin/sh

Bug: 73062966
Test: tree-hugger selinux denial during boot test
Change-Id: Ib4dc31778e95e952174e1365497feaf93dca7156
2019-07-19 09:19:23 -07:00
Wei Wang
046c510402 Fix: dumpstate HAL service property context
http://aosp/678384 changed property format

Fixes: 137695210
Test: inject timeout and take BR see dumpstate restarted
Change-Id: Ie24e2d42e92410a935ca4c9364b476d72aa459f3
2019-07-19 15:04:44 +08:00
chunhui.li
233a193462 fix data/asan/product/lib(64) can't access by platform_app issue
FMRadio change from system image to product image, then FMRadio
can't launch
selinux denied log:
avc: denied { open } for path="/data/asan/product/lib64/libfmjni.so"
dev="mmcblk0p35" ino=18 scontext=u:r:platform_app:s0:c512,c768
tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0
app=com.android.fmradio
solution: label data/asan/product/lib(64) to system_lib_file

Bug: 136974466
Test: launch FMRadio, it can work
Change-Id: Icdfc794cb077b81d550816d2e7779c763604e050
2019-07-19 03:23:47 +00:00
David Anderson
9859aa0a24 Merge "Add selinux labels for /metadata/ota." 2019-07-18 22:42:13 +00:00
David Anderson
c1bc87394d Add selinux labels for /metadata/ota.
/metadata/ota will store critical bits necessary to reify
system and vendor partition state during an OTA. It will be accessed
primarily by first-stage init, recovery/fastbootd, and update_engine.

Bug: 136678799
Test: manual test
Change-Id: Ib78cb96ac60ca11bb27d2b2fe011482e64ba0cf8
2019-07-16 13:38:10 -07:00
Roshan Pius
3aa1c1725e sepolicy: Permission changes for new wifi mainline module
Move wifi services out of system_server into a separate APK/process.

Changes:
a) Created sepolicy for the new wifi apk.
b) The new APK will run with network_stack uid (eventually will be moved
to the same process).

Used 'audit2allow' tool to gather list of permissions required.

Note: The existing wifi related permissions in system_server is left
behind to allow the module to be loaded into system_server or
network_stack process depending on device configuration.

Bug: 113174748
Test: Device boots up and able to make wifi connection.
Test: Tested hotspot functionality.
Test: Ran WifiManagerTest & WifiSoftApTest ACTS tests locally.
Test: Will send for wifi regression tests.
Change-Id: Id19643a235bf0c28238f2729926b893ac2025b97
(cherry-picked from c7aa90091e6bec70a31a643cc4519a9a86fb0b38)
2019-07-16 13:30:15 -07:00
Pirama Arumuga Nainar
2d16fef4ce Merge "Revert "Track usbd SELinux denial."" 2019-07-16 01:17:10 +00:00
Kiyoung Kim
8231ac82e5 Merge "Add linker config generator and output file to sepolicy" 2019-07-16 00:32:13 +00:00
Tom Cherry
4c52cedf22 Merge "Allow dumpstate to read /data/misc/logd always" 2019-07-15 23:28:23 +00:00
Treehugger Robot
b74402abe8 Merge "version_policy: avoid fclose a NULL file pointer" 2019-07-15 18:35:47 +00:00
Pirama Arumuga Nainar
98e320b6e0 Revert "Track usbd SELinux denial."
Bug: 72472544
This reverts commit 07efe37c5f.

Reason for revert: The selinux denial is no longer reproducible.

Test: Presubmit builds

Change-Id: I79d18743171315401401c1b06b3f97d837bf500f
2019-07-14 21:05:41 -07:00
David Anderson
17231129ce Merge "Allow fastbootd and update_engine to read from sysfs_dm." 2019-07-12 23:03:41 +00:00
Kiyoung Kim
affa6f323c Add linker config generator and output file to sepolicy
Sepolicy for linkerconfig generator and ld.config.txt file from
generator

Bug: 135004088
Test: m -j & tested from device
Change-Id: I2ea7653a33996dde67a84a2e7a0efa660886434a
2019-07-12 12:32:19 +09:00
David Anderson
53ea513bdf Allow gsid to create and access loop devices.
gsid creates loop devices when it cannot use device-mapper. This can
occur when images are split into multiple files (for example, FAT32) or
when a device is unencrypted, or FBE without metadata encryption. In
addition to accessing /dev/loop-control and loop devices, it also needs
LOOP_SET_DIRECT_IO and LOOP_SET_BLOCK_SIZE to optimize writes.

Bug: 134536978
Test: gsi_tool install works on crosshatch with metadata encryption
      disabled

Change-Id: I3f0aee1d0757e4b299deee74a8c1077846d56292
2019-07-11 16:36:25 -07:00
Brad Ebinger
243ef72edb Rename service from ircs to ircsmessage
ircs is not specific enough. There will be multiple services in the
future with ircsmessage used specificially for  message store.

Test: compile, tests
Change-Id: Ia7d57e6900c733408be26d6520aa46c512229248
2019-07-11 14:09:51 -07:00
Treehugger Robot
3f063ca932 Merge "Remove unused permissions in init." 2019-07-11 20:16:46 +00:00
Steven Moreland
587008a40b Remove unused permissions in init.
There was some plan to use binder from init, but it was abandoned. As
ServiceManager was recently re-written in C++, and as part of a
continued effort to reduce large dependencies in init and make sure it
is reliable, I'm removing these here.

Bug: 135768100
Test: N/A
Change-Id: I12b57709399c87ee25f689b601572b19abf7fb00
2019-07-10 10:23:52 -07:00
Mikael Pessa
25870c05c8 Merge "Give surfaceflinger permission to write perfetto traces" 2019-07-09 21:08:52 +00:00
Treehugger Robot
e4466e8ec7 Merge "Rename audio hal service" 2019-07-09 17:22:21 +00:00
Mikael Pessa
c97ea91e2f Give surfaceflinger permission to write perfetto traces
Test: Manual tests
Bug: 137050898
Change-Id: I00f67a666cbf265950aa9160d82e16bef2b2e423
2019-07-09 17:16:07 +00:00
Justin Yun
87b4b81190 Rename product_services to system_ext
Bug: 134359158
Test: build and check if system_ext.img is created
Change-Id: I395324d369d9467895471f5b62d327fd9b3381dc
2019-07-09 08:57:35 +00:00
Kevin Rocard
8fcd26e448 Rename audio hal service
The audio HAL service name previously contained the audio HAL version
of the first audio HAL it supported.
Nevertheless, the same service can and do host all audio HAL versions.

Aka there is only one audio HAL service, and the version in its name is
technical dept and should not be changed.

This caused many confusions during vendor HAL upgrade as the
service version number was erroneously updated leading to
device boot loop.

The new service name is:
android.hardware.audio.service
The old one was:
android.hardware.audio@2.0-service

Keeping both names valid as most phones will not rename
the service immediately.

Bug: 78516186
Test: boot & check the audio HAL is up with the old and new name
Change-Id: I2ce0182fd919af6eb8325d49682b4374be00344e
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-07-08 22:25:18 +00:00
Tom Cherry
77f8d4f8ca Allow dumpstate to read /data/misc/logd always
There is no reason to deny dumpstate from reading /data/misc/logd on
user builds.  Logpersist is disallowed from running on those builds,
so there is no harm in copying this directory.

Bug: 136978224
Test: build
Change-Id: Ia58bde10e1f45978975597cd2ea1951a784d3b49
2019-07-08 13:20:10 -07:00
David Anderson
483e70bd2a Allow fastbootd and update_engine to read from sysfs_dm.
Bug: 135771280
Test: device flashes, boots
Change-Id: I07816b94566d9da6e7831e29c69dbd06a09bbef8
2019-07-08 12:20:58 -07:00
Sidath Senanayake
31056ae11d Update API 29 prebuilts to include gpu_frequency tracepoint
Bug: 136289121
Change-Id: I2fb013d46ab72b29a83754b5199816d080bce534
2019-07-03 16:32:18 +01:00
Florian Mayer
19c96aa7a9 Merge "Allow heapprofd to write to /proc/$PID/page_idle." 2019-07-02 12:05:29 +00:00
Florian Mayer
d59250afae Allow heapprofd to write to /proc/$PID/page_idle.
Change-Id: Ic7d13ebfe7c26df14e23976b9329b6ba1b016498
2019-07-02 13:01:11 +01:00
Treehugger Robot
18898abf3f Merge "Sepolicy for added SystemSuspend HAL to ANR list." 2019-07-01 21:43:45 +00:00
liwugang
85ce153283 version_policy: avoid fclose a NULL file pointer
Test: Pass a not cil file to version_policy and see no crash appeared.
example: out/host/linux-x86/bin/version_policy -b  `which ls`  -m -n 10000.0 -o target

Change-Id: If2b950a02dd94a4813b74377617f90c7a75a9f27
Signed-off-by: liwugang <liwugang@xiaomi.com>
2019-07-01 16:47:20 +08:00
Sidath Senanayake
56d34f7838 Merge "Allow perfetto to access gpu_frequency tracepoint in user" 2019-06-28 18:46:02 +00:00
Kalesh Singh
113d10baaa Sepolicy for added SystemSuspend HAL to ANR list.
Change-Id: Ib7b647d07c5432ed4cdb674f3c9642cfcb5c9d79
Bug: 135458700
Fixes: 135458700
Test: Trigger ANR dump (adb shell am hang).
grep through logcat for sepolicy denials.
2019-06-28 10:08:22 -07:00
Andrew Sapperstein
6eaf8a2d62 Merge "Revert "Revert "Allow rule to let settings access apex files""" 2019-06-28 15:30:36 +00:00
Andrew Sapperstein
544a9b1c51 Revert "Revert "Allow rule to let settings access apex files""
This reverts commit e47d2365a8.

Reason for revert: Original CL was not the cause of the breakage. It went green before this revert landed. https://android-build.googleplex.com/builds/branches/aosp-master/grid?

Original CL went in 5695273.
Went green in 5695399.
Revert went in 5695588.

Change-Id: Ie4d7065fe7d3c58cdff99c2b7d76b50b941895bb
2019-06-28 15:28:28 +00:00
Cosmo Hsieh
71e1c36956 Merge "Revert "Allow rule to let settings access apex files"" 2019-06-28 09:59:04 +00:00
Cosmo Hsieh
e47d2365a8 Revert "Allow rule to let settings access apex files"
This reverts commit 0c0ba46192.

Reason for revert: <Broken build 5695273 on aosp-master on aosp_x86_64-eng>

Change-Id: I763f19aa5b72f2e1aaebbc78bb8ab3020c3d2a7b
2019-06-28 09:51:28 +00:00
Anton Hansson
efb6ec894c Merge "Remove policy for ro.url.legal*" 2019-06-28 09:11:09 +00:00
Andrew Sapperstein
bfe6fdedba Merge "Allow rule to let settings access apex files" 2019-06-28 04:52:35 +00:00
Todd Kennedy
0c0ba46192 Allow rule to let settings access apex files
In order to show licensing information, we need to read it from
an asset stored in the .apex file.

Bug: 135183006
Test: Manual; settings can access apex files stored on /data
Change-Id: I71fbde6e295d9c890c9b9b0449e5150834a6680e
2019-06-27 18:34:25 +00:00
Sidath Senanayake
4b25c0a65a Allow perfetto to access gpu_frequency tracepoint in user
This will allow Perfetto to capture GPU frequency changes
on the target, which is useful to graphics developers
using Perfetto to profile graphics HW usage.

Bug: 136062452
Change-Id: Idb7870b2f674f1359ef3b4487dbeff190b394248
2019-06-26 18:06:48 +01:00
Anton Hansson
22b24a17e8 Remove policy for ro.url.legal*
These props aren't read/written anywhere.

Test: presubmit
Change-Id: I0b7335546a6e798c183fc0c22b6a089cbe576e4c
2019-06-25 15:44:23 +01:00
Treehugger Robot
9cc85328ea Merge "atrace: allow tracing of vibrator hal" 2019-06-25 02:23:25 +00:00
Tom Cherry
946dd43afb Merge "Use a property instead of file to communicate cold boot done" 2019-06-24 19:39:03 +00:00
Dan Willemsen
76979371f1 Merge "Use prebuilt m4 instead of system m4" 2019-06-20 20:50:12 +00:00
Treehugger Robot
828722b4af Merge "Add power stats HAL to ANR list" 2019-06-20 17:26:04 +00:00