New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 702526 link

Starred by 4 users

Issue metadata

Status: Verified
Owner:
Closed: Apr 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 688900



Sign in to add a comment

eCryptfs->ext4: Implement cryptohomed::MigrateToDircrypto Dbus method.

Project Member Reported by kinaba@chromium.org, Mar 17 2017

Issue description

Migration library by dspaid@
https://chromium-review.googlesource.com/c/436985/

and

Dbus protocol to kick the migration by kinaba@
https://chromium-review.googlesource.com/c/454361/


is getting close to be ready.

The remaining task here is add a code to mount the both types of home directory,
and run the migration by using Dan's library.
 

Comment 1 by kinaba@chromium.org, Mar 27 2017

Owner: dspaid@chromium.org
Status: Assigned (was: Available)
dspaid@, are you going to take this?


For the record of the offline chat,

> The remaining task here is add a code to mount the both types of home directory,

/home/.shadow/$hash/mount is used by both of ecryptfs and ext4crypto mounter right now,
so we need to change at least one (or both) of them.

Btw, my tentative code for MOUNT_ERROR_PREVIOUS_MIGRATION_INCOMPLETE is detected by
the existence of /home/.shadow/$hash/vault and /home/.shadow/$hash/mount of ext4crypto
https://chromium.googlesource.com/chromiumos/platform2/+/7ac52416e8a23c717b1c17d23cef1ae0462842c8/cryptohome/mount.cc#474
which may probably need to be adjusted to use more proper check once everything is decided.

Comment 2 by dspaid@chromium.org, Mar 27 2017

Yea, I can take it.
Owner: hashimoto@chromium.org
Status: Started (was: Assigned)
Uploaded all needed patches:
- https://chromium-review.googlesource.com/c/461738
- https://chromium-review.googlesource.com/c/461781
- https://chromium-review.googlesource.com/c/472409

Please apply them locally for development.
Project Member

Comment 6 by bugdroid1@chromium.org, Apr 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/4198b66c7ace982faff4054d3cfda55ea432839f

commit 4198b66c7ace982faff4054d3cfda55ea432839f
Author: Ryo Hashimoto <hashimoto@google.com>
Date: Thu Apr 13 05:42:00 2017

cryptohome: Add a new mount argument for migration

When this new argument is true, MountEx mounts the existing eCryptfs
vault to a temporary location, while setting up a dircrypto home
directory at the normal mount destination.

- Add a new parameter to_migrate_from_ecryptfs to Mount::MountArgs
- Fill Mount::MountArgs::to_migrate_from_ecryptfs in service.cc
- Add a new switch to_migrate_from_ecryptfs to cryptohome.cc
- Implement the logic in Mount::MountCryptohomeInner
- Add a test

CQ-DEPEND=CL:461738
BUG= chromium:702526 
TEST=cryptohome --action=mount_ex --user=foo@foo.com --to_migrate_from_ecryptfs
TEST=cros_workon_make cryptohome --test

Change-Id: I3ea4f6f1d4e5c83e76fe4f3cf95742357288a748
Reviewed-on: https://chromium-review.googlesource.com/461781
Commit-Ready: Ryo Hashimoto <hashimoto@chromium.org>
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>

[modify] https://crrev.com/4198b66c7ace982faff4054d3cfda55ea432839f/cryptohome/make_tests.cc
[modify] https://crrev.com/4198b66c7ace982faff4054d3cfda55ea432839f/cryptohome/cryptohome.cc
[modify] https://crrev.com/4198b66c7ace982faff4054d3cfda55ea432839f/cryptohome/mount.cc
[modify] https://crrev.com/4198b66c7ace982faff4054d3cfda55ea432839f/cryptohome/mount.h
[modify] https://crrev.com/4198b66c7ace982faff4054d3cfda55ea432839f/cryptohome/service.cc
[modify] https://crrev.com/4198b66c7ace982faff4054d3cfda55ea432839f/cryptohome/mount_unittest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/system_api/+/f425c1c372b0077a67937855f03f1089d0df7970

commit f425c1c372b0077a67937855f03f1089d0df7970
Author: Ryo Hashimoto <hashimoto@google.com>
Date: Thu Apr 13 05:42:00 2017

cryptohome: Add a new mount argument for migration

When this new argument is true, MountEx mounts the existing eCryptfs
vault to a temporary location, while setting up a dircrypto home
directory at the normal mount destination.

