Commit graph

913 commits

Author SHA1 Message Date
Paul Lawrence
2ed2e30120 am e8308f85: am 81046166: Merge "Revert "Change init sequence to support file level encryption"" into mnc-dev
* commit 'e8308f852c867bc676e71875ea57de022464ea09':
  Revert "Change init sequence to support file level encryption"
2015-07-07 20:36:19 +00:00
Paul Lawrence
e8308f852c am 81046166: Merge "Revert "Change init sequence to support file level encryption"" into mnc-dev
* commit '8104616696ac5e806b16a393ea02c4f5d8efc328':
  Revert "Change init sequence to support file level encryption"
2015-07-07 18:20:27 +00:00
Paul Lawrence
8104616696 Merge "Revert "Change init sequence to support file level encryption"" into mnc-dev 2015-07-07 17:29:00 +00:00
Paul Lawrence
437bc5dcec Revert "Change init sequence to support file level encryption"
This reverts commit d815178b75.

Change-Id: I7e3f55d3092fcd04ea9f62f1971c9d42570f096c
2015-07-07 17:05:58 +00:00
Andres Morales
d80e243411 am 722d4a54: am 833f142d: Merge "[init] start gatekeeperd after device decryption" into mnc-dev
* commit '722d4a54d9fa49581931e7c88fee5aa0c1f3c5f8':
  [init] start gatekeeperd after device decryption
2015-07-07 01:09:04 +00:00
Paul Lawrence
1c875cc40f am 22d0ee6a: am a65e402b: Merge "Change init sequence to support file level encryption" into mnc-dev
* commit '22d0ee6a25b3bedd6c3cd52473df1404fce8615f':
  Change init sequence to support file level encryption
2015-07-07 00:32:17 +00:00
Andres Morales
722d4a54d9 am 833f142d: Merge "[init] start gatekeeperd after device decryption" into mnc-dev
* commit '833f142d201a4b682885ff9d95c6b3ab32fd0618':
  [init] start gatekeeperd after device decryption
2015-07-06 23:57:49 +00:00
Andres Morales
833f142d20 Merge "[init] start gatekeeperd after device decryption" into mnc-dev 2015-07-06 23:00:09 +00:00
Paul Lawrence
22d0ee6a25 am a65e402b: Merge "Change init sequence to support file level encryption" into mnc-dev
* commit 'a65e402b613e927697d35e7936c6d80908d77e88':
  Change init sequence to support file level encryption
2015-07-06 20:34:05 +00:00
Andres Morales
4dd2982dd3 [init] start gatekeeperd after device decryption
gatekeeperd depends on having /data to determine whether
to call setup routines for qcom HALs.

Bug: 22298552
Change-Id: I6c552016dc863bbb04bd5a949a2317a720c8263f
2015-07-06 12:00:22 -07:00
Paul Lawrence
d815178b75 Change init sequence to support file level encryption
File level encryption must get the key between mounting userdata and
calling post_fs_data when the directories are created. This requires
access to keymaster, which in turn is found from a system property.

Split property loaded into system and data, and load in right order.

Bug: 22233063
Change-Id: I8a6c40d44e17de386417a443c9dfc3b4e7fe59a5
2015-07-06 07:52:06 -07:00
Jeff Sharkey
35e0cc552c am 96835733: am f38f29c8: Let\'s reinvent storage, yet again!
* commit '96835733b397da908c86e2a1190b8c8baf06a441':
  Let's reinvent storage, yet again!
2015-06-26 16:18:13 +00:00
Jeff Sharkey
96835733b3 am f38f29c8: Let\'s reinvent storage, yet again!
* commit 'f38f29c87d97cea45d04b783bddbd969234b1030':
  Let's reinvent storage, yet again!
2015-06-26 16:05:20 +00:00
Jeff Sharkey
f38f29c87d Let's reinvent storage, yet again!
Now that we're treating storage as a runtime permission, we need to
grant read/write access without killing the app.  This is really
tricky, since we had been using GIDs for access control, and they're
set in stone once Zygote drops privileges.

The only thing left that can change dynamically is the filesystem
itself, so let's do that.  This means changing the FUSE daemon to
present itself as three different views:

/mnt/runtime_default/foo - view for apps with no access
/mnt/runtime_read/foo - view for apps with read access
/mnt/runtime_write/foo - view for apps with write access

There is still a single location for all the backing files, and
filesystem permissions are derived the same way for each view, but
the file modes are masked off differently for each mountpoint.

During Zygote fork, it wires up the appropriate storage access into
an isolated mount namespace based on the current app permissions.  When
the app is granted permissions dynamically at runtime, the system
asks vold to jump into the existing mount namespace and bind mount
the newly granted access model into place.

Bug: 21858077
Change-Id: I5a016f0958a92fd390c02b5ae159f8008bd4f4b7
2015-06-25 22:27:04 -07:00
Evgenii Stepanov
c25f0dc38b am c7b86c16: am eaa97876: am 2e8d31f6: Merge "SANITIZE_TARGET: set global ASAN_OPTIONS"
* commit 'c7b86c1661c7d178784dc2b9f09e478569a2886c':
  SANITIZE_TARGET: set global ASAN_OPTIONS
2015-06-24 18:30:03 +00:00
Evgenii Stepanov
c7b86c1661 am eaa97876: am 2e8d31f6: Merge "SANITIZE_TARGET: set global ASAN_OPTIONS"
* commit 'eaa978768beef315c5dca9db964d4e80c462cf74':
  SANITIZE_TARGET: set global ASAN_OPTIONS
2015-06-24 18:12:24 +00:00
Pavlin Radoslavov
a88a084e94 am 233286f4: am 4caa9f39: Merge "Fix the file permissions of /data/misc/bluedroid/bt_config.conf" into mnc-dev
* commit '233286f40bdd84ad26b5ebf615d9f62fc30e19bf':
  Fix the file permissions of /data/misc/bluedroid/bt_config.conf
2015-06-23 01:39:01 +00:00
Pavlin Radoslavov
233286f40b am 4caa9f39: Merge "Fix the file permissions of /data/misc/bluedroid/bt_config.conf" into mnc-dev
* commit '4caa9f39bb3415358dcb737d0eb9058c34192806':
  Fix the file permissions of /data/misc/bluedroid/bt_config.conf
2015-06-23 01:31:49 +00:00
Pavlin Radoslavov
8175bb2352 Fix the file permissions of /data/misc/bluedroid/bt_config.conf
Fix the file access permissions and group ownership of
"/data/misc/bluedroid/bt_config.conf" so the file can be reused when
switching users on the device.
For that purpose, we need to do the following:

1. Set the set-group-ID (bit 02000) flag for directory "/data/misc/bluedroid"
   so the files created in that directory will have group-id of
   "net_bt_stack" .

2. Change the file's permissions of file "/data/misc/bluedroid/bt_config.conf"
   to Read/Write by User and Group.

Bug: 21493919
Change-Id: Ie00ab4695198ef2aa299b484ef9d4f17bd41b98a
2015-06-22 10:19:30 -07:00
Evgenii Stepanov
1cbe3d944a SANITIZE_TARGET: set global ASAN_OPTIONS
allow_user_segv_handler=1 is required to run ART under ASan
detect_odr_violation=0 and alloc_dealloc_mismatch=0 suppress some of
the existing bug reports during boot.

Bug: 21951850, 21785137
Change-Id: I4d36967c6d8d936dacbfdf1b94b87fa94766bd3e
2015-06-19 11:15:51 -07:00
Tim Kilbourn
c15560d496 Merge "Don't restart zygote when inputflinger dies." 2015-06-12 21:33:32 +00:00
Tim Kilbourn
766ca5cd6c Merge "Revert "Track removal of the inputflinger binary."" 2015-06-12 21:33:01 +00:00
Tim Murray
83da7c6a54 am 63e38313: am e5b0c837: Merge "add cpuset support to libcutils" into mnc-dev
* commit '63e383136b8a76fdf619aa878b58b815a094e6ee':
  add cpuset support to libcutils
2015-06-12 19:15:46 +00:00
Tim Murray
63e383136b am e5b0c837: Merge "add cpuset support to libcutils" into mnc-dev
* commit 'e5b0c837856007812ace8ec5849f6852015d5d2b':
  add cpuset support to libcutils
2015-06-12 19:03:30 +00:00
Tim Murray
b769c8d24f add cpuset support to libcutils
bug 21782794

Change-Id: I249531754fb29442dc3c7434d77dbb103f4220a7
2015-06-11 18:35:46 -07:00
Tim Kilbourn
7c6020ba53 Don't restart zygote when inputflinger dies.
During development it is useful to be able to kill inputflinger and have
init restart it without bringing down the entire system server.

Change-Id: I8b13b94331c5045086db2f5c73a8f49efc5992cb
2015-06-10 23:42:15 +00:00
Tim Kilbourn
f8fcd6a616 Revert "Track removal of the inputflinger binary."
This reverts commit 2422c17c5e.

