Use GRUB_PROPERLY_ALIGNED_ARRAY in grub-core/disk/cryptodisk.c and
grub-core/disk/geli.c.
This commit is contained in:
parent
132867de71
commit
eeada7b1da
3 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-04-05 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Use GRUB_PROPERLY_ALIGNED_ARRAY in grub-core/disk/cryptodisk.c and
|
||||||
|
grub-core/disk/geli.c.
|
||||||
|
|
||||||
2013-04-05 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-04-05 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* util/grub-mkfont.c: Prefer enum to #define.
|
* util/grub-mkfont.c: Prefer enum to #define.
|
||||||
|
|
|
@ -256,7 +256,7 @@ grub_cryptodisk_endecrypt (struct grub_cryptodisk *dev,
|
||||||
case GRUB_CRYPTODISK_MODE_IV_BYTECOUNT64_HASH:
|
case GRUB_CRYPTODISK_MODE_IV_BYTECOUNT64_HASH:
|
||||||
{
|
{
|
||||||
grub_uint64_t tmp;
|
grub_uint64_t tmp;
|
||||||
grub_uint64_t ctx[(dev->iv_hash->contextsize + 7) / 8];
|
GRUB_PROPERLY_ALIGNED_ARRAY (ctx, dev->iv_hash->contextsize);
|
||||||
|
|
||||||
grub_memset (ctx, 0, sizeof (ctx));
|
grub_memset (ctx, 0, sizeof (ctx));
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ geli_rekey (struct grub_cryptodisk *dev, grub_uint64_t zoneno)
|
||||||
grub_uint64_t zone;
|
grub_uint64_t zone;
|
||||||
} __attribute__ ((packed)) tohash
|
} __attribute__ ((packed)) tohash
|
||||||
= { {'e', 'k', 'e', 'y'}, grub_cpu_to_le64 (zoneno) };
|
= { {'e', 'k', 'e', 'y'}, grub_cpu_to_le64 (zoneno) };
|
||||||
grub_uint64_t key[(dev->hash->mdlen + 7) / 8];
|
GRUB_PROPERLY_ALIGNED_ARRAY (key, dev->hash->mdlen);
|
||||||
|
|
||||||
grub_dprintf ("geli", "rekeying %" PRIuGRUB_UINT64_T " keysize=%d\n",
|
grub_dprintf ("geli", "rekeying %" PRIuGRUB_UINT64_T " keysize=%d\n",
|
||||||
zoneno, dev->rekey_derived_size);
|
zoneno, dev->rekey_derived_size);
|
||||||
|
|
Loading…
Reference in a new issue