Commit graph

1832 commits

Author SHA1 Message Date
Keun-young Park
9b4a443bd6 Merge "mInternalEmulated could be used after shutdown() called" 2017-08-17 22:10:24 +00:00
Pavel Grafov
fce5bc8f14 Zero memory used for encryuption keys.
am: e2e2d308df

Change-Id: I94d4cec05b76ade916cda42ae0b215f8272d7d51
2017-08-14 14:34:13 +00:00
Gao Xiang
d263da8807 mInternalEmulated could be used after shutdown() called
It fixes the findvolume() / reset() use-after-free issue after
shutdown called to avoid vold crash.

Fixes: a5bbb5e3c1 ("make shutdown safe for double calls.")
Change-Id: I50f216141b20da08549080291091dc5690c00ffe
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2017-08-14 14:26:56 +08:00
Pavel Grafov
e2e2d308df Zero memory used for encryuption keys.
std::vector with custom zeroing allocator is used instead of
std::string for data that can contain encryption keys.

Bug: 64201177
Test: manually created a managed profile, changed it's credentials
Test: manually upgraded a phone with profile from O to MR1.
Change-Id: Ic31877049f69eba9f8ea64fd99acaaca5a01d3dd
2017-08-10 17:31:03 +01:00
Ravisankar Reddy
7f361f97b5 Merge "Add noatime to vfat and exfat" into oc-mr1-dev
am: 53deec14b8

Change-Id: I72527d88639638f72aca10d59171a520adce0cdf
2017-08-04 04:31:19 +00:00
TreeHugger Robot
53deec14b8 Merge "Add noatime to vfat and exfat" into oc-mr1-dev 2017-08-04 04:24:57 +00:00
Keun-young Park
51001f99d1 do not sleep if it is shutting down am: 375ac25773
am: 4460d0e554

Change-Id: I017220c17760d4264359a91395ff834bd01e1394
2017-08-03 18:35:05 +00:00
Keun-young Park
9eee633412 do not sleep if it is shutting down am: 375ac25773
am: 612270b598

Change-Id: I3f88d8b0c5c4654ef57c3f9f0c8851a501945866
2017-08-03 18:29:04 +00:00
Keun-young Park
4460d0e554 do not sleep if it is shutting down
am: 375ac25773

Change-Id: Id0aa75c190b7012f4d329533fcd664341ae8c26b
2017-08-03 18:28:14 +00:00
Keun-young Park
612270b598 do not sleep if it is shutting down
am: 375ac25773

Change-Id: I576040b0068c27b9c7abd880e390841ce80f9906
2017-08-03 18:24:04 +00:00
Pavel Grafov
1565a1d365 Drop inode and page caches after evicting CE key.
am: b350ed02d5

Change-Id: I84b60141c240eb03162dacd9a563cbc8bc006cd7
2017-08-03 13:09:53 +00:00
Keun-young Park
375ac25773 do not sleep if it is shutting down
- Various sleep(5) for vold shutdown can increase shutdown time a lot.
- If it is shutting down, do not sleep at all. init will take care of
  active partitions if not unmounted.

bug: 64143519
Test: reboot and check logs from vold, check if "ShutdownThread: Shutdown wait timed out" happens.
Change-Id: I7cb91427ad2205fe23a054d255caf7ffdfd9f6c3
2017-08-02 17:45:48 -07:00
Elliott Hughes
60d64e1df3 Merge "Move off deprecated readdir_r." am: 1647759651 am: b60d874f24 am: 984b786b0e
am: f14b2fdca9

Change-Id: I931b7642976acdab7003acfd837982d613dd8110
2017-08-02 17:45:02 +00:00
Elliott Hughes
f14b2fdca9 Merge "Move off deprecated readdir_r." am: 1647759651 am: b60d874f24
am: 984b786b0e

Change-Id: Ida8d9a0830cf660155d50e5179d9199717ee1720
2017-08-02 17:27:29 +00:00
Elliott Hughes
984b786b0e Merge "Move off deprecated readdir_r." am: 1647759651
am: b60d874f24

Change-Id: Ic4370c02cf1d83281ffadedd9c2e1006d3748cf1
2017-08-02 17:22:55 +00:00
Elliott Hughes
b60d874f24 Merge "Move off deprecated readdir_r."
am: 1647759651