Change-Id: I11d1624947dcc3cdcd0d648de6cc25901c91dac6
2015-06-10 13:22:05 -07:00
Tao Bao
04b10b9aa3 Change pre-recovery into two services
/system/bin/uncrypt needs to be triggered to prepare the OTA package
before rebooting into the recovery. Separate pre-recovery (uncrypt)
into two services: uncrypt that does the uncryption work and
pre-recovery that actually reboots the device into recovery.

Also create /cache/recovery on post-fs in case it doesn't exist.

Bug: 20012567
Bug: 20949086
(cherry picked from commit e48aed0f0a)
Change-Id: I9877cd6ac9412ea6a566bb1ec0807940c7a38ce5
2015-06-09 14:52:43 -07:00
Paul Lawrence
b183361199 am a7dcec1d: am 3678a5fb: Merge "Move crypt commands to a different listener in vold" into mnc-dev
* commit 'a7dcec1da38c15d5e5ede7bfdec7ffd880cb6b82':
  Move crypt commands to a different listener in vold
2015-06-05 00:47:36 +00:00
Paul Lawrence
a7dcec1da3 am 3678a5fb: Merge "Move crypt commands to a different listener in vold" into mnc-dev
* commit '3678a5fb8d1094c4796c1316f3b571cb63cf7246':
  Move crypt commands to a different listener in vold
2015-06-04 23:07:32 +00:00
Paul Lawrence
3678a5fb8d Merge "Move crypt commands to a different listener in vold" into mnc-dev 2015-06-04 21:32:44 +00:00
Nick Kralevich
7dbe806939 am e2722e9b: am a20d6f4e: am 2ec88501: Merge "tzdatacheck: don\'t hard code SELinux domain name"
* commit 'e2722e9bfbeb2f2f349493fbe9b464c24e416ee0':
  tzdatacheck: don't hard code SELinux domain name
2015-06-03 22:25:14 +00:00
Paul Lawrence
37fcc5d73e Move crypt commands to a different listener in vold
In order to prevent this bug from happening, we must allow vold cryptfs
commands to complete while a long running mount is underway.

While waiting for vold to be changed to a binder interface, we will simply
create two listeners, one for cryptfs and one for everything else.

Bug: 19197175
Change-Id: Ie3d9567819ced7757b0a8f391547f27db944153c
2015-06-03 14:19:29 -07:00
Nick Kralevich
e2722e9bfb am a20d6f4e: am 2ec88501: Merge "tzdatacheck: don\'t hard code SELinux domain name"
* commit 'a20d6f4e154939722263207ddf5954b3f58f666d':
  tzdatacheck: don't hard code SELinux domain name
2015-06-03 20:53:31 +00:00
Nick Kralevich
32512e7167 tzdatacheck: don't hard code SELinux domain name
An automatic domain transition is already defined by SELinux
policy. Avoid having redundant information on the exec line.

This commit depends on commit 17fff893c0
which made the SELinux process label optional.

(cherrypicked from commit 221fca7ddd)

Change-Id: I89464f2bd218c7d6e8db08aa6bed2b62ec6dad2a
2015-06-03 13:36:24 -07:00
Nick Kralevich
221fca7ddd tzdatacheck: don't hard code SELinux domain name
An automatic domain transition is already defined by SELinux
policy. Avoid having redundant information on the exec line.

This commit depends on commit 17fff893c0
which made the SELinux process label optional.

Change-Id: I89464f2bd218c7d6e8db08aa6bed2b62ec6dad2a
2015-06-03 13:08:49 -07:00
Paul Crowley
b94032b79c Set up user directory crypto in init.
Bug: 19704432
Change-Id: Ife4928ffbee39c8ae69e6ba66d9ce5ef5a0beb76
2015-06-03 13:45:15 +01:00
Paul Crowley
f8a6fa503f Restore creation of /data/misc/vold erroneously rolled back
Rollback commit: 9f403450bc

Bug: 19704432
Change-Id: I1a73a2e1d3f4d5441df4d686d420d3a79b3e95bc
2015-06-03 13:43:25 +01:00
Mark Salyzyn
d8a99287a4 am 56051554: am e0e56563: am 0bda352f: Merge changes from topic \'logcatd\'
* commit '560515540d3ef4da9dc58e3b7fcfeb6c067bb677':
  init.rc: logd: Add logpersistd (nee logcatd)
  init: change exec parsing to make SECLABEL optional
  logcat: -f run in background
  logcat: -f flag to continue
2015-06-02 22:52:31 +00:00
Mark Salyzyn
560515540d am e0e56563: am 0bda352f: Merge changes from topic \'logcatd\'
* commit 'e0e565635a7c6c36a05282622c01203afbec5ca5':
  init.rc: logd: Add logpersistd (nee logcatd)
  init: change exec parsing to make SECLABEL optional
  logcat: -f run in background
  logcat: -f flag to continue
