New issue
Advanced search Search tips

Issue 811551 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Give cryptohome some general clean up

Project Member Reported by kerrnel@chromium.org, Feb 13 2018

Issue description

Cryptohome could use some generic cleanup.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 20 2018

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

commit 37318ee42479145e9a46671ad74c81b8192e1574
Author: Greg Kerr <kerrnel@chromium.org>
Date: Tue Feb 20 21:14:18 2018

cryptohome: move cert_provision library into a separate folder.

This moves the cert_provision library files into a separate folder to
generally cleanup the cryptohome source code tree.

BUG=chromium:811551
TEST=USE=cert_provision emerge-${BOARD} cryptohome; run unit tests.

Change-Id: I985e40fb43db634e588dc53dc4965e9ad6a62a52
Reviewed-on: https://chromium-review.googlesource.com/915212
Commit-Ready: Greg Kerr <kerrnel@chromium.org>
Tested-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/mock_cert_provision_keystore.h
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision_client.cc
[add] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/README.md
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision_unittest.cc
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/mock_cert_provision_cryptohome.h
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision_keystore.cc
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision_cryptohome.h
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision_keystore_unittest.cc
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision.proto
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision_util.h
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision.cc
[modify] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cryptohome.gyp
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision_pca.cc
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision_cryptohome.cc
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision_keystore.h
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision_util.cc
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/mock_cert_provision_pca.h
[rename] https://crrev.com/37318ee42479145e9a46671ad74c81b8192e1574/cryptohome/cert/cert_provision_pca.h

Components: OS>Systems>Security
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 1

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

commit 9194697b9b1010cca23bf8ef0f88e71bfeefabaa
Author: Greg Kerr <kerrnel@chromium.org>
Date: Thu Nov 01 09:17:49 2018

cryptohome: Removed unused MountTask object types.

As part of the work to remove MountTask from cryptohome, which will
allow glib to be removed as a dependency, this removes all MountTask
types which are not currently used. The next step is to remove the usage
of the rest from service.cc.

BUG=chromium:811551
TEST=FEATURES="test" emerge-${BOARD} cryptohome

Change-Id: Ia4d09bbb954e4067bcd6c023fbc47e1e65e07cb1
Reviewed-on: https://chromium-review.googlesource.com/1311714
Commit-Ready: Greg Kerr <kerrnel@chromium.org>
Tested-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/9194697b9b1010cca23bf8ef0f88e71bfeefabaa/cryptohome/mount_task.h
[modify] https://crrev.com/9194697b9b1010cca23bf8ef0f88e71bfeefabaa/cryptohome/mount_task_unittest.cc
[modify] https://crrev.com/9194697b9b1010cca23bf8ef0f88e71bfeefabaa/cryptohome/mount_task.cc

Labels: Cros-Hwsec-Refactoring
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 21

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

commit 3b4793c6cf3f7fd3dc08017730c9535acbde8cc3
Author: Eric Caruso <ejcaruso@chromium.org>
Date: Fri Dec 21 02:06:27 2018

cryptohome: only take mounts_lock_ with AutoLock

This ensures the lock is only taken in a scoped manner, reducing
the chance something leaks the lock.

BUG=chromium:811551
TEST=unit tests

Change-Id: I701040acff96dbdde99dfa46b2025b8f903e113f
Reviewed-on: https://chromium-review.googlesource.com/1379018
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/3b4793c6cf3f7fd3dc08017730c9535acbde8cc3/cryptohome/service.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Dec 21

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

commit f73ce1dc0e5819bd65b71135a95a1c1398496d55
Author: Eric Caruso <ejcaruso@chromium.org>
Date: Fri Dec 21 02:06:26 2018

cryptohome: remove MountTaskNop

This is only instantiated in a private method of Service which is
not called from anywhere, so it's dead code.

BUG=chromium:811551
TEST=unit tests

Change-Id: I8feee090be5f7bebbf60f2a577541e8c62451c7a
Reviewed-on: https://chromium-review.googlesource.com/1384758
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/f73ce1dc0e5819bd65b71135a95a1c1398496d55/cryptohome/service.h
[modify] https://crrev.com/f73ce1dc0e5819bd65b71135a95a1c1398496d55/cryptohome/mount_task.h
[modify] https://crrev.com/f73ce1dc0e5819bd65b71135a95a1c1398496d55/cryptohome/mount_task_unittest.cc
[modify] https://crrev.com/f73ce1dc0e5819bd65b71135a95a1c1398496d55/cryptohome/service.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Jan 4

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

