History log of /openbmc/estoraged/src/test/include/ (Results 1 – 6 of 6)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
530ce1e816-Dec-2025 Rom Lemarchand <romlem@google.com>

Add support for trim commands

Trim commands help with flash lifespan and performance:
- Explicitly discard blocks when formatting the filesystem
- Add support for discard commands to get passed thro

Add support for trim commands

Trim commands help with flash lifespan and performance:
- Explicitly discard blocks when formatting the filesystem
- Add support for discard commands to get passed through the
device-mapper

Change-Id: Ie3a3ba86757806935fb2863adf092449139941d2
Signed-off-by: Rom Lemarchand <romlem@google.com>

show more ...

1d6665fc04-Dec-2025 John Wedig <johnwedig@google.com>

Run fsck before mounting filesystem

Running fsck should help correct any filesystem errors and make mounting
more reliable. For example, filesystem errors might occur when there's a
power loss while

Run fsck before mounting filesystem

Running fsck should help correct any filesystem errors and make mounting
more reliable. For example, filesystem errors might occur when there's a
power loss while writes are in flight.

Tested:
Below is some example output from eStoraged with fsck.
```
root@wodp1-nfd02:~# systemctl status -l xyz.openbmc_project.eStoraged
● xyz.openbmc_project.eStoraged.service - Storage management daemon for an encrypted storage device
Loaded: loaded (/usr/lib/systemd/system/xyz.openbmc_project.eStoraged.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-12-04 16:38:57 PST; 23min ago
Invocation: ea8275ce96d74cce8036596450060255
Main PID: 812 (eStoraged)
Tasks: 1 (limit: 1965)
Memory: 4.3M
CPU: 5.247s
CGroup: /system.slice/xyz.openbmc_project.eStoraged.service
└─812 /usr/bin/eStoraged

Dec 04 16:38:57 wodp1-nfd02.prod.google.com systemd[1]: Started Storage management daemon for an encrypted storage device.
Dec 04 16:39:10 wodp1-nfd02.prod.google.com eStoraged[812]: Storage management service is running
Dec 04 16:39:24 wodp1-nfd02.prod.google.com eStoraged[812]: Created eStoraged object for path /xyz/openbmc_project/inventory/system/board/eMMC/emmc
Dec 04 16:39:45 wodp1-nfd02.prod.google.com eStoraged[812]: Starting unlock
Dec 04 16:39:45 wodp1-nfd02.prod.google.com eStoraged[812]: Activating LUKS dev /dev/mmcblk0
Dec 04 16:39:48 wodp1-nfd02.prod.google.com eStoraged[812]: Successfully activated LUKS dev /dev/mmcblk0
Dec 04 16:39:48 wodp1-nfd02.prod.google.com eStoraged[3049]: fsck from util-linux 2.39.3
Dec 04 16:39:49 wodp1-nfd02.prod.google.com eStoraged[3074]: /dev/mapper/luks-mmcblk0: recovering journal
Dec 04 16:39:49 wodp1-nfd02.prod.google.com eStoraged[3074]: /dev/mapper/luks-mmcblk0: clean, 34/954720 files, 98720/3812864 blocks
Dec 04 16:39:49 wodp1-nfd02.prod.google.com eStoraged[812]: Successfully mounted filesystem at /mnt/luks-mmcblk0_fs
```

Change-Id: Ie333a7fd9c8af2fe6e07ad52507249f42ca0e8e8
Signed-off-by: John Wedig <johnwedig@google.com>

show more ...

c0f8548603-Mar-2025 Patrick Williams <patrick@stwcx.xyz>

fix struct and variable case styles

Fix the following clang-tidy warnings:

