Permalink
Switch branches/tags
Nothing to show
Commits on Dec 3, 2013
  1. Add dummy target

    Matthew Garrett committed Dec 3, 2013
Commits on Jan 17, 2013
  1. x86: update x86_linux_header

    Update struct x86_linux_header with new fields, based on
    arch/x86/include/asm/bootparam.h as included in linux-3.7.
    Upcoming changes will use the payload_offset/payload_length fields.
    
    Signed-off-by: Olaf Hering <olaf@aepfle.de>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    olafhering committed with horms Jan 17, 2013
Commits on Jan 11, 2013
  1. kexec,i386: Remove unnecessary if condition check

    If we load the relocatable bzImage, the boot protocol must >= 2.05,
    So the if condition check is unnecessary.
    
    Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Zhang Yanfei committed with horms Jan 10, 2013
Commits on Dec 23, 2012
  1. build: Restrict scope of per-arch compiler flags

    Restrict the scope of compiler flags set in per-arch Makefiles
    to the architecture the Makefile belongs to.
    
    Signed-off-by: Simon Horman <horms@verge.net.au>
    horms committed Dec 23, 2012
  2. build: Use cross compiler's strip if available

    Signed-off-by: Simon Horman <horms@verge.net.au>
    horms committed Dec 23, 2012
  3. die: Use const for fmt

    Signed-off-by: Simon Horman <horms@verge.net.au>
    horms committed Dec 23, 2012
  4. kexec-zImage-arm: simply cmdline-related DTB resizing

    When resizing a dtb to add the command-line, only resize the DTB once,
    rather than once to add the /chosen node, and once to add the bootargs
    property.
    
    Also, simply add 1K of overhead (beyond strlen(cmdline)) to the buffer,
    to avoid requiring precise knowledge of the size impact of the requested
    FTB changes. In particular, some padding is performed when setting
    property values, which was not accounted for in the current code, which
    caused failures to set the bootargs values in some cases.
    
    Cc: Daniel Mack <zonque@gmail.com>
    Signed-off-by: Stephen Warren <swarren@nvidia.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    swarren committed with horms Dec 19, 2012
Commits on Dec 17, 2012
  1. kexec-elf-ppc: Fix crashkernel region overflow check

    Signed-off-by: Anders Hedlund <anders.j.hedlund@gmail.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    ahedlund committed with horms Dec 17, 2012
Commits on Dec 14, 2012
  1. kexec-zImage-arm: add code to support --command-line along with --dtb

    If --dtb is called together with --command-line, we need to modify the
    binary dtb buffer. Luckily, we have libfdt functions available, so this
    is straight forward.
    
    Signed-off-by: Daniel Mack <zonque@gmail.com>
    Tested-by: Sven Neumann <s.neumann@raumfeld.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    zonque committed with horms Dec 13, 2012
  2. fix message and indenting in putnode in ppc64

    Signed-off-by: Olaf Hering <olaf@aepfle.de>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    olafhering committed with horms Dec 13, 2012
  3. fixed strncat size argument on ppc64

    Signed-off-by: Olaf Hering <olaf@aepfle.de>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    olafhering committed with horms Dec 13, 2012
  4. fix comment typo in do_bzImage_load on x86

    Signed-off-by: Olaf Hering <olaf@aepfle.de>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    olafhering committed with horms Dec 13, 2012
  5. fix comment typo in locate_hole

    Signed-off-by: Olaf Hering <olaf@aepfle.de>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    olafhering committed with horms Dec 13, 2012
  6. Fix xen_cpuid() inline asm to not clobber stack's red zone

    Port xen-unstable changeset 24344:72f4e4cb7440 to kexec-tools:
    
      Pushing stuff onto the stack on x86-64 when we do not specify
      -mno-red-zone is unsafe. Since the complicated asm is due to register
      pressure on i386, we simply implement an all-new simpler alternative
      for x86-64.
    
    Signed-off-by: Olaf Hering <olaf@aepfle.de>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    olafhering committed with horms Dec 13, 2012
Commits on Dec 13, 2012
  1. ppc: exec stack fix

    execstack shows ppc kexec has an executable stack,
    this leaves it vulnerable to buffer overflows.
    
    Fix it by adding ASFLAGS --noexecstack
    
    Tested on PowerMac G4 Macmini:
    Without the patch:
    dave@darkstar:~/kexec-tools$ execstack build/sbin/kexec
    X build/sbin/kexec
    
    With the patch:
    dave@darkstar:~/kexec-tools$ execstack build/sbin/kexec
    - build/sbin/kexec
    
    Signed-off-by: Dave Young <dyoung@redhat.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    daveyoung committed with horms Dec 10, 2012