2015-06-02 22:41:29 +00:00
Mark Salyzyn
49ed105fd9 init.rc: logd: Add logpersistd (nee logcatd)
(cherry pick from commit 100658c303)

- logpersistd is defined as a thread or process in the context of the
  logd domain. Here we define logpersistd as logcat -f in logd domain
  and call it logcatd to represent its service mechanics.
- Use logcatd to manage content in /data/misc/logd/ directory.
- Only turn on for persist.logd.logpersistd = logcatd.
- Add logpersist.start, logpersist.stop and logpersist.cat debug
  class executables, thus only in the eng and userdebug builds.

ToDo: Wish to add Developer Options menu to turn this feature on or
off, complicated by the fact that user builds have no tools with
access rights to /data/misc/logd.

Bug: 19608716
Change-Id: I57ad757f121c473d04f9fabe9d4820a0eca06f31
2015-06-02 15:28:36 -07:00
Mark Salyzyn
100658c303 init.rc: logd: Add logpersistd (nee logcatd)
- logpersistd is defined as a thread or process in the context of the
  logd domain. Here we define logpersistd as logcat -f in logd domain
  and call it logcatd to represent its service mechanics.
- Use logcatd to manage content in /data/misc/logd/ directory.
- Only turn on for persist.logd.logpersistd = logcatd.
- Add logpersist.start, logpersist.stop and logpersist.cat debug
  class executables, thus only in the eng and userdebug builds.

ToDo: Wish to add Developer Options menu to turn this feature on or
off, complicated by the fact that user builds have no tools with
access rights to /data/misc/logd.

Bug: 19608716
Change-Id: I57ad757f121c473d04f9fabe9d4820a0eca06f31
2015-06-02 15:17:59 -07:00
Mark Salyzyn
473a50f168 rootdir: init.trace.rc too early
(cherry pick from commit 89357d23a1)

debugfs is mounted on boot

Bug: 21566233
Change-Id: I2ba106fbb1e8164ff3d8b2d5b16a16d7926c2732
2015-06-02 14:40:10 -07:00
Mark Salyzyn
e8f74ae706 am c79daf52: am 1300b16e: am 66e39275: Merge "rootdir: init.trace.rc too early"
* commit 'c79daf522566655c5e18a62c54ae484d14de5373':
  rootdir: init.trace.rc too early
2015-06-02 21:33:25 +00:00
Mark Salyzyn
c79daf5225 am 1300b16e: am 66e39275: Merge "rootdir: init.trace.rc too early"
* commit '1300b16e51045b0d1235cfaaa031228ded60924b':
  rootdir: init.trace.rc too early
2015-06-02 21:22:37 +00:00
Mark Salyzyn
89357d23a1 rootdir: init.trace.rc too early
debugfs is mounted on boot

Bug: 21566233
Change-Id: I2ba106fbb1e8164ff3d8b2d5b16a16d7926c2732
2015-06-02 12:51:42 -07:00
Paul Lawrence
0a423d994a DO NOT MERGE Securely encrypt the master key
(chery-picked from commit 806d10be23)

Move all key management into vold
Reuse vold's existing key management through the crypto footer
to manage the device wide keys.

Use ro.crypto.type flag to determine crypto type, which prevents
any issues when running in block encrypted mode, as well as speeding
up boot in block or no encryption.

This is one of four changes to enable this functionality:
  https://android-review.googlesource.com/#/c/148586/
  https://android-review.googlesource.com/#/c/148604/
  https://android-review.googlesource.com/#/c/148606/
  https://android-review.googlesource.com/#/c/148607/

Bug: 18151196

Change-Id: I6a8a18f43ae837e330e2785bd26c2c306ae1816b
2015-05-29 17:39:16 +00:00
Tao Bao
7cc023a7d5 am 6b0938f7: am 6484f3d1: Merge "Change pre-recovery into two services" into mnc-dev
* commit '6b0938f7fb39ad4ad071c2b493545409a3d69f41':
  Change pre-recovery into two services
2015-05-28 23:06:26 +00:00
Tao Bao
6b0938f7fb am 6484f3d1: Merge "Change pre-recovery into two services" into mnc-dev
* commit '6484f3d1cb4078c7525e23d16c7e7bcd90afa653':
  Change pre-recovery into two services
2015-05-28 22:51:29 +00:00
Tao Bao
6484f3d1cb Merge "Change pre-recovery into two services" into mnc-dev 2015-05-28 21:48:16 +00:00