Commit Graph

1 Commits

Author SHA1 Message Date
Philipp Rudo
021f5a146e kdumpctl: Drop default kexec '-d' option
Resolves: RHEL-46773

commit 3028529915d3026e62b59d8f3faadddd410baa75
Author: Philipp Rudo <prudo@redhat.com>
Date:   Fri Jun 14 11:48:24 2024 +0200

    kdumpctl: Drop default kexec '-d' option

    Kernel commits cbc2fe9d9cb2 ("kexec_file: add kexec_file flag to control
    debug printing") and a85ee18c7900 ("kexec_file: print out debugging
    message if required") added debug messages to the kexec_file_load system
    call when option -d is provided to the kexec user space tool. As
    kexec_file_load is the default and option -d is set by default these
    messages are always printed when a crash kernel is loaded. This not only
    clutters the kernel log but also potentially leaks confidential kernel
    information to users. As the messages are printed to the kernel log, not
    stderr, the redirection to /var/log/kdump.log won't catch them. This
    will become even more problematic as for RHEL10 the kernel will be built
    without support for the kexec_load system call. So kexec_file_load will
    be the only choice in the future.

    The redirection also caused confusion in a recent bug report. There a
    user moved a working /etc/sysconfig/kdump from ppc to s390 with
    KEXEC_ARGS containing the --dt-no-old-root option. This option is arch
    specific and does not exist on s390. Thus the kexec-tools failed with an
    'unrecognized option' error followed by the usage(). The problem was
    that the 'unrecognized option' error is printed to stderr, which got
    redirected to /var/log/kdump.log, while the usage() is printed to
    stdout, which ended up in the systemd journal. This caused confusion as
    the user only checked the journal and found the usage() without any
    error message.

    Thus remove the default -d option and the redirection of stderr to
    /var/log/kdump.log for the kexec-tools user space tool.

    This commit ultimately reverts 88a8b94 ("kdumpctl: add the '-d' option to
    enable the kexec loading debugging messages").

    Signed-off-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Philipp Rudo <prudo@redhat.com>
2024-07-09 15:17:35 +02:00