Commits on Dec 4, 2012
  1. kexec: Teach configure to find the strip binary.

    For some reason my version of the Makefile generated by configure
    included the line STRIP=strp.  Rerunning configure from a fresh slate
    did not regenerate that line so I don't know how it got there.  So add
    the code to Makefile.in and configure.ac to autodetect the strip binary.
    
    This is needed so that we can remove from purgatory all of the
    relocations to sections that are not needed at runtime, by stripping
    out those sections.
    
    Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
    [horms@verge.net.au: Omitted white-space only change to
                         purgatory/arch/x86_64/Makefile]
    Signed-off-by: Simon Horman <horms@verge.net.au>
    ebiederm committed with horms Dec 3, 2012
Commits on Dec 3, 2012
  1. kexec: Fix compile errors in crashdump-mips.c

    When building configured as '--host=mips64-octeon-linux-gnu' using
    GCC-4.7.0 there are two compile errors, fix them.
    
    Signed-off-by: David Daney <david.daney@cavium.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    David Daney committed with horms Nov 29, 2012
Commits on Nov 27, 2012
  1. fs2dt: check for initrd_size != 0 when adding initrd entries

    This prevents the creation of chosen/linux,initrd-{start,stop} entries
    with zero length.
    
    Signed-off-by: Daniel Mack <zonque@gmail.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    zonque committed with horms Nov 26, 2012
  2. fs2dt: fix basename string compares

    basename is initialized as
    
      basename = strrchr(pathname,'/') + 1;
    
    and does hence not contain the leading slash character.
    
    Signed-off-by: Daniel Mack <zonque@gmail.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    zonque committed with horms Nov 26, 2012
  3. kexec-tools 2.0.4-rc1.git

    Add .git to version so it doesn't look like a release.
    This is just so when people build code from git it can
    be identified as such from the version string.
    
    Signed-off-by: Simon Horman <horms@verge.net.au>
    horms committed Jan 31, 2012
Commits on Nov 21, 2012
  1. kexec-tools 2.0.4-rc1

    Signed-off-by: Simon Horman <horms@verge.net.au>
    horms committed Nov 21, 2012
  2. kexec x86_64: Make purgatory relocatable anywhere in the 64bit addres…

    …s space.
    
    Remove kexec/arch/i386/compat_x6_64.S
    purgatory/arch/i386/linux-entry16.S and purgatory/arch/i386/entry16.S
    Those were early attempts at entry32-16.S that should have been
    deleted long ago.
    
    Strip the purgatory code of debug symbols.  There is no need to carry
    debug symbols we will never use around in /sbin/kexec.
    
    On x86_64 use -mcmodel=large so that the code is built without
    any 32bit assumptions.  -mcmodel=medium and -mcmodel=small
    result int code that has 32bit relocations against variables
    that can live anywhere in the address space
    
    Modify the assembly in entry64.S and setup-x86_64.S to use %rip
    relative addressing of variables so no relocates are emitted.
    
    Modify entry64-32.S so that it does not have any relocations that can
    not be processed when purgatory is loaded above 4G.  entry64-32.S
    jumps to a 32bit entry point and can not itself be used above 4G so
    these changes merely prevent it from being a problem in the other case.
    
    eip is modifed to be a 64bit value of which only the low 32bits are
    exported outside of entry64-32.S
    
    The long mode exit code is modified to run with a %cs value whose
    base address is the address of the symbol entry32.  From there
    all of the 32bit code in entry64-32.S can read variables by reading
    them through %cs.  Until the final jump to the the target address
    which is made a far jump reloading %cs and the intstruction pointer.
    
    Modify entry32-16.S and entry32-16-debug.S to be position independent
    32bit code.  At their start make a short call to push the current value
    of %eip on the stack and pop it off.  Allowing the calculation of the
    address of entry16 which the code has always kept in %ebx.
    
    Update the pointer to the gdt in the gdt so that lgdt will work.
    
    Modify the instructions in entry32-16.S and entry32-16-debug.S so
    that the 32bit code uses offsets from %ebx which points at entry16.
    
    Tested-by: Yinghai Lu <yinghai@kernel.org>
    Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    ebiederm committed with horms Nov 19, 2012
Commits on Nov 14, 2012
  1. vmcore-dmesg: Determine correct machine pointer size

    A 32bit arch can prepare ELF64 headers. For example for PAE case to
    preresent file offsets 64bit but data size at the offset still remains
    32bit. If we just base our decision based on EI_CLASS, then we will try
    to read 64bit data from file and can run into various issues.
    
    We ran into following issue when we tried to run vmcore-dmesg on a 32bit
    PAE system vmcore which had 64bit elf headers.
    
    No program header covering vaddr 0xc0a6a688c0b89100found kexec bug?
    
    Basically we try to read value of log_buf variable from address
    log_buf_vaddr. We read in 64bit value and then pass that value again
    to vaddr_to_offset() in an attempt to get to actual log_buf start
    and get error message.
    
    So determine the machine pointer size based on ELF class and arch and read
    the bytes from file accordingly.
    
    v2: Fixed the code as per suggestion from Eric.
    
    Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
    Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
    Acked-by: Dave Young <dyoung@redhat.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    rhvgoyal committed with horms Nov 13, 2012