BUG= chromium:702526 
TEST=cryptohome --action=mount_ex --user=foo@foo.com --to_migrate_from_ecryptfs

Change-Id: I8081f8a0bc166fed3649b4577d36f92bab3a1778
Reviewed-on: https://chromium-review.googlesource.com/461738
Commit-Ready: Ryo Hashimoto <hashimoto@chromium.org>
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org>

[modify] https://crrev.com/f425c1c372b0077a67937855f03f1089d0df7970/dbus/cryptohome/rpc.proto

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/system_api/+/f425c1c372b0077a67937855f03f1089d0df7970

commit f425c1c372b0077a67937855f03f1089d0df7970
Author: Ryo Hashimoto <hashimoto@google.com>
Date: Thu Apr 13 05:42:00 2017

cryptohome: Add a new mount argument for migration

When this new argument is true, MountEx mounts the existing eCryptfs
vault to a temporary location, while setting up a dircrypto home
directory at the normal mount destination.

BUG= chromium:702526 
TEST=cryptohome --action=mount_ex --user=foo@foo.com --to_migrate_from_ecryptfs

Change-Id: I8081f8a0bc166fed3649b4577d36f92bab3a1778
Reviewed-on: https://chromium-review.googlesource.com/461738
Commit-Ready: Ryo Hashimoto <hashimoto@chromium.org>
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org>

[modify] https://crrev.com/f425c1c372b0077a67937855f03f1089d0df7970/dbus/cryptohome/rpc.proto

Project Member

Comment 9 by bugdroid1@chromium.org, Apr 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a15de7e2276f1ccaf8392b4268002f2979a246a5

commit a15de7e2276f1ccaf8392b4268002f2979a246a5
Author: hashimoto <hashimoto@chromium.org>
Date: Thu Apr 13 09:28:30 2017

Roll cros_system_api to f425c1c372b0077a67937855f03f1089d0df7970

f425c1c cryptohome: Add a new mount argument for migration

BUG= 702526 
TEST=build

