Commit graph

11685 commits

Author SHA1 Message Date
Chong Zhang
78e595deab cas: add CAS hal and switch to use hwservice
bug: 22804304

Change-Id: I7162905d698943d127aa52804396e4765498d028
2017-06-16 13:28:36 -07:00
TreeHugger Robot
1da7ed23b9 Merge "Exempt ASAN from selinux build-checks." 2017-06-15 22:53:45 +00:00
Dan Cashman
ccdd6e11dc Exempt ASAN from selinux build-checks.
ASAN makes use of shenanigans that violate our policy best-practices.
This is by design.  Exempt them from these tests to get it building
again.

Bug: 37740897
Test: Builds with ASAN enabled.
Change-Id: Iffde28c2741466da5862b2dfe1fffa2c0d93caeb
2017-06-15 11:24:29 -07:00
Tom Cherry
4aa1869be7 Merge "Add getpgid to system_service and init" am: 2122f1fe95 am: 043068593a am: 24d0cad327
am: c638217732

Change-Id: I88f49a55da787aa355431b65cbada05924d2c152
2017-06-15 17:33:24 +00:00
Tom Cherry
c638217732 Merge "Add getpgid to system_service and init" am: 2122f1fe95 am: 043068593a
am: 24d0cad327

Change-Id: Ieffac9d2e5ff8500534cf9935eff9918989c2fb4
2017-06-15 17:30:23 +00:00
Tom Cherry
24d0cad327 Merge "Add getpgid to system_service and init" am: 2122f1fe95
am: 043068593a

Change-Id: I3eb542cced980ce94425110d8dc8e58aeb122607
2017-06-15 17:28:00 +00:00
Tom Cherry
043068593a Merge "Add getpgid to system_service and init"
am: 2122f1fe95

Change-Id: I05f0b28b9e6622477fe2fa4b041ea03c5744f82c
2017-06-15 17:23:52 +00:00
Tom Cherry
2122f1fe95 Merge "Add getpgid to system_service and init" 2017-06-15 17:17:22 +00:00
TreeHugger Robot
d824301c26 Merge "Properly give some files the debugfs_tracing context only in debug mode." 2017-06-15 15:50:07 +00:00
Carmen Jackson
ad6668f9b5 Merge "Add debug selinux permission to write saved_cmdlines_size. am: e9381d5e01 am: d651e0b79b" into oc-dr1-dev-plus-aosp
am: 1c21d4bf8a  -s ours

Change-Id: I61071789474228aa6cc0f59b9ecfb9a859f0ae48
2017-06-14 23:41:52 +00:00
Carmen Jackson
64ce7fee45 Add debug selinux permission to write saved_cmdlines_size. am: e9381d5e01 am: e180a613b5
am: 7683d56599  -s ours

Change-Id: I47c3530675ce5c55edc09bca749c7a897404d033
2017-06-14 23:41:36 +00:00
Android Build Merger (Role)
1c21d4bf8a Merge "Add debug selinux permission to write saved_cmdlines_size. am: e9381d5e01 am: d651e0b79b" into oc-dr1-dev-plus-aosp 2017-06-14 23:39:02 +00:00
Carmen Jackson
7683d56599 Add debug selinux permission to write saved_cmdlines_size. am: e9381d5e01
am: e180a613b5

Change-Id: Iaa5b2f434ebf712884d5823caf87e93de317e14e
2017-06-14 23:38:47 +00:00
Carmen Jackson
24f24c4137 Add debug selinux permission to write saved_cmdlines_size. am: e9381d5e01
am: d651e0b79b

Change-Id: I99c911d119c300e7035a111a24b0d900f435fca8
2017-06-14 23:38:47 +00:00
Carmen Jackson
d651e0b79b Add debug selinux permission to write saved_cmdlines_size.
am: e9381d5e01

Change-Id: I784011fc804dd43f431be62804761b100846dfbf
2017-06-14 23:35:38 +00:00
Carmen Jackson
e180a613b5 Add debug selinux permission to write saved_cmdlines_size.
am: e9381d5e01

Change-Id: Ic2192d5128543f28d2f91c4aedabab08b01669e5
2017-06-14 23:35:35 +00:00
Joel Galenson
92fdd8954f Properly give some files the debugfs_tracing context only in debug mode.
One of my previous commits removed this, so I am now restoring it.

This commit also contains a bit of cleanup from previous commits by
removing some unneeded types.

It also fixes traceur by porting ag/2409144 to master.

Bug: 62413700, 62547086
Test: Built, flashed, and booted Marlin.  Verified that the files have
the correct context.  Verified that atrace and traceur work.

Change-Id: I76fa0e9060aff554687d57ab3976c8704a4068f0
2017-06-14 15:50:21 -07:00
TreeHugger Robot
365b9b0d76 Merge "recovery: clean up audit logspam" 2017-06-14 21:36:21 +00:00
Carmen Jackson
e9381d5e01 Add debug selinux permission to write saved_cmdlines_size.
Now that we're expected to use this when taking traces, we need to add
this permission so that Traceur can also access this file.

