Unnamed repository
Go to file
dyoung@redhat.com d4ce7e5d97 remove 98selinux dependency
Chaowang measured the selinux load_policy memory usage, it need ~50M
It's too much under kdump 2nd kernel, it cause more OOM then before.

Here is the findings from Vivek:
- If we don't load policy or don't do restorecon, kernel automatically
  uses a label for file as specified by file
  /sys/fs/selinux/initial_contexts/file

  On my system this value is "system_u:object_r:file_t:s0". Kernel
  enforces this label on a file if it is not labeled. That's the reason
  that you see above label on vmcore file when selinux policy was not
  loaded in second kernel or restorecon was not done.

  Note: I did some testing with rhel6 and there also I see file_t context.
  Not sure why that's the case.

- Relabeling of root file system over boot happens if there is a file
  /.autorelabel present. This file is touched by systemd service
  fedora-autorelabel-mark.service. And this file comes from initscritps
  package.

  So if this service thinks that system was booted with selinux disabled
  it will put this file on root and when next time system boots with
  selinux enabled, relabeling is enforced by fedora-autorelabel.service
  service.

- In our case relabeling is not happening after saving vmcore because
  there does not seem be any fedora-autorelabel-mark.service running
  from initramfs context. Looks like this service runs after switching
  to real root.

  Aug 08 10:44:13 vm9-f19 systemd[1]: Started Mark the need to relabel after reboot.

- selinux poicy is now loaded by systemd after root switch has taken
  place.

  Aug 08 10:44:10 vm9-f19 systemd[1]: Successfully loaded SELinux policy in 357.693ms.

So now we know that why selinux relabeling is not taking place. Reason
being that systemd service which marks the file system for autorelabeling
does not run from initramfs context.

And it might not make to run this service from initramfs context before
switch root. In general it makes sense to first switch to root, load
selinux policy if needed and then check whether to mark this filesystem
for relabel or not. Ideally root is mourted read only before that. It is
just that we break this rule for kdump. So as long as we make sure we
relabel files created by kdump after booting back, things should be fine.

Since we will relabel the vmcore dir after reboot so let's remove
the selinux dracut module dependency to avoid load_policy in 2nd kernel.
If in the future load_policy memory usage shrinks to an acceptable level
or there's a better solution we can add selinux load_policy back later.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-08-21 14:54:33 +08:00
po Update translation file po/it.po 2013-01-28 14:02:09 +08:00
.gitignore pull makedumpfile-1.5.4 2013-07-12 10:50:10 +08:00
98-kexec.rules udev rules fix 2012-05-28 09:50:47 +08:00
dracut-kdump.sh dracut-kdump.sh: add do_dump() and error out if dump vmcore fails 2013-08-02 14:56:12 +08:00
dracut-module-setup.sh remove 98selinux dependency 2013-08-21 14:54:33 +08:00
dracut-monitor_dd_progress monitor-dd-progress fix 2013-06-25 16:45:59 +08:00
firstboot_kdump.py firstboot:fix reserve mem ui spinbox step size 2012-12-12 17:15:10 +08:00
kdump.conf add dracut_args option to kdump.conf 2013-04-27 10:44:48 +08:00
kdump.conf.5 add dracut_args option to kdump.conf 2013-04-27 10:44:48 +08:00
kdump.init - Fix a syntax error in kdump init script 2010-06-13 21:54:34 +00:00
kdump.service Fixup sysytemd service file (bug 741272) 2012-02-14 10:13:06 -07:00
kdump.sysconfig do not mount root twice 2012-07-12 11:15:35 +08:00
kdump.sysconfig.i386 Revert: kdump.sysconfig: Add option action_on_fail and set its default as continue 2013-08-02 14:46:55 +08:00
kdump.sysconfig.ia64 Mass Update of RHEL5 patches 2008-06-05 15:18:53 +00:00
kdump.sysconfig.ppc64 Revert: kdump.sysconfig: Add option action_on_fail and set its default as continue 2013-08-02 14:46:55 +08:00
kdump.sysconfig.s390x Revert: kdump.sysconfig: Add option action_on_fail and set its default as continue 2013-08-02 14:46:55 +08:00
kdump.sysconfig.x86_64 Revert: kdump.sysconfig: Add option action_on_fail and set its default as continue 2013-08-02 14:46:55 +08:00
kdumpctl kernel cmdline: Remove hugepage allocations 2013-08-02 14:55:44 +08:00
kexec-kdump-howto.txt kexec-kdump-howto: Add a section for debugging tips 2013-06-25 14:01:57 +08:00
kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch pull makedumpfile-1.5.4 2013-07-12 10:50:10 +08:00
kexec-tools-2.0.3-disable-kexec-test.patch Disable kexec_test 2012-01-21 16:56:07 +08:00
kexec-tools-2.0.4-makedumpfile-Add-vmap_area_list-definition-for-ppc-ppc64.patch makedumpfile: Add vmap_area_list definition for ppc/ppc64. 2013-07-18 16:05:56 +08:00
kexec-tools.spec Release 2.0.4-7 2013-08-02 14:59:01 +08:00
mkdumprd mkdumprd: check return value of subshell 2013-07-12 10:02:30 +08:00
mkdumprd.8 Remove comma which is redundant 2013-02-16 15:19:41 +08:00
rhcrashkernel-param rhcrashkernel-param: echo crashkernel=auto for rhel7 2012-08-20 15:01:47 +08:00
sources pull makedumpfile-1.5.4 2013-07-12 10:50:10 +08:00
zanata-notes.txt Add a notes for zanata process 2012-12-05 01:23:09 -05:00