Commit graph

1832 commits

Author SHA1 Message Date
Treehugger Robot
4a634e3d8c Merge "Exclude /mnt/vendor from vold's ownership." 2018-06-29 16:47:11 +00:00
Tri Vo
e98adee732 Exclude /mnt/vendor from vold's ownership.
Addresses this selinux denial:
avc: denied { search } for name="vendor" dev="tmpfs" ino=11069
scontext=u:r:vold:s0 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir
permissive=0

Bug: 64905218
Test: fixes above denial.
Change-Id: I670b2148e65c7e0fcabd1e11f5bace0c4f4e18bd
Merged-In: I670b2148e65c7e0fcabd1e11f5bace0c4f4e18bd
(cherry picked from commit bca5cd78fe)
2018-06-29 12:22:01 +08:00
Logan Chien
17a93d5001 Merge changes I1f9b7b13,I36bc4a44
* changes:
  Deprecate <cutils/log.h> and <utils/Log.h>
  Replace SLOG() with LOG(ERROR)
2018-06-26 02:04:17 +00:00
Logan Chien
7e0af8e480 Deprecate <cutils/log.h> and <utils/Log.h>
This commit replaces <cutils/log.h> and <utils/Log.h> with <log/log.h>.

Background:
<cutils/log.h> has been moved to <log/log.h> for a while.  Both
<cutils/log.h> and <utils/Log.h> simply includes <log/log.h> for
backward compatibility.  This commit is a part of the effort to remove
<cutils/log.h> and <utils/Log.h> from the source tree eventually.

Bug: 78370064
Test: lunch aosp_walleye-userdebug && cd system/vold && mma
Change-Id: I1f9b7b132f9c35469e97556a30b521cc47e829d7
Merged-In: I1f9b7b132f9c35469e97556a30b521cc47e829d7
2018-06-25 10:29:33 +08:00
Logan Chien
bf319c4e70 Replace SLOG() with LOG(ERROR)
This commit replaces SLOG() from cutils/log.h with LOG(ERROR) from
android-base/logging.h.

This commit is a partial cherry-pick of
3472e52fc2.

Test: mma  # it builds
Change-Id: I36bc4a4430fc16b2c1c2eb39a2ec4d888c1ae352
Merged-In: I70dc512f21459d1e25b187f24289002b2c7bc7af
2018-06-25 10:29:30 +08:00
Treehugger Robot
7d557e98be Merge "Rely on updated newfs_msdos for parameter tuning." 2018-06-19 23:26:05 +00:00
Jeff Sharkey
a76f149f12 Rely on updated newfs_msdos for parameter tuning.
The recently updated newfs_msdos tool has robust tuning logic
internally to pick balanced values for parameters like sectors-per-
cluster, so rely on it instead of trying to force invalid
configurations.

If stakeholders want to tune these parameters even further, they
should contribute to upstream newfs_msdos, where it will benefit
more than just Android devices.

Bug: 29899852
Test: manual with 512MB, 2GB and 34GB devices
Change-Id: I23ab3699f37fc428c2bd7dcbd84f825412d916e6
2018-06-19 15:35:05 -06:00
Treehugger Robot
142702dc82 Merge "Fix double close in GetTreeBytes." 2018-06-08 23:34:41 +00:00
Treehugger Robot
e3017e0b18 Merge "vold: Avoid SIGSEGVs when fstab lacks /data" 2018-06-04 20:49:41 +00:00
Luis Hector Chavez
bbb512d019 vold: Avoid SIGSEGVs when fstab lacks /data
This change adds null-checks for all the places where cryptfs tries to
access the /data entry in fstab, to avoid crashes.

Bug: 80493321
Test: No crashes in Android-in-Chrome OS (which lacks /data in fstab)
Change-Id: Id6cdfe01cdd336cebf8afb9bdd07135811115182
Merged-In: Id6cdfe01cdd336cebf8afb9bdd07135811115182
2018-06-04 19:12:17 +00:00
Josh Gao
72fb1a6d6c Fix double close in GetTreeBytes.
calculate_dir_size closes the fd that it receives.

Bug: http://b/80446935
Test: treehugger
Change-Id: I56a428cd7eb78e56c55434628c1c7b2b87637c81
2018-05-30 11:13:42 -07:00
Treehugger Robot
6054bc3ded Merge "vold: Add nvme disk support" 2018-05-15 19:33:57 +00:00
Dmitry Shmidt
06dc6e512b vold: Add nvme disk support
Bug: 77482940
Test: Manual

Change-Id: Id0e7b3a0aa2083276109b0b2c9d1bcb81852582f
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2018-05-15 10:44:52 -07:00
Logan Chien
14540d9ceb Merge changes I3c14cfcf,I9d2ea66c,I9930105e
* changes:
  Replace library headers with angle quotations
  Reorder the include directives in cryptfs.cpp
  Add linux/types.h to cryptfs.h