Test: Used Traceur and saw the traces appear in the bugreports
directory, as expected.
Bug: 62493544

Change-Id: Ib4304176abbb51e2e3b45c566ff14574e1cfaa82
Merged-In: I464b0df30fabfc5f1c7cd7430e53e8d04bfacb53
(this merged-in is not the same change; it's a conflicting change in
master)
2017-06-14 14:12:43 -07:00
Jeff Vander Stoep
ea1d6e7dc2 recovery: clean up audit logspam
avc: granted { search } scontext=u:r:recovery:s0 tcontext=u:object_r:cache_file:s0 tclass=dir
avc: granted { getattr } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file
avc: granted { read } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file
avc: granted { read open } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file
avc: granted { read } scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs:s0 tclass=file
avc: granted { read open } scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs:s0 tclass=file
avc: granted { search } scontext=u:r:recovery:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir

Fixes: 62619253
Test: policy builds, no more "granted" messages in dmesg for recovery.
Change-Id: I3f6d8ceee80307a01a8fd40cb4f8362a9825b1a3
2017-06-14 10:56:14 -07:00
TreeHugger Robot
b8ad31d28f Merge "Assert filesystem types must have their associated attr" 2017-06-14 17:43:35 +00:00
Robert Benea
84ae2d242f Merge "sepolicy: fix support for lmkd" 2017-06-14 10:33:02 +00:00
Joel Scherpelz
c1acc98382 SELinux policy for secure persistent netd storage am: abb1ba6532 am: 5ee87b0092 am: 14a3cb2848
am: 733609daea

Change-Id: I248cfa3b85774569123a3b3f7e8d3c068005b7fc
2017-06-14 05:49:55 +00:00
Joel Scherpelz
733609daea SELinux policy for secure persistent netd storage am: abb1ba6532 am: 5ee87b0092
am: 14a3cb2848

Change-Id: Ib3b7dc9a8a702a32330ccb31f22cf746df8764fb
2017-06-14 05:45:35 +00:00
Joel Scherpelz
14a3cb2848 SELinux policy for secure persistent netd storage am: abb1ba6532
am: 5ee87b0092

Change-Id: Id2dc995f88a60fe865387453234e3630a9975381
2017-06-14 05:41:10 +00:00
Joel Scherpelz
5ee87b0092 SELinux policy for secure persistent netd storage
am: abb1ba6532

Change-Id: I7765bfd350deb50847e83a1d3b5d7399206b4b9d
2017-06-14 05:36:53 +00:00
Tim Murray
86cb521502 sepolicy: fix support for lmkd
Allow lmkd to access /dev/memcg once again.

Test: lmkd can access memcg
bug 36588803

Change-Id: I47b4e79260bcd2967d85d8151c83e624d432f409
2017-06-13 21:07:53 -07:00
Robert Benea
655baa5491 Merge "Revert "sepolicy: fix support for lmkd"" 2017-06-14 00:54:17 +00:00
Robert Benea
9b1e0d10ca Revert "sepolicy: fix support for lmkd"
This reverts commit 527f64e66a.

Change-Id: Ibc48af53431a8f7c7211999dcb571f492fb5ddb4
2017-06-14 00:32:38 +00:00
Jeff Vander Stoep
11d096fc99 Assert filesystem types must have their associated attr
Test that:
- File types on /sys have attr sysfs_type
- File types on /sys/kernel/debug have attr debugfs_type
- File types on /data have attr data_file_type

Test: build policy
Change-Id: Ie4f1f1c7e5345da0999082962f084fdac6b85428
2017-06-13 16:04:48 -07:00
TreeHugger Robot
dfa6d75384 Merge "Files on /data must have the data_file_type attr" 2017-06-13 22:58:44 +00:00
Tom Cherry
c59eb4d853 Add getpgid to system_service and init
In libprocessgroup, we want to only send signals once to processes,
particularly for SIGTERM.  We must send the signal both to all
processes within a POSIX process group and a cgroup.  To ensure that
we do not duplicate the signals being sent, we check the processes in
the cgroup to see if they're in the POSIX process groups that we're
killing.  If they are, we skip sending a second signal.  This requires
getpgid permissions, hence this SELinux change.

avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=process permissive=1
avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=process permissive=1
avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:system_app:s0 tclass=process permissive=1
avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:system_app:s0 tclass=process permissive=1
avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:zygote:s0 tclass=process permissive=1
avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:zygote:s0 tclass=process permissive=1
avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:system_server:s0 tclass=process permissive=1
avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:system_server:s0 tclass=process permissive=1

Bug: 37853905
Bug: 62418791
Test: Boot, kill zygote, reboot
Change-Id: Ib6c265dbaac8833c47145ae28fb6594ca8545570
2017-06-13 15:23:01 -07:00
Jeff Vander Stoep
a9f437b43e Build split file_contexts for recovery am: b236eb6ca2 am: 5c38368896
am: b3bdba4d4a