Change-Id: I4f5a6422eaef6be21d29f5ddc2b98ee53376e6a0
2017-08-02 17:19:01 +00:00
Elliott Hughes
1647759651 Merge "Move off deprecated readdir_r." 2017-08-02 17:12:21 +00:00
Elliott Hughes
4e3da6e96f Move off deprecated readdir_r.
Bug: http://b/32678321
Test: builds
Change-Id: I2d6e995d5eed3e72e12ce8b8f82a10143a256cd4
2017-08-01 17:39:44 -07:00
Ravisankar Reddy
4cc6baf616 Add noatime to vfat and exfat
testNoAtime is new cts testcase, which verifies all writable
block filesystems are mounted "noatime" toavoid unnecessary
flash churn. So add noatime for vfat.

Bug: 64137815
Test: run cts -m m CtsOsTestCases -t android.os.cts.EnvironmentTest#testNoAtime
Change-Id: I4f42b54ed0d66e09964351da26d0d3bf38d573d6
2017-07-31 18:12:30 +08:00
Pavel Grafov
b350ed02d5 Drop inode and page caches after evicting CE key.
Bug: 63257991
Test: Turning work profile off and attempting to read profile files.
Change-Id: I36f8ae9a8894f88950f50aed4a06645fab7e998b
2017-07-27 17:45:42 +01:00
Jeff Sharkey
95a92f9203 Only enable quotas when supported by device.
Otherwise we might end up creating ext4 partitions that the device
can't mount.

Bug: 63763609
Test: builds, boots
Exempt-From-Owner-Approval: Bug 63673347
Change-Id: I5f6cf73f23a55bc0dea9480523f19049313c3dd1
2017-07-17 13:58:45 -06:00
TreeHugger Robot
51f174f0c9 Merge "Check if sdcard daemon exited." 2017-07-13 21:05:07 +00:00
Junichi Uekawa
60fb60616c Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215 am: dfcc7dbad0 am: 602a2ce0e0
am: 189527f13f

Change-Id: Ie4cdfd04c1acf48c802b233eb34b2417c859ae04
2017-07-13 20:45:56 +00:00
Junichi Uekawa
189527f13f Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215 am: dfcc7dbad0
am: 602a2ce0e0

Change-Id: I4d4946552edb444f4a3a7ea333f272a7408ec260
2017-07-13 20:37:17 +00:00
Junichi Uekawa
602a2ce0e0 Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215
am: dfcc7dbad0

Change-Id: I742ebc5174d809fa6f70324659f6e03798710679
2017-07-13 20:34:46 +00:00
Junichi Uekawa
dfcc7dbad0 Merge "Try SO_RCVBUF before SO_RCVBUFFORCE."
am: 3f8fa0c215

Change-Id: I5df611cfaa1c4451f4d0cd576f3b82f2fefbea6b
2017-07-13 20:32:18 +00:00
Treehugger Robot
3f8fa0c215 Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." 2017-07-13 20:21:49 +00:00
Daniel Rosenberg
1d79d1014e Check if sdcard daemon exited.
If the system is using sdcardfs, the sdcard daemon exits after mounting.
If it's using FUSE, the sdcard daemon runs until we go to unmount.

Bug: 37638548
Test: Run "adb shell ps | grep -w Z" with sdcardfs enabled.
      The sdcard daemon should not be listed.
      Run again with sdcardfs disabled. The daemon should be
      running, and vold should not be stuck waiting on it.
Change-Id: I930d22b35194ec99e7a6a4a022a04d36f4f39a34
2017-07-11 18:09:15 -07:00
Junichi Uekawa
c865adaa3b Try SO_RCVBUF before SO_RCVBUFFORCE.
When running in a container, the process might be in a user/net
namespace, which would cause setting the SO_RCVBUFFORCE socket option to
fail with EPERM. But rmem_max is set to a high enough value which allows
SO_RCVBUF to succeed.

Bug: 62417946
Test: Run android in a new user and network namespace, vold does not
      abort here.

Change-Id: I2b678ddd886a406a3394d9fdd33f9c8800ef78a3
Signed-off-by: Junichi Uekawa <uekawa@google.com>
(cherry picked from commit b41155d4af0e00fc6f65d7d67b80e7b866f847d6)
2017-07-11 15:51:54 -07:00
Keun-young Park
5139cdf927 add vold to "shutdown critical" am: 85f412b4ee
am: 4f58be1b69