2018-05-08 05:28:08 +00:00
Logan Chien
196d5850f2 Replace library headers with angle quotations
This commit replaces the double quotations for library headers with
angle quotations.

Test: cd system/vold && mma
Change-Id: I3c14cfcf80f29173669409df548af84c1b39b96d
Merged-In: I3c14cfcf80f29173669409df548af84c1b39b96d
2018-05-02 12:18:45 +08:00
Logan Chien
862eef7ace Reorder the include directives in cryptfs.cpp
This commit reorders the include directives in cryptfs.cpp so that
upcoming <cutils/log.h> change can be obvious.

Test: lunch aosp_walleye-userdebug && cd system/vold && mma
Change-Id: I9d2ea66c15b7b68014a67ba7c1420075953459ba
Merged-In: I9d2ea66c15b7b68014a67ba7c1420075953459ba
2018-05-02 12:18:38 +08:00
Logan Chien
83a5ad2731 Add linux/types.h to cryptfs.h
This commit adds <linux/types.h> to cryptfs.h because cryptfs.h uses
`__le16` and `__le32` which are defined in <linux/types.h>.

The absence of <linux/types.h> will become an error after we sort the
headers in the upcoming commits.

Test: cd system/vold && mma
Change-Id: I9930105ee86f80a29295b59596b21335c68a8e23
Merged-In: I9930105ee86f80a29295b59596b21335c68a8e23
2018-05-02 12:18:31 +08:00
Treehugger Robot
f6dbba8846 Merge "Remove waitpid on UnMount" 2018-04-03 20:23:59 +00:00
Daniel Rosenberg
8b9a5b344e Remove waitpid on UnMount
Since we no longer have the Fuse Daemon, we won't ever
need to stop the daemon when unmounting.

Bug: 33808187
Test: Run "adb shell ps | grep -w Z"
          The sdcard daemon should not be listed.
Change-Id: I6bb9341785b711d81553393f7c3b56115c435236
2018-03-13 02:58:03 +00:00
Treehugger Robot
456483d193 Merge "mFusePid should be cleared after waitpid successfully" 2018-02-15 23:46:14 +00:00
Jeff Sharkey
35829f3968 Merge "Remove FIDTRIM." 2018-01-12 20:20:15 +00:00
Jeff Sharkey
9b73845fe8 Remove FIDTRIM.
Remove FIDTRIM support, which isn't meaningful on UFS-based flash
devices.  Modern devices require FBE/FDE which gives us better
protection against trimmed data lingering around.

Bug: 67041047
Test: builds, boots
Change-Id: I38d7d6961edf2047592b87c74b2a0f5906fb54e2
Merged-In: I4fb194c5d5ef13f413c02acedfbaaf79c567582b
2018-01-12 10:43:23 -07:00
Chih-hung Hsieh
b96ed7e6e0 Merge "Fix warning in system/vold/tests." 2017-12-11 23:22:58 +00:00
Chih-Hung Hsieh
a827f55629 Fix warning in system/vold/tests.
* Comment out unused function.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I18db09be2ff8ef27f822876a6832ca5f08ce939f
Merged-In: I7a23573af0d664a5f39f1cde3a22ac0001dac1ac
2017-12-07 14:18:34 -08:00
Gao Xiang
9aec7a2fb6 mFusePid should be cleared after waitpid successfully
When waitpid is successful, we need to reset mFusePid
since mFusePid will be killed again unnecessarily
in doUnmount() if we don't reset mFusePid.

As a result, it will kill another unrelated process
in the case of pids wrap around.

Test: reboot
Fixes: 1d79d10 ("Check if sdcard daemon exited.")

Change-Id: Icb422d5c81621f9f6b9f4b1218e94b1d89172763
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
2017-12-07 11:37:19 +08:00
Xin Li
56b0e8c1df Merge "DO NOT MERGE: Merge Oreo MR1 into master" 2017-12-06 23:18:28 +00:00
Xin Li
1843c887d4 DO NOT MERGE: Merge Oreo MR1 into master
Exempt-From-Owner-Approval: Changes already landed internally
Change-Id: Ic7e2e2d1ef7bf17a9c81ea30d759fd9fe0a218c7
2017-12-06 14:24:58 -08:00
Pierre-Hugues Husson
5687befd86 Merge "Workaround perdev_minors path change in Linux"
am: d3870c5167

Change-Id: Ia7ec03a566f8c122dff05bcc3d996c05cf2b7771
2017-11-28 18:59:56 +00:00
Treehugger Robot
d3870c5167 Merge "Workaround perdev_minors path change in Linux" 2017-11-28 18:45:30 +00:00
Pierre-Hugues Husson
f347cd0249 Workaround perdev_minors path change in Linux
This upstream Linux change has been discussed at https://patchwork.kernel.org/patch/8281851/
And included in AOSP in https://android-review.googlesource.com/c/kernel/common/+/202752
Some devices have been released without it, so we need this change to
have a working SDcard on those devices.

