Commit Graph

5739 Commits (052)

Author SHA1 Message Date
Tong Li 32f5af2f5e 95ssh-client: attempt to copy UserKnownHostsFile to kdump's initramfs
Bug related to this issue: https://bugzilla.redhat.com/show_bug.cgi?id=1360131
Now dracut only attempts to copy GlobalKnownHostsFile while generating kdump's
initramfs. This method will cause kdump's failure if users set customized
UserKnownHostsFile in /etc/ssh/ssh_config. This patch simply attempts to copy
those files too while going through /etc/ssh/ssh_config. Note that we need to
make sure ~/foo will be copied as /root/foo in kdump's initramfs.
2016-11-30 17:05:57 +08:00
Xunlei Pang 01030beda2 testsuite: add "rd.memdebug=4" in TEST-01-BASIC to test rd.memdebug
"rd.memdebug=4" includes all the test level, so add it to test
rd.memdebug function.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2016-11-27 12:21:02 +08:00
Xunlei Pang 7a5949ffcd dracut.cmdline.7.asc: update document for rd.memdebug=4
"rd.memdebug=4" is for kernel module memory consumption debugging.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2016-11-27 12:09:10 +08:00
Xunlei Pang 52c295c161 99base: apply kernel module memory debug support
Extend "rd.memdebug" to "4", and "make_trace_mem" to "4+:komem".
Add new "cleanup_trace_mem" to cleanup the trace if active.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2016-11-27 12:09:10 +08:00
Xunlei Pang 34986d538a 99base: add memtrace-ko.sh to debug kernel module large memory consumption
The current method for memory debug is to use "rd.memdebug=[0-3]",
it is not enough for debugging kernel modules. For example, when we
want to find out which kernel module consumes a large amount of memory,
"rd.memdebug=[0-3]" won't help too much.

A better way is needed to achieve this requirement, this is useful for
kdump OOM debugging.

The principle of this patch is to use kernel trace to track slab and
buddy allocation calls during kernel module loading(module_init), thus
we can analyze all the trace data and get the total memory consumption.
As for large slab allocation, it will probably fall into buddy allocation,
thus tracing "mm_page_alloc" alone should be enough for the purpose(this
saves quite some trace buffer memory, also large free is quite unlikey
during module loading, we neglect those memory free events).

The trace events include memory calls under "tracing/events/":
  kmem/mm_page_alloc

We also inpect the following events to detect the module loading:
  module/module_load
  module/module_put

Since we use filters to trace events, the final trace data size won't
be too big. Users can adjust the trace buffer size via "trace_buf_size"
kernel boot command line as needed.

We can get the module name and task pid from "module_load" event which
also mark the beginning of the loading, and module_put called by the
same task pid implies the end of the loading. So the memory events
recorded in between by the same task pid are consumed by this module
during loading(i.e. modprobe or module_init()).

With these information, we can record the rough total memory(the larger,
the more precise the result will be) consumption involved by each kernel
module loading.

Thus we introduce this shell script to find out which kernel module
consumes a large amount of memory during loading. Use "rd.memdebug=4"
as the tigger.

After applying this patch and specifying "rd.memdebug=4", during booting
it will print out something extra like below:
0 pages consumed by "pata_acpi"
0 pages consumed by "ata_generic"
1 pages consumed by "drm"
0 pages consumed by "ttm"
0 pages consumed by "drm_kms_helper"
835 pages consumed by "qxl"
0 pages consumed by "mii"
6 pages consumed by "8139cp"
0 pages consumed by "virtio"
0 pages consumed by "virtio_ring"
9 pages consumed by "virtio_pci"
1 pages consumed by "8139too"
0 pages consumed by "serio_raw"
0 pages consumed by "crc32c_intel"
199 pages consumed by "virtio_console"
0 pages consumed by "libcrc32c"
9 pages consumed by "xfs"

From the print, we see clearly that "qxl" consumed the most memory.

