* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_open): Ensure
at compile time that enough of scratch size is available.
This commit is contained in:
parent
4e42521d8c
commit
ddb3efc906
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-11-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_open): Ensure
|
||||||
|
at compile time that enough of scratch size is available.
|
||||||
|
|
||||||
2013-11-22 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-11-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/kern/x86_64/efi/callwrap.S: Fix stack alignment.
|
* grub-core/kern/x86_64/efi/callwrap.S: Fix stack alignment.
|
||||||
|
|
|
@ -426,6 +426,10 @@ grub_biosdisk_open (const char *name, grub_disk_t disk)
|
||||||
disk->total_sectors = total_sectors;
|
disk->total_sectors = total_sectors;
|
||||||
/* Limit the max to 0x7f because of Phoenix EDD. */
|
/* Limit the max to 0x7f because of Phoenix EDD. */
|
||||||
disk->max_agglomerate = 0x7f >> GRUB_DISK_CACHE_BITS;
|
disk->max_agglomerate = 0x7f >> GRUB_DISK_CACHE_BITS;
|
||||||
|
COMPILE_TIME_ASSERT ((0x7f >> GRUB_DISK_CACHE_BITS
|
||||||
|
<< (GRUB_DISK_SECTOR_BITS + GRUB_DISK_CACHE_BITS))
|
||||||
|
+ sizeof (struct grub_biosdisk_dap)
|
||||||
|
< GRUB_MEMORY_MACHINE_SCRATCH_SIZE);
|
||||||
|
|
||||||
disk->data = data;
|
disk->data = data;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue