On 10/19/15 at 04:29pm, Dangyi Liu wrote:
Use KDUMP_COMMANDLINE_REMOVE config instead of hardcode them in
kdumpctl. System admins can also specify what to remove as they like.
However, this patch makes a change that kdump command line from
KDUMP_COMMANDLINE will not be trimmed any more.
Signed-off-by: Dangyi Liu <dliu(a)redhat.com>
Cc: Dave Young <dyoung(a)redhat.com>
Cc: Minfei Huang <mhuang(a)redhat.com>
OK, I didn't follow this issue earlier. But I have some questions.
Adding KDUMP_COMMANDLINE_REMOVE to put those kernel-parameters under
/etc/sysconfig means they can be switched by users or admins surely, just
like we do in KDUMP_COMMANDLINE_APPEND. I want to remind that all of
stuffs put in KDUMP_COMMANDLINE_REMOVE are proved helpless for vmcore
dumping. Turning one or several of them could cause bugs, but turning
them off can prevent bugs and don't incur dumping issues. Then I am
wondering why we want them to be turned on by users. E.g for
"crashkernel" could you tell in what cases user want to turn it on in
kdump kernel?
2nd question is if we all agree to put them in KDUMP_COMMANDLINE_REMOVE
do users know what they are used for and why they need remove and in
which case they can be opened? Do you have a plan to elaborate each of
them?
3rd, I saw you were confused about which one should be handled firstly
about KDUMP_COMMANDLINE_APPEND and KDUMP_COMMANDLINE_REMOVE. This is a
kind of torture we make to put on ourselves. We give users of kdump too
many options.
I personally do not like this idea. But I don't oppose it strongly since
people bring it up.
Thanks
Baoquan
---
kdump.sysconfig | 4 ++++
kdump.sysconfig.i386 | 4 ++++
kdump.sysconfig.ppc64 | 4 ++++
kdump.sysconfig.ppc64le | 4 ++++
kdump.sysconfig.s390x | 4 ++++
kdump.sysconfig.x86_64 | 4 ++++
kdumpctl | 3 +--
7 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/kdump.sysconfig b/kdump.sysconfig
index effe466..f93aa25 100644
--- a/kdump.sysconfig
+++ b/kdump.sysconfig
@@ -14,6 +14,10 @@ KDUMP_KERNELVER=""
# /proc/cmdline
KDUMP_COMMANDLINE=""
+# This variable lets us remove arguments from the current kdump commandline.
+# This only works when the command line is taken from /proc/cmdline.
+KDUMP_COMMANDLINE_REMOVE="crashkernel hugepages hugepagesz panic_on_warn
slub_debug"
+
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 reset_devices"
diff --git a/kdump.sysconfig.i386 b/kdump.sysconfig.i386
index bb7a6e5..b6ca58b 100644
--- a/kdump.sysconfig.i386
+++ b/kdump.sysconfig.i386
@@ -14,6 +14,10 @@ KDUMP_KERNELVER=""
# /proc/cmdline
KDUMP_COMMANDLINE=""
+# This variable lets us remove arguments from the current kdump commandline.
+# This only works when the command line is taken from /proc/cmdline.
+KDUMP_COMMANDLINE_REMOVE="crashkernel hugepages hugepagesz panic_on_warn
slub_debug"
+
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off
udev.children-max=2 panic=10 rootflags=nofail transparent_hugepage=never"
diff --git a/kdump.sysconfig.ppc64 b/kdump.sysconfig.ppc64
index dd09598..de2364e 100644
--- a/kdump.sysconfig.ppc64
+++ b/kdump.sysconfig.ppc64
@@ -14,6 +14,10 @@ KDUMP_KERNELVER=""
# /proc/cmdline
KDUMP_COMMANDLINE=""
+# This variable lets us remove arguments from the current kdump commandline.
+# This only works when the command line is taken from /proc/cmdline.
+KDUMP_COMMANDLINE_REMOVE="crashkernel hugepages hugepagesz panic_on_warn
slub_debug"
+
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices
cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10
rootflags=nofail kvm_cma_resv_ratio=0 transparent_hugepage=never"
diff --git a/kdump.sysconfig.ppc64le b/kdump.sysconfig.ppc64le
index dd09598..de2364e 100644
--- a/kdump.sysconfig.ppc64le
+++ b/kdump.sysconfig.ppc64le
@@ -14,6 +14,10 @@ KDUMP_KERNELVER=""
# /proc/cmdline
KDUMP_COMMANDLINE=""
+# This variable lets us remove arguments from the current kdump commandline.
+# This only works when the command line is taken from /proc/cmdline.
+KDUMP_COMMANDLINE_REMOVE="crashkernel hugepages hugepagesz panic_on_warn
slub_debug"
+
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices
cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10
rootflags=nofail kvm_cma_resv_ratio=0 transparent_hugepage=never"
diff --git a/kdump.sysconfig.s390x b/kdump.sysconfig.s390x
index b103a88..9fce28d 100644
--- a/kdump.sysconfig.s390x
+++ b/kdump.sysconfig.s390x
@@ -14,6 +14,10 @@ KDUMP_KERNELVER=""
# /proc/cmdline
KDUMP_COMMANDLINE=""
+# This variable lets us remove arguments from the current kdump commandline.
+# This only works when the command line is taken from /proc/cmdline.
+KDUMP_COMMANDLINE_REMOVE="crashkernel hugepages hugepagesz panic_on_warn
slub_debug"
+
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
KDUMP_COMMANDLINE_APPEND="nr_cpus=1 cgroup_disable=memory numa=off
udev.children-max=2 panic=10 rootflags=nofail transparent_hugepage=never"
diff --git a/kdump.sysconfig.x86_64 b/kdump.sysconfig.x86_64
index 7991d68..fc2961d 100644
--- a/kdump.sysconfig.x86_64
+++ b/kdump.sysconfig.x86_64
@@ -14,6 +14,10 @@ KDUMP_KERNELVER=""
# /proc/cmdline
KDUMP_COMMANDLINE=""
+# This variable lets us remove arguments from the current kdump commandline.
+# This only works when the command line is taken from /proc/cmdline.
+KDUMP_COMMANDLINE_REMOVE="crashkernel hugepages hugepagesz panic_on_warn
slub_debug"
+
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory
mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail acpi_no_memhotplug
transparent_hugepage=never"
diff --git a/kdumpctl b/kdumpctl
index 9f7e56b..3b0760b 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -102,11 +102,10 @@ prepare_cmdline()
local cmdline;
if [ -z "$KDUMP_COMMANDLINE" ]; then
cmdline=`cat /proc/cmdline`
+ cmdline=`remove_cmdline_param "$cmdline" ${KDUMP_COMMANDLINE_REMOVE}`
else
cmdline=${KDUMP_COMMANDLINE}
fi
- cmdline=`remove_cmdline_param "$cmdline" crashkernel hugepages hugepagesz
panic_on_warn slub_debug`
-
cmdline="${cmdline} ${KDUMP_COMMANDLINE_APPEND}"
--
2.4.3
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec