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

Issue 688258 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 682951



Sign in to add a comment

ext4crypto: login_Cryptohome fails.because cryptohome.is_vault_mounted() does not recognized ext4crypto user dir

Project Member Reported by kinaba@chromium.org, Feb 3 2017

Issue description

Blocking: 682951
Several other tests relying on is_value_mounted():

login_GaiaLogin
enterprise_PowerManagement
policy_PowerManagementIdleSettings
Summary: ext4crypto: login_Cryptohome fails.because cryptohome.is_vault_mounted() does not recognized ext4crypto user dir (was: ext4crypto: login_Cryptohome fails.)
Status: Started (was: Assigned)

Comment 5 by kinaba@chromium.org, Feb 10 2017

Owner: gwendal@chromium.org
https://chromium-review.googlesource.com/c/440848/
Cc: asavery@chromium.org
Looking in more details, the issue is deeper.
While it works on ecryptfs, tests that use chrome (like video_YouTubeHTML5)  fail on ext4:

When we issue resart ui, we get a SIGTERM:
02/14 17:08:33.610 DEBUG|    cros_interface:0058| sh -c restart ui.
02/14 17:08:34.605 ERROR|exception_formatte:0057|.
...
02/14 17:08:34.805 ERROR|exception_formatte:0068| Received signal 15, exiting
02/14 17:08:34.808 ERROR|exception_formatte:0073|.

Comparing on the same machine /var/log/messages when cryptohome use ecryptfs or ext4, there are very few difference.

cryptohome drop the vm cache, but I can not see why autotest complains the processes getting signal 15 when it is expected.








vlm_crypto_diff.txt
150 KB View Download
vlm_ecryptfs.txt
6.9 KB View Download
vlm_ext4_crypto.txt
71.7 KB View Download
login_Cryptohome.DEBUG
115 KB Download

Comment 7 by kinaba@chromium.org, Feb 15 2017

That's https://bugs.chromium.org/p/chromium/issues/detail?id=686611
and is fixed on tot. Here we can focus on is_vault_mounted.
Forget #6: I did not apply cl/441429 properly, missed ui-post-stop.
Project Member

Comment 9 by bugdroid1@chromium.org, Feb 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/f75357b82a9c58434db07059ebc77edc0b3b7c73

commit f75357b82a9c58434db07059ebc77edc0b3b7c73
Author: Kazuhiro Inaba <kinaba@chromium.org>
Date: Sat Feb 18 17:40:53 2017

ext4crypto: Update cryptohome.is_vault_mounted() to support ext4 encryption.

The utility function assumed the specific behavior of ecryptfs backend
that it mounts /home/.shadow/hash/vault as the user's home directory.
On ext4crypto, the behavior changes. The test needs to take both the
cases into account during the transition period.

BUG= chromium:688258 
TEST=`test_that login_Cryptohome` on both type of encrypted filesystems.

Change-Id: I1437b9401aab3429ed9f231914f9b14d16f7dc14
Reviewed-on: https://chromium-review.googlesource.com/439125
Commit-Ready: Kazuhiro Inaba <kinaba@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Kazuhiro Inaba <kinaba@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>

[modify] https://crrev.com/f75357b82a9c58434db07059ebc77edc0b3b7c73/client/cros/constants.py

Owner: kinaba@chromium.org
Status: Fixed (was: Started)
Project Member

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

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/6bad6729b6c63efdbe4fa56447d97a41e4f199c1

commit 6bad6729b6c63efdbe4fa56447d97a41e4f199c1
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Tue Mar 21 02:30:20 2017

cryptohome: Add support for ext4 crypto

Adapt is_vault_mounted() to handle mount output when ext4 crypto is used.
Add is_permanent_vault_mounted() to test if a mount is operational and
permanent.

To test a regular user is mounted,
with ecryptfs, we have:
...
/home/.shadow/<uid>/vault /home/user/<uid> ecryptfs rw,seclabe...
with ext4:
/dev/mmcblk0p1 /home/user/<uid> ext4 rw....

BUG= chromium:688258 
TEST=Check ext4 based mount are recognized.
Check ecryptfs still works.
Check guestfs tests works (login_CryptohomeIncognito)

Change-Id: If758bced366da4fb6e377a7f38dfb2e307ddc882
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/440848

[modify] https://crrev.com/6bad6729b6c63efdbe4fa56447d97a41e4f199c1/client/cros/cryptohome.py
[modify] https://crrev.com/6bad6729b6c63efdbe4fa56447d97a41e4f199c1/client/site_tests/login_Cryptohome/login_Cryptohome.py
[modify] https://crrev.com/6bad6729b6c63efdbe4fa56447d97a41e4f199c1/client/site_tests/security_ProfilePermissions/security_ProfilePermissions.py
[modify] https://crrev.com/6bad6729b6c63efdbe4fa56447d97a41e4f199c1/client/cros/constants.py

Status: Verified (was: Fixed)
Test is passing on M58 caroline 

Sign in to add a comment