Commit Graph

638 Commits

Author SHA1 Message Date
Dave Young 06b35b224d Release 2.0.15-4 2017-07-19 09:56:07 +08:00
Dave Young 06c776f36b Release 2.0.15-3 2017-07-14 16:07:11 +08:00
Dave Young 151e0b5345 Release 2.0.15-2 2017-06-28 14:36:01 +08:00
Pratyush Anand 7845cdd89c aarch64: Add makedumpfile executable
Add makedumpfile executable for aarch64 as well.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2017-06-28 14:35:42 +08:00
Dave Young ff28c8fe08 Release kexec-tools 2.0.15-1 2017-06-23 11:33:25 +08:00
Dave Young d6dfe2cc1e Release 2.0.14-13 2017-06-15 09:43:11 +08:00
Bhupesh Sharma f513f035f3 kexec-tools.spec: Fix whitespace errors
This patch fixes the whitespace errors reported by
'rpmlint' or 'fedpkg lint' when they are run on kexec-tools srpm:

kexec-tools.spec:242: W: mixed-use-of-spaces-and-tabs (spaces: line 107,
tab: line 242)

Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2017-06-15 09:41:33 +08:00
Dave Young 70a9f58336 Release 2.0.14-12 2017-05-18 16:50:48 +08:00
Dave Young b74479521c Release 2.0.14-11 2017-05-12 11:00:23 +08:00
Dave Young c3ab408727 Release 2.0.14-10
Speedup kdump service startup
2017-05-05 16:16:25 +08:00
Dave Young 841ea5be0b Release 2.0.14-9 2017-04-27 14:01:45 +08:00
Dave Young 414b2a7dbb Release 2.0.14-8 2017-04-11 16:33:38 +08:00
Dave Young 961bda9152 Release 2.0.14-7 2017-03-31 11:57:36 +08:00
Xunlei Pang 5c87d73cf3 kdump-emergency: fix "Transaction is destructive" emergency failure
We met a problem that the kdump emergency service failed to
start when the target dump timeout(we passed "rd.timeout=30"
to kdump), it reported "Transaction is destructive" messages:

  [ TIME ] Timed out waiting for device dev-mapper-fedora\x2droot.device.
  [DEPEND] Dependency failed for Initrd Root Device.
  [ SKIP ] Ordering cycle found, skipping System Initialization
  [DEPEND] Dependency failed for /sysroot.
  [DEPEND] Dependency failed for Initrd Root File System.
  [DEPEND] Dependency failed for Reload Configuration from the Real Root.
  [ SKIP ] Ordering cycle found, skipping System Initialization
  [ SKIP ] Ordering cycle found, skipping Initrd Default Target
  [DEPEND] Dependency failed for File System Check on /dev/mapper/fedora-root.
  [  OK  ] Reached target Initrd File Systems.
  [  OK  ] Stopped dracut pre-udev hook.
  [  OK  ] Stopped dracut cmdline hook.
           Starting Setup Virtual Console...
           Starting Kdump Emergency...
  [  OK  ] Reached target Initrd Default Target.
  [  OK  ] Stopped dracut initqueue hook.
  Failed to start kdump-error-handler.service: Transaction is destructive.
  See system logs and 'systemctl status kdump-error-handler.service' for details.
  [FAILED] Failed to start Kdump Emergency.
  See 'systemctl status emergency.service' for details.
  [DEPEND] Dependency failed for Emergency Mode.

This is because in case of root failure, initrd-root-fs.target
will trigger systemd emergency target which requires the systemd
emergency service actually is kdump-emergency.service, then our
kdump-emergency.service starts kdump-error-handler.service with
"systemctl isolate"(see 99kdumpbase/kdump-emergency.service, we
replace systemd's with this one under kdump).

This will lead to systemd two contradictable jobs queued as an
atomic transaction:
job 1) the emergency service gets started by initrd-root-fs.target
job 2) the emergency service gets stopped due to "systemctl isolate"
thereby throwing "Transaction is destructive".

In order to solve it, we can utilize "IgnoreOnIsolate=yes" for both
kdump-emergency.service and kdump-emergency.target. Unit with attribute
"IgnoreOnIsolate=yes" won't be stopped when isolating another unit,
they can keep going as expected in case be triggered by any failure.

