GRUB has support for both the IBM PC XT (Set 1) and IBM PC AT (Set 2) key
scan code mappings. But the driver always hardcodes to Set 1, overwriting
the mode that was queried in the grub_keyboard_controller_init() function.
This breaks keyboard mapping on machines whose firmwares are not using the
On Fri, 30 Oct 2020 21:47:14 +0100
Daniel Kiper wrote:
> On Mon, Oct 19, 2020 at 06:09:54PM -0500, Glenn Washburn wrote:
> > By default, dm-crypt internally uses an IV that corresponds to
> > 512-byte sectors, even when a larger sector size is specified. What
> > this means is that when using a l
This creates an alignment with grub_disk_t naming of the same field and is
more intuitive as to how it should be used.
Signed-off-by: Glenn Washburn
---
grub-core/disk/cryptodisk.c | 2 +-
grub-core/disk/geli.c | 2 +-
grub-core/disk/luks.c | 2 +-
grub-core/disk/luks2.c | 4 ++-
Introduce new variables keyslot_key, digest_key, and segment_key which
represent the integer key of the item in the respective associative array
when looping over the array items. This replaces using a generically
named variable named "idx" used for all three values.
Signed-off-by: Glenn Washburn
Here we go again. I have not added RB sigs to any patches since I've had to
modify them in moving them earlier in the patch set. This would be the first
three rename patches. The first two patches of v3 have been reworked into 5
patches (05-09) which combine to be equivalent. Most of the changes s
Signed-off-by: Glenn Washburn
---
include/grub/types.h | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/grub/types.h b/include/grub/types.h
index 035a4b528..495c86bb1 100644
--- a/include/grub/types.h
+++ b/include/grub/types.h
@@ -72,6 +72,14 @@
# endif
#e
This should improve readability of code by providing clues as to what the
value represents. The new macro GRUB_TYPE_BITS(type) returns the number of
bits allocated for type. Also add GRUB_TYPE_U_MAX/MIN(type) macros to get
the max/min values for an unsigned number with size of type.
Signed-off-by:
This makes it clear that the offset represents sectors, not bytes, in order
to improve readability.
Signed-off-by: Glenn Washburn
---
grub-core/disk/cryptodisk.c | 10 +-
grub-core/disk/geli.c | 2 +-
grub-core/disk/luks.c | 4 ++--
grub-core/disk/luks2.c | 4 ++--
in
This makes it more obvious to the reader that the disk referred to is the
source disk, as opposed to say the disk holding the cryptodisk.
Signed-off-by: Glenn Washburn
---
grub-core/disk/luks2.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/grub-cor
The loop variable j should be used to index the digests and segments json
array, instead of the variable i, which is the keyslot index.
Signed-off-by: Glenn Washburn
---
grub-core/disk/luks2.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/grub-core/disk/luks2.c b/gr
Variables named i are usually looping variables, so rename to keyslot_idx to
allow for easier reading of luks2_get_keyslot.
Signed-off-by: Glenn Washburn
---
grub-core/disk/luks2.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/grub-core/disk/luks2.c b/grub-core/disk
Error messages now distinguish between indexes and keys. The former
include "index" in the error string, and the later are surrounded in quotes.
Signed-off-by: Glenn Washburn
---
grub-core/disk/luks2.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/grub-core/disk
Use the keyslot key value in the keyslot json array rather than the index of
the keyslot in the json array. This is less confusing for the end user. For
example, say you have a LUKS2 device with a key in slot 1 and slot 4. When
using the password for slot 4 to unlock the device, the messages using
Looping variable j was named such because the variable name i was taken.
Since i has been renamed in the previous patch, we can rename j to i.
Signed-off-by: Glenn Washburn
---
grub-core/disk/luks2.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/grub-core
The total_length field is named confusingly because length usually refers to
bytes, whereas in this case its really the total number of sectors on the
device. Also counter-intuitively, grub_disk_get_size returns the total
number of device native sectors. We need to convert the sectors from the
size
Signed-off-by: Glenn Washburn
---
grub-core/disk/luks2.c | 70 +++---
include/grub/misc.h| 2 ++
2 files changed, 67 insertions(+), 5 deletions(-)
diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
index 4a4a0dec4..751b48d6a 100644
--- a/grub-co
By default, dm-crypt internally uses an IV that corresponds to 512-byte
sectors, even when a larger sector size is specified. What this means is
that when using a larger sector size, the IV is incremented every sector.
However, the amount the IV is incremented is the number of 512 byte blocks
in a
Signed-off-by: Glenn Washburn
---
grub-core/disk/luks2.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
index 751b48d6a..b628043e0 100644
--- a/grub-core/disk/luks2.c
+++ b/grub-core/disk/luks2.c
@@ -622,6 +622,17 @@ luks2_recover_
18 matches
Mail list logo