```
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/include/sanitize.hpp:41:37: error: invalid case style for str

fix struct and variable case styles

Fix the following clang-tidy warnings:

```
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/include/sanitize.hpp:41:37: error: invalid case style for struct 'mmc_io_multi_cmd_erase' [readability-identifier-naming,-warnings-as-errors]
41 | struct mmc_io_multi_cmd_erase data) = 0;
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:48:30: error: invalid case style for parameter 'cipher_mode' [readability-identifier-naming,-warnings-as-errors]
48 | const char* cipher_mode, const char* uuid,
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:49:30: error: invalid case style for parameter 'volume_key' [readability-identifier-naming,-warnings-as-errors]
49 | const char* volume_key, size_t volume_key_size, void* params),
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:49:49: error: invalid case style for parameter 'volume_key_size' [readability-identifier-naming,-warnings-as-errors]
49 | const char* volume_key, size_t volume_key_size, void* params),
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:55:25: error: invalid case style for parameter 'passphrase_size' [readability-identifier-naming,-warnings-as-errors]
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:59:56: error: invalid case style for parameter 'requested_type' [readability-identifier-naming,-warnings-as-errors]
59 | (struct crypt_device * cd, const char* requested_type,
```

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib4c685db2037514b0517e42369b1d66b49b00e03

show more ...


/openbmc/estoraged/.clang-format
/openbmc/estoraged/.clang-tidy
/openbmc/estoraged/.gitignore
/openbmc/estoraged/include/cryptsetupInterface.hpp
/openbmc/estoraged/include/erase.hpp
/openbmc/estoraged/include/estoraged.hpp
/openbmc/estoraged/include/getConfig.hpp
/openbmc/estoraged/include/meson.build
/openbmc/estoraged/include/pattern.hpp
/openbmc/estoraged/include/sanitize.hpp
/openbmc/estoraged/include/util.hpp
/openbmc/estoraged/include/verifyDriveGeometry.hpp
/openbmc/estoraged/include/zero.hpp
/openbmc/estoraged/meson.build
/openbmc/estoraged/meson.options
/openbmc/estoraged/service_files/meson.build
/openbmc/estoraged/service_files/xyz.openbmc_project.eStoraged.service.in
/openbmc/estoraged/src/erase/cryptoErase.cpp
/openbmc/estoraged/src/erase/meson.build
/openbmc/estoraged/src/erase/pattern.cpp
/openbmc/estoraged/src/erase/sanitize.cpp
/openbmc/estoraged/src/erase/verifyDriveGeometry.cpp
/openbmc/estoraged/src/estoraged.cpp
/openbmc/estoraged/src/getConfig.cpp
/openbmc/estoraged/src/main.cpp
/openbmc/estoraged/src/meson.build
/openbmc/estoraged/src/test/erase/crypto_test.cpp
/openbmc/estoraged/src/test/erase/pattern_test.cpp
/openbmc/estoraged/src/test/erase/sanitize_test.cpp
/openbmc/estoraged/src/test/erase/verifyGeometry_test.cpp
/openbmc/estoraged/src/test/erase/zero_test.cpp
/openbmc/estoraged/src/test/estoraged_test.cpp
estoraged_test.hpp
/openbmc/estoraged/src/test/meson.build
/openbmc/estoraged/src/test/util_test.cpp
/openbmc/estoraged/src/util.cpp
/openbmc/estoraged/subprojects/.clang-tidy-ignore
/openbmc/estoraged/subprojects/boost.wrap
/openbmc/estoraged/subprojects/packagefiles/boost/meson.build
2443a02117-Mar-2023 John Wedig <johnwedig@google.com>

Improve accuracy of 'Locked' property

The 'Locked' property in the volume interface is supposed to indicate
whether the LUKS volume is currently activated, but this property is
often inaccurate beca

Improve accuracy of 'Locked' property

The 'Locked' property in the volume interface is supposed to indicate
whether the LUKS volume is currently activated, but this property is
often inaccurate because it always defaults to false upon startup
(i.e. unlocked). However, the LUKS volume is usually locked at startup.
So, client daemons can get confused when looking at the Locked
property.

This commit reworks the functionality for the 'Locked' property, so that
it checks whether the mapped virtual crypt device exists, e.g. whether
/dev/mapper/<luks_device> exists. This way, the Locked property should
better reflect the actual state.

The one caveat to keep in mind is that 'Locked' will be True even if the
device isn't formatted as a LUKS volume. If client daemons need to know
whether it's already formatted, we may want to add another property to
the Volume interface for that purpose. But in the meantime, eStoraged
already exports an EncryptionStatus property as part of the Drive
interface. So, the information is already available, if needed.

Tested:
Checked 'Locked' property at startup
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Locked
b true
Formatted the LUKS volume, then checked 'Locked' property again
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \
xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \
--timeout=60
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Locked
b false
Restarted eStoraged and checked 'Locked' again.
$ systemctl restart xyz.openbmc_project.eStoraged
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Locked
b false
Locked the LUKS volume, and checked 'Locked' again.
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Lock
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Locked
b true
Restarted eStoraged, and checked 'Locked' again.
$ systemctl restart xyz.openbmc_project.eStoraged
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Locked
b true

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: I5cd6bac4b4426c0e2579c3fc8cf7a27b4f2ccc08

show more ...

8d5a3a0729-Sep-2022 John Wedig <johnwedig@google.com>

Implement the changePassword method

With this commit, it is now possible to change the password for the
LUKS-encrypted volume, using the changePassword D-Bus method for
eStoraged.

Tested:
$ busctl

Implement the changePassword method

With this commit, it is now possible to change the password for the
LUKS-encrypted volume, using the changePassword D-Bus method for
eStoraged.

Tested:
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 \
xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4 \
--timeout=60
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume ChangePassword \
ayay 3 1 2 3 3 4 5 6
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Lock
Attempted to unlock using the old password. It failed as expected.
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3
Unlocked with the new password
$ busctl call xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 4 5 6

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: If1395fb04f51b1fb1a3d26731422d21476205207

show more ...


/openbmc/estoraged/.clang-tidy
/openbmc/estoraged/.gitignore
/openbmc/estoraged/OWNERS
/openbmc/estoraged/include/cryptsetupInterface.hpp
/openbmc/estoraged/include/erase.hpp
/openbmc/estoraged/include/estoraged.hpp
/openbmc/estoraged/include/filesystemInterface.hpp
/openbmc/estoraged/include/getConfig.hpp
/openbmc/estoraged/include/pattern.hpp
/openbmc/estoraged/include/sanitize.hpp
/openbmc/estoraged/include/util.hpp
/openbmc/estoraged/include/verifyDriveGeometry.hpp
/openbmc/estoraged/include/zero.hpp
/openbmc/estoraged/meson.build
/openbmc/estoraged/service_files/meson.build
/openbmc/estoraged/service_files/xyz.openbmc_project.eStoraged.service.in
/openbmc/estoraged/src/erase/cryptoErase.cpp
/openbmc/estoraged/src/erase/meson.build
/openbmc/estoraged/src/erase/pattern.cpp
/openbmc/estoraged/src/erase/sanitize.cpp
/openbmc/estoraged/src/erase/verifyDriveGeometry.cpp
/openbmc/estoraged/src/erase/zero.cpp
/openbmc/estoraged/src/estoraged.cpp
/openbmc/estoraged/src/getConfig.cpp
/openbmc/estoraged/src/main.cpp
/openbmc/estoraged/src/meson.build
/openbmc/estoraged/src/test/erase/crypto_test.cpp
/openbmc/estoraged/src/test/erase/pattern_test.cpp
/openbmc/estoraged/src/test/erase/sanitize_test.cpp
/openbmc/estoraged/src/test/erase/verifyGeometry_test.cpp
/openbmc/estoraged/src/test/erase/zero_test.cpp
/openbmc/estoraged/src/test/estoraged_test.cpp
estoraged_test.hpp
/openbmc/estoraged/src/test/meson.build
/openbmc/estoraged/src/test/util_test.cpp
/openbmc/estoraged/src/util.cpp
/openbmc/estoraged/subprojects/boost.wrap
/openbmc/estoraged/subprojects/phosphor-dbus-interfaces.wrap
/openbmc/estoraged/subprojects/phosphor-logging.wrap
/openbmc/estoraged/subprojects/sdbusplus.wrap
/openbmc/estoraged/subprojects/stdplus.wrap
59dffa6313-Jan-2022 John Edward Broadbent <jebr@google.com>

Add crypto Erase to eStorageD.

The goal is to erase the keys that are used to decrypt the drive. After
the keys are erased it will not be possible to decrypt the drive, even
if the password can be r

Add crypto Erase to eStorageD.

The goal is to erase the keys that are used to decrypt the drive. After
the keys are erased it will not be possible to decrypt the drive, even
if the password can be recalled. The data is forever inaccessible.

Testing:

$ systemctl stop emmc.service

$ /eStoraged -b /dev/mmcblk0 &

$ busctl call xyz.openbmc_project.eStoraged.mmcblk0 /xyz/openbmc_project/storage/mmcblk0 xyz.openbmc_project.Inventory.Item.Volume FormatLuks ays 3 1 2 3 xyz.openbmc_project.Inventory.Item.Volume.FilesystemType.ext4

$ busctl call xyz.openbmc_project.eStoraged.mmcblk0 /xyz/openbmc_project/storage/mmcblk0 xyz.openbmc_project.Inventory.Item.Volume Lock

$ busctl call xyz.openbmc_project.eStoraged.mmcblk0 /xyz/openbmc_project/storage/mmcblk0 xyz.openbmc_project.Inventory.Item.Volume Erase s xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.CryptoErase

$ busctl call xyz.openbmc_project.eStoraged.mmcblk0 /xyz/openbmc_project/storage/mmcblk0 xyz.openbmc_project.Inventory.Item.Volume Unlock ay 3 1 2 3
Call failed: The operation failed internally.

Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: I3221e82a92c1b555e2379b19c9e1d5b6e4b02f9b

show more ...