- dbginfo.sh: Avoiding exclusion list for pipes in sysfs (#996732)

- zipl: Fix zipl "--force" option for DASD multi-volume dump (#997361)
This commit is contained in:
Dan Horák 2013-08-21 12:18:42 +02:00
parent fac999b58c
commit d93a0307e6
2 changed files with 128 additions and 3 deletions

View File

@ -1,7 +1,7 @@
From 9b225fac81186176075f673dfe5cf8e373b2068a Mon Sep 17 00:00:00 2001 From 9b225fac81186176075f673dfe5cf8e373b2068a Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz> From: Dan Horak <dan@danny.cz>
Date: Sun, 20 Jul 2008 09:24:05 +0200 Date: Sun, 20 Jul 2008 09:24:05 +0200
Subject: [PATCH 1/2] s390-tools-1.5.3-zipl-zfcpdump-2 Subject: [PATCH 1/4] s390-tools-1.5.3-zipl-zfcpdump-2
--- ---
common.mak | 4 ++-- common.mak | 4 ++--
@ -29,7 +29,7 @@ index 44adc6e..4373da5 100644
From a3d9221076f9eb7cc8434baac71327f786351c63 Mon Sep 17 00:00:00 2001 From a3d9221076f9eb7cc8434baac71327f786351c63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz> From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Thu, 23 Apr 2009 11:46:01 +0200 Date: Thu, 23 Apr 2009 11:46:01 +0200
Subject: [PATCH 2/2] s390-tools-1.8.1-fdasd-su Subject: [PATCH 2/4] s390-tools-1.8.1-fdasd-su
--- ---
fdasd/fdasd.c | 10 ++++++---- fdasd/fdasd.c | 10 ++++++----
@ -59,3 +59,124 @@ index ba22475..f2ac417 100644
-- --
1.8.1.4 1.8.1.4
From d13c754f68ea838a47b8125006b9b493cfbbb7f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Wed, 21 Aug 2013 12:13:30 +0200
Subject: [PATCH 3/4] dbginfo.sh: Avoiding exclusion list for pipes in sysfs
Description: dbginfo.sh: Avoiding exclusion list for pipes in sysfs
Symptom: The dbginfo.sh script hangs
Problem: The trace pipes for CPU tracing in sysfs can potentially block
dbginfo.
Solution: Switch over to make use of dd with the nonblock option to savely
collect the whole sysfs without keeping an exclusion list up to
date
Reproduction: Run dbginfo on a kernel that provides trace_pipe and
trace_pipe_raw
---
scripts/dbginfo.sh | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/scripts/dbginfo.sh b/scripts/dbginfo.sh
index 6d07132..0ada40b 100755
--- a/scripts/dbginfo.sh
+++ b/scripts/dbginfo.sh
@@ -181,8 +181,8 @@ fi
if test ${LINUX_SUPPORT_SYSFSDBF} -eq 1; then
if test -e /proc/s390dbf; then
PROCFILES="${PROCFILES}\
- `find /proc/s390dbf -type f -not -path \"*/raw\" -not -path \"*/flush\" 2>/dev/null`\
- "
+ `find /proc/s390dbf -type f -not -path \"*/raw\" -not -path \"*/flush\" 2>/dev/null`\
+ "
fi
fi
@@ -492,12 +492,9 @@ collect_sysfs() {
mkdir -p "${WORKPATH}${dir_name}"
done
- find /sys -noleaf -type f -perm /444 \
- -a -not -name "*trace_pipe" \
- -a -not -path "*debug/hid*/events" \
- -a -not -path "*debug/usb/usbmon/*" 2>/dev/null | while IFS= read -r file_name; do
+ find /sys -noleaf -type f -perm /444 2>/dev/null | while IFS= read -r file_name; do
echo " ${file_name}"
- cp -P --preserve=links -L --parents "${file_name}" "${WORKPATH}"
+ dd if="${file_name}" iflag=nonblock of="${WORKPATH}${file_name}"
done
if test ${debugfs_mounted} -eq 1; then
@@ -574,7 +571,7 @@ call_run_command() {
# check if command exists
if ! which "${raw_cmd}" >/dev/null 2>&1; then
- # check if command is a builtin
+ # check if command is a builtin
if ! command -v "${raw_cmd}" >/dev/null 2>&1; then
echo " WARNING: Command \"${raw_cmd}\" not available" >> "${logfile}"
echo >> "${logfile}"
@@ -722,7 +719,7 @@ environment_setup()
if test -e "${WORKDIR_BASE}${SCRIPTNAME}".lock; then
print_alreadyrunning
- exit 1
+ exit 1
else
touch "${WORKDIR_BASE}${SCRIPTNAME}".lock
fi
--
1.8.1.4
From 7d540e7f40c731092ac655d1d38af7d69ceee706 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Wed, 21 Aug 2013 12:13:58 +0200
Subject: [PATCH 4/4] zipl: Fix zipl "--force" option for DASD multi-volume
dump
Description: zipl: Fix zipl "--force" option for DASD multi-volume dump
Symptom: When specifying "--force" and afterwards the dump partition is
modified, for example by creating a swap partition, the dump
still fails with the message "Wrong signature".
Problem: The "larl" instruction was used to load an odd address which
results in an incorrect even address.
Solution: Load the correct even address.
Reproduction: 1) Create ECKD MV dump DASDs:
$ zipl -M mvdump.list --force
2) Modify partitions:
$ dd if=/dev/zero of=/dev/dasdx1
3) Create dump
-> Should work with this fix
---
zipl/boot/eckd2mvdump.S | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/zipl/boot/eckd2mvdump.S b/zipl/boot/eckd2mvdump.S
index f1cec78..529d6b3 100644
--- a/zipl/boot/eckd2mvdump.S
+++ b/zipl/boot/eckd2mvdump.S
@@ -153,7 +153,7 @@ _dump_mem_64:
.Lcheck_sign:
larl %r7,.Lforce
- tm 0(%r7),0x01 # was zipl --force specified?
+ tm 1(%r7),0x01 # was zipl --force specified?
bo .Lheaders-0b(%r13) # yes, skip signature check
llgf %r2,.Ldev_start_blk-0b(%r13) # start block of partition
lghi %r3,TMP_PAGE_START # destination of read operation
@@ -576,8 +576,9 @@ _ioblock_64:
.byte 0x85, 0x40, 0xa2, 0xa3, 0x81, 0x94, 0x97, 0xa2
.byte 0x00
-.org (MVDUMP_TOOL_SIZE - 9)
+.org (MVDUMP_TOOL_SIZE - 10)
.Lforce:
+ .byte 0x00
.byte 0x00 # is set to 0x01 by zipl -f
.Lmem_upper_limit:
.long 0xffffffff,0xffffffff # can be used for memsize=xxx
--
1.8.1.4

View File

@ -7,7 +7,7 @@ Name: s390utils
Summary: Utilities and daemons for IBM System/z Summary: Utilities and daemons for IBM System/z
Group: System Environment/Base Group: System Environment/Base
Version: 1.23.0 Version: 1.23.0
Release: 2%{?dist} Release: 3%{?dist}
Epoch: 2 Epoch: 2
License: GPLv2 and GPLv2+ and CPL License: GPLv2 and GPLv2+ and CPL
ExclusiveArch: s390 s390x ExclusiveArch: s390 s390x
@ -734,6 +734,10 @@ User-space development files for the s390/s390x architecture.
%changelog %changelog
* Wed Aug 21 2013 Dan Horák <dan[at]danny.cz> - 2:1.23.0-3
- dbginfo.sh: Avoiding exclusion list for pipes in sysfs (#996732)
- zipl: Fix zipl "--force" option for DASD multi-volume dump (#997361)
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:1.23.0-2 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:1.23.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild