- Feb 28, 2017
-
-
Todd Poynor authored
Add a file context for keeping track of last reboot reason and label directory /data/misc/reboot/ for this purpose. (Cherry picked from commit ca051f6d) Bug: 30994946 Test: manual: reboot ocmmand, setprop sys.powerctl, SoC thermal mgr Change-Id: I9569420626b4029a62448b3f729ecbbeafbc3e66
-
Steven Moreland authored
Bug: 35328775 Test: works in both binderized and passthrough modes Merged-In: I1f827b4983e5e67c516e4488ad3497dd62db7e20 Change-Id: I1f827b4983e5e67c516e4488ad3497dd62db7e20
-
- Feb 24, 2017
-
-
Amit Mahajan authored
Test: Basic telephony sanity Bug: 35672432 Change-Id: I7d17cc7efda9902013c21d508cefc77baccc06a8
-
- Feb 17, 2017
-
-
Steven Moreland authored
Test: hidl_test, device boots with allocator Bug: 35327976 Merged-In: I6232a2823ff16058c70f173ec2332772048563f4 Change-Id: I6232a2823ff16058c70f173ec2332772048563f4
-
- Feb 13, 2017
-
-
Steven Moreland authored
Bug: 34135607 Test: hals work Merged-In: I6a1f87438bb5b540fce900e9ec5df07d3f4f6bd4 Change-Id: I6a1f87438bb5b540fce900e9ec5df07d3f4f6bd4
-
- Feb 12, 2017
-
-
Nick Kralevich authored
On boot, Android runs restorecon on a number of virtual directories, such as /sys and /sys/kernel/debug, to ensure that the SELinux labels are correct. To avoid causing excessive boot time delays, the restorecon code aggressively prunes directories, to avoid recursing down directory trees which will never have a matching SELinux label. See: * https://android-review.googlesource.com/93401 * https://android-review.googlesource.com/109103 The key to this optimization is avoiding unnecessarily broad regular expressions in file_contexts. If an overly broad regex exists, the tree pruning code is ineffective, and the restorecon ends up visiting lots of unnecessary directories. The directory /sys/kernel/debug/tracing contains approximately 4500 files normally, and on debuggable builds, this number can jump to over 9000 files when the processing from wifi-events.rc occurs. For comparison, the entire /sys/kernel/debug tree (excluding /sys/kernel/debug/tracing) only contains approximately 8000 files. The regular expression "/sys/kernel(/debug)?/tracing/(.*)?" ends up matching a significant number of files, which impacts boot performance. Instead of using an overly broad regex, refine the regex so only the files needed have an entry in file_contexts. This list of files is essentially a duplicate of the entries in frameworks/native/cmds/atrace/atrace.rc . This change reduces the restorecon_recursive call for /sys/kernel/debug from approximately 260ms to 40ms, a boot time reduction of approximately 220ms. Bug: 35248779 Test: device boots, no SELinux denials, faster boot. Change-Id: I70f8af102762ec0180546b05fcf014c097135f3e
-
- Feb 11, 2017
-
-
Nick Kralevich authored
Use the default filesystem label from genfs_contexts for the directory /sys/kernel/debug/tracing and /sys/kernel/tracing, instead of explicitly attempting to relabel it. There are three cases we need to consider: 1) Old-style tracing functionality is on debugfs 2) tracing functionality is on tracefs, but mounted under debugfs 3) tracefs is mounted at /sys/kernel/tracing For #1, the label on /sys/kernel/debug/tracing will be debugfs, and all processes are allowed debugfs:dir search, so having the label be debugfs instead of debugfs_tracing will not result in any permission change. For #2, the label on /sys/kernel/debug/tracing will be debugfs_tracing, which is the same as it is today. The empty directory /sys/kernel/tracing wlll retain the sysfs label, avoiding the denial below. For #3, /sys/kernel/debug/tracing won't exist, and /sys/kernel/tracing will have the debugfs_tracing label, where processes are allowed search access. Addresses the following denial: avc: denied { associate } for pid=1 comm="init" name="tracing" dev="sysfs" ino=95 scontext=u:object_r:debugfs_tracing:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem permissive=0 Bug: 31856701 Bug: 35197529 Test: no denials on boot Change-Id: I7233ea92c6987b8edfce9c2f1d77eb25c7df820f
-
- Feb 09, 2017
-
-
Nick Bray authored
Bug: 30989383 Bug: 34731101 Test: manual Change-Id: Icf9d48568b505c6b788f2f5f456f2d709969fbeb
-
- Feb 07, 2017
-
-
Joe Onorato authored
Test: adb shell incident Bug: 31122534 Change-Id: I4ac9c9ab86867f09b63550707673149fe60f1906
-
- Feb 06, 2017
-
-
Chad Brubaker authored
The rules for the two types were the same and /data/app-ephemeral is being removed. Remove these types. Test: Builds Change-Id: I520c026395551ad1362dd2ced53c601d9e6f9b28
-
- Feb 02, 2017
-
-
Jiyong Park authored
This change adds selinux policy for configstore@1.0 hal. Currently, only surfaceflinger has access to the HAL, but need to be widen. Bug: 34314793 Test: build & run Merged-In: I40e65032e9898ab5f412bfdb7745b43136d8e964 Change-Id: I40e65032e9898ab5f412bfdb7745b43136d8e964 (cherry picked from commit 5ff0f178)
-
- Jan 31, 2017
-
-
Calin Juravle authored
Since it was introduced it caused quite a few issues and it spams the SElinux logs unnecessary. The end goal of the audit was to whitelist the access to the interpreter. However that's unfeasible for now given the complexity. Test: devices boots and everything works as expected no more auditallow logs Bug: 29795519 Bug: 32871170 Change-Id: I9a7a65835e1e1d3f81be635bed2a3acf75a264f6
-
Mark Salyzyn authored
Create an event_log_tags_file label and use it for /dev/event-log-tags. Only trusted system log readers are allowed direct read access to this file, no write access. Untrusted domain requests lack direct access, and are thus checked for credentials via the "plan b" long path socket to the event log tag service. Test: gTest logd-unit-tests, liblog-unit-tests and logcat-unit-tests Bug: 31456426 Bug: 30566487 Change-Id: Ib9b71ca225d4436d764c9bc340ff7b1c9c252a9e
-
- Jan 29, 2017
-
-
Sandeep Patil authored
Bug: 33746484 Test: Successfully boot with original service and property contexts. Successfully boot with split serivce and property contexts. Change-Id: I87f95292b5860283efb2081b2223e607a52fed04 Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
- Jan 27, 2017
-
-
Janis Danisevskis authored
This adds the premissions required for android.hardware.keymaster@2.0-service to access the keymaster TA as well as for keystore and vold to lookup and use android.hardware.keymaster@2.0-service. IT DOES NOT remove the privileges from keystore and vold to access the keymaster TA directly. Test: Run keystore CTS tests Bug: 32020919 (cherry picked from commit 5090d6f3) Change-Id: Ib02682da26e2dbcabd81bc23169f9bd0e832eb19
-
Badhri Jagan Sridharan authored
Bug: 31015010 cherry-pick from b6e4d4bd Test: checked for selinux denial msgs in the dmesg logs. Change-Id: I8285ea05162ea0d75459e873e5c2bad2dbc7e5ba
-
- Jan 25, 2017
-
-
Jeff Tinker authored
bug:32815560 Change-Id: I494141b47fcd2e7e0cc02aa58d8df9a222060b3f
-
Ray Essick authored
reflect the change from "mediaanalytics" to "mediametrics" Also incorporates a broader access to the service -- e.g. anyone. This reflects that a number of metrics submissions come from application space and not only from our controlled, trusted media related processes. The metrics service (in another commit) checks on the source of any incoming metrics data and limits what is allowed from unprivileged clients. Bug: 34615027 Test: clean build, service running and accessible Change-Id: I657c343ea1faed536c3ee1940f1e7a178e813a42
-
- Jan 24, 2017
-
-
Calin Juravle authored
This CLs adds SElinux policies necessary to compile secondary dex files. When an app loads secondary dex files via the base class loader the files will get reported to PM. During maintance mode PM will compile the secondary dex files which were used via the standard installd model (fork, exec, change uid and lower capabilities). What is needed: dexoptanalyzer - needs to read the dex file and the boot image in order to decide if we need to actually comppile. dex2oat - needs to be able to create *.oat files next to the secondary dex files. Test: devices boots compilation of secondary dex files works without selinux denials cmd package compile --secondary-dex -f -m speed com.google.android.gms Bug: 32871170 Change-Id: I038955b5bc9a72d49f6c24c1cb76276e0f53dc45
-
- Jan 20, 2017
-
-
Paul Lawrence authored
Test: Device boots Can take photos Run "adb shell atrace -c -b 16000 -t 5 gfx" without root and check produces output Run "python systrace.py view gfx freq sched am wm dalvik binder_driver" from external/chromium-trace after adb root and check populated Bug: 31856701 Change-Id: Ic319f8a0a3e395efa7ee8ba33a868ac55cb44fe4
-
Alex Klyubin authored
Test: No change to SELinux policy Change-Id: I45d6d6ab0538b9d4768b922cfdc2c972272d0b18
-
Steven Moreland authored
/sys/class/leds is the standard location for linux files dealing with leds, however the exact contents of this directory is non-standard (hence the need for a hal). Bug: 32022100 Test: compiles and works for the subset of common files Change-Id: I7571d7267d5ed531c4cf95599d5f2acc22287ef4
-
- Jan 18, 2017
-
-
mukesh agrawal authored
Revise policy, to allow init and system_server to configure, clear, and read kernel trace events. This will enable us to debug certain WiFi failures. Note that system_server is restricted to only accessing a wifi-specific trace instance. (Hence, system_server is not allowed to interfere with atrace.) Moreover, even for the wifi trace instance, system_server is granted limited permissions. (system_server can not, e.g., change which events are traced.) Note also that init and system_server are only granted these powers on userdebug or eng builds. The init.te and system_server.te changes resolve the following denials: // Denials when wifi-events.rc configures tracing { write } for pid=1 comm="init" name="instances" dev="debugfs" ino=755 scontext=u:r:init:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1 { add_name } for pid=1 comm="init" name="wifi" scontext=u:r:init:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1 { create } for pid=1 comm="init" name="wifi" scontext=u:r:init:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1 { write } for pid=1 comm="init" name="tracing_on" dev="debugfs" ino=18067 scontext=u:r:init:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 { write } for pid=1 comm="init" name="buffer_size_kb" dev="debugfs" ino=18061 scontext=u:r:init:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=file permissive=1 // Denials when system_server sets up fail-safe // (auto-terminate tracing if system_server dies) { search } for pid=882 comm="system_server" name="instances" dev="debugfs" ino=755 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1 { read } for pid=882 comm="system_server" name="free_buffer" dev="debugfs" ino=18063 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 { open } for pid=882 comm="system_server" path="/sys/kernel/debug/tracing/instances/wifi/free_buffer" dev="debugfs" ino=18063 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 { getattr } for pid=882 comm="system_server" path="/sys/kernel/debug/tracing/instances/wifi/free_buffer" dev="debugfs" ino=18063 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 // Denials when system_server toggles tracing on or off // (WifiStateMachine is a thread in system_server) { search } for pid=989 comm="WifiStateMachin" name="instances" dev="debugfs" ino=755 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1 { write } for pid=989 comm="WifiStateMachin" name="tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 { open } for pid=989 comm="WifiStateMachin" path="/sys/kernel/debug/tracing/instances/wifi/tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 { getattr } for pid=989 comm="WifiStateMachin" path="/sys/kernel/debug/tracing/instances/wifi/tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 { write } for pid=989 comm="WifiStateMachin" name="tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 { open } for pid=989 comm="WifiStateMachin" path="/sys/kernel/debug/tracing/instances/wifi/tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 { getattr } for pid=989 comm="WifiStateMachin" path="/sys/kernel/debug/tracing/instances/wifi/tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 // Denials when system_server reads the event trace // (This happens in response to a dumpsys request) { search } for pid=3537 comm="Binder:882_B" name="instances" dev="debugfs" ino=755 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1 { read } for pid=3537 comm="Binder:882_B" name="trace" dev="debugfs" ino=18059 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 { open } for pid=3537 comm="Binder:882_B" path="/sys/kernel/debug/tracing/instances/wifi/trace" dev="debugfs" ino=18059 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 { getattr } for pid=3537 comm="Binder:882_B" path="/sys/kernel/debug/tracing/instances/wifi/trace" dev="debugfs" ino=18059 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 { write } for pid=3537 comm="Binder:882_B" name="trace" dev="debugfs" ino=18059 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1 Bug: 27254565 Test: manual Manual test: - Build this CL along with CL:322337 - Verify that system boots, and that we can connect to GoogleGuest. (Testing of actual trace functionality with require some more patches in frameworks/opt/net/wifi.) $ adb root && adb shell dmesg | egrep 'avc: denied.+debugfs' Change-Id: Ib6eb4116549277f85bd510d25fb30200f1752f4d
-
Josh Gao authored
Replace the global debuggerd with a per-process debugging helper that gets exec'ed by the process that crashed. Bug: http://b/30705528 Test: crasher/crasher64, `debuggerd <pid>`, `kill -ABRT <pid>` Change-Id: Iad1b7478f7a4e2690720db4b066417d8b66834ed
-
Eino-Ville Talvala authored
- Allow cameraservice to talk to hwbinder, hwservicemanager - Allow hal_camera to talk to the same interfaces as cameraservice Test: Compiles, confirmed that cameraservice can call hwservicemanager Bug: 32991422 Change-Id: Ied0a3f5f7149e29c468a13887510c78d555dcb2a
-
Jorim Jaggi authored
This reverts commit 262edc38. Fixes: 34370523 Change-Id: I077d064d4031d40bc48cb39eba310e6c16b9627d
-
Sandeep Patil authored
Bug: 33746484 Test: Successfully boot with original service and property contexts. Successfully boot with split serivce and property contexts. Change-Id: I7881af8922834dc69b37dae3b06d921e05206564 Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
Sandeep Patil authored
Bug: 33746484 Test: Successfully boot with original service and property contexts. Successfully boot with split serivce and property contexts. Change-Id: Ide67d37d85273c60b9e387e72fbeb87be6da306a Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
- Jan 13, 2017
-
-
Jim Miller authored
Move from fingerprintd to new fingerprint_hal and update SeLinux policy. Test: Boot with no errors related to fingerprint sepolicy Bug: 33199080 Change-Id: Idfde0cb0530e75e705033042f64f3040f6df22d6
-
Hridya Valsaraju authored
The following are the avc denials that are addressed: avc: denied { call } for pid=889 comm="system_server" scontext=u:r:system_server:s0 tcontext=u:r:hal_gnss_default:s0 tclass=binder permissive=0 avc: denied { call } for scontext=u:r:hal_gnss_default:s0 tcontext=u:r:system_server:s0 tclass=binder permissive=0 avc: denied { read } for name="hw" dev="mmcblk0p43" ino=1837 scontext=u:r:hal_gnss_default:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0 avc: denied { open } for path="/system/lib64/hw" dev="mmcblk0p43" ino=1837 scontext=u:r:hal_gnss_default:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0 Bug:31974439 Test: Checked that there no more related avc denial messages related to the GNSS HAL in dmesg. Change-Id: I5b43dc088017a5568dd8e442726d2bf52e95b1d5
-
Max Bires authored
It seems likely that there is no reason to keep around a number of devices that are configured to be included into the pixel kernels. Init and ueventd should be the only processes with r/w access to these devices, so auditallow rules have been added to ensure that they aren't actually used. /dev/keychord was given its own type since it's one of the few character devices that's actually legitimately used and would cause log spam in the auditallow otherwise. Bug: 33347297 Test: The phone boots without any apparent log spam. Change-Id: I3dd9557df8a9218b8c802e33ff549d15849216fb
-
- Jan 12, 2017
-
-
Myles Watson authored
Test: run a gtest in /data/nativetest/ with no permission denial Change-Id: Id644ed7dbea59becaf84b6073c9144711ad07c10
-
- Jan 11, 2017
-
-
Josh Gao authored
Bug: http://b/34228376 Test: m Change-Id: I1321ada1521bb3e3fd08105f1a41d519ee486683
-
- Jan 10, 2017
-
-
Andre Eisenbach authored
Bug: 31972505 Test: VTS test passes, Bluetooth starts/stops Change-Id: Ic068c9fca7c50e63c5b6e3d86a2ee6cc53207e08
-
- Jan 09, 2017
-
-
Dan Cashman authored
Bug: 33746381 Test: Device boots with no extra denials. Change-Id: I2f0da92367851142e0d7df4afec8861ceaed9d3e
-
- Jan 07, 2017
-
-
ynwang authored
Allowing storaged for reading from pseudo filesystems and debugfs. Bug: 32221677 Change-Id: I837cead9a68f0b399703b64d724cb9c4b205c335
-
- Jan 05, 2017
-
-
dcashman authored
Simulate platform and non-platform split by compiling two different file_contexts files and loading them together on-device. Leave the existing file_contexts.bin in place until we're ready to build images based on the new files. Bug: 31363362 Test: Builds and boots without additional denials. Change-Id: I7248f876e2230cee3b3cbf386422063da1e3dde0 Bring back file_contexts.bin. Change-Id: Ifec2c363579151080fdec48e8bc46bbbc8c97674 Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
- Jan 03, 2017
-
-
Alexey Polyudov authored
Change-Id: I79a305407c3a362d7be11f4c026f31f1e9666f1c Signed-off-by:
Alexey Polyudov <apolyudov@google.com>
-
- Dec 29, 2016
-
-
Ashutosh Joshi authored
Adding sepoilcy for sensors. Test: Sensors work. Change-Id: Ibbf0c1a22654a17b1573e3761ea9ccd816150255
-
- Dec 28, 2016
-
-
Ashutosh Joshi authored
Adding sepolicty for contexthub service. Test: GTS tests pass. Change-Id: I2576b8028d12a31151d7b7869679b853eb16c75e
-