Change-Id: I05a8c1ddb479e4e7527ef5d593a75f6a5992a5ad
2017-07-06 17:24:53 +00:00
Keun-young Park
4f58be1b69 add vold to "shutdown critical"
am: 85f412b4ee

Change-Id: Ib346b39be455571656c4732d2ad63b3edbe1e0cd
2017-07-06 17:22:35 +00:00
Android Build Merger (Role)
6eae30144e Merge "Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp am: f39281b68c" 2017-07-06 01:40:02 +00:00
Android Build Merger (Role)
8433d23931 Merge "Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp am: f39281b68c" 2017-07-06 01:39:56 +00:00
Keun-young Park
788d330274 Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp
am: f39281b68c

Change-Id: I142be6c019cd9a3f8f212a2bbc97842cd04cf6eb
2017-07-06 01:39:32 +00:00
Keun-young Park
12be4f9936 Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp
am: f39281b68c

Change-Id: If9b0ee31633ae73ad9257ee6035bdb1bd3c3d861
2017-07-06 01:39:27 +00:00
Android Build Merger (Role)
9344a3426e Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928 am: 9045c86a32" 2017-07-06 01:38:55 +00:00
Keun-young Park
b69dd8bb98 Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928
am: 9045c86a32

Change-Id: I5440cec7c057e5bc5e40886fcedd1a4814fd063a
2017-07-06 01:38:24 +00:00
Keun-young Park
da3e0f6ec2 Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928
am: 9045c86a32

Change-Id: Ifa4795f87e6de808cbbf4e238d8a0a938ad1f8b9
2017-07-06 01:38:18 +00:00
Android Build Merger (Role)
f39281b68c Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp 2017-07-06 01:14:00 +00:00
Keun-young Park
681b90811c Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15
am: 733fe09928

Change-Id: I123056823f31b7e8d0ad3a6ae7775867d3dd0edb
2017-07-06 01:13:30 +00:00
Keun-young Park
9045c86a32 Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15
am: 733fe09928

Change-Id: I760a1278d3138ca7a24ab69613466c83615f067d
2017-07-06 01:13:21 +00:00
Keun-young Park
733fe09928 Merge "add vold to "shutdown critical"" am: da85cb71b3
am: 228b95fa15

Change-Id: I0de967657d969f54dedddbb2b72ab07ed650e2e3
2017-07-06 00:56:21 +00:00
Keun-young Park
85f412b4ee add vold to "shutdown critical"
bug: 37626581
Test: reboot and check last kmsg

(cherry picked from commit 41156c5035)

Change-Id: I363dbbe58d2cb46b521ebdcea85c507679f27206
2017-07-06 00:53:42 +00:00
Keun-young Park
228b95fa15 Merge "add vold to "shutdown critical""
am: da85cb71b3

Change-Id: Ib0e4977590a94d7934001c223677cff45e59cd0a
2017-07-06 00:46:34 +00:00
Treehugger Robot
da85cb71b3 Merge "add vold to "shutdown critical"" 2017-07-06 00:40:55 +00:00
Keun-young Park
41156c5035 add vold to "shutdown critical"
bug: 37626581
Test: reboot and check last kmsg
Change-Id: I2c186c20a4afc342eaae420175013c80219a5ee5
2017-07-05 13:58:35 -07:00
Paul Crowley
73a5b06578 resolve merge conflicts of 8e6f6a5 to oc-dr1-dev-plus-aosp
am: 071120776a

Change-Id: Ifaa55b09cf0251cf994b8870169cf69e430b91ba
2017-06-29 01:20:07 +00:00
Paul Crowley
071120776a resolve merge conflicts of 8e6f6a5 to oc-dr1-dev-plus-aosp
Test: None
Change-Id: Icf7654b3200a4afd104f31aff8ce5b09867b7182
2017-06-28 16:09:00 -07:00
Paul Crowley
8e6f6a5ceb resolve merge conflicts of 4ad7784 to stage-aosp-master
am: ddb542f574

Change-Id: Iedef223a14b8a0c8dc558440b429a33d6b23f948
2017-06-28 22:45:50 +00:00
Paul Crowley
ddb542f574 resolve merge conflicts of 4ad7784 to stage-aosp-master
Test: Build seems to be unrelatedly broken
Change-Id: I2df307aa1c7134f217c558495e1438412480f324
Merged-In: I6ccfe0894551ba068de9bf5e23fe4fd1e10e36b1
2017-06-28 21:52:46 +00:00