Change-Id: I4d3a71a1ffd2004e3ac85d89686d24e00c112d6e
2017-06-13 18:08:26 +00:00
Jeff Vander Stoep
6d2b07cd14 Build split file_contexts for recovery am: b236eb6ca2 am: 77fe1de7d1
am: 78c58c7936

Change-Id: I93ab700661ddad141f2ff9973187bb5b72ffad78
2017-06-13 18:07:30 +00:00
Jeff Vander Stoep
b3bdba4d4a Build split file_contexts for recovery am: b236eb6ca2
am: 5c38368896

Change-Id: Iaf28a1b178427e5b2bd13f45485cc3504464f6fc
2017-06-13 18:03:45 +00:00
Jeff Vander Stoep
78c58c7936 Build split file_contexts for recovery am: b236eb6ca2
am: 77fe1de7d1

Change-Id: I71b4bca350a9a29dd45dfafe8c3d1938cb54a46f
2017-06-13 18:02:42 +00:00
Jeff Vander Stoep
5c38368896 Build split file_contexts for recovery
am: b236eb6ca2

Change-Id: I87eb8bad11fc9c011289b8d97219835a08d18cd1
2017-06-13 18:00:06 +00:00
Jeff Vander Stoep
77fe1de7d1 Build split file_contexts for recovery
am: b236eb6ca2

Change-Id: I60a92781a5b923889e627d73e8922aca2607b67b
2017-06-13 17:59:09 +00:00
Daniel Cashman
8d2b904ed9 Merge "Add mapping compatibility file for sepolicy api lvl 26.0" 2017-06-13 17:58:44 +00:00
Jeff Vander Stoep
b236eb6ca2 Build split file_contexts for recovery
[    7.674739] selinux: selinux_android_file_context: Error getting
file context handle (No such file or directory)

Bug: 62564629
Test: build and flash marlin. Successfully switch between regular
    and recovery modes

Change-Id: I0f871f8842d95322c844fb7b13ad1b4b42578e35
2017-06-13 15:38:55 +00:00
Dan Cashman
5e4e0d7fba Add mapping compatibility file for sepolicy api lvl 26.0
commit: 5c6a227ebb added the oc-dev
sepolicy prebuilts (api 26.0), but did not include the corresponding
base mapping file, which is to be maintained along with current
platform development in order to ensure backwards compatibility.

Bug: 37896931
Test: none, this just copies the old mapping file to prebuilts.
Change-Id: Ia5c36ddab036352845878178fa9c6a9d649d238f
2017-06-13 08:33:15 -07:00
Robert Benea
48bd2f4df3 Merge "sepolicy: fix support for lmkd" 2017-06-13 15:24:47 +00:00
Tim Murray
527f64e66a sepolicy: fix support for lmkd
Allow lmkd to access /dev/memcg once again.

Test: lmkd can access memcg
bug 36588803

Change-Id: Ia57dbbc3987d8858c932103c4e546cbb88893207
2017-06-12 18:30:38 -07:00
Jeff Vander Stoep
21988af13a Move non-treble devices to split file_contexts am: 7a68c5ae4c am: aee782caf7
am: ef0ab60389

Change-Id: I0c55b9a8301f6b0264ccf578258422995a0c8b84
2017-06-12 22:28:57 +00:00
Jeff Vander Stoep
754e4ddf71 Move non-treble devices to split file_contexts am: 7a68c5ae4c am: 8265811608
am: 508921c44e

Change-Id: I86ff1c1cd66a6d3e7955436923f25e47c1098a01
2017-06-12 22:24:26 +00:00
Jeff Vander Stoep
ef0ab60389 Move non-treble devices to split file_contexts am: 7a68c5ae4c
am: aee782caf7

Change-Id: I9210f221529abc0195dc39d198b042d02ca223ab
2017-06-12 22:20:49 +00:00
Jeff Vander Stoep
508921c44e Move non-treble devices to split file_contexts am: 7a68c5ae4c
am: 8265811608

Change-Id: I653ab6e4d8ff7a859ac489d4b05fdddb0668ae4e
2017-06-12 22:18:54 +00:00
Jeff Vander Stoep
aee782caf7 Move non-treble devices to split file_contexts
am: 7a68c5ae4c

Change-Id: Ic9f658984340b255114bb0f8d505fa6774f1cb04
2017-06-12 22:14:28 +00:00
Jeff Vander Stoep
8265811608 Move non-treble devices to split file_contexts
am: 7a68c5ae4c

Change-Id: Ide9c5ccdc2002972f311c9829c573b98f12fea44
2017-06-12 22:14:28 +00:00
Jeff Vander Stoep
4fe3b0b912 Move non-treble devices to split file_contexts am: f965a0a176
am: 2703f3eee8

Change-Id: I2130641f315522740c150f4a22f8a4fe20a9a085
2017-06-12 19:33:35 +00:00