Commit Graph

268 Commits

Author SHA1 Message Date
Coiby Xu 6a8e087180 get kdump ifname once in kdump_install_net
Resolves: bz1950932
Upstream: Fedora
Conflict: None

commit 97ee5dc64c
Author: Coiby Xu <coxu@redhat.com>
Date:   Thu May 6 09:20:26 2021 +0800

    get kdump ifname once in kdump_install_net

    Signed-off-by: Coiby Xu <coxu@redhat.com>
    Acked-by: Kairui Song <kasong@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2021-05-13 15:36:46 +08:00
Coiby Xu 54611cd628 Implement IP netmask calculation to replace "ipcalc -m"
Resolves: bz1947347
Upstream: Fedora
Conflict: None

commit 1ca1b71780
Author: Coiby Xu <coxu@redhat.com>
Date:   Thu Apr 8 11:44:26 2021 +0800

    Implement IP netmask calculation to replace "ipcalc -m"

    Recently, dracut-network drops depedency on dhcp-client which requires
    ipcalc. Thus the dependency chain
    "kexec-tools -> dracut-network -> dhcp-client -> ipcalc"
    is broken. When NIC is configured to a static IP, kexec-tools depended
    on "ipcalc -m" to get netmask. This commit implements the shell
    equivalent of "ipcalc -m".

    The following test code shows cal_netmask_by_prefix is consistent with
    "ipcalc -m",

        #!/bin/bash
        . dracut-module-setup.sh

        for i in {0..128}; do
            mask_expected=$(ipcalc -m fe::/$i| cut -d"=" -f2)
            mask_actual=$(cal_netmask_by_prefix $i "-6")
            if [[ "$mask_expected" != "$mask_actual" ]]; then
                echo "prefix="$i, "expected="$mask_expected, "acutal="$mask_actual
                exit
            fi
        done

        echo "IPv6 tests passed"

        for i in {0..32}; do
            mask_expected=$(ipcalc -m 8.8.8.8/$i| cut -d"=" -f2)
            mask_actual=$(cal_netmask_by_prefix $i "")
            if [[ "$mask_expected" != "$mask_actual" ]]; then
                echo "prefix="$i, "expected="$mask_expected, "acutal="$mask_actual
                exit
            fi
        done

        echo "IPv4 tests passed"

        i=-2
        res=$(cal_netmask_by_prefix "$i" "")
        if [[ $? -ne 1 ]]; then
            echo "cal_netmask_by_prefix should exit when prefix<0"
            exit
        fi

        res=$(cal_netmask_by_prefix "$i" "")
        if [[ $? -ne 1 ]]; then
            echo "cal_netmask_by_prefix should exit when prefix<0"
            exit
        fi

        i=33
        $(cal_netmask_by_prefix $i "")
        if [[ $? -ne 1 ]]; then
            echo "cal_netmask_by_prefix should exit when prefix>32 for IPv4"
            exit
        fi

        i=129
        $(cal_netmask_by_prefix $i "-6")
        if [[ $? -ne 1 ]]; then
            echo "cal_netmask_by_prefix should exit when prefix>128 for IPv4"
            exit
        fi

        echo "Bad prefixes tests passed"

        echo "All tests passed"

    Reported-by: Jie Li <jieli@redhat.com>
    Signed-off-by: Coiby Xu <coxu@redhat.com>
    Acked-by: Kairui Song <kasong@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2021-05-11 06:38:58 +00:00
Pingfan Liu 540d33a082 kdump-lib.sh: introduce functions to return recommened mem size
Resolves: bz1892558
Upstream: Fedora
Conflict: None

commit 18131894b6
Author: Pingfan Liu <piliu@redhat.com>
Date:   Thu Feb 4 09:45:36 2021 +0800

    kdump-lib.sh: introduce functions to return recommened mem size

    There is requirement to decide the recommended memory size for the current
    system. And the algorithm is based on /proc/iomem, so it can align with the
    algorithm used by reserve_crashkernel() in kernel.

    Signed-off-by: Pingfan Liu <piliu@redhat.com>
    Acked-by: Kairui Song <kasong@redhat.com>