Change-Id: I323d85bd8381f82b75db09493ddc22f432cec548
2017-11-28 17:53:42 +01:00
Paul Crowley
2b1b72d183 Merge "Key upgrading for FDE."
am: 997e605563

Change-Id: If2ca4a6bd3b7a2b36b6c092975bcfdde8e063a3e
2017-11-27 20:59:33 +00:00
Treehugger Robot
997e605563 Merge "Key upgrading for FDE." 2017-11-27 20:55:51 +00:00
Paul Crowley
73473337d8 Key upgrading for FDE.
Correctly handle a key upgrade error from keymaster by upgrading the
FDE RSA key and writing the new key blob to disk.

Bug: 69792304
Test: Roll back PLATFORM_SECURITY_PATCH a month, wipe and reboot, roll
      forwards again, check logs with and without this patch.
Change-Id: I220d2dd4e3d791f636e9bc5f063064cecbf1b88a
2017-11-27 10:34:18 -08:00
Xin Li
bf168f7dad Merge commit 'e2d1d99f1a98b02a28fe71f2a387a72b69d4b4a6' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: I4bdada4c933109f1cc60c61946fa30e174ca7583
2017-11-14 12:20:56 -08:00
Jaegeuk Kim
4d1c7765c8 Merge "cryptfs: support make_f2fs with quota"
am: 7807866abe

Change-Id: I9b52d87df0a6ddc3c29b4bd5d302e300747ad4c1
2017-11-14 01:10:34 +00:00
Jaegeuk Kim
af285d98b8 Merge "cryptfs: call format_f2fs correctly with proper flags"
am: b9a1169eca

Change-Id: I7ad4229ee514d80fc3280d8f468844a3b5eb9137
2017-11-14 01:10:17 +00:00
Treehugger Robot
7807866abe Merge "cryptfs: support make_f2fs with quota" 2017-11-14 01:06:37 +00:00
Jaegeuk Kim
b9a1169eca Merge "cryptfs: call format_f2fs correctly with proper flags" 2017-11-14 01:06:27 +00:00
Jaegeuk Kim
8de9f065a4 cryptfs: support make_f2fs with quota
Change-Id: I699b457ca0282c02e0d0a399c146d4e54a403bf4
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-11-13 13:54:16 -08:00
Jaegeuk Kim
98651a235b cryptfs: call format_f2fs correctly with proper flags
Change-Id: Ia493e6f758ff5dd5dd41479193ab237d4306d464
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-11-13 13:16:45 -08:00
Jeff Vander Stoep
c923127e23 Merge "Check that dir name is a pid before attempting to read"
am: 6419445383

Change-Id: I8b7639934bcee660bcd84f83afae5cc2c17bae15
2017-10-24 17:19:58 +00:00
Treehugger Robot
6419445383 Merge "Check that dir name is a pid before attempting to read" 2017-10-24 17:15:03 +00:00
Jeff Vander Stoep
a997db73d6 Check that dir name is a pid before attempting to read
Prevents selinux denials for folders in /proc that do not have the
default /proc label.

Bug: 68146208
Test: no selinux denials for vold attempting to read proc_asound dir.
Merged-In: I7cdd3bbe8e687e078372012773e9a34a5c76e0f8
Change-Id: I7cdd3bbe8e687e078372012773e9a34a5c76e0f8
2017-10-24 14:04:27 +00:00
Chih-hung Hsieh
7718457dfc Merge "Use -Werror in system/vold/tests"
am: d6d0e91c62

Change-Id: Idc41239ba5d67954dfb7d6e61e31768dafdd3599
2017-10-19 23:18:12 +00:00
Chih-hung Hsieh
d6d0e91c62 Merge "Use -Werror in system/vold/tests" 2017-10-19 22:33:52 +00:00
Chih-Hung Hsieh
27c0d952cb Use -Werror in system/vold/tests
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ied1f6160124d10d81151d401ed4a0b089816abb3
2017-10-19 10:07:38 -07:00
Paul Crowley
e2d1d99f1a Merge "Remove CheckBattery altogether" into stage-aosp-master am: db436c7999
am: 45aa0f6c51

Change-Id: I91e0b067e313869417b8b18d9f65f8d0f2acc894
2017-10-04 05:29:30 +00:00
Paul Crowley
45aa0f6c51 Merge "Remove CheckBattery altogether" into stage-aosp-master
am: db436c7999

Change-Id: I65e49db994bbfe266772fa36ed97bee4e4468d5b
2017-10-04 05:27:10 +00:00
TreeHugger Robot
db436c7999 Merge "Remove CheckBattery altogether" into stage-aosp-master 2017-10-04 05:22:11 +00:00
Paul Crowley
db324f795a Merge "Remove CheckBattery altogether" am: 2890b8d215 -s ours am: 90a9c44f9d
am: 68b565336b

Change-Id: I88aa538f2bfb210ce185784ee2c95b70080718e4
2017-10-04 04:43:55 +00:00