Commit Graph

639 Commits

Author SHA1 Message Date
Kairui Song
a7199c141c Add a kernel install hook to clean up kdump initramfs
Kdump service will create kdump initramfs when needed, but it won't
clean up the kdump initramfs on kernel uninstall. So create a kernel
install hook to do the clean up job.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2020-08-27 11:22:03 +08:00
Kairui Song
f8f8d79d7f Release 2.0.20-17
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-08-04 10:50:46 +08:00
Kairui Song
d0d9ff1eb2 Drop static lib dependencies
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-08-04 10:47:51 +08:00
Fedora Release Engineering
21b4996e3a - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-08-01 03:43:49 +00:00
Fedora Release Engineering
1844d088f7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 03:00:49 +00:00
Pingfan Liu
8bef2d943b kexec-tools.spec: make the existence of pre.d and post.d mandatory
If the directory /etc/kdump/pre.d is optional, then it is hard
to tell between the following cases:
  -1. no directory "/etc/kdump/pre.d"
  -2. "rm -rf /etc/kdump/pre.d", which removes all scripts under pre.d
For the second case, kdump.img should be rebuilt.

To bail out from this corner case, always creating pre.d and post.d
during rpm installation.

Signed-off-by: Pingfan Liu <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2020-07-20 16:12:04 +08:00
Kairui Song
070d362846 Release 2.0.20-14
Also fix a timestamp issue.

Signed-off-by: Kairui Song <kasong@redhat.com>
2020-07-01 17:15:38 +08:00
Kairui Song
e05c550144 Drop switch root capability for non fadump initramfs
Switch root is never used for kdump image, and this will be helpful to
reduce the initramfs size.

Also increase dracut dependency version and the function is
dracut_no_switch_root is new introduced.

This commit is applied to RHEL some time ago, but missing in Fedora as
Fedora's Dracut didn't backport this feature at that time. Now apply
this missing commit.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Pingfan Liu <piliu@redhat.com>
2020-06-10 22:37:34 +08:00
Pingfan Liu
47bdeee35d fadump-howto.txt: source it in spec file
Signed-off-by: Pingfan Liu <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2020-06-03 11:34:37 +08:00
Kairui Song
cfd93e2b7e Revert "Add a hook to wait for kdump target in initqueue"
This reverts commit cee618593c.

Upstream dracut have provided a parameter for adding mandantory network
requirement by appending "rd.neednet" parameter, so we should use that
instead.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2020-05-28 16:26:00 +08:00
Kairui Song
0094fb496d Release 2.0.20-13
Add support for using unmounted device as dump target, update docs, and
fix several known issue.

Signed-off-by: Kairui Song <kasong@redhat.com>
2020-05-22 19:29:19 +08:00
Kairui Song
b5b252ae27 Release 2.0.20-12
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-04-02 01:48:46 +08:00
Kairui Song
4b43ba063d Release 2.0.20-11
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-03-24 01:47:45 +08:00
Kazuhito Hagio
476a2b50f6 makedumpfile: Introduce --check-params option
Backport from the upstream makedumpfile devel branch.

commit 989152e113bfcb4fbfbad6f3aed6f43be4455919
Author: Kazuhito Hagio <k-hagio-ab@nec.com>
Date:   Tue Feb 25 16:04:55 2020 -0500

    [PATCH] Introduce --check-params option

    Currently it's difficult to check whether a makedumpfile command-line
    is valid or not without an actual panic.  This is inefficient and if
    a wrong configuration is not tested, you will miss the vmcore when an
    actual panic occurs.

    In order for kdump facilities like kexec-tools to be able to check
    the specified command-line parameters in advance, introduce the
    --check-params option that only checks them and exits immediately.

    Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>

Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
Acked-by: Kairui Song <kasong@redhat.com>
2020-03-12 23:32:18 +08:00
Kairui Song
16d2e4274d Release 2.0.20-10
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-02-13 16:19:54 +08:00
Kairui Song
1b89cc245f Release 2.0.20-9
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-01-29 14:44:16 +08:00
Kairui Song
47f2a819d5 Fix builing failure on Fedora 32
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-01-29 14:43:47 +08:00
Kairui Song
71d20dc825 Release 2.0.20-8
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-01-29 08:48:04 +08:00
Kairui Song
69b920db5d Update makedumpfile to 1.6.7
Signed-off-by: Kairui Song <kasong@redhat.com>
2020-01-29 08:47:42 +08:00
Kairui Song
cee618593c Add a hook to wait for kdump target in initqueue
The dracut initqueue may quit immediately and won't trigger any hook if
there is no "finished" hook still pending (finished hook will be deleted
once it return 0).

This issue start to appear with latest dracut, latest dracut use
network-manager to configure the network,
network-manager module only install "settled" hook, and we didn't
install any other hook. So NFS/SSH dump will fail. iSCSI dump works
because dracut iscsi module will install a "finished" hook to detect if
the iscsi target is up.

So for NFS/SSH we keep initqueue running until the host successfully get
a valid IP address, which means the network is ready.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Pingfan Liu <piliu@redhat.com>
2020-01-29 08:12:45 +08:00
Kairui Song
d01c6de338 Release 2.0.20-7
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-12-29 19:36:08 +08:00
Kairui Song
b301d6c4f4 Fix building failure due to makedumpfile's compile flag
From: Pingfan Liu <piliu@redhat.com>

makedumpfile: remove -lebl

-lebl has been removed from elfutils.

Signed-off-by: Kairui Song <kasong@redhat.com>
2019-12-28 03:12:27 +08:00
Kairui Song
ee742fcf6b Release 2.0.20-6
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-11-28 17:53:30 +08:00
Pingfan Liu
d9d4483b7a spec: move binaries from /sbin to /usr/sbin
Before this patch
$rpm -ql kexec-tools | grep sbin
/sbin/kexec
/sbin/makedumpfile
/sbin/mkdumprd
/sbin/vmcore-dmesg

After this patch
$rpm -ql kexec-tools | grep sbin
/usr/sbin/kexec
/usr/sbin/makedumpfile
/usr/sbin/mkdumprd
/usr/sbin/vmcore-dmesg

Signed-off-by: Pingfan Liu <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2019-11-08 15:23:33 +08:00
Kairui Song
e7a207d166 Release 2.0.20-5
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-10-15 13:54:32 +08:00
Kairui Song
022166630f Merge #2 Add systemd-udev require. 2019-09-25 02:40:35 +00:00
Kairui Song
e31d5baf59 Release 2.0.20-4
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-09-24 14:58:09 +08:00
Kazuhito Hagio
a0db00d575 makedumpfile: Fix inconsistent return value from find_vmemmap()
Backport from the makedumpfile devel branch in upstream.

commit 8425342a52b23d462f10bceeeb1c8a3a43d56bf0
Author: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Date:   Fri Sep 6 09:50:34 2019 -0400

    [PATCH] Fix inconsistent return value from find_vmemmap()

    When -e option is given, the find_vmemmap() returns FAILED(1) if
    it failed on x86_64, but on architectures other than that, it is
    stub_false() and returns FALSE(0).

              if (info->flag_excludevm) {
                      if (find_vmemmap() == FAILED) {
                              ERRMSG("Can't find vmemmap pages\n");

      #define find_vmemmap()          stub_false()

    As a result, on the architectures other than x86_64, the -e option
    does some unnecessary processing with no effect, and marks the dump
    DUMP_DH_EXCLUDED_VMEMMAP unexpectedly.

    Also, the functions for the -e option return COMPLETED or FAILED,
    which are for command return value, not for function return value.

    So let's fix the issue by following the common style that returns
    TRUE or FALSE, and avoid confusion.

    Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>

Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Acked-by: Kairui Song <kasong@redhat.com>
2019-09-20 16:37:44 +08:00
Kazuhito Hagio
bdd3061883 makedumpfile: Fix exclusion range in find_vmemmap_pages()
Backport from the makedumpfile devel branch in upstream.

commit b461971bfac0f193a0c274c3b657d158e07d4995
Author: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Date:   Thu Aug 29 14:51:56 2019 -0400

    [PATCH] Fix exclusion range in find_vmemmap_pages()

    In the function, since pfn ranges are literally start and end, not start
    and end+1, if the struct page of endpfn is at the last in a vmemmap page,
    the vmemmap page is dropped by the following code, and not excluded.

        npfns_offset = endpfn - vmapp->rep_pfn_start;
        vmemmap_offset = npfns_offset * size_table.page;
        // round down to page boundary
        vmemmap_offset -= (vmemmap_offset % pagesize);

    We can use (endpfn+1) here to fix.

    Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>

Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Acked-by: Kairui Song <kasong@redhat.com>
2019-09-20 16:37:39 +08:00
Kazuhito Hagio
68f9e69a16 makedumpfile: x86_64: Fix incorrect exclusion by -e option with KASLR
Backport from the makedumpfile devel branch in upstream.

commit aa5ab4cf6c7335392094577380d2eaee8a0a8d52
Author: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Date:   Thu Aug 29 12:26:34 2019 -0400

    [PATCH] x86_64: Fix incorrect exclusion by -e option with KASLR

    The -e option uses info->vmemmap_start for creating a table to determine
    the positions of page structures that should be excluded, but it is a
    hardcoded value even with KASLR-enabled vmcore.  As a result, the option
    excludes incorrect pages from it.

    To fix this, get the vmemmap start address from info->mem_map_data.

    Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>

Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Acked-by: Kairui Song <kasong@redhat.com>
2019-09-20 16:37:23 +08:00
Kairui Song
d9c0c2f68f Release 2.0.20-3
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-08-12 18:08:37 +08:00
Kazuhito Hagio
15f6d2627f makedumpfile: Increase SECTION_MAP_LAST_BIT to 4
Backport from the makedumpfile devel branch in upstream.

commit 7bdb468c2c99dd780c9a5321f93c79cbfdce2527
Author: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Date:   Tue Jul 23 12:24:47 2019 -0400

    [PATCH] Increase SECTION_MAP_LAST_BIT to 4

    kernel commit 326e1b8f83a4 ("mm/sparsemem: introduce a SECTION_IS_EARLY
    flag") added the flag to mem_section->section_mem_map value, and it caused
    makedumpfile an error like the following:

      readmem: Can't convert a virtual address(fffffc97d1000000) to physical address.
      readmem: type_addr: 0, addr:fffffc97d1000000, size:32768
      __exclude_unnecessary_pages: Can't read the buffer of struct page.
      create_2nd_bitmap: Can't exclude unnecessary pages.

    To fix this, SECTION_MAP_LAST_BIT needs to be updated. The bit has not
    been used until the addition, so we can just increase the value.

    Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>

Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Acked-by: Dave Young <dyoung@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2019-08-06 11:15:14 +08:00
Kazuhito Hagio
076b839dd4 makedumpfile: Do not proceed when get_num_dumpable_cyclic() fails
Backport from the makedumpfile devel branch in upstream.

commit c1b834f80311706db2b5070cbccdcba3aacc90e5
Author: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Date:   Tue Jul 23 11:50:52 2019 -0400

    [PATCH] Do not proceed when get_num_dumpable_cyclic() fails

    Currently, when get_num_dumpable_cyclic() fails and returns FALSE in
    create_dump_bitmap(), info->num_dumpable is set to 0 and makedumpfile
    proceeds to write a broken dumpfile slowly with incorrect progress
    indicator due to the value.

    It should not proceed when get_num_dumpable_cyclic() fails.

    Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>

Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Acked-by: Dave Young <dyoung@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2019-08-06 11:14:40 +08:00
Kairui Song
80de723566 Release 2.0.20-2
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-08-02 14:51:21 +08:00
Kairui Song
cb1e5463b5 x86: Fix broken multiboot2 buliding for i386
When building for i386, an error occured:

kexec/arch/i386/kexec-x86.c:39:22: error: 'multiboot2_x86_probe'
undeclared here (not in a function); did you mean 'multiboot_x86_probe'?
39 |  { "multiboot2-x86", multiboot2_x86_probe, multiboot2_x86_load,
   |                      ^~~~~~~~~~~~~~~~~~~~
   |                      multiboot_x86_probe

kexec/arch/i386/kexec-x86.c:39:44: error: 'multiboot2_x86_load'
undeclared here (not in a function); did you mean 'multiboot_x86_load'?
39 |  { "multiboot2-x86", multiboot2_x86_probe, multiboot2_x86_load,
   |                                            ^~~~~~~~~~~~~~~~~~~
   |                                            multiboot_x86_load
kexec/arch/i386/kexec-x86.c:40:4: error: 'multiboot2_x86_usage'
 undeclared here (not in a function); did you mean 'multiboot_x86_usage'?
40 |    multiboot2_x86_usage },
   |    ^~~~~~~~~~~~~~~~~~~~
   |    multiboot_x86_usage

Fix this issue by putting the definition in the right header, also tidy
up Makefile.

Signed-off-by: Kairui Song <kasong@redhat.com>
2019-08-02 11:24:03 +08:00
Kairui Song
03fd19454b Release 2.0.20-1
Rebase to latest upstream and make a release

Signed-off-by: Kairui Song <kasong@redhat.com>
2019-07-31 15:54:46 +08:00
Kairui Song
4b7198f651 Update makedumpfile to 1.6.6
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-07-31 15:54:42 +08:00
Kairui Song
17981c14ec kexec-tools.spec: Use a macro for makedumpfile version
Don't repeat it again and again and make it easier to maintain.

Signed-off-by: Kairui Song <kasong@redhat.com>
2019-07-31 15:53:26 +08:00
Fedora Release Engineering
603cd09b76 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 11:23:07 +00:00
Vasiliy Glazov
c4a2ecb6e4 Add systemd-udev require.
It is needed to proper owning of /usr/lib/udev/rules.d directory.
2019-06-11 07:46:47 +00:00
Lianbo Jiang
b1250de389 makedumpfile: x86_64: Add support for AMD Secure Memory Encryption
Backport from the makedumpfile devel branch in upstream.

commit d222b01e516bba73ef9fefee4146734a5f260fa1 (HEAD -> devel)
Author: Lianbo Jiang <lijiang@redhat.com>
Date:   Wed Jan 30 10:48:53 2019 +0800

    [PATCH] x86_64: Add support for AMD Secure Memory Encryption

    On AMD machine with Secure Memory Encryption (SME) feature, if SME is
    enabled, page tables contain a specific attribute bit (C-bit) in their
    entries to indicate whether a page is encrypted or unencrypted.

    So get NUMBER(sme_mask) from vmcoreinfo, which stores the value of
    the C-bit position, and drop it to obtain the true physical address.

    Signed-off-by: Lianbo Jiang <lijiang@redhat.com>

Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2019-06-10 16:13:38 +08:00
Bhupesh Sharma
3001788f4c Add aarch64 specific kdump.sysconfig and use 'nr_cpus' instead of 'maxcpus'
'maxcpus' setting normally don't work on several kdump enabled systems
due to a known udev issue.

Currently the fedora kdump configuration is set as the following on the
aarch64 systems:

 # cat /etc/sysconfig/kdump
<..snip..>
  # This variable lets us append arguments to the current kdump
  # commandline after processed by KDUMP_COMMANDLINE_REMOVE
  # KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 reset_devices"
<..snip..>

Since the 'maxcpus' setting doesn't limit the number of SMP CPUs,
so the kdump kernel still boots with all CPUs available on the system.
For e.g on the qualcomm amberwing its 46 CPUs:

  # lscpu
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              46
On-line CPU(s) list: 0-45
Thread(s) per core:  1
Core(s) per socket:  46
Socket(s):           1
NUMA node(s):        1
Vendor ID:           Qualcomm
Model:               1
Model name:          Falkor
Stepping:            0x0
CPU max MHz:         2600.0000
CPU min MHz:         600.0000
BogoMIPS:            40.00
L1d cache:           32K
L1i cache:           64K
L2 cache:            512K
L3 cache:            58880K
NUMA node0 CPU(s):   0-45
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid asimdrdm

This causes the memory consumption in the kdump kernel to swell up and
we can end up having OOM issues in the kdump kernel boot.

Whereas if we use 'nr_cpus=1' in the bootargs, the number of SMP CPUs in
the kdump kernel get limited to 1.

The 'swiotlb=noforce' setting in bootargs provide us extra guarding, to
ensure the crash kernel size requirements do not swell on systems
which support swiotlb.

With the above settings, crashkernel boots properly (without OOM) on all
the aarch64 boards I could test on - qualcomm amberwings, hp-moonshots
and hpe-apache (thunderx2) for crash dump saving on local disk.

Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
Acked-by: Pingfan Liu <piliu@redhat.com>
2019-05-29 17:04:20 +08:00
Kairui Song
8af28759ec Release 2.0.19-2
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-05-20 17:08:28 +08:00
Pingfan Liu
a585f981bd kexec.rules: create dedicated udev rules for ppc64
On powerpc, after hot add cpu and trigger crash on the hot-added cpu, the
kdump kernel hangs after "I'm in purgatory".

The current udev rules expects the dtb to be rebuit on cpu add/remove event.
But since powerpc does not follow the standard cpu hot add framework, it
only ejects online/offline event to user space when cpu is hot
added/removed, instead of add/remove event.  Pingfan tried fixing that but
it didn't please the maintainer as it breaks some old userspace tools.

Due to the failure of dtb's rebuilding, KDump kernel fails to get the
'boot_cpuid' and eventually fails to boot [see early_init_dt_scan_cpus() in
arch/powerpc/kernel/prom.c file] if system crashes on hot-added CPU.

Work around it by changing udev rules on powerpc to onlne/offline.

As for offline message, it is even useless on powerpc, and can be dropped.
See the explain: On powerpc, /sys/devices/system/cpu/cpuX nodes are present
for all "possible", irrespective of whether a CPU is hot-added/removed.
crash_notes are already built for all /sys/devices/system/cpu/cpuX nodes and
these nodes are present for all "possible" CPUs
(online/offline/could-be-hot-removed/could-be-hot-added)

Signed-off-by: Pingfan Liu <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2019-05-06 16:22:28 +08:00
Kairui Song
24f9b31080 Release 2.0.19-1
Rebase to latest kexec-tools upstream and remove backport patch.

Signed-off-by: Kairui Song <kasong@redhat.com>
2019-03-22 17:06:27 +08:00
Kairui Song
ace66284ab Update eppic to latest snapshot
Also don't override LDFLAGS when building eppic lib, this ensure
hardening won't get overrided.

Signed-off-by: Kairui Song <kasong@redhat.com>
2019-03-21 11:19:41 +08:00
Kairui Song
be6200f044 Release 2.0.18-5
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-02-22 17:11:27 +08:00
Kairui Song
97890ecbac Update eppic to latest upstream snapshot
eppic project have moved to github, update to latest upstream snapshot,
change source link and tar file naming style to fit github's URL format.

This fix the O0 warning reported by annocheck and passes all distro package
flag checking.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2019-02-22 17:09:07 +08:00
Kairui Song
2fc7312546 Enable building with hardening flags
Backport the patches required to make the hardening build flags work with
kexec-tools and makedumpfile, and enabld hardening flags in spec file.
This will make the pacakge pass all warnings for kexec and makedumpfile
reported by annocheck.

Didn't find any issue with basic tests with kexec and makedumpfile.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2019-02-22 17:09:07 +08:00
Fedora Release Engineering
b5736e4663 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 05:20:38 +00:00
Igor Gnatenko
95e9a62674 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:10 +01:00
Kairui Song
7f9dd45688 Release 2.0.18-3
Signed-off-by: Kairui Song <kasong@redhat.com>
2019-01-22 18:08:05 +08:00
Kairui Song
9c2dc28713 Release 2.0.18-2
Signed-off-by: Kairui Song <kasong@redhat.com>
2018-12-07 01:35:01 +08:00
Kairui Song
fca27c3a44 Update makedumpfile to 1.6.5
Signed-off-by: Kairui Song <kasong@redhat.com>
2018-12-07 01:33:47 +08:00
Markus Linnala
65807d9855 As /etc/kdump.conf timestamp is updated do not compare it when doing rpm --verify 2018-11-13 16:23:57 +02:00
Kairui Song
435cc06cee Release 2.0.18-1
(Also add missing change log for 2.0.17-12)

Signed-off-by: Kairui Song <kasong@redhat.com>
2018-11-06 00:33:29 +08:00
Kairui Song
0c609b0a37 Release 2.0.17-12
Signed-off-by: Kairui Song <kasong@redhat.com>
2018-11-01 22:55:02 +08:00
Kairui Song
1c97aee728 Throttle kdump reload request triggered by udev event
Previously, kdump will restart / reload for many times on hotplug
event, especially memory hotplug events. Hotplugged memory may
generate many udev event as memory are managed and hotplugged in
small chunks by the kernel.

This results in unnecessary system workload and an actually longer
delay of kdump reload and the hotplug event, as udev will either
get blocked or kdumpctl will be waiting for other triggered operation.

To fix this, introduce a kdump-udev-throttler as an agent which will
be called by udev and merge concurrent kdump restart requests. Tested
with a Hyper-V VM which is failing due to udev timeout previously,
no new issues found.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2018-11-01 22:33:17 +08:00
Kairui Song
80357ee9b4 Release 2.0.17-11
Signed-off-by: Kairui Song <kasong@redhat.com>
2018-10-15 15:29:01 +08:00
Kairui Song
9b6e312447 Enable dracut squash module
In dracut-049, a new squash module is introduced, it can reduce the
memory usage of kdump initramfs in the capture kernel, this helps a lot
on lowering the risk of OOM failure.

Tested with latest rawhide with NFS, SSH and local dump.

Signed-off-by: Kairui Song <kasong@redhat.com>
2018-10-15 15:01:31 +08:00
Kairui Song
67e5c8d226 Release 2.0.17-10
Signed-off-by: Kairui Song <kasong@redhat.com>
2018-08-22 16:31:18 +08:00
Bhupesh Sharma
00da17176d kexec: fix for "Unhandled rela relocation: R_X86_64_PLT32" error
Resolves: bz1619122
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1619122

This patch fixes the "Unhandled rela relocation: R_X86_64_PLT32" error
that we are seeing with Fedora 29 (and newer kernels > 4.18) which
trying to run kexec/kdump on x86_64 machines.

The patch is being discussed upstream and has been ACK'ed by Baoquan and
myself (see <https://www.spinics.net/lists/kexec/msg21255.html>) and I
have also tested the same on Fedora 29/rawhide x86_64 machine as well:

Before the patch:
----------------
[root@hp-bl480c-01 ~]# kdumpctl restart
  kexec: unloaded kdump kernel
  Stopping kdump: [OK]
  Unhandled rela relocation: R_X86_64_PLT32
  kexec: failed to load kdump kernel
  Starting kdump: [FAILED]

After the patch:
---------------
[root@hp-bl480c-01 ~]# kdumpctl restart
  kexec: unloaded kdump kernel
  Stopping kdump: [OK]
  kexec: loaded kdump kernel
  Starting kdump: [OK]

Suggested Upstream Fix:

    In response to a change in binutils, commit b21ebf2fb4c
    (x86: Treat R_X86_64_PLT32 as R_X86_64_PC32) was applied to
    the linux kernel during the 4.16 development cycle and has
    since been backported to earlier stable kernel series. The
    change results in the failure message in $SUBJECT when
    rebooting via kexec.

    Fix this by replicating the change in kexec.

    Signed-off-by: Chris Clayton <chris2553@googlemail.com>

Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2018-08-22 15:48:43 +08:00
Kairui Song
e9f3823082 Release 2.0.17-9 2018-08-07 17:35:38 +08:00
Kairui Song
25b19d3627 Remove kdump-anaconda subpackage
Kdump anaconda has been included as a subpackage for a long time, which
is not a good practice, as the anaconda plugin should be built as
noarch and it does not belong to kexec-tools. We have created a new
package 'kdump-anaconda-addon', so remove it here.

The release version should be bumped later so that kdump-anaconda-addon
could mark previous versions as obsoleted.

Signed-off-by: Kairui Song <kasong@redhat.com>
2018-08-07 17:22:01 +08:00
Dave Young
3b8642c280 Release 2.0.17-8 2018-07-26 20:31:44 +08:00
Dave Young
9c7fea7ff7 Fix armv7hl build failure
armv7hl build failed because no makedumpfile* built but the latest commit
tries to install them.

Exclude armv7hl in the code chunk.

Signed-off-by: Dave Young <dyoung@redhat.com>
2018-07-26 20:19:08 +08:00
Dave Young
d319cbbb6d Release 2.0.17-7
Signed-off-by: Dave Young <dyoung@redhat.com>
2018-07-26 19:54:11 +08:00
Dave Young
3e065ac92e Remove koji build workaround patch since koji build works without the patch now
Signed-off-by: Dave Young <dyoung@redhat.com>
2018-07-26 19:51:25 +08:00
Bhupesh Sharma
bb6dd93d7a kexec-tools.spec: Drop kexec-tools-2.0.3-disable-kexec-test.patch
kexec_test seems to be no longer used upstream, so we had introduced
the 'kexec-tools-2.0.3-disable-kexec-test.patch' earlier to disable the
same from fedora kexec-tools as well.

However an earlier patch "Remove obsolete kdump tool" now explicitly
installs needed files via appropriate logic in .spec file, so we can
drop this patch now to reduce the maintenance burden.

Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
2018-07-26 19:51:25 +08:00
Bhupesh Sharma
0b9095c11b Remove obsolete kdump tool
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1441677
Testing: On x86_64 Fedora machine. After this patch kdump utility and related
        man page cannot be found on this machine:

        [root@tyan-gt24-09 ~]# which kdump
        /usr/bin/which: no kdump in
        (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

	[root@tyan-gt24-09 ~]# man kdump
        No manual entry for kdump

Update the fedora 'kexec-tools.spec' to not install the obsolete
kdump tool.

I have submitted an upstream patch to obsolete the kdump tool from
upstream kexec-tools (which has been accepted), but after an internal
discussion we decided not to backport the upstream 'kexec-tools' patch
(which does the same) for fedora, as we would prefer to manage the
changes directly in the .spec file itself.

Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
2018-07-26 19:51:04 +08:00
Fedora Release Engineering
3de202cfdb - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 07:00:01 +00:00
Dave Young
5350d31f56 Release 2.0.17-5 2018-07-09 12:48:20 +08:00
Dave Young
9913d44d9e Update makedumpfile 1.6.4 2018-07-09 12:45:31 +08:00
Pingfan Liu
6832be14f2 dracut-module-setup.sh: pass ip=either6 param for ipv6
Kdump always use _proto=dhcp for both ipv4 and ipv6.  But for ipv6
the dhcp address assignment is not like ipv4, there are different ways
for it, stateless and stateful, see below document:
https://fedoraproject.org/wiki/IPv6Guide

In case stateless, kernel can do the address assignment, dracut use
_proto=auto6;  for stateful case, dracut use _proto=dhcp6.
But it is hard to decide whether stateless or stateful takes effect,
hence, dracut introduces ip=either6 option, which can try both of these
method automatically for us. For detail, refer to dracut:
commit 67354ee 40network: introduce ip=either6 option

We do not see bug reports before because for the most auto6 cases
kernel assign ip address before dhclient, kdump just happened to work.

Signed-off-by: Pingfan Liu <piliu@redhat.com>
2018-07-09 12:43:28 +08:00
Dave Young
e4a27dde51 Resolves: bz1594827
Fix installation error for kdump anaconda addon.
2018-06-27 15:09:58 +08:00
Dave Young
0dad02e4bb Release 2.0.17-3 2018-05-30 10:50:36 +08:00
Lianbo Jiang
1704064885 Add early kdump support in initramfs.
Kdump service starts too late, so early crashes will have no chance
to get kdump kernel booting, this will cause crash information to be
lost. It is necessary to add a dracut module in order to load crash
kernel and initramfs as early as possible. You can provide "rd.early
kdump" in grub commandline to enable, then the early kdump will load
those files like the normal kdump, which is disabled by default.

For the normal kdump service, it can check whether the early kdump
has loaded the crash kernel and initramfs. It has no conflict with
the early kdump.

If you rebuild the new initramfs for early kdump, the new initramfs
size will become large, because it will put the vmlinuz and kdump
initramfs into the new initramfs.

In addition, early kdump doesn't support fadump.

Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
Reviewed-by: Kazuhito Hagio <khagio@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2018-05-29 10:19:19 +08:00
Dave Young
a95fcea412 Release 2.0.17-2
Pull in makedumpfile 1.6.3
2018-04-28 14:41:25 +08:00
Dave Young
62999dab42 Add missing changelog in spec 2018-04-28 14:30:58 +08:00
Dave Young
6e25286a97 Release 2.0.17-1
Pull upstream 2.0.17
2018-04-26 13:19:12 +08:00
Dave Young
98cc66a34d Release 2.0.16-6 2018-04-08 17:03:04 +08:00
Igor Gnatenko
4d1e8aadc8
Escape macros in %changelog
Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-09 09:04:52 +01:00
Dave Young
13107c8084 Fix wrong changelog date 2018-02-07 12:26:19 +08:00
Dave Young
0ee2dc96a5 Release 2.0.16-4
-update anaconda addon migrate with Anaconda changes.
2018-02-07 11:29:16 +08:00
Dave Young
84311089a5 Release 2.0.16-3
Workaround a build failure (rhbz1520805)
2017-12-08 11:44:14 +08:00
Dave Young
919a3299ee Workaround a koji build failure
with below CFLAGS, kexec-tools can not build:
--specs=/usr/lib/rpm/redhat/redhat-annobin-cc1

segfault happened while strip the purgatory:

gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -mcmodel=large -Os -fno-builtin -ffreestanding -fno-zero-initialized-in-bss -fno-PIC -fno-PIE -fno-stack-protector -mcmodel=large -Wl,--no-undefined -nostartfiles -nostdlib -nodefaultlibs -e purgatory_start -r -Wl,-Map=purgatory/purgatory.map -o purgatory/purgatory.ro.sym purgatory/purgatory.o purgatory/printf.o purgatory/string.o purgatory/arch/x86_64/entry64-32.o purgatory/arch/x86_64/entry64.o purgatory/arch/x86_64/setup-x86_64.o purgatory/arch/x86_64/stack.o purgatory/arch/x86_64/purgatory-x86_64.o purgatory/arch/i386/entry32-16.o purgatory/arch/i386/entry32-16-debug.o purgatory/arch/i386/crashdump_backup.o purgatory/arch/i386/console-x86.o purgatory/arch/i386/vga.o purgatory/arch/i386/pic.o purgatory/sha256.o
strip --strip-debug -o purgatory/purgatory.ro purgatory/purgatory.ro.sym
make: *** [purgatory/Makefile:69: purgatory/purgatory.ro] Segmentation fault (core dumped)

koji build link:
https://kojipkgs.fedoraproject.org//work/tasks/6067/23536067/build.log

Reported rhbz1520805, a binutils bug is pending to be fixed,
Will revert this once binutils bug is fixed and usable in koji build system.

Signed-off-by: Dave Young <dyoung@redhat.com>
2017-12-08 11:42:30 +08:00
Dave Young
5604e2efb4 Release 2.0.16-2
Signed-off-by: Dave Young <dyoung@redhat.com>
2017-12-04 12:54:01 +08:00
Dave Young
bdd2ac6b93 Release 2.0.16-1
Signed-off-by: Dave Young <dyoung@redhat.com>
2017-11-21 12:54:35 +08:00
Dave Young
a2d284eea8 Release 2.0.15-15 2017-11-09 13:46:34 +08:00
Dave Young
823c962ff1 Release 2.0.15-14 2017-10-11 09:59:00 +08:00
Dave Young
4594c9830d Release 2.0.15-13 2017-09-06 15:48:35 +08:00
Xunlei Pang
e067d77dfc mkdumprd: apply dracut "--hostonly-cmdline" and "--no-hostonly-default-device"
Dracut has "--hostonly-cmdline" which can generate cmdlines(if any)
regarding the dump target, it's an existing way for us to use to
simplify the code. E.g. We already removed generate_lvm_cmdlines(),
to use "--hostonly-cmdline".

But "--hostonly-cmdline" has other issues(e.g. BZ1451717), it adds
needless devices for kdump like root device.

Now dracut supports "--no-hostonly-default-device" which enables
us to only add the kdump target, which can avoid needless devices
being recognized under kdump. Thus "--hostonly-cmdline" side effects
can be avoided with the help of "--no-hostonly-default-device".

This patch applies dracut's "--hostonly-cmdline" together with
"--no-hostonly-default-device" to achieve above-mentioned purpose.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2017-09-06 15:40:04 +08:00
Dave Young
c8ab07e72b Release 2.0.15-12
btw, fixed the bogus date in rpm spec changelog
2017-08-17 16:58:06 +08:00
Dave Young
4384995b3d makedumpfile: fix 4.13 kernel larget vmcore bug
Added patch from panand which was accepted by upstream but not merged in upstream yet.
kexec-tools-2.0.15-makedumpfile-fix-SECTION_MAP_MASK-for-kernel-bigger-than-4.13.patch
2017-08-17 16:50:23 +08:00
Dave Young
238f7d836c Release 2.0.15-11
[From ville.skytta@iki.fi]
- Own the /usr/share/makedumpfile dir
- Mark COPYING as %%license
2017-08-15 09:50:35 +08:00
Dave Young
0ffa712fab Release 2.0.15-10 2017-08-08 10:10:50 +08:00
Dave Young
00ceca7f99 Release 2.0.15-9
https://bugzilla.redhat.com/show_bug.cgi?id=1474706

Makedumpfile failed with below error messages, which is caused by kernel changes 65ade2f872b474fa8a04c2d397783350326634e6:

Buffer size for the cyclic mode: 95992
vtop4_x86_64: Can't get the symbol of init_level4_pgt.
readmem: Can't convert a virtual address(ffffffff8fe18284) to physical address.
readmem: type_addr: 0, addr:ffffffff8fe18284, size:390
check_release: Can't get the address of system_utsname.

Pull in Pratyush's fix in upstream makedumpfile (not merged yet but acked by
maintainer)

Signed-off-by: Dave Young <dyoung@redhat.com>
2017-08-07 09:44:42 +08:00
Fedora Release Engineering
1ad0c239a5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 00:20:54 +00:00
Florian Weimer
610f08562d Rebuild with fixed binutils for ppc64le (#1475636) 2017-07-30 18:12:58 +02:00
Dave Young
d968a68263 Release 2.0.15-6
Update makedumpfile to upstream 1.6.2

Signed-off-by: Dave Young <dyoung@redhat.com>
2017-07-28 14:42:15 +08:00