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

Issue 695791 link

Starred by 4 users

Issue metadata

Status: Archived
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Use xattr instead of JSON file to track directorires

Project Member Reported by hashimoto@chromium.org, Feb 24 2017

Issue description

For ext4 crypto, currently cryptohome uses a JSON file to remember inode values of tracked directories.
By adding xattr to each tracked directory, we can get rid of this JSON file and simplify the code.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 17 2017

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

commit 524badd8139370520dceefbd2d6586161d05104c
Author: Ryo Hashimoto <hashimoto@google.com>
Date: Fri Mar 17 05:28:21 2017

cryptohome: Use xattr instead of JSON to track directories

Each tracked directory has user.TrackedDirectoryName xattr which
contains the base name of the directory, so that we can find the
directory even without the appropraite key which is necessary to decrypt the directory name.

For instance: for aaa/bbb/ccc directory, each TrackedDirectoryName will
contain:
[encrypted aaa]/[encrypted bbb]/[encrypted ccc]
"aaa"           "bbb"           "ccc"

BUG= chromium:695791 
TEST=cros_workon_make cryptohome --test
TEST=find . -type d -exec getfattr -n user.TrackedDirectoryName {} \+
2>/dev/null
TEST=cryptohome do_free_disk_space control

Change-Id: I620afad1803c9d78c025adc3bdfa8357636e1f6b
Reviewed-on: https://chromium-review.googlesource.com/451059
Commit-Ready: Ryo Hashimoto <hashimoto@chromium.org>
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>

[modify] https://crrev.com/524badd8139370520dceefbd2d6586161d05104c/cryptohome/mount.cc
[modify] https://crrev.com/524badd8139370520dceefbd2d6586161d05104c/cryptohome/homedirs.h
[modify] https://crrev.com/524badd8139370520dceefbd2d6586161d05104c/cryptohome/mount_unittest.cc
[modify] https://crrev.com/524badd8139370520dceefbd2d6586161d05104c/cryptohome/mount.h
[modify] https://crrev.com/524badd8139370520dceefbd2d6586161d05104c/cryptohome/homedirs_unittest.cc
[modify] https://crrev.com/524badd8139370520dceefbd2d6586161d05104c/cryptohome/homedirs.cc

Labels: Merge-Request-58
Project Member

Comment 3 by sheriffbot@chromium.org, Mar 18 2017

Labels: -Merge-Request-58 Hotlist-Merge-Approved Merge-Approved-58
Your change meets the bar and is auto-approved for M58. Please go ahead and merge the CL to branch 3029 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

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

Comment 4 by bugdroid1@chromium.org, Mar 21 2017

Labels: merge-merged-release-R58-9334.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/c451b2fbfbd0b96e11716592561ea90da3b559a1

commit c451b2fbfbd0b96e11716592561ea90da3b559a1
Author: Ryo Hashimoto <hashimoto@google.com>
Date: Tue Mar 21 09:30:07 2017

cryptohome: Use xattr instead of JSON to track directories

Each tracked directory has user.TrackedDirectoryName xattr which
contains the base name of the directory, so that we can find the
directory even without the appropraite key which is necessary to decrypt the directory name.

For instance: for aaa/bbb/ccc directory, each TrackedDirectoryName will
contain:
[encrypted aaa]/[encrypted bbb]/[encrypted ccc]
"aaa"           "bbb"           "ccc"

BUG= chromium:695791 
TEST=cros_workon_make cryptohome --test
TEST=find . -type d -exec getfattr -n user.TrackedDirectoryName {} \+
2>/dev/null
TEST=cryptohome do_free_disk_space control

Change-Id: I620afad1803c9d78c025adc3bdfa8357636e1f6b
Reviewed-on: https://chromium-review.googlesource.com/451059
Commit-Ready: Ryo Hashimoto <hashimoto@chromium.org>
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
(cherry picked from commit 524badd8139370520dceefbd2d6586161d05104c)
Reviewed-on: https://chromium-review.googlesource.com/457009
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org>

[modify] https://crrev.com/c451b2fbfbd0b96e11716592561ea90da3b559a1/cryptohome/mount.cc
[modify] https://crrev.com/c451b2fbfbd0b96e11716592561ea90da3b559a1/cryptohome/homedirs.h
[modify] https://crrev.com/c451b2fbfbd0b96e11716592561ea90da3b559a1/cryptohome/mount_unittest.cc
[modify] https://crrev.com/c451b2fbfbd0b96e11716592561ea90da3b559a1/cryptohome/mount.h
[modify] https://crrev.com/c451b2fbfbd0b96e11716592561ea90da3b559a1/cryptohome/homedirs_unittest.cc
[modify] https://crrev.com/c451b2fbfbd0b96e11716592561ea90da3b559a1/cryptohome/homedirs.cc

Project Member

Comment 5 by sheriffbot@chromium.org, Mar 21 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Approved -Merge-Approved-58
Status: Fixed (was: Assigned)

Comment 7 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment