Bug 596439 - blacklisting a module in kdump.conf has no effect
blacklisting a module in kdump.conf has no effect
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kexec-tools (Show other bugs)
6.0
All Linux
low Severity high
: rc
: ---
Assigned To: Cong Wang
Chao Ye
:
Depends On:
Blocks: 524819
  Show dependency treegraph
 
Reported: 2010-05-26 14:34 EDT by Doug Chapman
Modified: 2013-09-29 22:14 EDT (History)
14 users (show)

See Also:
Fixed In Version: kexec-tools-2_0_0-79_el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 09:45:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to fix blacklisting (649 bytes, application/octet-stream)
2010-05-26 14:34 EDT, Doug Chapman
no flags Details

  None (edit)
Description Doug Chapman 2010-05-26 14:34:35 EDT
Created attachment 416971 [details]
patch to fix blacklisting

Description of problem:
The kdump.conf file has the ability to list files to be blacklisted so that they do not get loaded during a kdump boot.  This is important functionality that is needed to work around kdump problems on some larger systems.

The current version of mkdumprd adds the blacklisted file to a conf file in /etc/modprobe.d/ so that it doesn't get automatically loaded on demand however, the mkdumprd adds code to the kdump initrd that manually loads the driver anyway.

I have written a patch that prevents the initrd from manually loading modules that are blacklisted.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. add a module to the blacklist line on kdump.conf
2. force a dump
3. note that the blacklisted module still gets loaded
  
Actual results:
blacklisted module gets loaded

Expected results:
blacklisted module should not be loaded


Additional info:
Comment 2 Neil Horman 2010-05-26 15:56:44 EDT
looks fine, but instead of looping through the blacklist mods, why not just do:
echo $blacklist_mods | grep -q $module
if [ $? -eq 0 ]
then
   contineu
fi
Comment 3 Doug Chapman 2010-05-26 17:37:51 EDT
(In reply to comment #2)
> looks fine, but instead of looping through the blacklist mods, why not just do:
> echo $blacklist_mods | grep -q $module
> if [ $? -eq 0 ]
> then
>    contineu
> fi    

That is cleaner but might cause unexpected issues.  I am thinking of the case where we have a driver named e1000 and e1000e (don't recall if this is the case in RHEL6 but you get the idea).  If you were trying to blacklist e1000 this method would also blacklist e1000e which might not be the desired result.
Comment 4 Neil Horman 2010-06-01 06:46:40 EDT
hmm, ok.  I'll commit this when pm approves it
Comment 5 RHEL Product and Program Management 2010-06-02 10:45:48 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 7 Chao Ye 2010-07-30 02:28:27 EDT
Verified with -131.el6 on x86_64:
============================================================
[root@hp-dl2x170g6-01 ~]# cat /etc/kdump.conf; service kdump restart; lsmod | grep ipv6; yum list kexec-tools; echo c > /proc/sysrq-trigger
......
ext4 /dev/sda1
core_collector makedumpfile --nosuchoption
blacklist ipv6
default shell
Stopping kdump:[  OK  ]
Detected change(s) the following file(s):
  
  /etc/kdump.conf
Rebuilding /boot/initrd-2.6.32-52.el6.x86_64kdump.img
Warning: There is not enough space to save a vmcore.
         The size of /dev/sda1 should be much greater than 5983920 kilo bytes.
Your running kernel is using more than 70% of the amount of space you reserved for kdump, you should consider increasing your crashkernel reservation[WARNING]
Starting kdump:[  OK  ]
ipv6                  320850  60 
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Installed Packages
kexec-tools.x86_64                    2.0.0-131.el6                    installed
......
/ # lsmod | grep ipv6
/ # uname -a
Linux (none) 2.6.32-52.el6.x86_64 #1 SMP Wed Jul 21 11:50:07 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
......
-------------------------------------------------------------------------------
[root@hp-dl2x170g6-01 ~]# cat /etc/kdump.conf; service kdump restart; lsmod | grep ipv6; yum list kexec-tools; echo c > /proc/sysrq-trigger
......
ext4 /dev/sda1
core_collector makedumpfile --nosuchoption
#blacklist ipv6
default shell
Stopping kdump:[  OK  ]
Detected change(s) the following file(s):
  
  /etc/kdump.conf
Rebuilding /boot/initrd-2.6.32-52.el6.x86_64kdump.img
Warning: There is not enough space to save a vmcore.
         The size of /dev/sda1 should be much greater than 5983920 kilo bytes.
Your running kernel is using more than 70% of the amount of space you reserved for kdump, you should consider increasing your crashkernel reservation[WARNING]
Starting kdump:[  OK  ]
ipv6                  320850  60 
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Installed Packages
kexec-tools.x86_64                    2.0.0-131.el6                    installed
......
/ # lsmod | grep ipv6
ipv6                  320850 38 
/ # uname -a
Linux (none) 2.6.32-52.el6.x86_64 #1 SMP Wed Jul 21 11:50:07 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
......

Verified with -131.el6 on i386:
============================================================
[root@hp-xw4600-01 ~]# cat /etc/kdump.conf; service kdump restart; lsmod | grep ipv6; yum list kexec-tools; echo c > /proc/sysrq-trigger
......
ext4 /dev/sda1
core_collector makedumpfile --nosuchopion
#blacklist ipv6
default shell
Stopping kdump:                                            [  OK  ]
Detected change(s) the following file(s):
  
  /etc/kdump.conf
Rebuilding /boot/initrd-2.6.32-52.el6.i686kdump.img
Warning: There is not enough space to save a vmcore.
         The size of /dev/sda1 should be much greater than 899896 kilo bytes.
Starting kdump:                                            [  OK  ]
ipv6                  264447  38 
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Installed Packages
kexec-tools.i686                     2.0.0-131.el6                     installed
......
/ # lsmod | grep ipv6
ipv6                  264447 14 
/ # uname -a
Linux (none) 2.6.32-52.el6.i686 #1 SMP Wed Jul 21 11:15:32 EDT 2010 i686 i686 i386 GNU/Linux
......
-------------------------------------------------------------------------------
[root@hp-xw4600-01 ~]# cat /etc/kdump.conf; service kdump restart; lsmod | grep ipv6; yum list kexec-tools; echo c > /proc/sysrq-trigger
......
ext4 /dev/sda1
core_collector makedumpfile --nosuchopion
blacklist ipv6
default shell
Stopping kdump:                                            [  OK  ]
Detected change(s) the following file(s):
  
  /etc/kdump.conf
Rebuilding /boot/initrd-2.6.32-52.el6.i686kdump.img
Warning: There is not enough space to save a vmcore.
         The size of /dev/sda1 should be much greater than 899896 kilo bytes.
Starting kdump:                                            [  OK  ]
ipv6                  264447  38 
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Installed Packages
kexec-tools.i686                     2.0.0-131.el6                     installed
......
/ # lsmod | grep ipv6
/ # uname -a
Linux (none) 2.6.32-52.el6.i686 #1 SMP Wed Jul 21 11:15:32 EDT 2010 i686 i686 i386 GNU/Linux
============================================================
Change status to VERIFIED.
Comment 9 releng-rhel@redhat.com 2010-11-11 09:45:54 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.