We add kdump-emergency.target dedicated to kdump the similar way
as did for kdump-emergency.service(i.e. will replace systemd's
emergency.target with kdump-emergency.target under kdump), and
adds "IgnoreOnIsolate=yes" into both of them.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Acked-by: Pratyush Anand <panand@redhat.com>
[bhe: improve the patch log about IgnoreOnIsolate="]
2017-03-31 11:54:30 +08:00
Dave Young 00ed76e7e2 Release 2.0.14-6 2017-03-17 10:21:49 +08:00
Pratyush Anand 86a81de3e5 Fix `makedumpfile --mem-usage /proc/kcore`
Patches have been taken from kexec-tools and makedumpfile to fix issue
with `makedumpfile --mem-usage /proc/kcore`.

Two of the patches is from kexec-tools and rest are from makedumpfile.
All the patches have been acked upstream and applies without conflict.

Kexec-tools patches:
(kexec-tools-2.0.14-x86-x86_64-Fix-format-warning-with-die.patch), which
fixes koji build issue.

kexec-tools-2.0.14-build_mem_phdrs-check-if-p_paddr-is-invalid.patch fixes
the regresssion caused by kernel /proc/kcore fix to use -1 as default value
of p_paddr for pt_loads. Without his patch kexec -p will fail with latest
kernel.

Other makedumpfile patches are backported to support --mem-usage while
kernel kaslr being enabled. Details please see the patch log of the individual
patches.

All the patches are backport of upstream commits.

Patches has been tested with kernel 4.11.0-0.rc1.git0.1.fc26.x86_64.

    # makedumpfile --mem-usage /proc/kcore -f
    The kernel version is not supported.
    The makedumpfile operation may be incomplete.

    TYPE            PAGES                   EXCLUDABLE      DESCRIPTION
    ----------------------------------------------------------------------
    ZERO            1960                    yes             Pages filled
    with zero
    NON_PRI_CACHE   22850                   yes             Cache pages
    without private flag
    PRI_CACHE       1517                    yes             Cache pages with
    private flag
    USER            32522                   yes             User process
    pages
    FREE            1898981                 yes             Free pages
    KERN_DATA       78721                   no              Dumpable kernel
    data

    page size:              4096
    Total pages on system:  2036551
    Total size on system:   8341712896       Byte

We won't need to pass -f once fedora kernel is rebased with v4.12.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2017-03-17 10:14:17 +08:00
Dave Young bbe10baeb2 Release 2.0.14-5 2017-03-09 16:59:31 +08:00
Dave Young 00bd88cd58 Release 2.0.14-4 2017-01-23 16:00:59 +08:00
Tong Li 1c27a3d827 drop kdump script rhcrashkernel-param in kexec-tools repo
Resolves: bz1399436

Since currently crashkernel= will be handled in kdump anaconda addon
we can safely remove rhcrashkernel-param callback.

Signed-off-by: Tong Li <tonli@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2017-01-23 15:59:47 +08:00
Dave Young 769e1d53c6 Release 2.0.14-3 2017-01-04 15:00:49 +08:00
Dave Young bd8a109b91 Rebase makedumpfile 1.6.1
Rebase makedumpfile to 1.6.1 and drop the upstreamed patches

Signed-off-by: Dave Young <dyoung@redhat.com>
2017-01-04 14:58:56 +08:00
Dave Young abfed0b6d6 Release 2.0.14-2
Fix build error, forgot to update anaconda addon file in rpm spec.
Update changelog etc.
2016-12-20 17:45:45 +08:00
Dave Young 6cd80235c6 Update addon tarball in rpm spec
Previously forgot to update addon file name in rpm spec..
Signed-off-by: Dave Young <dyoung@redhat.com>
2016-12-20 17:43:09 +08:00
Dave Young 986a4999d4 Release 2.0.14-1
Rebase kexec-tools to upstream 2.0.14

Signed-off-by: Dave Young <dyoung@redhat.com>
2016-12-20 17:09:40 +08:00
Dave Young 8cfb265790 Release 2.0.13-9 2016-11-28 10:43:20 +08:00
Dave Young 4137ad43c3 Release 2.0.13-8 2016-11-11 14:15:42 +08:00
Dave Young 9a1312a624 kexec/arch/i386: Add support for KASLR memory randomization
Backport upstream kexec-tools commit for correct kaslr page_offset value
commit 9f62cbddddfc93d78d9aafbddf3e1208cb242f7b
Author: Thomas Garnier <thgarnie@google.com>
Date:   Tue Sep 13 15:10:05 2016 +0800

    kexec/arch/i386: Add support for KASLR memory randomization

    Multiple changes were made on KASLR (right now in linux-next). One of
    them is randomizing the virtual address of the physical mapping, vmalloc
    and vmemmap memory sections. It breaks kdump ability to read physical
    memory.

    This change identifies if KASLR memories randomization is used by
    checking if the page_offset_base variable exists. It search for the
    correct PAGE_OFFSET value by looking at the loaded memory section and
    find the lowest aligned on PUD (the randomization level).

    Related commits on linux-next:
     - 0483e1fa6e09d4948272680f691dccb1edb9677f: Base for randomization
     - 021182e52fe01c1f7b126f97fd6ba048dc4234fd: Enable for PAGE_OFFSET

    Signed-off-by: Thomas Garnier <thgarnie@google.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
2016-11-11 14:14:59 +08:00
Dave Young 50c70debae Update kdump anaconda addon
*) Add support for new Anaconda addon methods (#1288636)
*) update latin translation (#1053550)

Signed-off-by: Dave Young <dyoung@redhat.com>
2016-11-11 11:03:59 +08:00
Tong Li 7e53e9fe38 Documentation: step by step guide on confiuring kdump in live images
This is a short document about how to setup kdump on live images. All
steps were tested on Fedora 25 Alpha LiveCD and saved vmcore captured
by kdump to a USB stick successfully.

Signed-off-by: Tong Li <tonli@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2016-11-11 10:56:11 +08:00
Dave Young 11785bdffb Release 2.0.13-7 2016-10-27 14:52:32 +08:00
Pratyush Anand 938280a5e9 x86_64: fix page_offset calculation
V1 of the KASLR patch which was backported in 2.0.13-6 had wrong
calculation for page_offset. This patch takes the correct difference.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2016-10-27 14:52:15 +08:00
Dave Young f77aa85025 Release 2.0.13-6 2016-10-27 14:44:27 +08:00
Pingfan Liu aee378209e Add initial upstream support for kexec on aarch64
Fix Bug 925630 - kexec-tools: support for arm64
https://bugzilla.redhat.com/show_bug.cgi?id=925630
involves three things:
  1. back porting upstream code to enable the function of kexec-tools on arm64
     patchset backported from upstream:
        commit abdfe97736f89d9bc73662b9134604b0229a599e
        commit 522df5f7217fda01ece3f6ac3e9987b0320c2bb0
        commit 217bcc00c9309416a6c6cd0584196559d28a9259
  2. fix the arm related building issue by using autoreconf in spec file

  3. patches to fix the issue of higher version gcc used by koji (not upstrem yet,
     and the corresponding fix in kernel side is in other package)
        kexec-tools-2.0.13-arm64-Add-support-for-additional-relocations-in-the-kexec-purgatory-code.patch
        kexec-tools-2.0.13-arm64-Add-support-of-R_AARCH64_PREL32-relocation-in-.patch
[panand: apply patches in 3 of above paragraph]

Signed-off-by: Pingfan Liu <piliu@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Acked-by: Pratyush Anand <panand@redhat.com>
2016-10-27 14:44:13 +08:00
Dave Young 658db69940 Support kdump for kaslr enabled Fedora kernel
Since in Fedora 25 kernel kaslr is enabled (x86) but makedumpfile can not save
a correct vmcore, so it means kdump default setup will not work.

Pratyush posted a patch series to upstream which can fix the issue. Let's merge them in F25, will get the normal fixes after it being merged in upstream, we hopefully can rebase soon in rawhide.

This is an urgent fix for F25 since F25 freeze is this week.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Pratyush Anand <panand@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
2016-10-27 14:44:02 +08:00
Dave Young f583213ea4 Release 2.0.13-5 2016-09-16 15:43:52 +08:00
Dave Young fdd79a70f6 Release 2.0.13-4 2016-08-26 14:05:37 +08:00
Xunlei Pang d614274092 spec: Update to add dependency on dracut version >= 044-117
Fedora dracut-network version >= 044-117 must be installed to work with
this set of kexec-tools patches. Therefore adding dependency for them.

Acked-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2016-08-26 14:03:48 +08:00
Dave Young 8e669fa5dd Release 2.0.13-3 2016-08-09 15:42:46 +08:00
Dave Young 97581f1a43 Fix armv7 build failure
Upstream kexec-tools 2.0.13 tarball does not pack arm phys_to_virt.h and
iomem.h, add them to avoid armv7 build failure.
2016-08-09 15:42:39 +08:00
Dave Young 3638e9e3a5 Release 2.0.13-2 2016-08-09 14:34:10 +08:00
Dave Young ba543e01ed 2.0.13-1 build fail due to patches can not applied. Drop the old patches now.
They have been included in 2.0.13
2016-08-09 14:34:01 +08:00
Dave Young 4ef632e2fb Release 2.0.13-1
Rebase kexec-tools 2.0.13
2016-08-09 14:08:28 +08:00
Dave Young da25b9432d Release 2.0.12-10 2016-07-21 15:01:42 +08:00
Pratyush Anand 4179337294 spec: Update to add dependency on dracut version >= 044-75
Fedora dracut version >= 044-75 must be installed to work with this set of
kexec-tools patches. Therefore adding dependency for them.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2016-07-21 13:56:20 +08:00
Dave Young 3859893fee Release 2.0.12-9 2016-07-13 11:22:42 +08:00
Pratyush Anand 5d1e6f1b0b makedumpfile: Support _count -> _refcount rename in struct page
Resolves: bz1342744

Upstream:
2c21d4656e

Signed-off-by: Pratyush Anand <panand@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2016-07-13 11:14:56 +08:00
Dave Young 48f26ff755 Update kdump anaconda addon
Use our own code to get system total memory from /proc/meminfo because the
callback to pyanaconda sometimes cause installation hangs.

Signed-off-by: Dave Young <dyoung@redhat.com>
2016-07-13 11:13:02 +08:00
Dave Young 69d27ce34e Release 2.0.12-8 2016-07-06 10:11:16 +08:00
Dave Young 6a4e1164dc Rebase makedumpfile 1.6.0 2016-07-06 10:08:51 +08:00
Dave Young 5b4ce07af0 Release 2.0.12-7
Fix invalid date in rpm spec file.
2016-06-27 15:58:28 -04:00
Dave Young f629c84941 Release 2.0.12-6 2016-06-28 03:43:03 +08:00
Dave Young 59c0a16dc6 Release 2.0.12-5 2016-06-06 13:08:15 +08:00
Dave Young 56d592d976 Release 2.0.12-4 2016-05-30 13:23:53 +08:00
Dave Young 1b4191ed18 Update kdump anaconda addon
Show range of valid reserved memory values in TUI:
https://github.com/daveyoung/kdump-anaconda-addon/pull/10
2016-05-30 13:23:37 +08:00
Dave Young 698fc10076 Release 2.0.12-3
Update kdump anaconda addon to adapt to blivet-2.0 API
See below pull request:
https://github.com/daveyoung/kdump-anaconda-addon/pull/8

Signed-off-by: Dave Young <dyoung@redhat.com>
2016-03-29 17:14:19 +08:00
Dave Young fcc71ad6ef Release 2.0.12-2 2016-03-25 10:36:09 +08:00
Dave Young 59c1aab531 ppc64le: fix kexec hang due to ppc64 elf abi breakage
Fedora bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1310495

kexec kernel hangs in ppc64le test. It is caused by kexec does not support
abi v2 properly.

Backport upstream patches below fixes the issue:
There is no code conflicts.

commit 3debb8cf3272216119cb2e59a4963ce3c18fe8e3
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Feb 26 18:06:15 2016 +1100

    Properly align powerpc64 .toc

    gcc leaves .toc byte aligned, relying on the linker to align the section.

        * kexec/arch/ppc64/kexec-elf-rel-ppc64.c (machine_verify_elf_rel):
        Fudge alignment of .toc section.

    Signed-off-by: Alan Modra <amodra@gmail.com>
    Signed-off-by: Anton Blanchard <anton@samba.org>
    Tested-by: Dave Young <dyoung@redhat.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>

commit 1e423dc297d10eb7ff25c829d2856ef12fc81d77
Author: Anton Blanchard <anton@samba.org>
Date:   Fri Feb 26 18:04:16 2016 +1100

    ppc64: purgatory: Handle local symbols in ELF ABIv2

    The PowerPC64 ELF ABIv2 has the concept of global and local symbols
    and information on this is encoded in sym->st_other. When doing a
    R_PPC64_REL24 branch we want to hit the local entry point, so adjust
    it as necessary.

    Signed-off-by: Anton Blanchard <anton@samba.org>
    Tested-by: Dave Young <dyoung@redhat.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>

commit 4a2ae3a39c64dc43e9d094be9541253234ff4822
Author: Anton Blanchard <anton@samba.org>
Date:   Fri Feb 26 18:03:11 2016 +1100

    Pass struct mem_sym into machine_apply_elf_rel()

    On PowerPC64 ABIv2 we need to look at the symbol to determine
    if it has a local entry point. Pass struct mem_sym into
    machine_apply_elf_rel() so we can.

    Signed-off-by: Anton Blanchard <anton@samba.org>
    Tested-by: Dave Young <dyoung@redhat.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Xunlei Pang <xlpang@redhat.com>
2016-03-25 10:35:44 +08:00
Dave Young 962f4d9d16 Release 2.0.12-1
Rebase to upstream 2.0.12
2016-03-22 17:00:57 +08:00
Dennis Gilmore 1ee26c817f - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 01:56:18 +00:00
Dave Young 5bb315a9a4 Release 2.0.11-3 2015-12-11 15:24:54 +08:00
Dave Young 49b222871a fix bogus date in changelog 2015-11-19 11:30:36 +08:00
Dave Young d94d7f3ccc Release 2.0.11-2
Rebase makedumpfile 1.5.9

Signed-off-by: Dave Young <dyoung@redhat.com>
2015-11-19 11:23:05 +08:00
Dave Young 1b6121d5d3 Release 2.0.11-1 2015-11-09 10:37:30 +08:00
Dave Young ee540e62a3 Release 2.0.10-9 2015-10-19 10:39:22 +08:00
Dave Young 77951bf1d3 Release 2.0.10-8 2015-09-08 14:03:57 +08:00
Dave Young f85fd280f3 Update kdump anaconda addon
Pulled below commit from Martin Kolman:

commit 0c68135bd14788bc6b3f7f901eb2d2cb8ba76f79
Author: Martin Kolman <martin.kolman@gmail.com>
Date:   Mon Sep 7 14:46:42 2015 +0200

    Don't put options after the %end of the %addon section

    Otherwise the installation describing kickstart will not be valid.
    This can resulting in various issues such, as Initial Setup refusing
    to run due to invalid kickstart file.
2015-09-08 14:02:19 +08:00
Dave Young 0c5372e80b Release 2.0.10-7 2015-08-19 14:18:57 +08:00
Dangyi Liu 37dc7c286c kdumpctl: Add man page for kdumpctl
kdumpctl is useful sometimes when users want to debug or setup ssh key
authentication. So add a man page for it.

Signed-off-by: Dangyi Liu <dliu@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Pratyush Anand <panand@redhat.com>
2015-08-19 14:15:34 +08:00
Baoquan He 54747162a3 Release 2.0.10-6 2015-08-13 15:55:08 +08:00
Dave Young 4a505f62a9 Release 2.0.10-5 2015-08-04 13:32:53 +08:00
Dave Young 579e1725d0 Update kdump addon
Moving isys.total_memory() call to class method to avoid installation hangs.
It is possible because totoal_memory will call log.info which need log lock.
but some loging function need import gettext module which need import lock.
Thus deadlock could happen.

Moved isys.total_memory callback to class method instead.
2015-08-04 13:28:53 +08:00
Dave Young 87d25d54e5 Release 2.0.10-4 2015-07-28 12:47:50 +08:00
Dave Young 970cb6124f Release 2.0.10-3 2015-07-23 10:56:36 +08:00
Dave Young 67b4f6ba91 Update kdump addon
Updated kdump addon icon again, Máirín Duffy designed a better icon,
it shows a little blip in a heart beat with a magnifying class examining
it, it uses components of the gnome-symbolic-theme so it would match the
other icons in the hub.
2015-07-23 10:51:47 +08:00
Dave Young 5380af665d Release 2.0.10-2
Update kdump addon icon
2015-07-13 11:08:55 +08:00
Dave Young 35dd19e611 Release 2.0.10-1
Rebase kexec-tools to 2.0.10
Drop unused 2.0.7 patches in git tree
2015-07-09 09:38:30 +08:00
Dave Young 2b76613fc9 Rebase eppic library to upstream 050615
Upstream tree: https://code.google.com/p/eppic/
There's below changes vs previous version:
1) fix compile issues with gdb 7.6
2) fix compile warnings
3) Support for ARM64

