Nick Kralevich
9bda3fe810
Merge "vold: cleanups for O_CLOEXEC tidy checks." am: a59868d6de
am: 5af0c75525
...
am: 4197c098df
Change-Id: Ibe3636abcfafab7854c7b0434095b6e91fadcacf
2019-03-29 18:46:07 -07:00
Nick Kralevich
4197c098df
Merge "vold: cleanups for O_CLOEXEC tidy checks." am: a59868d6de
...
am: 5af0c75525
Change-Id: I19cae40b342d339bf5752dfba304c37a0abecea8
2019-03-29 18:42:05 -07:00
Nick Kralevich
5af0c75525
Merge "vold: cleanups for O_CLOEXEC tidy checks."
...
am: a59868d6de
Change-Id: Ice4a6009beb2d41d381e461b00be93471b100778
2019-03-29 18:38:04 -07:00
Nick Kralevich
a59868d6de
Merge "vold: cleanups for O_CLOEXEC tidy checks."
2019-03-30 01:27:38 +00:00
Paul Lawrence
25fe272764
Merge "Fix checkpoint on Taimen" am: 3889f17ad1
am: e2d9258979
...
am: 471325ad5a
Change-Id: I96523c193353d8d0f3cf775447b07c018ff810a8
2019-03-29 17:58:01 -07:00
Paul Lawrence
471325ad5a
Merge "Fix checkpoint on Taimen" am: 3889f17ad1
...
am: e2d9258979
Change-Id: Id0768b2cb6aa645d528d21738456a72308936ace
2019-03-29 17:38:20 -07:00
Paul Lawrence
e2d9258979
Merge "Fix checkpoint on Taimen"
...
am: 3889f17ad1
Change-Id: I06af82f6534b26e595be3aa1d39588175920d0db
2019-03-29 17:16:19 -07:00
Treehugger Robot
3889f17ad1
Merge "Fix checkpoint on Taimen"
2019-03-29 23:09:52 +00:00
Nick Kralevich
e7e89acbc8
vold: cleanups for O_CLOEXEC tidy checks.
...
Bug: 129350825
Test: compiles and boots
Change-Id: I83a484ca15df1b757b670008f15af5504bc94df1
2019-03-29 16:04:47 -07:00
Paul Lawrence
e81f4c1945
Fix checkpoint on Taimen
...
Bug: 129494872
Test: VtsKernelCheckpointTest runs and passes
Change-Id: Ib2de866db7c847d569789d1aa6cdbad7c3ee7ff4
2019-03-29 13:22:19 -07:00
Bernie Innocenti
a83d0fe1b6
Merge "Fix bogus error checking on unique_fd" am: 95587b085e
am: 3e9b69bf77
...
am: eb2be538c0
Change-Id: I7bf25301ca157fc7d508e03d32d037987a29ecf3
2019-03-28 21:32:18 -07:00
Bernie Innocenti
eb2be538c0
Merge "Fix bogus error checking on unique_fd" am: 95587b085e
...
am: 3e9b69bf77
Change-Id: Id54116718b97057f978e1410a96bfb449999f832
2019-03-28 21:15:34 -07:00
Bernie Innocenti
3e9b69bf77
Merge "Fix bogus error checking on unique_fd"
...
am: 95587b085e
Change-Id: Ic11222fdc81a9a2e15546378f1bc5012107c50af
2019-03-28 21:09:18 -07:00
Treehugger Robot
95587b085e
Merge "Fix bogus error checking on unique_fd"
2019-03-29 03:52:46 +00:00
TreeHugger Robot
9cfc0b4b17
Merge "vold: fsync both file and directory after write keys"
2019-03-28 08:44:30 +00:00
TreeHugger Robot
32212df196
Merge "vold: Introduce android::vold::writeStringToFile"
2019-03-28 08:44:12 +00:00
Tommy Chiu
a98464f688
vold: fsync both file and directory after write keys
...
Use vold version of writeStringToFile which fsync files, and
manually fsync directories after initialize global DE
Bug: 71810347
Test: Build pass and reboot stress test.
Original boot failure symptom is NOT reproducible.
Change-Id: I1ca8f8cf0ccfd01075a9c33f79042e58d99aea26
2019-03-28 08:43:24 +00:00
Bernie Innocenti
ebe293ab54
Fix bogus error checking on unique_fd
...
The expression "!fd" calls the implicit conversion to int, but comparing
the raw fd against 0 does not work, since open() and other POSIX calls
returning a file descriptor use -1 to signal an error.
Test: m vold
Change-Id: I0847c276f39cb9dd09c7ffb96951276113418fc8
2019-03-28 15:54:52 +09:00
Daniel Rosenberg
0873a1c71c
Merge "Switch Checkpoint health sleep time to ms." am: 32a8a47b07
am: e6db7e0a23
...
am: 2cc8752935
Change-Id: I125122b44009e2cb11e7cf6c147c9a808a87b8a2
2019-03-26 19:53:51 -07:00
Daniel Rosenberg
2cc8752935
Merge "Switch Checkpoint health sleep time to ms." am: 32a8a47b07
...
am: e6db7e0a23
Change-Id: If71daebf5bd2d91f5dfbadee4c7707c10b667648
2019-03-26 19:49:51 -07:00
Daniel Rosenberg
e6db7e0a23
Merge "Switch Checkpoint health sleep time to ms."
...
am: 32a8a47b07
Change-Id: If927a879f06faac4fde97dde41f2017010f7001c
2019-03-26 19:45:51 -07:00
Daniel Rosenberg
32a8a47b07
Merge "Switch Checkpoint health sleep time to ms."
2019-03-27 02:34:24 +00:00
Daniel Rosenberg
38f7671916
Merge "Fixed min_free_bytes prop name and usleep time default" am: 7522da3036
am: 23e15b78ad
...
am: 511073b610
Change-Id: Ic796c1d7f636bb5718eee599e25aed83784bd246
2019-03-26 19:26:30 -07:00
Daniel Rosenberg
511073b610
Merge "Fixed min_free_bytes prop name and usleep time default" am: 7522da3036
...
am: 23e15b78ad
Change-Id: I33e4655486ec05fbd9ea66e467aaa1dce440edf9
2019-03-26 19:22:27 -07:00
Daniel Rosenberg
23e15b78ad
Merge "Fixed min_free_bytes prop name and usleep time default"
...
am: 7522da3036
Change-Id: I242863be8d2b0b9ff780670b340f8acbfdaad52e
2019-03-26 19:18:18 -07:00
Suren Baghdasaryan
11a6b56ac8
Merge "Convert ifstream usage into fopen() to prevent fd leaks into child processes" am: 93fb6083d4
am: f1dec58b61
...
am: 1efcfc30b1
Change-Id: Iacc7caa16478c167462ca5645f5eabfa34381896
2019-03-26 19:07:20 -07:00
Daniel Rosenberg
7522da3036
Merge "Fixed min_free_bytes prop name and usleep time default"
2019-03-27 02:01:48 +00:00
Suren Baghdasaryan
1efcfc30b1
Merge "Convert ifstream usage into fopen() to prevent fd leaks into child processes" am: 93fb6083d4
...
am: f1dec58b61
Change-Id: Id7e8626129dbda0fdafcc86b087b67f71b5d3f8a
2019-03-26 18:57:14 -07:00
Suren Baghdasaryan
f1dec58b61
Merge "Convert ifstream usage into fopen() to prevent fd leaks into child processes"
...
am: 93fb6083d4
Change-Id: I28dc4717f22207e310c5701a78c04214ffa4d52a
2019-03-26 18:48:13 -07:00
Suren Baghdasaryan
93fb6083d4
Merge "Convert ifstream usage into fopen() to prevent fd leaks into child processes"
2019-03-27 01:31:15 +00:00
Daniel Rosenberg
b7dddd0a7e
Switch Checkpoint health sleep time to ms.
...
This changes the property from microsecond to milliseconds, as we don't
need that sort of precision here. Also switches from using ulseep, which
has been removed from POSIX, to nanosleep.
Test: Builds, Boots, Times
Change-Id: Iefbaf8489ba05d8d688542fd7d4305efb980e701
2019-03-27 00:22:34 +00:00
Satoshi Futenma
18d10d4c15
Fixed min_free_bytes prop name and usleep time default
...
Test: check build
Bug: 129299864
Change-Id: Iab6a01d15185dd19604cd8d3d7ea4efc2b020e34
2019-03-27 00:12:39 +00:00
Suren Baghdasaryan
28af26ac47
Convert ifstream usage into fopen() to prevent fd leaks into child processes
...
std::ifstream does not use O_CLOEXEC flag when opening files. This leads
to file descriptors being inherited by child processes. In the case of vold
this results in leaking FDs to less privileged children with no permission
for these files which occasionally leads to SELinux denials.
Bug: 129298168
Change-Id: Id2731782a25d65c9a7cbf25dc441f3e7a17609c1
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-03-26 20:10:24 +00:00
Tommy Chiu
0bd2d11692
vold: Introduce android::vold::writeStringToFile
...
Remove static definition of writeStringToFile, and
move it from KeyStorage to Utils
Bug: 71810347
Change-Id: I38bfd27370ac2372e446dc699f518122e73c6877
2019-03-26 17:38:13 +08:00
Rubin Xu
5b4f31125e
Merge "Remove excess logging in secdiscard" am: b640f4e337
am: 2c1e98d69f
...
am: b970f62913
Change-Id: Icce53ecc1e43945cd1298edbf3e70005340432d9
2019-03-22 06:27:47 -07:00
Rubin Xu
b970f62913
Merge "Remove excess logging in secdiscard" am: b640f4e337
...
am: 2c1e98d69f
Change-Id: I767847aa355adf893189e329b67c78a5145245e3
2019-03-22 06:23:33 -07:00
Rubin Xu
2c1e98d69f
Merge "Remove excess logging in secdiscard"
...
am: b640f4e337
Change-Id: Ic4509611efc55b0953ccca02fd7730740982728a
2019-03-22 06:17:06 -07:00
Treehugger Robot
b640f4e337
Merge "Remove excess logging in secdiscard"
2019-03-22 13:05:35 +00:00
Daniel Rosenberg
149ed5fb3c
Merge changes I977cc03b,I7b621476,Ib57f4461 am: 58551c0568
am: 5da6d2a0f9
...
am: 6647c75d3c
Change-Id: Iecf990d139b98ba2788cb6ba82e6673c28bb08c2
2019-03-21 14:28:39 -07:00
Daniel Rosenberg
6647c75d3c
Merge changes I977cc03b,I7b621476,Ib57f4461 am: 58551c0568
...
am: 5da6d2a0f9
Change-Id: I98125f4b3277601bf2795e76cb8b8b889e1725e4
2019-03-21 14:23:22 -07:00
Daniel Rosenberg
5da6d2a0f9
Merge changes I977cc03b,I7b621476,Ib57f4461
...
am: 58551c0568
Change-Id: I0ecec87455c3c8daa53b00be941539998eea1cd2
2019-03-21 14:19:27 -07:00
Daniel Rosenberg
58551c0568
Merge changes I977cc03b,I7b621476,Ib57f4461
...
* changes:
Add health check to checkpointing
Change abortChanges to take a message and bool
Make needsCheckpoint cover whole session
2019-03-21 21:01:08 +00:00
Daniel Rosenberg
8daeec05e8
Add health check to checkpointing
...
Take action if we are running out of checkpoint space.
Configurable via ro.sys properties.
ro.sys.cp_usleeptime = Time to sleep between checks
ro.sys.cp_min_free_bytes = Min free space to act on
ro.sys.cp_commit_on_full = action to take. Either commits or reboots to
continue attempt without checkpoint, or retry
and eventually abort OTA
Test: Trigger a checkpoint and fill the disk.
Bug: 119769392
Change-Id: I977cc03b7aef9320d661c8a0d716f8a1ef0be347
2019-03-21 13:33:49 -07:00
Daniel Rosenberg
a59e4396a4
Change abortChanges to take a message and bool
...
abortChanges will attempt to pass a reboot message, and will only reboot
if the device is currently checkpointing. Additionally, it can opt to
attempt to prevent future attempts. This only works for non-bootloader
controlled updates. Failures are ignored, as it will always reboot the
device. In the unlikely event of such a failure, the device will
continue to retry as though you did not ask to prevent future attempts.
Test: vdc checkpoint abortChanges abort_retry_test 1
vdc checkpoint abortChanges abort_noretry_test 0
Change-Id: I7b6214765a1faaf4fd193c73331696b53ae572d2
2019-03-21 13:33:49 -07:00
Daniel Rosenberg
84203c1e24
Make needsCheckpoint cover whole session
...
This makes needCheckpoint return true when the device will or is using
checkpointing.
Test: vdc checkpoint startCheckpoint 1
reboot
vdc checkpoint needsCheckpoint
should return 1 before and after data mounts, and 0 once the
checkpoint has been committed
Change-Id: Ib57f4461d837f41a8110ed318168165a684d913a
2019-03-21 13:33:49 -07:00
Rubin Xu
f2e846f153
Remove excess logging in secdiscard
...
Remove all debug logs to reduce logspam a bit.
Bug: 64349233
Test: manual
Change-Id: I234fae7b9fb719b09af27985736f43f085dad301
2019-03-21 19:13:51 +00:00
Paul Crowley
178ee0ded1
Merge "Shell no longer globs, so glob in pushBackContents" am: a41b7849d0
am: 04017039b7
...
am: 612065e22b
Change-Id: I296bf6ce7d616e3615e2a39293b2b60c2ce85c4d
2019-03-19 12:39:54 -07:00
Paul Crowley
612065e22b
Merge "Shell no longer globs, so glob in pushBackContents" am: a41b7849d0
...
am: 04017039b7
Change-Id: Ifc9ef0e513dd3d7ed6d0b67ddbec236145196b18
2019-03-19 12:35:48 -07:00
Paul Crowley
04017039b7
Merge "Shell no longer globs, so glob in pushBackContents"
...
am: a41b7849d0
Change-Id: Iedd9a6d6834adc844e13e9ec596062032588fd53
2019-03-19 12:31:37 -07:00
Paul Crowley
a41b7849d0
Merge "Shell no longer globs, so glob in pushBackContents"
2019-03-19 19:13:56 +00:00