Signed-off-by: Pingfan Liu <piliu@redhat.com>
2021-04-27 10:20:25 +08:00
Tao Liu 154195d22c Release 2.0.21-7
Related: rhbz#1938165

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-04-25 14:52:55 +08:00
Tao Liu 910c20d3ce Fix incorrect vmcore permissions when dumped through ssh
Related: rhbz#1938165
Upstream: fedora
Conflict: none

commit 00785873ef
Author: Tao Liu <ltao@redhat.com>
Date:   Fri Mar 19 18:07:51 2021 +0800

    Fix incorrect vmcore permissions when dumped through ssh

    Previously when dumping vmcore to a remote machine through ssh,
    the files are created remotely and file permissions are taken
    from the default umask value, which making the files accessible to
    anyone on the remote machine.

    This patch fixed the security issue by setting a customized umask value
    before the file creation on the remote machine.

    Signed-off-by: Tao Liu <ltao@redhat.com>
    Acked-by: Kairui Song <kasong@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-04-20 16:29:34 +08:00
Tao Liu 3371584d02 Fix incorrect permissions on kdump dmesg file
Resolves: rhbz#1938165
Upstream: fedora
Conflict: none

commit 91c802ff52
Author: Tao Liu <ltao@redhat.com>
Date:   Thu Mar 18 16:52:46 2021 +0800

    Fix incorrect permissions on kdump dmesg file

    Also known as CVE-2021-20269. The kdump dmesg log files(kexec-dmesg.log,
    vmcore-dmesg.txt) are generated by shell redirection, which take the
    default umask value, making the files readable for group and others.

    This patch chmod these files, making them only accessible to owner.

    Signed-off-by: Tao Liu <ltao@redhat.com>
    Acked-by: Kairui Song <kasong@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-04-20 16:29:24 +08:00
Mohan Boddu 9ae724c9b0 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
Signed-off-by: Mohan Boddu <mboddu@redhat.com>
2021-04-16 00:55:36 +00:00
DistroBaker 19b2b92e48 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#7a0d2aaed53dc0500860691320a90bc1e695b795
2021-02-04 07:52:32 +01:00
DistroBaker 624a6443ca Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#33108ef524ff033295711f888ce2c67d457951aa
2021-01-22 08:12:00 +00:00
DistroBaker 6333173003 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#fc703518525dc85b88873120f2bcf7bffa682735
2021-01-08 13:46:38 +00:00
DistroBaker 7d0122bd5d Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#7cb4be80cdaaf85b7dcbdf8f15b113192159026b
2020-12-23 10:00:07 +00:00
DistroBaker a1014067b4 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#d5e39c9f7b721b80d2aa1afa85c38754a5be074e
2020-11-30 11:50:38 +00:00
DistroBaker c97bf1e0f8 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#4f492cf73ea11ff74f5b062e18fcea45cb5e7eeb
2020-11-20 16:10:48 +00:00
DistroBaker f12e14c178 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#4f492cf73ea11ff74f5b062e18fcea45cb5e7eeb
2020-11-20 13:33:23 +00:00
DistroBaker 17a51515f0 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#4f492cf73ea11ff74f5b062e18fcea45cb5e7eeb
2020-11-20 12:35:49 +00:00
DistroBaker 5cac7c3f96 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#bfd06661e81465d077bac435c90b4082134adf19
2020-11-05 05:34:29 +00:00
Petr Šabata f5bf4978d8 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/kexec-tools#041ba89902961b5490a7143d9596dc00d732cba0
2020-10-15 14:45:57 +02:00
Release Configuration Management c06ea8eef0 New branch setup 2020-10-08 15:59:21 +00:00