Tested by Pratyush.

Signed-off-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Pratyush Anand <panand@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
2015-07-09 09:29:10 +08:00
Dave Young e9ee834802 Release 2.0.9-2
Koji build add extra cflags automaticlly, this cause wrong kexec purgatory
Pre Peter Robinson's suggestion, add below in spec file:
%undefine _hardened_build

Also removes extra -FPIC ldflags since there's no such options in upstream makedumpfile.

Resolves: bz1236456

Signed-off-by: Dave Young <dyoung@redhat.com>
2015-07-02 10:27:48 +08:00
Dave Young d74d13c425 Release 2.0.9-1
Rebase kexec-tools 2.0.9
2015-06-26 10:15:57 +08:00
Dave Young 8219fcf725 Rebase makedumpfile 1.5.8 2015-06-26 10:14:52 +08:00
Dennis Gilmore 3ac7dddb2b - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 13:07:57 +00:00
Dave Young f58228adba Release 2.0.8-13
Update kdump icon again, Xiaoxue created a new one with different color
so that we have similar color theme with other components.

Also add kdump.svg to rpm %files section

Otherwise rpmbuild will not package it in rpm
2015-06-11 14:19:36 +08:00
Dave Young ed6b29ede9 Fix bogus date in last commit for 2.0.8-12 2015-06-10 10:56:01 +08:00
Dave Young 99f580dffd Release 2.0.8-12 2015-06-10 10:50:31 +08:00
Dave Young 507abc9e30 Update kdump addon
changes: update kdump spoke icon
several fixes from M4rtinK
2015-06-10 10:48:49 +08:00
Baoquan He 115092ef8e Release 2.0.8-11 2015-06-03 21:13:05 +08:00
Baoquan He 0a9851e2fc Release 2.0.8-10 2015-04-21 11:15:50 +08:00
Baoquan He eb8034e067 add fPIC to makefumpfile CFLAGS to support hardening
Beginning from f23 program hardening become the defaults for all packages.
Details can be checked from below link:
https://fedoraproject.org/wiki/Changes/Harden_All_Packages

Adding this to makedumpfile CFLAGS, otherwise makedumpfile building will
fail on koji.

Signed-off-by: Baoquan He <bhe@redhat.com>
2015-04-21 11:13:33 +08:00
Baoquan He 2c443617bc Release 2.0.8-9 2015-04-09 16:04:27 +08:00
Dave Young dcad90ac4f Release 2.0.8-8 2015-02-15 14:39:31 +08:00
Baoquan He 17b86f7fce Release 2.0.8-7 2015-01-30 14:59:46 +08:00
WANG Chao a9b30d9e79 Release 2.0.8-6
Signed-off-by: WANG Chao <chaowang@redhat.com>
2015-01-13 13:16:45 +08:00
WANG Chao 4d730048fc Release 2.0.8-5
(Fix bogus date in last commit)

Signed-off-by: WANG Chao <chaowang@redhat.com>
2015-01-06 14:45:13 +08:00
WANG Chao 376f397655 Release 2.0.8-5
Signed-off-by: WANG Chao <chaowang@redhat.com>
2015-01-06 14:43:29 +08:00
WANG Chao eedfc174a6 update to kdump-anaconda-addon-005-2-g86366ae.tar.gz
It contains translations update.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-12-01 15:55:52 +08:00
WANG Chao b3d4edfe33 Release 2.0.8-4
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-11-04 11:44:47 +08:00
WANG Chao bd29906daa Fix an installation issue on ppc64le
I forgot to add kdump.sysconfig.ppc64le to "Source" directive to
kexec-tools.spec. And on ppc64le, the default kdump.sysconfig will be
installed to /etc/sysconfig/kdump. Now fix it.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2014-11-04 11:43:30 +08:00
WANG Chao 5ee69fc5f2 Release 2.0.8-3
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-10-28 11:17:16 +08:00
WANG Chao 09951d997c Fix bogus date
The date is a typo and fix it.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-10-21 14:59:13 +08:00
WANG Chao 5bc459ce64 Release 2.0.8-2
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-10-21 13:42:34 +08:00
WANG Chao d03fe08d92 spec: Fix rpmbuild issue on ARM
Fix rpmbuild issue on ARM platform.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-10-21 13:42:29 +08:00
WANG Chao 12b38ac1ad Release 2.0.8-1
Rebase kexec-tools-2.0.8

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-10-20 11:28:22 +08:00
WANG Chao 5379422cd4 Remove kexec-tools-eppic subpackage
Remove this package and put eppic_makedumpfile.so and its sample
scripts in kexec-tools package.

makedumpfile does dlopen() on eppic_makedumpfile.so and that does not
enforce any choice. One could either ship it in kexec-tools package or
in a subpackage. Both will work.

The real reason was that code for eppic_makedumpfile.so
(extension_eppic.c) and some eppic scripts are in upstream makedumpfile
project. And that project is distributed as part of kexec-tools package.

Now breaking down that makedumpfile in two parts and shipping all
eppic specific bits in a separate subpackage was creating confusion
everytime we did some changes.

So to avoid that confusion and to keep all of the makedumpfile related
bits in a single package, this change is being done.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-10-20 11:26:42 +08:00
WANG Chao b29d8e0d54 Rebase kdump-anaconda-addon-005
The new kdump-anaconda-addon add support of FADUMP.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-10-14 11:01:42 +08:00
WANG Chao fd3900dcaf Release 2.0.7-11
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-09-26 13:00:56 +08:00
WANG Chao 2e19ead4fd spec: fix ppc64le build failure
kexec-tools expects "powerpc64le" to pass to configure.ac, while we
passed ppc64le. Otherwise the build fails. Now fix it like we did for
ppc64.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-09-25 10:05:49 +08:00
WANG Chao affcb6eeda Release 2.0.7-10
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-09-23 15:56:13 +08:00
WANG Chao e77fed1a83 spec: build makedumpfile on ppc64le
Enable makedumpfile build on ppc64le.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-09-23 11:22:45 +08:00
WANG Chao c88a6bb5b6 Rebase makedumpfile-1.5.7
Rebase makedumpfile-1.5.7 and remove the useless patches.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-09-19 11:29:35 +08:00
WANG Chao 5b1065de3c Add sample eppic scripts to kexec-tools-eppic package
Upstream makedumpfile contains some sample eppic scripts for reference.
Now pull the whole scripts directory into kexec-tools-eppic package.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-09-18 11:19:50 +08:00
WANG Chao 511ed60630 ppc64/kdump: Fix ELF header endianess
Backport the following commit from kexec-tools upstream:

commit 45b33eb
Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Date:   Fri Jul 25 17:07:49 2014 +0200

    ppc64/kdump: Fix ELF header endianess

    The ELF header created among the loading of the kdump kernel should be
    flagged using the current endianess and not always as big endian.

    Without this patch the data exposed in /proc/vmcore are not readable when
    running in LE mode.

    Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>

This is part of the work to enable ppc64le.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-09-15 21:55:04 +08:00
WANG Chao 79449e6612 kexec/ppc64: disabling exception handling when building the purgatory
Backport the following commit from upstream kexec-tools:

commit 335bad7
Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Date:   Tue Jul 22 18:22:28 2014 +0200

    kexec/ppc64: disabling exception handling when building the purgatory

    Some Linux distributions would like to turn on the GCC exception handling
    by default. As this option introduces symbols in the built code that are
    defined in a separate shared library, this is not a good idea to have such
    an option activated when building the purgatory.

    This patch forces the exception handling to be turned off when building the
    purgatory on ppc64 BE and LE.

    Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>

This is part of the work to enable ppc64le.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-09-15 21:55:02 +08:00
WANG Chao 768d9ce47f kexec/ppc64: move to device tree version 17
Backport the following commit from upstream kexec-tools:

commit 2ca2203
Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Date:   Mon Jun 16 14:42:43 2014 +0200

    kexec/ppc64: move to device tree version 17

    Kernel commit e6a6928c3ea1d0195ed75a091e345696b916c09b changed the way the
    device tree is processed in the kernel. Now version 2 is no more supported.

    This patch move the version of the device tree generated in ppc64
    environment from 2 to 17, allowing to kexec kernel 3.16.

    In addition, automates the define of NEED_STRUCTURE_BLOCK_EXTRA_PAD which
    should not be set for DT version 16 and above.

    Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>

This is part of the work to enable ppc64le.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-09-15 21:54:47 +08:00
Baoquan He a0023e92fc Release 2.0.7-9 2014-09-10 10:51:04 +08:00
Baoquan He 3a9200bc9f kexec: Provide an option to use new kexec system call
This is a back port from upstream.

commit 046d1755d2bd723a11a180c265e61a884990712e
Author: Vivek Goyal <vgoyal@redhat.com>
Date:   Mon Aug 18 11:22:32 2014 -0400

    kexec: Provide an option to use new kexec system call

    Hi,

    This is v2 of the patch. Since v1, I moved syscall implemented check littler
    earlier in the function as per the feedback.

    Now a new kexec syscall (kexec_file_load()) has been merged in upstream
    kernel. This system call takes file descriptors of kernel and initramfs
    as input (as opposed to list of segments to be loaded). This new system
    call allows for signature verification of the kernel being loaded.

    One use of signature verification of kernel is secureboot systems where
    we want to allow kexec into a kernel only if it is validly signed by
    a key system trusts.

    This patch provides and option --kexec-file-syscall (-s), to force use of
    new system call for kexec. Default is to continue to use old syscall.

    Currently only bzImage64 on x86_64 can be loaded using this system call.
    As kernel adds support for more arches and for more image types, kexec-tools
    can be modified accordingly.

    Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
    Acked-by: Baoquan He <bhe@redhat.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
2014-09-10 10:44:24 +08:00
WANG Chao 838d8046b7 Release 2.0.7-8
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-08-29 13:20:00 +08:00
Dave Young fae72772d7 Removing firstboot module
Since we have added kdump anaconda addon, thus removing firstboot module
User can setup kdump in anaconda install phase, and change the kdump.conf
details in s-c-kdump

Delete the firstboot po files as well.

Signed-off-by: Dave Young <dyoung@redhat.com>
2014-08-29 13:17:14 +08:00
WANG Chao 8b0cc435e0 update to kdump-anaconda-addon-003.tar.gz
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-08-29 13:02:18 +08:00
WANG Chao e242ae873b Release 2.0.7-7
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-08-21 10:32:08 +08:00
WANG Chao d2d16f0521 update to kdump-anaconda-addon-002.tar.gz
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-08-21 10:32:08 +08:00
WANG Chao 890d2fabf4 spec: install udev rules 98-kexec.rules to /usr/lib not /etc
Resolves: rhbz#1131169

Zbigniew (systemd developer) pointed out that our udev rules should
install to /usr/lib/ not /etc. Because /etc is supposed to be used by
sysadmins only and package should install by default into /usr/lib.

As advised here:
http://www.freedesktop.org/software/systemd/man/udev.html#Rules%20Files

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-08-21 10:31:52 +08:00
Peter Robinson e46e590cf9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-16 23:35:59 +00:00
WANG Chao b17977dfb8 Release 2.0.7-5
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-08-06 12:06:04 +08:00
WANG Chao 2276b8561c Introduce kdump capture service
This patch introduce a new kdump-capture.service which is used to run
kdump.sh.

kdump-capture.service has OnFailure=emergency.target and
OnFailureIsolate=yes set. When kdump.sh fails, the kdump emergency
service will be triggered and enter the error handling path.

In 2nd kernel, the default target for systemd is initrd.target, so we
put kdump-capture.service in initrd.target.wants/ and by that, system
will start kdump-capture as part of the boot process.

kdump.sh used to run in dracut-pre-pivot hook. Now kdump-capture.service
is placed after dracut-pre-pivot.service and other dependencies are all
copied from dracut-pre-pivot.service. So the start point of
kdump.sh will be almost the same as it used to be.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2014-08-05 13:13:32 +08:00
WANG Chao 002337c671 Introduce kdump error handling service
Now upon failure kdump script might not be called at all and it might
not be able to execute default action. It results in a hang.

Because we disable emergency shell and rely on kdump.sh being invoked
through dracut-pre-pivot hook. But it might happen that we never call
into dracut-pre-pivot hook because certain systemd targets could not
reach due to failure in their dependencies. In those cases error
handling code does not run and system hangs. For example:

sysroot-var-crash.mount --> initrd-root-fs.target --> initrd.target \
  --> dracut-pre-pivot.service --> kdump.sh

If /sysroot/var/crash mount fails, initrd-root-fs.target will not be
reached. And then initrd.target will not be reached,
dracut-pre-pivot.service wouldn't run. Finally kdump.sh wouldn't run.

To solve this problem, we need to separate the error handling code from
dracut-pre-pivot hook, and every time when a failure shows up, the
separated code can be called by the emergency service.

By default systemd provides an emergency service which will drop us into
shell every time upon a critical failure. It's very convenient for us to
re-use the framework of systemd emergency, because we don't have to
touch the other parts of systemd. We can use our own script instead of
the default one.

This new scheme will overwrite emergency shell and replace with kdump
error handling code. And this code will do the error handling as needed.
Now, we will not rely on dracut-pre-pivot hook running always. Instead
whenever error happens and it is serious enough that emergency shell
needed to run, now kdump error handler will run.

dracut-emergency is also replaced by kdump error handler and it's
enabled again all the way down. So all the failure (including systemd
and dracut) in 2nd kernel could be captured, and trigger kdump error
handler.

dracut-initqueue is a special case, which calls "systemctl start
emergency" directly, not via "OnFailure=emergency". In case of failure,
emergency is started, but not in a isolation mode, which means
dracut-initqueue is still running. On the other hand, emergency will
call dracut-initqueue again when default action is dump_to_rootfs.
systemd would block on the last dracut-initqueue, waiting for the first
instance to exit, which leaves us hang. It looks like the following:

dracut-initqueue (running)
  --> call dracut-emergency:
    --> dracut-emergency (running)
      --> kdump-error-handler.sh (running)
        --> call dracut-initqueue:
          --> blocking and waiting for the original instance to exit.

To fix this, I'd like to introduce a wrapper emergency service. This
emegency service will replace both the systemd and dracut emergency. And
this service does nothing but to isolate to real kdump error handler
service:

dracut-initqueue (running)
  --> call dracut-emergency:
    --> dracut-emergency isolate to kdump-error-handler.service
      --> dracut-emergency and dracut-initqueue will both be stopped
          and kdump-error-handler.service will run kdump-error-handler.sh.

In a normal failure case, this still works:
foo.service fails
  --> trigger emergency.service
    --> emergency.service isolates to kdump-error-handler.service
      --> kdump-error-handler.service will run kdump-error-handler.sh

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2014-08-05 13:13:32 +08:00
WANG Chao 3b27570bea cleanup: extract functions from kdump.sh to kdump-lib-initramfs.sh
Extract functions from kdump.sh, and construct kdump-lib-initramfs.sh as
kdump common functions/varaibles library.

kdump-lib-initramfs.sh will include kdump-lib.sh, because it will use
the functions from there. IOW, kdump-lib-initramfs.sh will be a superset
of kdump-lib.sh

So after this cleanup:

- scripts running in 1st kernel only have to include kdump-lib.sh
- scripts running in 2nd kernel only have to include kdump-lib-initramfs.sh

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2014-08-05 13:13:11 +08:00
WANG Chao 0b63f4a522 Release 2.0.7-4
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-24 13:01:19 +08:00
WANG Chao 10b2ee22ef kdump-anaconda-addon: update to kdump-anaconda-addon-001-4-g03898ef.tar.gz
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-24 12:56:57 +08:00
WANG Chao 61fcf06f98 Release 2.0.7-3
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-21 14:50:43 +08:00
WANG Chao a87b9ff7ef Update kexec-tools-anaconda-addon
update to kdump-anaconda-addon-20140721.tar.gz

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-21 14:49:13 +08:00
WANG Chao 993961a411 Fix a typo in %changelog
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-16 15:10:00 +08:00
WANG Chao c45783a2c3 Release 2.0.7-2
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-16 14:59:13 +08:00
Baoquan He e5769870b1 Stop maximizing the bitmap buffer to reduce the risk of OOM.
This is a backport of the following upstream commit.

commit 0b732828091a545185ad13d0b2e6800600788d61
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Tue Jun 10 13:57:29 2014 +0900

    [PATCH 3/3] Stop maximizing the bitmap buffer to reduce the risk of OOM.

    We tried to maximize the bitmap buffer to get the best performance,
    but the performance degradation caused by multi-cycle processing
    looks very small according to the benchmark on 2TB memory:

      https://lkml.org/lkml/2013/3/26/914

    This result means we don't need to make an effort to maximize the
    bitmap buffer, it will just increase the risk of OOM.

    This patch sets a small fixed value (4MB) as a safety limit,
    it may be safer and enough in most cases.

    Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-16 14:57:21 +08:00
Baoquan He 23d1c25fd5 Move counting pfn_memhole for cyclic mode.
This is a backport of the following upstream commit.

commit 2648a8f7caa63e3ec82fd4bce471cec0a895b704
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Mon Jun 9 17:48:30 2014 +0900

    [PATCH 2/3] Move counting pfn_memhole for cyclic mode.

    In cyclic mode, memory holes are checked in initialize_2nd_bitmap_cyclic()
    in both the kdump path and the ELF path, so pfn_memhole should be
    counted there.

    Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-16 14:57:18 +08:00
Baoquan He 0bb00b495b Remove the 1st bitmap buffer from the ELF path in cyclic mode.
This is a backport of the following upstream commit.

commit 16b94ab7fad6744d8b77f2b26838f220307e3118
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Mon Jun 9 17:44:43 2014 +0900

    [PATCH 1/3] Remove the 1st bitmap buffer from the ELF path in cyclic mode.

    We can create the 2nd bitmap without creating the 1st bitmap by commit
    363d53fc8, so we don't need to create the 1st bitmap in cyclic mode
    in the ELF path since it isn't used. Thus, we can use the whole bitmap
    buffer only for the 2nd bitmap like the kdump path.

    Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-16 14:57:15 +08:00
Baoquan He 598e09b6b6 Fix free bitmap_buffer_cyclic error.
This is a backport of the following upstream commit. It is about freeing
the wrong bitmap thing, it could increase the risk of OOM when system is
in an edge of OOM.

commit 0e7b1a6e3c1919c9222b662d458637ddf802dd04
Author: Arthur Zou <zzou@redhat.com>
Date:   Wed May 7 17:54:16 2014 +0900

    [PATCH v3] Fix free bitmap_buffer_cyclic error.

    Description:
    In create_dump_bitmap() and write_kdump_pages_and_bitmap_cyclic(),
    What should be freed is info->partial_bitmap instead of info->bitmap.

    Solution:
    Add two functions to free the bitmap_buffer_cyclic. info->partial_bitmap1
    is freed by free_bitmap1_buffer_cyclic(). info->partial_bitmap2 is
    freed by free_bitmap2_buffer_cyclic(). At the same time, remove
    thoes frees that free partial_bitmap1 or partial_bitmap2 at the end
    of main() because partial_bitmap1 and partial_bitmap2 has been freed
    after dump file has been written out, so there is no need to free it
    again at the end of main.

    Signed-off-by: Arthur Zou <zzou@redhat.com>

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-16 14:57:00 +08:00
Baoquan He 46a8fa94aa Introduce the mdf_pfn_t type.
This is a backport of the following upstream commit. Late back ported
commit depends on it.

commit 9dc6440c63320066bc6344c6e3ca3c3af88bcc42
Author: Petr Tesarik <ptesarik@suse.cz>
Date:   Thu Apr 24 10:58:43 2014 +0900

    [PATCH v3] Introduce the mdf_pfn_t type.

    Replace unsigned long long with mdf_pfn_t where:

      a. the variable denotes a PFN
      b. the variable is a number of pages

    The number of pages is converted to a mdf_pfn_t, because it is a result
    of subtracting two PFNs or incremented in a loop over a range of PFNs,
    so it can get as large as a PFN.

    Note: The mdf_ (i.e. makedumpfile) prefix is used to prevent possible
    conflicts with other software that defines a pfn_t type.

    Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com
2014-07-16 14:56:41 +08:00
WANG Chao 33736ef595 makedumpfile: Fix Makefile for eppic_makedumpfile.so build
Backport from the following commit from upstream makedumpfile:

commit 45fc42c
Author: WANG Chao <chaowang@redhat.com>
Date:   Tue Jun 10 14:11:27 2014 +0900

    [PATCH] Fix Makefile for eppic_makedumpfile.so build.

    When libeppic isn't installed on a standard location, building
    eppic_makedumpfile.so with -leppic directly doesn't work.

    Add LDFLAGS to build arguments, so that one can pass LDFLAGS="-Ldir
    -Idir" to tell where to search for libeppic library and its header
    files.

    For example, if eppic source is installed on the same directory level
    with makedumpfile as the following:

    makedumpfile
     |--- arch
     +--- eeppic_scripts
    eppic
     |--- applications
     +--- libeppic

    After compiling libeppic, one can use the following command to build
    eppic_makedumpfile.so:

    make LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so

    Signed-off-by: WANG Chao <chaowang@redhat.com>

