Commit Graph

9573 Commits

Author SHA1 Message Date
Tianjie Xu
82696dd19b Merge "Allow recovery to read thermal info" am: 462cf398a0
am: 8ee641877c

Change-Id: I6c035c3e696531297ff8a3c09045acf6d2c98cd0
2017-04-07 18:27:57 +00:00
Tianjie Xu
8ee641877c Merge "Allow recovery to read thermal info"
am: 462cf398a0

Change-Id: I12d310b90e6863a56c1fc269ce237e93864d88f8
2017-04-07 18:23:57 +00:00
Tianjie Xu
462cf398a0 Merge "Allow recovery to read thermal info" 2017-04-07 18:16:53 +00:00
Dan Cashman
77154b390c Move mapping_sepolicy.cil to /system partition. am: 04ef57bfac
am: 84b3879ad2

Change-Id: I64c0a4e8ae9978fe8b809e21ae8b3e9b0b3feb98
2017-04-07 14:35:17 +00:00
Dan Cashman
84b3879ad2 Move mapping_sepolicy.cil to /system partition.
am: 04ef57bfac

Change-Id: I906f85514efb4301ac0bafaf140deba7be76cdee
2017-04-07 14:30:51 +00:00
Dan Cashman
04ef57bfac Move mapping_sepolicy.cil to /system partition.
This is a necessary first step to finalizing the SELinux policy build
process.  The mapping_sepolicy.cil file is required to provide backward
compatibility with the indicated vendor-targeted version.

This still needs to be extended to provide N mapping files and corresponding
SHA256 outputs, one for each of the N previous platform versions with which
we're backward-compatible.

(cherry-pick of commit: 0e9c47c0af)

Bug: 36783775
Test: boot device with matching sha256 and non-matching and verify that
device boots and uses either precompiled or compiled policy as needed. Also
verify that mapping_sepolicy.cil has moved.

Change-Id: I5692fb87c7ec0f3ae9ca611f76847ccff9182375
2017-04-06 15:45:16 -07:00
Tianjie Xu
3da2f21fbf Allow recovery to read thermal info
We want to track temperature metrics during an OTA update.

denial message:
denied  { search } for  pid=349 comm="recovery" name="thermal"
dev="sysfs" ino=18029 scontext=u:r:recovery:s0
tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0

denied  { read } for  pid=326 comm="recovery" name="temp"
dev="sysfs" ino=18479 scontext=u:r:recovery:s0
tcontext=u:object_r:sysfs_thermal:s0 tclass=file permissive=0

Bug: 36920500
Bug: 32518487
Test: temperature logs on angler
Change-Id: Ib70c1c7b4e05f91a6360ff134a11c80537d6015e
2017-04-06 00:22:54 -07:00
Mark Salyzyn
0dd37a3bb5 Merge "logcatd: introduce logcatd executable" am: b5b6e0c5c0
am: 8da8e872d2

Change-Id: I84e2d4d81892ee48d0e3db3875c9dd0b49f3ce2d
2017-04-04 21:56:31 +00:00
Mark Salyzyn
8da8e872d2 Merge "logcatd: introduce logcatd executable"
am: b5b6e0c5c0

Change-Id: Ie55c6153a4484921cf85bff0fc64e2b345715ae1
2017-04-04 21:54:28 +00:00
Treehugger Robot
b5b6e0c5c0 Merge "logcatd: introduce logcatd executable" 2017-04-04 21:48:23 +00:00
Tianjie Xu
64c8aa962f Merge "Allow update_verifier to reboot the device" am: fde87a96c6
am: 6429e00093

Change-Id: I14d24ef85a8409adaffe4073e3697d21a2c2f05f
2017-04-04 20:58:53 +00:00
Tianjie Xu
6429e00093 Merge "Allow update_verifier to reboot the device"
am: fde87a96c6