Review-Url: https://codereview.chromium.org/2815163004
Cr-Commit-Position: refs/heads/master@{#464357}

[modify] https://crrev.com/a15de7e2276f1ccaf8392b4268002f2979a246a5/DEPS

Project Member

Comment 10 by bugdroid1@chromium.org, Apr 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/076ff4a8a39435d7c805bf17aa0683c7100c87d0

commit 076ff4a8a39435d7c805bf17aa0683c7100c87d0
Author: Ryo Hashimoto <hashimoto@google.com>
Date: Mon Apr 17 05:39:03 2017

cryptohome: Implement Service::DoMigrateToDircrypto

- Add Mount::MigrateToDircrypto.
- SUCCESS/FAILED progress signals are sent by Service.
- Implement cryptohome --action=migrate_to_dircrypto.

BUG= chromium:702526 
TEST=cryptohome --action=migrate_to_dircrypto --user=foo@foo.com

Change-Id: If79262162942a862293b01a9740e185f1eb42385
Reviewed-on: https://chromium-review.googlesource.com/472409
Commit-Ready: Ryo Hashimoto <hashimoto@chromium.org>
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Dan Spaid <dspaid@chromium.org>

[modify] https://crrev.com/076ff4a8a39435d7c805bf17aa0683c7100c87d0/cryptohome/service.h
[modify] https://crrev.com/076ff4a8a39435d7c805bf17aa0683c7100c87d0/cryptohome/service.cc
[modify] https://crrev.com/076ff4a8a39435d7c805bf17aa0683c7100c87d0/cryptohome/interface.h
[modify] https://crrev.com/076ff4a8a39435d7c805bf17aa0683c7100c87d0/cryptohome/cryptohome.cc
[modify] https://crrev.com/076ff4a8a39435d7c805bf17aa0683c7100c87d0/cryptohome/mount.cc
[modify] https://crrev.com/076ff4a8a39435d7c805bf17aa0683c7100c87d0/cryptohome/dircrypto_data_migrator/migration_helper.cc
[modify] https://crrev.com/076ff4a8a39435d7c805bf17aa0683c7100c87d0/cryptohome/dircrypto_data_migrator/migration_helper.h
[modify] https://crrev.com/076ff4a8a39435d7c805bf17aa0683c7100c87d0/cryptohome/mount.h
[modify] https://crrev.com/076ff4a8a39435d7c805bf17aa0683c7100c87d0/cryptohome/interface.cc
[modify] https://crrev.com/076ff4a8a39435d7c805bf17aa0683c7100c87d0/cryptohome/dircrypto_data_migrator/migration_helper_unittest.cc
[modify] https://crrev.com/076ff4a8a39435d7c805bf17aa0683c7100c87d0/cryptohome/cryptohome.xml

Labels: Merge-Request-59
Requesting merge of https://chromium-review.googlesource.com/472409 to M-59.
Project Member

Comment 12 by sheriffbot@chromium.org, Apr 18 2017

Labels: -Merge-Request-59 Merge-Review-59 Hotlist-Merge-Review
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 13 by uekawa@google.com, Apr 21 2017

DEPS roll was before the branch point, so the cherry pick request is for #10 ? 
Cc: gkihumba@chromium.org

Comment 15 by uekawa@google.com, Apr 24 2017

Labels: ArcExt4Migration
Any update on merge review?
What I want to merge is only https://chromium-review.googlesource.com/472409.
Labels: Merge-Approved-59
Project Member

Comment 18 by bugdroid1@chromium.org, Apr 26 2017

Labels: merge-merged-release-R59-9460.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/b82ee01d18231fca1f3a662aeb5bf08d6cf34792

commit b82ee01d18231fca1f3a662aeb5bf08d6cf34792
Author: Ryo Hashimoto <hashimoto@google.com>
Date: Wed Apr 26 04:46:55 2017

cryptohome: Implement Service::DoMigrateToDircrypto

- Add Mount::MigrateToDircrypto.
- SUCCESS/FAILED progress signals are sent by Service.
- Implement cryptohome --action=migrate_to_dircrypto.

BUG= chromium:702526 
TEST=cryptohome --action=migrate_to_dircrypto --user=foo@foo.com

Change-Id: If79262162942a862293b01a9740e185f1eb42385
Reviewed-on: https://chromium-review.googlesource.com/472409
Commit-Ready: Ryo Hashimoto <hashimoto@chromium.org>
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Dan Spaid <dspaid@chromium.org>
(cherry picked from commit 076ff4a8a39435d7c805bf17aa0683c7100c87d0)
Reviewed-on: https://chromium-review.googlesource.com/487761
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org>

[modify] https://crrev.com/b82ee01d18231fca1f3a662aeb5bf08d6cf34792/cryptohome/service.h
[modify] https://crrev.com/b82ee01d18231fca1f3a662aeb5bf08d6cf34792/cryptohome/service.cc
[modify] https://crrev.com/b82ee01d18231fca1f3a662aeb5bf08d6cf34792/cryptohome/interface.h
[modify] https://crrev.com/b82ee01d18231fca1f3a662aeb5bf08d6cf34792/cryptohome/cryptohome.cc
[modify] https://crrev.com/b82ee01d18231fca1f3a662aeb5bf08d6cf34792/cryptohome/mount.cc
[modify] https://crrev.com/b82ee01d18231fca1f3a662aeb5bf08d6cf34792/cryptohome/dircrypto_data_migrator/migration_helper.cc
[modify] https://crrev.com/b82ee01d18231fca1f3a662aeb5bf08d6cf34792/cryptohome/dircrypto_data_migrator/migration_helper.h
[modify] https://crrev.com/b82ee01d18231fca1f3a662aeb5bf08d6cf34792/cryptohome/mount.h
[modify] https://crrev.com/b82ee01d18231fca1f3a662aeb5bf08d6cf34792/cryptohome/interface.cc
[modify] https://crrev.com/b82ee01d18231fca1f3a662aeb5bf08d6cf34792/cryptohome/dircrypto_data_migrator/migration_helper_unittest.cc
[modify] https://crrev.com/b82ee01d18231fca1f3a662aeb5bf08d6cf34792/cryptohome/cryptohome.xml

Labels: -Merge-Review-59 -Merge-Approved-59
Status: Fixed (was: Started)

Comment 20 by son...@google.com, May 17 2017

Status: Verified (was: Fixed)
Verified on build 9460.42.0
==============================
localhost / # cryptohome --action=migrate_to_dircrypto --user=foo@foo.com MigrateToDircrypto call succeeded.
localhost / # 
==============================
Labels: -Hotlist-Merge-Review

Sign in to add a comment