Commits on Nov 8, 2012
  1. ppc/uImage: Find new kernel load_addr if the default addr is not avai…

    …lable
    
    If the kernel cannot be loaded at the default load_addr, provided
    by the image, we should try finding a free area using locate_hole().
    This is usually applicable for the CRASH case, where the memory should
    be located in the reserved region.
    
    Without this patch, sometime the kernel fails to load for uImage formatted
    relocatable kernel images.
    
    Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
    Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Cc: Matthew McClintock <msm@freescale.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Suzuki K. Poulose committed with horms Nov 7, 2012
Commits on Oct 19, 2012
  1. kdump: pass acpi_rsdp= to 2nd kernel for efi booting

    In case efi booting, kdump need kernel parameter acpi_rsdp= to retrieve
    the acpi root table physical address.
    
    Add a function cmdline_add_efi to get the address from /sys/firmware/efi/systab
    If there's no such file or read fail the function will just do nothing.
    
    Tested efi boot Fedora 17 on thinkpad T420.
    
    Some background info for this issue:
    http://lists.infradead.org/pipermail/kexec/2010-March/003889.html
    
    [v1 -> v2]:
    Address comments from Khalid and Simon
    use fgets instead of read(2) to iterate the file
    do not add 'noefi' because kexec does not construct EFI signature
    in bootloader signature in boot_params, so kexec'd kernel will
    disable EFI automatically even without noefi.
    
    Signed-off-by: Dave Young <dyoung@redhat.com>
    Reviewed-by: Khalid Aziz <khalid@gonehiking.org>
    Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    daveyoung committed with horms Oct 18, 2012
Commits on Oct 11, 2012
  1. kexec: fix Makefile.in binaries_arch

    Definitions of BINARIES_ARCH in Makefile.in seems to have been broken since commit 0775c60.
    
    Signed-off-by: Tony Jones <tonyj@suse.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    jones-tony committed with horms Oct 10, 2012
Commits on Sep 18, 2012
  1. kexec: Define some constants and structures conditionally

    Some definitions in include/x86/x86-linux.h conflicts
    with definitions placed in Xen headers. Make them
    conditional. This patch is required by future
    Xen kdump fixes.
    
    Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Daniel Kiper committed with horms Sep 10, 2012
  2. xen: Fix Xen kdump support

    get_crash_memory_ranges() is unreliable under Xen. Proper machine
    memory map could be obtained under Xen by calling __HYPERVISOR_memory_op
    hypercall with XENMEM_machine_memory_map argument. get_crash_memory_ranges_xen()
    does that. It is implemented using ioctl() or libxenctrl interface.
    This solution is compatible with 3.x and 4.x Xen versions.
    
    Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Daniel Kiper committed with horms Sep 10, 2012
  3. kexec: Move crash memory ranges logging

    Move crash memory ranges logging from get_crash_memory_ranges()
    to load_crashdump_segments(). This solution will be used by
    fixed Xen kdump support, too.
    
    Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Daniel Kiper committed with horms Sep 10, 2012
  4. kexec: Get backup area start address and size directly from mem_range

    Get backup area start address and size directly from mem_range.
    Under Xen /proc/iomem contains invalid values.
    
    Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Daniel Kiper committed with horms Sep 10, 2012
  5. kexec: Add segregate_lowmem_region()

    Extract code segregating lowmem region and move it to new
    segregate_lowmem_region(). This function will be used by
    fixed Xen kdump support, too.
    
    Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Daniel Kiper committed with horms Sep 10, 2012
  6. kexec: Move crash kernel area placement and size detection to is_cras…

    …hkernel_mem_reserved()
    
    Move crash kernel area placement and size detection
    from get_crash_memory_ranges() to is_crashkernel_mem_reserved().
    Former one will not be used by fixed Xen kdump support.
    
    Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Daniel Kiper committed with horms Sep 10, 2012
  7. xen: Rename e820_to_kexec_type() to xen_e820_to_kexec_type() and expo…

    …rt it
    
    Rename e820_to_kexec_type() to xen_e820_to_kexec_type() and export it.
    
    Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Daniel Kiper committed with horms Sep 10, 2012
Commits on Sep 12, 2012
  1. ARM: Add device tree support to the ARM platform

    To allow newer ARM platforms to use kexec, pass device tree
    information to the kernel during boot.
    
    By default the dtb is found from /proc/device-tree. A user can specify
    a dtb file or use legacy ATAGs
    
    Signed-off-by: Matthew Leach <matthew.leach@arm.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Matthew Leach committed with horms Sep 7, 2012
  2. arm: Make use of memory_ranges

    Make use of struct memory_ranges and provide a global usablemem_rgns.
    This is in preparation for adding device tree support.
    
    Signed-off-by: Simon Horman <horms@verge.net.au>
    horms committed Sep 7, 2012