Change-Id: Id1e696f18bd1091f4103c02b49e3fa2dd6fa8e1b
2017-04-04 20:56:53 +00:00
Tianjie Xu
fde87a96c6 Merge "Allow update_verifier to reboot the device" 2017-04-04 20:48:29 +00:00
Steven Moreland
484a277c29 Merge "Remove hal_binderization_prop" am: 1871fc0a88
am: 2261cab6f2

Change-Id: Id44a7c591e8d7640c89e74cb9e88ce7849439c29
2017-04-04 20:17:49 +00:00
Steven Moreland
2261cab6f2 Merge "Remove hal_binderization_prop"
am: 1871fc0a88

Change-Id: I2d474b6d04d0fa2af7ad35d7af068e38477609ee
2017-04-04 20:12:30 +00:00
Treehugger Robot
1871fc0a88 Merge "Remove hal_binderization_prop" 2017-04-04 19:49:52 +00:00
Tianjie Xu
1a60998ac0 Allow update_verifier to reboot the device
Currently update_verifier only verifies the blocks when dm-verity is in
'enforcing' mode; and dm-verity will reboot the device upon detection of
errors. However, sometimes the verity mode is not guaranteed to be
correct. When mode is 'eio' for example, dm-verity will not trigger
a reboot but rather fail the read. So update_verifier need to take the
responsibility to reboot the device. Otherwise the device will continue
to boot without setting the flag "isSlotMarkedSuccessful".

Denial message:
update_verifier: type=1400 audit(0.0:18): avc: denied { write } for
name="property_service" dev="tmpfs" ino=14678 scontext=u:r:update_verifier:s0
tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0

Bug: 36260064
Test: powerctl property sets successfully
Change-Id: I7431f87e2d61be1425397732aebb369d4ad4c26c
2017-04-04 19:44:06 +00:00
Steven Moreland
d40474ec55 Remove hal_binderization_prop
Test: works on internal marlin
Bug: 34274385
Change-Id: Idd35e5cdccb595b4e5994eb1d78fdeece0aec0a6
2017-04-04 09:46:45 -07:00
Mark Salyzyn
88cdd71d7e logcatd: introduce logcatd executable
logcatd is the same as logcat, except that the -L flag, if supplied,
runs once, then the command re-runs itself without the -L flag with
the same argument set.  By introducing a logcatd daemon executable
we can solve the problem of the longish reads from pstore that
sometimes occur when the system is excessively busy spinning in a
foreground task starving this daemon as we absorb the delay in
an init service, rather than in an init exec.  This would not have
been efficiently possible without the introduction of liblogcat.

Test: gTest logcat-unit-tests
Test: Manual check logpersist operations
Bug: 28788401
Bug: 30041146
Bug: 30612424
Bug: 35326290
Change-Id: I3454bad666c66663f59ae03bcd72e0fe8426bb0a
2017-04-03 14:53:53 -07:00
Daniel Cashman
537e9e98bf Merge "Add reverse-attribute mapping to sepolicy-analyze." am: cb6f8f0277
am: 22b00be748

Change-Id: Id8e7c42e8e92fed47611c083d40c2d574d3d6918
2017-03-31 20:37:59 +00:00
Daniel Cashman
22b00be748 Merge "Add reverse-attribute mapping to sepolicy-analyze."
am: cb6f8f0277

Change-Id: I47b6a0362f268ba1a599ab2354f72357fc7b79cc
2017-03-31 20:35:29 +00:00
Daniel Cashman
cb6f8f0277 Merge "Add reverse-attribute mapping to sepolicy-analyze." 2017-03-31 20:32:17 +00:00
Tom Cherry
bb51a94124 Merge "Grant vdc access to kmsg" am: 6b92e26aec
am: 58cb5787d4

Change-Id: I219d6074cf3ff7253ef74ebc6d8aa5372d296243
2017-03-31 16:44:55 +00:00
Vishwath Mohan
ba0c430ba1 Merge "Refactor sanitized library on-disk layout - SELinux." am: a2e9664cef
am: ebe26cbb7c