commit e4cf13c05773f3446bd76a13c4e37f0b80728711
Author: Eric Caruso <ejcaruso@chromium.org>
Date: Fri Jan 04 20:46:41 2019

cryptohome: small timer cleanup

A timer was being stopped when it was never started, and some of
the timer types are unused but have to be left around to keep the
enum values stable, so mark them unused with comments.

BUG=chromium:811551
TEST=unit tests

Change-Id: I6c5faf3e7e2f839585fb2a8e71972a93920cbba9
Reviewed-on: https://chromium-review.googlesource.com/1393048
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/e4cf13c05773f3446bd76a13c4e37f0b80728711/cryptohome/service.cc
[modify] https://crrev.com/e4cf13c05773f3446bd76a13c4e37f0b80728711/cryptohome/cryptohome_metrics.h

Project Member

Comment 10 by bugdroid1@chromium.org, Jan 4

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

commit 439e39b5b038d8055782f2c21e60839cd115e06e
Author: Eric Caruso <ejcaruso@chromium.org>
Date: Fri Jan 04 23:30:58 2019

cryptohome: remove UnmountForUser

There's a comment on this method questioning whether it should
even exist, and it has no external users. It's not even exposed to
Chrome via system_api. Thus, it's dead, and we should remove it.
If we want this functionality later, we should reimplement it in a
new-style Ex method.

BUG=chromium:811551
TEST=unit tests, pre-cq

Change-Id: Ie16c1a4d1c07545d15acfe7375e6e7c2b9c2ea43
Reviewed-on: https://chromium-review.googlesource.com/1395045
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/439e39b5b038d8055782f2c21e60839cd115e06e/cryptohome/stateful_recovery.cc
[modify] https://crrev.com/439e39b5b038d8055782f2c21e60839cd115e06e/cryptohome/service.h
[modify] https://crrev.com/439e39b5b038d8055782f2c21e60839cd115e06e/cryptohome/stateful_recovery_unittest.cc
[modify] https://crrev.com/439e39b5b038d8055782f2c21e60839cd115e06e/cryptohome/interface.cc
[modify] https://crrev.com/439e39b5b038d8055782f2c21e60839cd115e06e/cryptohome/interface.h
[modify] https://crrev.com/439e39b5b038d8055782f2c21e60839cd115e06e/cryptohome/service.cc
[modify] https://crrev.com/439e39b5b038d8055782f2c21e60839cd115e06e/cryptohome/mock_service.h
[modify] https://crrev.com/439e39b5b038d8055782f2c21e60839cd115e06e/cryptohome/dbus_bindings/org.chromium.CryptohomeInterface.xml

Project Member

Comment 11 by bugdroid1@chromium.org, Jan 6

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

commit 4f5148f98bac5ff0f5f5a09dcaa82c4380a23d34
Author: Eric Caruso <ejcaruso@chromium.org>
Date: Sun Jan 06 04:08:45 2019

system_api: add UnmountRequest proto for cryptohome

In preparation for the upcoming UnmountEx D-Bus method, we should
add a request proto type.

BUG=chromium:811551
TEST=emerge system_api

Change-Id: I9de65a67fe4ecfebd17f19b159b75a686806aa05
Reviewed-on: https://chromium-review.googlesource.com/1395357
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/4f5148f98bac5ff0f5f5a09dcaa82c4380a23d34/system_api/dbus/cryptohome/rpc.proto

Project Member

Comment 12 by bugdroid1@chromium.org, Jan 11

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

commit c16b665160bc0a71828d287dc0b4daa639d45138
Author: Eric Caruso <ejcaruso@chromium.org>
Date: Fri Jan 11 17:47:57 2019

cryptohome: move PKCS#11 init timer into Mount

This prepares for an upcoming refactor where we are no longer
using the glib event bridge or MountTask to post results back to
the main thread.

BUG=chromium:811551
TEST=unit tests

Change-Id: Idb2ba5b365fccde729468f5ce5cb6dd6d8b0539c
Reviewed-on: https://chromium-review.googlesource.com/1394257
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/c16b665160bc0a71828d287dc0b4daa639d45138/cryptohome/mount.cc
[modify] https://crrev.com/c16b665160bc0a71828d287dc0b4daa639d45138/cryptohome/service.cc

Sign in to add a comment