This series is meant to address concerns Daniel had for patches 3, 4, 8, and 9 of Daniel's series with subject "[PATCH 0/9] Cryptodisk fixes for v2.06". These were patches authored by me and which Daniel handed back for me to take the lead in getting accepted. This series warrants a new thread because several patches were split and new patches have been added to addresses suggestions from Daniel.
The comments from Daniel can be seen in the following ML messages: 3: https://lists.gnu.org/archive/html/grub-devel/2020-09/msg00071.html 4: https://lists.gnu.org/archive/html/grub-devel/2020-09/msg00070.html 8: https://lists.gnu.org/archive/html/grub-devel/2020-09/msg00021.html 9: https://lists.gnu.org/archive/html/grub-devel/2020-09/msg00069.html Patches 1 and 2 are equivalent to patch 3 of the previous series, which was split into patch 1 which fixed the indexing and error message bugs and patch 2 which improves readability of the code. Patch 3 is new and related to patches 1 and 2. It uses the keyslot number that cryptsetup understand when displaying the keyslot to the user. Patch 4 has not changed from patch 4 of the previous series, except the adding of a line in the commit mesage mentioning the removal of the empty statement. Daniel's suggestion to rename total_length to total_sectors is implemented in patch 8. The other two suggestions, handling partial LUKS2 sectors and grub_strtoull() errors, I don't believe warrant action as I argued in more detail here: https://lists.gnu.org/archive/html/grub-devel/2020-10/msg00020.html Patch 5 has also not changed from the equivalent patch 8 of the previous series, but a more detailed commit message has been added per Daniel's suggestion. Patch 6, previously patch 9, has been updated to change how the IV is updated for plain and plain64 modes. This change is functionally equivalent to the previous patch, but more easy to understand. A comment has been added to aid that end. Also, the commit message was changed to be less confusing. Patch 7 comes out of a suggestion by Daniel in the previous patch 9. Some numerical literals are replaced with macros to compute those values. The appropriately named macros aid in understanding the code. Note: I have not functionally tested this as it affects mostly geli encrypted volumes which are on *BSD, which I do not use. The code compiles, and I expect it to work, but I would appreciate any *BSD geli users to verify that this still works for them. Patches 8, 9, and 10 make no functional changes to the code. They solely rename some identifiers. Patch 8 as mentioned above, was suggested by Daniel. Patches 9 and 10 are in the same vein in that they aid in the understanding of the code by more accurately describing what the identifiers represent. Glenn Washburn (10): luks2: Fix use of incorrect index and some grub_error() messages. luks2: Improve readability in luks2_get_keyslot. luks2: Use more intuitive keyslot key instead of index when naming keyslot. luks2: grub_cryptodisk_t->total_length is the max number of device native sectors cryptodisk: Fix cipher IV mode 'plain64' always being set as 'plain'. cryptodisk: Properly handle non-512 byte sized sectors. cryptodisk: Replace some literals with constants in grub_cryptodisk_endecrypt. cryptodisk: Rename total_length field in grub_cryptodisk_t to total_sectors. cryptodisk: Rename offset in grub_cryptodisk_t to offset_sectors. luks2: Rename source disk variabled named 'disk' to 'source' as in luks.c. grub-core/disk/cryptodisk.c | 78 +++++++++++++++++++--------------- grub-core/disk/geli.c | 4 +- grub-core/disk/luks.c | 9 ++-- grub-core/disk/luks2.c | 84 ++++++++++++++++++++----------------- include/grub/cryptodisk.h | 18 ++++++-- include/grub/types.h | 3 ++ 6 files changed, 116 insertions(+), 80 deletions(-) -- 2.27.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel