1. 23 Feb, 2018 2 commits
  2. 04 Apr, 2017 1 commit
    • Andrei Borzenkov's avatar
      i386, x86_64, ppc: fix switch fallthrough cases with GCC7 · 4bd4a887
      Andrei Borzenkov authored
      In util/getroot and efidisk slightly modify exitsing comment to mostly
      retain it but still make GCC7 compliant with respect to fall through
      annotation.
      
      In grub-core/lib/xzembed/xz_dec_lzma2.c it adds same comments as
      upstream.
      
      In grub-core/tests/setjmp_tets.c declare functions as "noreturn" to
      suppress GCC7 warning.
      
      In grub-core/gnulib/regexec.c use new __attribute__, because existing
      annotation is not recognized by GCC7 parser (which requires that comment
      immediately precedes case statement).
      
      Otherwise add FALLTHROUGH comment.
      
      Closes: 50598
      4bd4a887
  3. 08 Jan, 2017 1 commit
  4. 07 May, 2015 3 commits
  5. 14 Oct, 2014 1 commit
  6. 22 Sep, 2014 1 commit
  7. 21 Sep, 2014 1 commit
    • Peter Jones's avatar
      Initialized initrd_ctx so we don't free a random pointer from the stack. · 631a8200
      Peter Jones authored
      Currently, if "linux" fails, the "goto fail;" in grub_cmd_initrd sends us
      into grub_initrd_close() without grub_initrd_init() being called, and thus
      it never clears initrd_ctx->components.  grub_initrd_close() then frees that
      address, which is stale data from the stack.  If the stack happens to have a
      stale *address* there that matches a recent allocation, then you'll get a
      double free later.
      
      So initialize the memory up front.
      Signed-off-by: default avatarPeter Jones <pjones@redhat.com>
      631a8200
  8. 17 Dec, 2013 3 commits
  9. 15 Dec, 2013 3 commits
  10. 28 Oct, 2013 1 commit
  11. 19 Oct, 2013 1 commit
  12. 14 Oct, 2013 1 commit
  13. 02 May, 2013 1 commit
  14. 24 Apr, 2013 2 commits
  15. 14 Apr, 2013 1 commit
  16. 22 Mar, 2013 1 commit
  17. 20 Jan, 2013 1 commit
  18. 15 Jan, 2013 1 commit
    • Colin Watson's avatar
      Remove nested functions from memory map iterators. · d0d4b8a0
      Colin Watson authored
      * grub-core/efiemu/mm.c (grub_efiemu_mmap_iterate): Add hook_data
      argument, passed to hook.
      * grub-core/kern/i386/coreboot/mmap.c
      (grub_linuxbios_table_iterate): Likewise.
      (grub_machine_mmap_iterate: iterate_linuxbios_table): Make static
      instead of nested.
      (grub_machine_mmap_iterate): Add hook_data argument.
      * grub-core/kern/i386/multiboot_mmap.c (grub_machine_mmap_iterate):
      Add hook_data argument, passed to hook.
      * grub-core/kern/i386/pc/mmap.c (grub_machine_mmap_iterate):
      Likewise.
      * grub-core/kern/i386/qemu/mmap.c (grub_machine_mmap_iterate):
      Likewise.
      * grub-core/kern/ieee1275/mmap.c (grub_machine_mmap_iterate):
      Likewise.
      * grub-core/kern/mips/arc/init.c (grub_machine_mmap_iterate):
      Likewise.
      * grub-core/kern/mips/loongson/init.c (grub_machine_mmap_iterate):
      Likewise.
      * grub-core/kern/mips/qemu_mips/init.c (grub_machine_mmap_iterate):
      Likewise.
      * grub-core/mmap/efi/mmap.c (grub_efi_mmap_iterate): Likewise.
      (grub_machine_mmap_iterate): Likewise.
      * grub-core/mmap/mmap.c (grub_mmap_iterate): Likewise.
      * include/grub/efiemu/efiemu.h (grub_efiemu_mmap_iterate): Update
      prototype.
      * include/grub/memory.h (grub_memory_hook_t): Add data argument.
      Remove NESTED_FUNC_ATTR from here and from all users.
      (grub_mmap_iterate): Update prototype.
      (grub_efi_mmap_iterate): Update prototype.  Update all callers to
      pass appropriate hook data.
      (grub_machine_mmap_iterate): Likewise.
      
      * grub-core/commands/acpi.c (grub_acpi_create_ebda: find_hook): Make
      static instead of nested.
      * grub-core/commands/lsmmap.c (grub_cmd_lsmmap: hook): Likewise.
      Rename to ...
      (lsmmap_hook): ... this.
      * grub-core/efiemu/mm.c (grub_efiemu_mmap_init: bounds_hook):
      Likewise.
      (grub_efiemu_mmap_fill: fill_hook): Likewise.
      * grub-core/kern/i386/coreboot/init.c (grub_machine_init:
      heap_init): Likewise.
      * grub-core/kern/i386/pc/init.c (grub_machine_init: hook): Likewise.
      Rename to ...
      (mmap_iterate_hook): ... this.
      * grub-core/kern/ieee1275/init.c (grub_claim_heap: heap_init):
      Likewise.
      * grub-core/lib/ieee1275/relocator.c
      (grub_relocator_firmware_get_max_events: count): Likewise.
      (grub_relocator_firmware_fill_events: fill): Likewise.  Rename
      to ...
      (grub_relocator_firmware_fill_events_iter): ... this.
      * grub-core/lib/relocator.c (grub_relocator_alloc_chunk_align:
      hook): Likewise.  Rename to ...
      (grub_relocator_alloc_chunk_align_iter): ... this.
      * grub-core/loader/i386/bsd.c (generate_e820_mmap: hook): Likewise.
      Rename to ...
      (generate_e820_mmap_iter): ... this.
      * grub-core/loader/i386/linux.c (find_mmap_size: hook): Likewise.
      Rename to ...
      (count_hook): ... this.
      (grub_linux_boot: hook): Likewise.  Rename to ...
      (grub_linux_boot_mmap_find): ... this.
      (grub_linux_boot: hook_fill): Likewise.  Rename to ...
      (grub_linux_boot_mmap_fill): ... this.
      * grub-core/loader/i386/multiboot_mbi.c (grub_fill_multiboot_mmap:
      hook): Likewise.  Rename to ...
      (grub_fill_multiboot_mmap_iter): ... this.
      * grub-core/loader/multiboot.c (grub_get_multiboot_mmap_count:
      hook): Likewise.  Rename to ...
      (count_hook): ... this.
      * grub-core/loader/multiboot_mbi2.c (grub_fill_multiboot_mmap:
      hook): Likewise.  Rename to ...
      (grub_fill_multiboot_mmap_iter): ... this.
      * grub-core/loader/powerpc/ieee1275/linux.c
      (grub_linux_claimmap_iterate: alloc_mem): Likewise.
      * grub-core/loader/sparc64/ieee1275/linux.c (alloc_phys: choose):
      Likewise.  Rename to ...
      (alloc_phys_choose): ... this.
      (determine_phys_base: get_physbase): Likewise.
      * grub-core/mmap/i386/mmap.c (grub_mmap_malign_and_register:
      find_hook): Likewise.
      * grub-core/mmap/i386/pc/mmap.c (preboot: fill_hook): Likewise.
      (malloc_hook: count_hook): Likewise.
      * grub-core/mmap/i386/uppermem.c (grub_mmap_get_lower: hook):
      Likewise.  Rename to ...
      (lower_hook): ... this.
      (grub_mmap_get_upper: hook): Likewise.  Rename to ...
      (upper_hook): ... this.
      (grub_mmap_get_post64: hook): Likewise.  Rename to ...
      (post64_hook): ... this.
      * grub-core/mmap/mips/uppermem.c (grub_mmap_get_lower: hook):
      Likewise.  Rename to ...
      (lower_hook): ... this.
      (grub_mmap_get_upper: hook): Likewise.  Rename to ...
      (upper_hook): ... this.
      * grub-core/mmap/mmap.c (grub_mmap_iterate: count_hook): Likewise.
      (grub_mmap_iterate: fill_hook): Likewise.
      (fill_mask): Pass addr and mask within a single struct.
      (grub_cmd_badram: hook): Make static instead of nested.  Rename
      to ...
      (badram_iter): ... this.
      (grub_cmd_cutmem: hook): Likewise.  Rename to ...
      (cutmem_iter): ... this.
      d0d4b8a0
  19. 05 Oct, 2012 1 commit
  20. 18 Sep, 2012 1 commit
  21. 02 Jul, 2012 1 commit
  22. 27 Jun, 2012 1 commit
  23. 25 Jun, 2012 1 commit
  24. 20 Jun, 2012 1 commit
  25. 31 May, 2012 3 commits
  26. 30 May, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Fix handling of EFI with big memory maps. · a4e5ca80
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/loader/i386/linux.c (GRUB_LINUX_CL_OFFSET): Removed.
      	(real_mode_mem): Likewise.
      	(real_mode_target): Likewise.
      	(real_mode_pages): Likewise.
      	(prot_mode_pages): Likewise.
      	(linux_params): New var.
      	(linux_cmdline): Likewise.
      	(free_pages): Don't set real mode variables.
      	(allocate_pages): Don't allocate real mode memory.
      	(grub_e820_add_region): Remove the limit.
      	(grub_linux_boot): Allocate and copy real mode memory.
      	(grub_linux_unload): Free linux_cmdline.
      	(grub_cmd_linux): Use temporary storage for parameters.
      	(grub_cmd_initrd): Likewise.
      	* include/grub/i386/linux.h (GRUB_E820_MAX_ENTRY): Removed.
      	(linux_kernel_params): Make it 1K big.
      a4e5ca80
  27. 17 Apr, 2012 1 commit
  28. 11 Apr, 2012 1 commit
  29. 11 Mar, 2012 1 commit
  30. 07 Mar, 2012 1 commit