This file will be installed as a separate executable named "tracekomem"
in the following patch.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2016-11-27 12:09:10 +08:00
Daniel Molkentin e69da98de1 Add md4 and arc4 modules for ntlm
Some crashkernel targets still use legacy NTLM auth, which
require those (bsc#869496). This patch enumerates all dependent
hash algorithems, because even though most of them are probably
compiled in, older ones (e.g. md4 and arc4) usually aren't.
2016-11-17 16:56:53 +01:00
Daniel Molkentin 7957bd01b0 Resolve symbolic links for -i and -k parameters (bsc#902375) 2016-11-17 16:34:20 +01:00
Daniel Molkentin 9ffab3f3a5 Always try to add pinctrl-cherryview
Contrary to previous intel pinctrl drivers, the cherryview driver can be
and usually is built as a module. However, it sets up the SDIO pinout
so sdhci can make use of the SD card reader, which may subsequently
hold a root file system on a card  (bsc#998440).
2016-11-15 11:59:05 +01:00
Harald Hoyer cc81672cef Merge pull request #161 from dracut-mailing-devs/1477422589-21327-1-git-send-email-stefanb@linux.vnet.ibm.com
dracut-install: preserve extended attributes when copying files
2016-11-15 10:41:31 +01:00
Harald Hoyer aa6885fbaf Merge pull request #174 from haraldh/master
testsuite: add "-cpu host" to kvm call
2016-11-14 16:35:13 +01:00
Harald Hoyer beaddf6881 Merge pull request #173 from danimo/xennet
network: Try to load xennet
2016-11-14 16:34:30 +01:00
Harald Hoyer dfb3db3dad testsuite: add "-cpu host" to kvm call 2016-11-14 16:21:06 +01:00
Harald Hoyer 43adba3a71 README.md: change centosci badge 2016-11-14 13:51:59 +01:00
Harald Hoyer e63ac4433a test/test-rhel-7.2.rpms: remove file 2016-11-14 12:30:52 +01:00
Harald Hoyer d941f0e015 Revert "TEST-99-RPM: use --best and install all rpms"
This reverts commit f81806db20.
2016-11-14 12:29:12 +01:00
Harald Hoyer f81806db20 TEST-99-RPM: use --best and install all rpms 2016-11-14 12:27:33 +01:00
Harald Hoyer f0c9ae4d36 README.md: add CentOS badge 2016-11-14 12:27:11 +01:00
Harald Hoyer e35d1451f5 test/TEST-99-RPM: dnf does not like any dracut subpackage 2016-11-11 16:34:42 +01:00
Harald Hoyer eac751f1e0 test/TEST-99-RPM: speedup test 2016-11-11 16:04:31 +01:00
Harald Hoyer e80ac43710 dracut.spec: add systemd-udev requirement 2016-11-11 16:04:09 +01:00
Thomas Renninger b1a39dbcc2 network: Try to load xennet
This makes dracut boot from NFS in a xen instance.

bnc#896464, bnc#896259

Signed-off-by: Thomas Renninger <trenn@suse.de>
2016-11-10 16:05:58 +01:00
Harald Hoyer 0eb7a7c479 README.testsuite: add dmraid 2016-11-10 10:56:06 +01:00
Harald Hoyer 924a669a1b TEST-99-RPM: append "/" to DESTDIR 2016-11-07 17:52:52 +01:00
Harald Hoyer 6ee83a0bd1 Makefile: fixed DESTDIR in rpm target 2016-11-07 17:52:09 +01:00
Harald Hoyer 93d7b95ad4 TEST-30-ISCSI: give server more time for the head start 2016-11-07 17:22:08 +01:00
Harald Hoyer caa6d12fd7 README.testsuite: add more requirements 2016-11-07 17:20:43 +01:00
Harald Hoyer ffcbde7fe2 TEST-99-RPM: set release version and disable update-testing repo 2016-11-07 17:20:18 +01:00
Harald Hoyer 44766d1f1f TEST-99-RPM: actually use the generated rpms with dnf 2016-11-07 17:05:28 +01:00
Harald Hoyer 86f0904004 TEST-30-ISCSI: fixed dhcpd.conf and disabled nowait 2016-11-07 13:23:39 +01:00
Harald Hoyer e22e04ae15 TEST-99-RPM: add test_check() for rpm,dnf,yum 2016-11-07 13:20:35 +01:00
Harald Hoyer 2811e4ed22 TEST-99-RPM: create dracut rpms to install first
create rpms in TESTDIR first
2016-11-07 13:15:56 +01:00
Harald Hoyer 5d274f9365 Makefile: create rpms in DESTDIR for target rpm 2016-11-07 13:14:49 +01:00
Zbigniew Jędrzejewski-Szmek 4dbb4dc5bc Use versioned Obsoletes
Also change <= N to < N+1. For example, dracut-029-1 > dracut-029, so would not
get obsoleted properly. This all applies to old versions, so doesn't make much
difference in practice, so just fix it to avoid c&p duplication of the bad
pattern in the future.
2016-11-07 11:10:12 +01:00
Harald Hoyer 597b159248 NEWS: update for 045 2016-11-07 11:01:36 +01:00
Andreas Stieger 0db98910a1 dracut.sh: create the initramfs non-world readable also if early cpio is used
Fixes: 5f2c30d9bc
Previously fixed CVE-2012-4453: e1b48995c2

Signed-off-by: Andreas Stieger <astieger@suse.com>
2016-11-07 10:41:38 +01:00
Harald Hoyer a5b2d8fe74 Merge pull request #169 from floppym/50-dracut.install-bashism
50-dracut.install: use /bin/bash shebang
2016-11-07 10:20:06 +01:00
Mike Gilbert 69395a528a 50-dracut.install: use /bin/bash shebang
This script utilizes several bash-specific constructs.
2016-11-04 13:09:28 -04:00
Harald Hoyer ca31a7e368 TODO: remove some items 2016-11-03 15:05:36 +01:00
Harald Hoyer e7f52635d9 README: update
remove "new" and reword the first paragraphs

remove sourceforge repo links
2016-11-03 14:54:45 +01:00
Harald Hoyer 2afd60baa6 README.md: remove CI badge 2016-11-03 14:48:31 +01:00
Harald Hoyer bd98b88447 dracut.8: document INITRD_COMPRESS environment variable
https://bugzilla.redhat.com/show_bug.cgi?id=1389775
2016-11-02 13:49:17 +01:00
Harald Hoyer ec44ed1d9d README: correct github URLs 2016-10-26 13:41:21 +02:00
Stefan Berger 61c761bc2c dracut-install: preserve extended attributes when copying files
Preserve extended attributes when copying files using dracut-install.

The copying of extended attributes avoids file execution denials when
the Linux Integrity Measurement's Appraisal mode is active. In that mode
executables need their file signatures copied. In particular, this patch
solves the problem that dependent libaries are not included in the
initramfs since the copied programs could not be executed due to missing
signatures. The following audit record shows the type of failure that
is now prevented:

type=INTEGRITY_DATA msg=audit(1477409025.492:30065): pid=922 uid=0
 auid=4294967295 ses=4294967295
 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
 op="appraise_data" cause="IMA-signature-required"
 comm="ld-linux-x86-64"
 name="/var/tmp/dracut.R6ySa4/initramfs/usr/bin/journalctl"
 dev="dm-0" ino=37136 res=0

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2016-10-25 22:05:55 +02:00
Harald Hoyer b8278a99ab README.md: update 2016-10-20 15:35:08 +02:00
Harald Hoyer 7e8f8ddbf8 README.md: update 2016-10-20 14:53:25 +02:00
Harald Hoyer 4a7b55ee7e add README.md 2016-10-20 14:46:40 +02:00
Harald Hoyer ddfcfdf199 test/test-rhel-7.2.rpms
list of rpms to install to run the testsuite on rhel-7.2
2016-10-20 13:58:53 +02:00
Harald Hoyer fc44fdb5ac integrity/ima-policy-load.sh: s/echo -n/printf 2016-10-20 13:58:25 +02:00
Harald Hoyer b08ad7f7d8 Merge pull request #160 from yuwata/fix-rescue-install
rescue: use proper path for 0-rescue.conf
2016-10-19 09:35:46 +02:00
Yu Watanabe b29901c083 rescue: use proper path for 0-rescue.conf 2016-10-19 12:22:54 +09:00