With this patch, we don't need use a fedora-specific patch for building
eppic_makedumpfile.so.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-06-13 13:17:56 +08:00
WANG Chao 2db8de3c8a kexec-tools.spec: add changelog
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-06-10 11:24:55 +08:00
WANG Chao 85ee62fdd1 Release 2.0.7-1
Rebase kexec-tools-2.0.7

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-06-10 11:20:36 +08:00
Dennis Gilmore 3a560f19ab - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 21:17:21 -05:00
WANG Chao 40ce1a4ece Release 2.0.6-8
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-22 18:33:02 +08:00
Arthur Zou 2553056c74 Rename the subpackage kdump-anaconda-addon
Rename the subpackage kdump-anaconda-addon to kexec-tools-anaconda-addon
to keep consistency and make fedpkg build happy

Because every time fedpkg builds a new release the package version number
should increase. But kdump-annaconda-addon just keep same version, so let's
rename it to kexec-tools-annaconda-addon here kexec-tools- is a default prefix.
For version let's use default top level version.

At the same time, rename the kdump-anaconda-addon directory name to anaconda-addon
to make it more standard. Using the current data instead of version number as a
surfix of kdump-anaconda-addon tarball just like kexec-tools-po did.

Signed-off-by: Arthur Zou <zzou@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2014-05-22 18:32:43 +08:00
WANG Chao 4742c0fb6b Release 2.0.6-7
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-21 17:33:00 +08:00
WANG Chao f6eaa4e227 spec: fix a typo in "Requires" of kexec-tools-eppic
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-21 17:32:23 +08:00
WANG Chao f765f060c8 Release 2.0.6-6
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-20 16:48:13 +08:00
WANG Chao e4cf7a9282 spec: kexec-tools-eppic requires the same version/release of kexec-tools
makedumpfile_eppic.so (provided by kexec-tools-eppic) is built against
makedumpfile (provided by kexec-tools). kexec-tools-eppic must depend on
the same version.release of kexec-tools, otherwise there could be a ABI
compatibility issue.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-20 16:18:42 +08:00
Arthur Zou 8f963f3318 Modify the kexec-tools.spec file to generate a kdump-anaconda-addon subpackage
Signed-off-by: Arthur Zou <zzou@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2014-05-20 16:05:58 +08:00
WANG Chao 649f83713e Release 2.0.6-5
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-04-30 13:43:50 +08:00
WANG Chao 39178b1346 Rebase makedumpfile-1.5.6
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-04-30 13:40:01 +08:00
WANG Chao 1780a4b77c kexec-tools.spec: remove ia64 architecture
Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-04-23 14:02:57 +08:00
WANG Chao 06750c40e7 Release 2.0.6-4
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-04-17 11:31:32 +08:00
WANG Chao ed12e00218 kdump-dep-generator: Add kdump service dependencies on the fly
kdump-dep-generator is a systemd generator, used to write out kdump
service dependencies.

Currently it's only useful for ssh dump case. And in ssh dump case, it
writes out a dependency which kdump.service "Wants"
network-online.target:

  # ls -l /run/systemd/generator/kdump.service.wants/
  [..] network-online.target -> /usr/lib/systemd/system/network-online.target

So that kdump.service will pull in network-online.target and delayed
start until network-online.target is reached.

In the future, we could use generator to write out kdump.service
dynamically and get rid of the static defined kdump.service at all.

v1->v2:
Vivek: not using hardcoded run time generator path, use what systemd pass in.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-04-17 11:27:31 +08:00
WANG Chao 9546c93e6b Release 2.0.6-3
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-04-03 14:43:10 +08:00
Peter Robinson 7851211da1 Exclude aarch64 2014-03-27 16:13:09 +00:00
Peter Robinson 4cc836d2ed Revert "Add initial aarch64 support."
This reverts commit ab699dd204.
2014-03-27 14:38:47 +00:00
Peter Robinson ab699dd204 Add initial aarch64 support. 2014-03-27 11:56:27 +00:00
WANG Chao 33d1bf7e67 Release 2.0.6-1
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-03-26 15:28:42 +08:00
Arthur Zou 7f9b45002a Backport vmcore-dmsg stack smashing in extreme case
In exteme case vmcore-dmesg will overflow. upstream has fixed the
some problem. so simply backport it

Signed-off-by: Arthur Zou <zzou@redhat.com>
Acked-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-03-14 13:04:58 +08:00
WANG Chao 58a4543011 Release 2.0.5-2
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-03-10 13:22:24 +08:00
WANG Chao 3b9a0140cb Release 2.0.5-1
Rebase kexec-tools-2.0.5

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-03-05 11:16:44 +08:00
WANG Chao ad6faec56b Release 2.0.4-25
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-03-05 11:15:42 +08:00
WANG Chao 7c99869b79 Release 2.0.4-24
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-02-17 12:50:08 +08:00
WANG Chao 2ef16b5be8 add kdump-in-cluster-environment.txt to rpm pkg
Last time I forgot to install this doc to rpm pkg. So add it now.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-02-17 12:50:05 +08:00
WANG Chao 7c65f40916 Release 2.0.4-23
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-01-29 16:34:28 +08:00
WANG Chao 75c9162996 makedumpfile: memset() in cyclic bitmap initialization introduce segment fault.
This is a backport of the following upstream commit:

commit 4404368
Author: WANG Chao <chaowang@redhat.com>
Date:   Wed Dec 18 22:34:43 2013 +0900

    [PATCH] memset() in cyclic bitmap initialization introduce segment fault.

    We are using memset() to improve performance when creating 1st and 2nd
    bitmap. After doing round up the pfn_start and round down pfn_end, it's
    possible that pfn_start_roundup is greater than pfn_end_round. A segment
    fault could happen in that case because memset is taking roughly the
    value of (pfn_end_round << 3 - pfn_start_roundup << 3 ), which is
    negative, as its third argument.

    So we can skip the memset if start is greater than end. It's safe
    because we will set bit for the round up part and also round down part.

    Actually this happens on my EFI virtual machine:

    cat /proc/iomem:
    00000000-00000fff : reserved
    00001000-0009ffff : System RAM
    000a0000-000bffff : PCI Bus 0000:00
    000f0000-000fffff : System ROM
    00100000-3d162017 : System RAM
      01000000-015cab9b : Kernel code
      015cab9c-019beb3f : Kernel data
      01b4f000-01da9fff : Kernel bss
      30000000-37ffffff : Crash kernel
    3d162018-3d171e57 : System RAM
    3d171e58-3d172017 : System RAM
    3d172018-3d17ae57 : System RAM
    3d17ae58-3dc10fff : System RAM
    3dc11000-3dc18fff : reserved
    3dc19000-3dc41fff : System RAM
    3dc42000-3ddcefff : reserved
    3ddcf000-3f7fefff : System RAM
    3f7ff000-3f856fff : reserved
    [..]

    gdb ./makedumpfile core
    (gdb) bt full
    [..]
     #1  0x000000000042775d in create_1st_bitmap_cyclic () at makedumpfile.c:4543
            i = 0x5
            pfn = 0x3d190
            phys_start = 0x3d18ee58
            phys_end = 0x3d18f018
            pfn_start = 0x3d18e
            pfn_end = 0x3d18f
            pfn_start_roundup = 0x3d190
            pfn_end_round = 0x3d188
            pfn_start_byte = 0x7a32
            pfn_end_byte = 0x7a31
    [..]
    (gdb) list makedumpfile.c:4543
    4538                                        return FALSE;
    4539
    4540                        pfn_start_byte = (pfn_start_roundup - info->cyclic_start_pfn) >> 3;
    4541                        pfn_end_byte = (pfn_end_round - info->cyclic_start_pfn) >> 3;
    4542
    4543                        memset(info->partial_bitmap2 + pfn_start_byte,
    4544                               0xff,
    4545                               pfn_end_byte - pfn_start_byte);
    4546
    4547                        for (pfn = pfn_end_round; pfn < pfn_end; ++pfn)

    Signed-off-by: WANG Chao <chaowang@redhat.com>

This patch fixes segment fault issues on the systems with very small
memory map range (less than 8 pages).

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-01-29 16:31:04 +08:00
WANG Chao 5d68494023 Release 2.0.4-22
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-01-28 13:07:09 +08:00
WANG Chao 6ae85f33a7 Rebase makedumpfile-1.5.5
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-01-28 13:04:36 +08:00
WANG Chao 59b1229661 Release 2.0.4-21
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-01-22 12:53:36 +08:00
Baoquan He b085004c23 makedumpfile: Improve progress information for huge memory system.
Backport from upstream.

commit 20ecc0827e7837c52f3903638a59959f8bf17f9e
Author: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Date:   Tue Nov 5 00:29:35 2013 +0900

    [PATCH v2] Improve progress information for huge memory system.

    On system with huge memory, percentage in progress information is
    updated at very slow interval, because 1 percent on 1 TiB memory is
    about 10 GiB, which looks like as if system has freezed. Then,
    confused users might get tempted to push a reset button to recover the
    system. We want to avoid such situation as much as possible.

    Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-01-22 12:52:01 +08:00
WANG Chao e14ca722e8 Release 2.0.4-20
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-01-17 11:50:17 +08:00
WANG Chao 6752e5562e vmcore-dmesg: struct_val_u64() not casting u64 to u32
This is a backport of the following upstream commit:

commit 158d763
Author: WANG Chao <chaowang@redhat.com>
Date:   Tue Jan 7 01:37:34 2014 +0800

    vmcore-dmesg: struct_val_u64() not casting u64 to u32

    It seems gcc doesn't check return type from inline function.
    struct_val_u64() should return u64 otherwise upper 32bit is lost.

    Signed-off-by: WANG Chao <chaowang@redhat.com>
    Acked-by: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>

timestamp in vmcore-dmesg is u64 type but it's truncated to u32, which
results in wrong time stamp. So let's backport this patch to fix this
issue.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-01-17 11:32:48 +08:00
WANG Chao dd7eee7e4a makedumpfile: Fall back to read() when mmap() fails
This is a backport of the following upstream commit:

commit 7c770ed
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Thu Dec 12 16:40:31 2013 +0900

    [PATCH] Fall back to read() when mmap() fails.

    This is a fall back path for mmap().
    This patch disables mmap() when facing the issues related to mmap(),
    and read() will be used to read vmcore instead.

    Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>

mmap() file operation on vmcore is working properly when the page being
accessed has different attributes on different part (ie. two different type
of memory ranges are overlapping).

A fall back mechanism is introduced in this patch, in case mmap() fails,
switch to read() afterwards.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-01-17 11:32:48 +08:00
WANG Chao 89a4cb24e0 makedumpfile: Add --non-mmap option to disable mmap() manually
This is a backport of the following upstream commit:

commit a895dc8
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Thu Dec 12 16:40:12 2013 +0900

    [PATCH] Add --non-mmap option to disable mmap() manually.

    When --non-mmap option is specified, makedumpfile doesn't use
    mmap() even if /proc/vmcore supports mmap().

    Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>

Having this patch, user can switch between mmap() and read() when
accessing vmcore. Whenever user feels necessary to use readmem on vmcore
(buggy code in mmap path, debug purpose, etc.), --non-mmap can do this
favor.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-01-17 11:32:48 +08:00
WANG Chao 778ab7d0c4 makedumpfile: Add help and man message for '--help'
This is a backport  of the following upstream commit:

commit eb708ce
Author: Baoquan He <bhe@redhat.com>
Date:   Tue Jul 2 11:11:07 2013 +0900

    [PATCH 2/2] Add help and man message for '--help'.

    Conventionally '-h' and '--help' are all provided. Currently makedumpfile
    lacks help and man message for '--help'. Here add it.

    Signed-off-by: Baoquan He <bhe@redhat.com>

It's needed for applying commit 414d3ed ("Add --non-mmap option to
disable mmap() manually").

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-01-17 11:32:47 +08:00
WANG Chao 194a389a9f makedumpfile: Assign non-printable value as short options
This is a backport of the following upstream commit:

commit bd67c1d
Author: Baoquan He <bhe@redhat.com>
Date:   Tue Jul 2 11:09:20 2013 +0900

    [PATCH 1/2] Assign non-printable value as short options.

    Characters for short options is limited, and now makedumpfile has
    considerably many options. As times go on, no enough reasonable
    letters can be assigned to each functionality with short options.

    E.g non-cyclic vs Y, cyclic-buffer vs Z, eppic vs S.

    Now assign non-printable value to these kind of short optins, meanwhile
    define them as indicative MACRO which can make code more readable.

    Signed-off-by: Baoquan He <bhe@redhat.com>

It's needed for applying commit 414d3ed ("Add --non-mmap option to
disable mmap() manually").

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-01-17 11:32:47 +08:00
WANG Chao bad556cf2e makedumpfile: Revert "makedumpfile: disable mmap"
This reverts commit 2dc9600ad14b8cf29f6eddbf27c7ec90426156aa:

commit 2dc9600
Author: Dave Young <dyoung@redhat.com>
Date:   Thu Nov 14 10:51:47 2013 +0800

    makedumpfile: disable mmap

    There's a  kernel bug for mapping mem ranges which end with
    an address not aligned to page boundry. It's still not resolved
    in upstream, so let's disable mmap read for now as a workaround.

    Once upstream got a right fix we can revert this patch.

    Signed-off-by: Dave Young <dyoung@redhat.com>

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-01-17 11:32:47 +08:00
WANG Chao 0e90b05d96 Release 2.0.4-18
Signed-off-by: WANG Chao <chaowang@redhat.com>
2013-12-24 14:37:13 +08:00
WANG Chao 7d6ef48a5a Add makedumpfile.conf and its man page
makedumpfile can filter out kernel data from vmcore[1]. A how-to of feature
is well explained in makedumpfile.conf, which upstream is already
shipping but we're not.

Now add makedumpfile.conf and its man page to our package the upstream
way:

makedumpfile.conf --> /etc/makedumpfile.conf.sample
makedumpfile.conf.5.gz --> /usr/share/man/man5/makedumpfile.conf.5.gz

