1. 14 Oct, 2014 1 commit
  2. 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: 's avatarPeter Jones <pjones@redhat.com>
      631a8200
  3. 23 Mar, 2013 1 commit
  4. 05 Mar, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * include/grub/misc.h (ALIGN_UP_OVERHEAD): New define. · 1a2fd1e6
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/loader/i386/linux.c (grub_cmd_initrd): Align initrds at 4.
      	* grub-core/loader/i386/pc/linux.c (grub_cmd_initrd): Likewise.
      	* grub-core/loader/ia64/efi/linux.c (grub_cmd_initrd): Likewise.
      	* grub-core/loader/mips/linux.c (grub_cmd_initrd): Likewise.
      	* grub-core/loader/powerpc/ieee1275/linux.c (grub_cmd_initrd): Likewise.
      	* grub-core/loader/sparc64/ieee1275/linux.c (grub_cmd_initrd): Likewise.
      1a2fd1e6
  5. 26 Feb, 2012 1 commit
  6. 10 Feb, 2012 2 commits
    • Vladimir 'phcoder' Serbinenko's avatar
      Increase warning level. · ebcecdf1
      Vladimir 'phcoder' Serbinenko authored
      	* conf/Makefile.common (CFLAGS_GNULIB): Add -Wno-redundant-decls
      	-Wno-unreachable-code -Wno-conversion -Wno-old-style-definition.
      	* configure.ac (HOST_CFLAGS): Add bunch of -W arguments.
      	(TARGET_CFLAGS): Likewise.
      	(HOST_CFLAGS): Add -Werror unless --disable-werror is activated.
      	* grub-core/Makefile.core.def (decompressor_xz): Add
      	-Wno-unreachable-code.
      	(normal): Add -Wno-redundant-decls.
      	(xzio): Add -Wno-unreachable-code.
      	(lzopio): Add -Wno-redundant-decls -Wno-error.
      	* grub-core/commands/acpi.c: Add exception to -Wcast-align.
      	* grub-core/commands/lsacpi.c: Add exception to -Wcast-align.
      	* grub-core/gensymlist.sh: Add exception to -Wmissing-format-attribute.
      	* grub-core/kern/dl.c: Add exception to -Wcast-align.
      	* grub-core/kern/efi/efi.c (grub_efi_modules_addr): Likewise.
      	* grub-core/kern/i386/coreboot/init.c: Add exception to
      	-Wsuggest-attribute=noreturn.
      	* grub-core/kern/ia64/dl.c: Add exception to -Wcast-align.
      	* grub-core/kern/ia64/dl_helper.c: Likewise.
      	* grub-core/kern/mips/dl.c: Likewise.
      	* grub-core/kern/sparc64/dl.c: Likewise.
      	* grub-core/lib/LzmaEnc.c: Add exception to -Wshadow.
      	* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (memcpy): Likewise.
      	(memcmp): Likewise.
      	* grub-core/lib/pbkdf2.c: Add exception to -Wunreachable-code.
      	* grub-core/loader/ia64/efi/linux.c: Add exception to -Wcast-align.
      	* grub-core/loader/mips/linux.c: Likewise.
      	* grub-core/loader/multiboot_elfxx.c: Likewise.
      	* grub-core/script/parser.y: Add exception to -Wunreachable-code.
      	* grub-core/video/sm712.c: Add exception to -Wcast-align.
      	* util/import_gcry.py: Add -Wno-cast-align to modules checked by hand.
      	* grub-core/font/font.c (grub_font_loader_init): Add explicit cast and
      	fixme.
      	* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
      	* grub-core/kern/i386/multiboot_mmap.c (grub_machine_mmap_init):
      	Fix prototype.
      ebcecdf1
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix printf. · 44c6828d
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/loader/ia64/efi/linux.c (grub_cmd_fpswa): Likewise.
      44c6828d
  7. 09 Feb, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Remove "payload" command in ia64 Linux loader since I couldn't · 690c531f
      Vladimir 'phcoder' Serbinenko authored
      	find any evidence of it being used for anything.
      	Replace "relocate" command with an environment variable
      
      	* grub-core/loader/ia64/efi/linux.c (ia64_boot_param): Remove extra
      	fields.
      	(ia64_boot_payload): Removed.
      	(last_payload): Likewise.
      	(RELOCATE_OFF): Likewise.
      	(RELOCATE_ON): Likewise.
      	(RELOCATE_FORCE): Likewise.
      	(relocate): Likewise.
      	(free_pages): Don't free payloads.
      	(grub_load_elf64): Use common error messages.
      	Use "linux_relocate" variable.
      	Increase the space after boot_params.
      	(grub_cmd_payload): Removed.
      	(grub_cmd_relocate): Likewise.
      	(grub_cmd_fpswa): Improve messages.
      	(cmd_payload): Removed.
      	(cmd_relocate): Likewise.
      	(GRUB_MOD_INIT): Don't register "payload" and "relocate".
      	(GRUB_MOD_FINI): Don't unregister "payload" and "relocate".
      690c531f
  8. 08 Feb, 2012 1 commit
  9. 05 Feb, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Clarify and unify messages. · b525fd83
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/commands/hashsum.c (options): Unify messages.
      	* grub-core/commands/keystatus.c (GRUB_MOD_INIT): Don't mark a
      	literal-only message as translatable.
      	* grub-core/commands/lsacpi.c (GRUB_MOD_INIT): Likewise.
      	* grub-core/loader/ia64/efi/linux.c (GRUB_MOD_INIT): Likewise.
      	* grub-core/commands/legacycfg.c (GRUB_MOD_INIT): Add quoting around
      	commands.
      	* grub-core/commands/menuentry.c (options): Clarify that it's a keyboard
      	key, not the key used to unlock. Clarify what it's used for.
      	* grub-core/kern/emu/hostdisk.c (read_device_map): Unify error message.
      	* grub-core/loader/xnu.c (grub_xnu_load_driver): Remove erroneous colon.
      	* grub-core/script/main.c (GRUB_MOD_INIT): Clarify [n] to be [NUM].
      	* util/grub-editenv.c (options): Unify "verbose" message.
      	* util/grub-fstest.c (read_file): Unify error message.
      	(fstest): Add quotes around commands.
      	(options): Unify "verbose" message.
      	* util/grub-install.in: Add quotes around variable name.
      	* util/grub-kbdcomp.in: Unify error message.
      	* util/grub-mkfont.c (main): Likewise.
      	* util/grub-mkrescue.in: Likewise.
      	* util/grub-mklayout.c (options): Unify "verbose" message.
      	* util/grub-mkstandalone.in: Unify help and verbose messages.
      	* util/grub-mount.c (options): Unify "verbose" message.
      	* util/grub-probe.c (options): Likewise.
      	* util/grub-script-check.c (options): Likewise.
      	* util/grub-setup.c (setup): Unify no-terminator message.
      	(options): Use DEVICE and not DEV.
      	Unify "verbose" message.
      	* util/ieee1275/ofpath.c (xrealpath): Unify error message.
      b525fd83
  10. 03 Feb, 2012 2 commits
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/loader/ia64/efi/linux.c (find_mmap_size): Replace fatal with · 347998c2
      Vladimir 'phcoder' Serbinenko authored
      	error.
      	(allocate_pages): Check return value.
      	Replace fatal with error.
      	(grub_linux_boot): Replace printf with dprintf.
      	Check find_mmap_size return value.
      	Replace fatal with error.
      	Don't call grub_machine_fini.
      	(grub_load_elf64): Replace printf with dprintf.
      	(grub_cmd_linux): Likewise.
      	(grub_cmd_initrd): Likewise.
      	(grub_cmd_payload): Likewise.
      347998c2
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/commands/ls.c: Gettextize. · 4a9f8346
      Vladimir 'phcoder' Serbinenko authored
              * grub-core/commands/setpci.c: Likewise.
              * grub-core/commands/videotest.c: Likewise.
              * grub-core/disk/geli.c: Likewise.
              * grub-core/kern/mm.c: Likewise.
              * grub-core/lib/relocator.c: Likewise.
              * grub-core/loader/efi/appleloader.c: Likewise.
              * grub-core/loader/i386/xnu.c: Likewise.
              * grub-core/loader/ia64/efi/linux.c: Likewise.
              * grub-core/loader/xnu.c: Likewise.
              * grub-core/net/dns.c: Likewise.
              * grub-core/net/net.c: Likewise.
              * grub-core/script/lexer.c: Likewise.
              * grub-core/script/parser.y: Likewise.
              * grub-core/script/yylex.l: Likewise.
              * util/getroot.c: Likewise.
              * util/grub-setup.c: Likewise.
      4a9f8346
  11. 14 Jan, 2012 1 commit
  12. 13 Jan, 2012 1 commit
  13. 26 Dec, 2011 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Don't override more informative errors. · 7a45a539
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/commands/acpi.c (grub_cmd_acpi): Don't override errors.
      	* grub-core/font/font.c (open_section): Likewise.
      	* grub-core/loader/i386/bsd.c (grub_bsd_load_aout): New argument
      	filename. Don't override errors.
      	(grub_cmd_openbsd_ramdisk): Don't override errors.
      	* grub-core/loader/i386/linux.c (grub_cmd_linux): Likewise.
      	(grub_cmd_initrd): Likewise.
      	* grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
      	(grub_cmd_initrd): Likewise.
      	* grub-core/loader/ia64/efi/linux.c (grub_load_elf64): Likewise.
      	(grub_cmd_linux): Likewise.
      	(grub_cmd_initrd): Likewise.
      	(grub_cmd_payload): Likewise.
      	* grub-core/loader/mips/linux.c (grub_cmd_initrd): Likewise.
      	* grub-core/loader/multiboot.c (grub_cmd_multiboot): Likewise.
      	(grub_cmd_module): Likewise.
      	* grub-core/loader/powerpc/ieee1275/linux.c (grub_cmd_initrd): Likewise.
      	* grub-core/loader/sparc64/ieee1275/linux.c (grub_cmd_initrd): Likewise.
      	* grub-core/loader/xnu.c (grub_xnu_load_driver): Likewise.
      	(grub_cmd_xnu_mkext): Likewise.
      	(grub_cmd_xnu_ramdisk): Likewise.
      	(grub_xnu_check_os_bundle_required): Likewise.
      	(grub_xnu_load_kext_from_dir): Likewise.
      	(grub_cmd_xnu_kextdir): Likewise.
      	* grub-core/loader/xnu_resume.c (grub_xnu_resume): Likewise.
      7a45a539
  14. 24 Jun, 2011 1 commit
  15. 03 Jan, 2011 1 commit
  16. 01 Sep, 2010 3 commits