Change-Id: If6ca7b2337a0b80b6fe2c0163e9a8bec2e7d6829
2017-03-31 16:44:01 +00:00
Tom Cherry
58cb5787d4 Merge "Grant vdc access to kmsg"
am: 6b92e26aec

Change-Id: Ie76aa1f95e72b6183c13be4f9dc86481a2d63077
2017-03-31 16:42:55 +00:00
Vishwath Mohan
ebe26cbb7c Merge "Refactor sanitized library on-disk layout - SELinux."
am: a2e9664cef

Change-Id: I184d353b6ca0c8e5b712da11b4de777e04a5b79f
2017-03-31 16:41:29 +00:00
Tom Cherry
6b92e26aec Merge "Grant vdc access to kmsg" 2017-03-31 16:41:02 +00:00
Treehugger Robot
a2e9664cef Merge "Refactor sanitized library on-disk layout - SELinux." 2017-03-31 16:35:53 +00:00
Dan Cashman
d444ebedac Add reverse-attribute mapping to sepolicy-analyze.
sepolicy-analyze allows users to see all types that have a given
attribute, but not the reverse case: all attributes of a given type.
Add a '--reverse' option which enables this, but keeps the previous
interface.

Usage: sepolicy-analyze sepolicy attribute -r init

Bug: 36508258
Test: Build and run against current policy.
Change-Id: Ice6893cf7aa2ec4706a7411645a8e0a8a3ad01eb
2017-03-31 08:40:26 -07:00
Jin Qian
fc8bbd7ea5 Merge "storaged: allow shell to call dumpsys storaged" am: eca322517d
am: f81e48b62f

Change-Id: Ied9a916f080a85d41165cb9e427ad8e696e695ed
2017-03-31 02:35:54 +00:00
Jin Qian
f81e48b62f Merge "storaged: allow shell to call dumpsys storaged"
am: eca322517d

Change-Id: I22930eb5a18047b235b6d1028a3fc49e5a6b0989
2017-03-31 02:33:29 +00:00
Treehugger Robot
eca322517d Merge "storaged: allow shell to call dumpsys storaged" 2017-03-31 02:29:18 +00:00
Jin Qian
af3eaf0d20 storaged: allow shell to call dumpsys storaged
Test: adb kill-server && adb shell dumpsys storaged
Bug: 36492915
Change-Id: I3a1a2ad2f016ddd5770d585cae82c8be69001df9
2017-03-30 16:21:29 -07:00
Myles Watson
a21b3b1987 Disallow HAL access to Bluetooth data files am: 02d9d21dcb
am: 6f700ae546

Change-Id: I6d58dcfa6037dc916d9ab5b995d2132e559783e1
2017-03-30 20:19:01 +00:00
Myles Watson
6f700ae546 Disallow HAL access to Bluetooth data files
am: 02d9d21dcb

Change-Id: I29861f9cc52001f2968c2313f48031dd01afe8c7
2017-03-30 20:17:03 +00:00
Tom Cherry
bc4d36305d Grant vdc access to kmsg
Init is no longer calling vdc with logwrapper, so it must take care of
logging to kmsg directly.

Change-Id: I529f5a95e19c08ef75e0da9a02bae1cb7187eec0
avc: denied { write } for pid=367 comm="vdc" name="kmsg" dev="tmpfs" ino=11056 scontext=u:r:vdc:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0

Test: observe vdc logging in kmsg on boot and stderr on normal usage

Change-Id: Ie3678509d360f19b95cb03aeea75f29843728203
2017-03-30 11:02:29 -07:00
Myles Watson
02d9d21dcb Disallow HAL access to Bluetooth data files
Devices that store their BT MAC address in /data/misc/bluedroid/ need
to find another place for that file.

Bug: 36602160
Test: Restart Bluetooth, check for selinux denials/files in /data/misc
Change-Id: Ib8d610f201a8c35f95b464c24857c6639205bc66
Merged-In: Ib8d610f201a8c35f95b464c24857c6639205bc66
2017-03-30 17:59:32 +00:00
Vishwath Mohan
33ebdda80f Refactor sanitized library on-disk layout - SELinux.
This CL changes the policy for ASAN files on-disk to support the
changes made by the following CLs -
https://android-review.googlesource.com/#/c/359087/
https://android-review.googlesource.com/#/c/359389/

which refactor the on-disk layout of sanitized libraries in the following
manner -
/data/lib* --> /data/asan/system/lib*
/data/vendor/* --> /data/asan/vendor/*

There are a couple of advantages to this, including better isolation
from other components, and more transparent linker renaming and
SELinux policies.

Bug: 36574794
Bug: 36674745
Test: m -j40 && SANITIZE_TARGET="address" m -j40 and the device
boots. All sanitized libraries are correctly located in /data/asan/*,
and have the right SELinux permissions.

Change-Id: Ib08e360cecc8d77754a768a9af0f7db35d6921a9
2017-03-29 23:42:49 -07:00
Nathan Harold
b78fd54535 Merge changes from topic 'ipsec-service' am: 328153893f
am: eaa5e2984f

Change-Id: I232deac94123b1e07a20789cc247aa95bb9b3327
2017-03-29 23:58:47 +00:00
Nathan Harold
a581c048df Update Common NetD SEPolicy to allow Netlink XFRM am: 7eb3dd3b02
am: 75760e9d04

Change-Id: I02cfb5b418c2edaeaa02831113205e0a73f92342
2017-03-29 23:58:44 +00:00
Nathan Harold
eaa5e2984f Merge changes from topic 'ipsec-service'
am: 328153893f

Change-Id: Id6cc5e3c1dc6b098f893b566dcbf09fc29973162
2017-03-29 23:55:03 +00:00
Nathan Harold
75760e9d04 Update Common NetD SEPolicy to allow Netlink XFRM
am: 7eb3dd3b02

Change-Id: Iafaa3fd315533c4cb49847d927d2c7cbae71bb51
2017-03-29 23:54:58 +00:00
Treehugger Robot
328153893f Merge changes from topic 'ipsec-service'
* changes:
  Add IpSecService SEPolicy
  Update Common NetD SEPolicy to allow Netlink XFRM
2017-03-29 22:50:50 +00:00
Josh Gao
53047f6d7e Merge "Mark system_ndebug_socket as mlstrustedobject." am: ad38a45cc3
am: e2acb915ad

Change-Id: I86368e4febe04d7dddc718316c1788c46f6ecb74
2017-03-28 00:35:55 +00:00
Josh Gao
e2acb915ad Merge "Mark system_ndebug_socket as mlstrustedobject."
am: ad38a45cc3

Change-Id: I0d974996ee28e0cff0a5a59de66ce2247c1c254a
2017-03-28 00:32:22 +00:00
Treehugger Robot
ad38a45cc3 Merge "Mark system_ndebug_socket as mlstrustedobject." 2017-03-28 00:21:31 +00:00
Jeff Vander Stoep
ab1fad17ff Merge "Create selinux_policy phony target" am: 915c0070fa
am: 2f4df755ae

Change-Id: I4a273520e7a5a92f5739f413d8773ddb3c6a259a
2017-03-27 20:09:55 +00:00
Jeff Vander Stoep
2f4df755ae Merge "Create selinux_policy phony target"
am: 915c0070fa

Change-Id: I6899ca877d1ccf0a3d475fd34cfffc00eacdf23d
2017-03-27 20:06:54 +00:00
Treehugger Robot
915c0070fa Merge "Create selinux_policy phony target" 2017-03-27 20:03:04 +00:00
Steven Moreland
d34c7eefda Merge "adbd: use hal_client_domain" am: 5a9410cf7a
am: aa5feec9f3

Change-Id: I3ba818c67e9134161dfd9c74d9fdb52f0bd51bef
2017-03-27 17:34:08 +00:00