[1]. http://lists.infradead.org/pipermail/kexec/2011-September/005466.html

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-12-24 14:25:11 +08:00
Ville Skyttä 3b60d01930 Drop period at end of Summary. 2013-12-21 23:26:12 +02:00
Ville Skyttä 9017c32c77 Fix Tamil (India) locale subdir name.
- Fix bogus date in %changelog.
2013-12-21 23:25:08 +02:00
WANG Chao ce5e13266e Release 2.0.4-14
Signed-off-by: WANG Chao <chaowang@redhat.com>
2013-12-03 11:32:04 +08:00
WANG Chao b82449261b makedumpfile, ppc: Support to filter dump for kernels that use CONFIG_SPARSEMEM_VMEMMAP.
This is a backport of commit bcdba92 ("[PATCH v5] Support to filter dump
for kernels that use CONFIG_SPARSEMEM_VMEMMAP."):

commit bcdba92
Author: Hari Bathini <hbathini@linux.vnet.ibm.com>
Date:   Mon Nov 25 17:20:55 2013 +0900

    [PATCH v5] Support to filter dump for kernels that use CONFIG_SPARSEMEM_VMEMMAP.

    Makedumpfile tool fails to filter dump for kernels that are build with
    CONFIG_SPARSEMEM_VMEMMAP set, as it fails to do address translations
    for vmemmap regions that are mapped out of zone normal. This patch
    provides support in makedumpfile to do vmemmap to physical address
    translations when they are mapped outside zone normal. Some kernel
    symbols are needed in vmcoreinfo for this changes to be effective.
    The kernel patch that adds the necessary symbols to vmcoreinfo has
    been posted to linuxppc devel mailing list. This patch is influenced
    by vmemmap to physical address translation support code in crash tool.
    This patch has been tested successfully at all dump filtering levels
    on kernels with CONFIG_SPARSEMEM_VMEMMAP set/unset. Also, tested dump
    filtering on already filtered vmcores (re-filtering).

    Changes from v4 to v5:
    Trimmed patch description to be compact and readable.

    Changes from v3 to v4:
    Rebased to devel branch.

    Signed-off-by: Onkar N Mahajan <onmahaja@in.ibm.com>
    Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>

On PPC platform, filter facility is broken since we use
CONFIG_SPARSEMEM_VMEMMAP. This patch fixes this issue but also needs kernel
counterpart fix to get makedumpfile filter working.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Steve Best<sbest@redhat.com>
2013-11-28 11:39:20 +08:00
WANG Chao 296e8d3779 makedumpfile: Understand >= v3.11-rc4 dmesg.
This is a backport of commit a01b663 ("[PATCH v2] dump-dmesg: Understand
>= v3.11-rc4 dmesg."):

commit a01b663
Author: Lubomir Rintel <lkundrak@v3.sk>
Date:   Fri Sep 20 15:56:49 2013 +0900

    [PATCH v2] dump-dmesg: Understand >= v3.11-rc4 dmesg.

    Symbol name changed with the following commit:
    62e32ac printk: rename struct log to struct printk_log

    Changes for v2:
      * Only back values for symbol names we did actually read;
      *         either "log" or "printk_log"

    Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

makedumpfile --dump-dmesg is broken since VMCOREINFO symbol "log" has
renamed to "printk_log". This patch fixes --dump-dmesg on 3.11 kernel.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-11-28 11:39:20 +08:00
WANG Chao 376a899b09 Release 2.0.4-13
Signed-off-by: WANG Chao <chaowang@redhat.com>
2013-11-15 13:34:11 +08:00
Dave Young 2dc9600ad1 makedumpfile: disable mmap
There's a  kernel bug for mapping mem ranges which end with
an address not aligned to page boundry. It's still not resolved
in upstream, so let's disable mmap read for now as a workaround.

Once upstream got a right fix we can revert this patch.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-11-15 13:32:20 +08:00
WANG Chao c9bc5ca307 Release 2.0.4-12
Signed-off-by: WANG Chao <chaowang@redhat.com>
2013-10-29 13:44:52 +08:00
arthur d43f2a8502 fix sadump format phys_base calculating error
Description of Problem:

  This is a REGRESSION issue.

  At fedora makedumpfile has been updated toward v1.5.4. Unfortunately,
  this version fails calculating phys_base on sadump format and then
  fails converting vmcore.

  x86_64 kernel is relocatable kernel and there can be a gap between
  the physical address statically assigned to kernel data and texts
  and the address that is really assigned to each object corresponding
  to the kernel symbols. The gap is phys_base. makedump calculates the
  phys_base in an ad-hoc way that comparing the addresses of some of
  occurrences of "Linux kernel" strings in certain range of vmcore.

Resolution:
  Fix patch has already been posted in upstream. so just back port.
  The commit ID are:
  commit e23dc0a1aa5fa7a4429f72ff1c2fe87a87291065
  commit 92563d7a7a5175ef78c4a94ee269b1b455331b4c

Signed-off-by: arthur <zzou@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-10-29 13:28:26 +08:00
WANG Chao bb3f341fb2 kdump, x86: Process multiple Crash kernel in /proc/iomem
Boot with "crashkernel=128M,high", kernel now uses "Crash kernel" in
/proc/iomem for crash kernel memory reservations at both low and high:

commit 157752d
Author: Yinghai Lu <yinghai@kernel.org>

    kexec: use Crash kernel for Crash kernel low

But kexec is still scanning for "Crash kernel low" in /proc/iomem, and
will fail immediately when load/unload crash kernel.

So let's pull the following commit from kexec upstream to make
it compatible with our kernel:

commit e25e6e7
Author: Yinghai Lu <yinghai@kernel.org>

    kdump, x86: Process multiple Crash kernel in /proc/iomem

(This patch from upstream is untouched and can be applied cleanly)

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-10-29 13:17:31 +08:00
Baoquan He 55c7158d16 makedumpfile: wrong cyclic buffer size recalculation causes bitmap data corruption
Description of Problem:

In cyclic mode, makedumpfile recalculates cyclic buffer size as the
largest multiple of the largest block size managed by buddy
allocator, i.e. 4MB, smaller than the cyclic buffer size in order to
enable to process each unit of blocks managed by buddy allocator in
each cycle.

However, makedumpfile does two wrong things in the recalculations:

1) While updating size of cyclic buffer, makedumpfile doesn't update
length of range of cycle in page frame numbers, due to which, if
cyclic buffer size is updated, because cyclic buffer size is always
reduced during udpate, some buffer overrun can happen on the cyclic
buffer. This can cause segmentation violation in the worst case.

2) roundup() is used to calculate bitmap size for maximum block size
managed by buddy allocator, here divideup() is correct, due to
which, although memory filtering is not affected, cyclic buffer size
get too much aligned and less efficient.

Fix patches has already been posted and merged in makedumpfile
development devel branch.

git://git.code.sf.net/p/makedumpfile/code
f8c8218856effc43ea01cd9394761cfb8aeaa8df
a785fa7dd7a7bd7dcbb017d0bea8848243b0924f

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: WANG Chao <chaowang@redhat.com>
2013-10-29 13:15:46 +08:00
Baoquan He 6a56c56743 Fix max_mapnr issue on system has over 44-bit addressing.
The dumpfile header has this field, which was inherited from
the old "diskdump" facility:

 struct disk_dump_header {
 ...
        unsigned int            max_mapnr;      /* = max_mapnr */
 ...
and which, among other things, is used by the crash utility as a
delimiter to determine whether a physical address read request is
legitimate.  And obviously the field cannot handle PFN values greater
than 32-bits.

The makedumpfile source code does have its own max_mapnr representation
in its DumpInfo structure in "makedumpfile.h":

 struct DumpInfo {
 ...
        unsigned long long      max_mapnr;   /* number of page descriptor */
 ...
But in its "diskdump_mod.h" file, it carries forward the old diskdump
header format, which has the 32-bit field:

 struct disk_dump_header {
 ...
        unsigned int            max_mapnr;      /* = max_mapnr */
 ...
And here in "makedumpfile.c", the inadvertent truncation occurs
when the PFN is greater than 32-bits:

 int
 write_kdump_header(void)
 {
 ...
        dh->max_mapnr      = info->max_mapnr;
 ...
Now upstream has below commit to fix this, back port it:

commit 8e124174b62376b17ac909bc68622ef07bde6840
Author: Jingbai Ma <jingbai.ma@hp.com>
Date:   Fri Oct 18 18:53:38 2013 +0900

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: WANG Chao <chaowang@redhat.com>
2013-10-28 17:33:16 +08:00
Baoquan He daf4abdeeb Release 2.0.4-11 2013-10-12 16:05:43 +08:00
Baoquan He 514be15bf4 Release 2.0.4-10 2013-09-27 17:15:02 +08:00
Baoquan He 377b01b270 Back port 2 revert commits
In 2.0.4, Cliff from HP posted 2 patches:
e35aa29 kexec: include reserved e820 sections in crash kernel
4932034 kexec: lengthen the kernel command line image

However, with both of them kdump kernel may fail to boot, and
are useless because of restriction in kernel side. In upstream,
they have been reverted. Now back port these 2 revert commits.
Also since the commit 1a4e90b has dependency, back port commit
dc607e4 which is depended on by commit 1a4e90b too.

1a4e90b Revert "kexec: include reserved e820 sections in crash kernel"
dc607e4 kexec: i386: Add cmdline_add_memmap_internal() to reduce the code duplication
8274916 Revert: "kexec: lengthen the kernel command line image"
2013-09-27 17:01:24 +08:00
Baoquan He 45f24f53f5 Release 2.0.4-9 2013-09-27 10:18:06 +08:00
WANG Chao a8921f04ae Introduce kdump-lib.sh for kdump shared functions
Currently in the whole kdump framework, we have some common functions
used across not only mkdumprd context and dracut context, but also 1st
kernel and 2nd kernel. We defined these functions at each script, which
is obviously not decent.

So let's introduce kdump-lib.sh for the shared functions and put it
to /lib/kdump/kdump-lib.sh.

It starts small, as you can see, only 3 functions are extracted. But in
the future more and more common functions can be added.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-09-27 10:07:13 +08:00
Baoquan He 2ce047b9ed makedumpfile support kernel 3.10
This is back ported from makedumpfile upstream directly:

commit 1202589997ad008b18276f504c5c2b8529b41dfe
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Fri Sep 20 09:34:57 2013 +0900

    [PATCH] Support newer kernels.

     A new makedumpfile supports newer kernels:

           - 3.10    (x86 FLATMEM)
           - 3.10    (x86 SPARSEMEM)
           - 3.10    (x86_64 SPARSEMEM)

    Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
2013-09-27 10:05:33 +08:00
Baoquan He 64ab43fb97 Release 2.0.4-8 2013-08-21 15:00:35 +08:00
Baoquan He 65b1f9f044 Release 2.0.4-7 2013-08-02 14:59:01 +08:00
Baoquan He 5de822d48d makedumpfile: Add vmap_area_list definition for ppc/ppc64.
Build on ppc/ppc64 failed after makedumpfile-1.5.4 is pulled, since the
variable vmap_area_list is not defined. Back port below commit from
upstream to add it.

commit 150b58eb299066c65ef7713a93effc35c00be03a
Author: Baoquan He <bhe@redhat.com>
Date:   Mon Jul 15 20:37:14 2013 +0800

    [PATCH] Add vmap_area_list definition for ppc/ppc64.

    vmap_area_list is added to get vmalloc_start for ppc/ppc64, but its
    definition is missing, now add them.

    Signed-off-by: Baoquan He <bhe@redhat.com>
2013-07-18 16:05:56 +08:00