crash (7.0.8-1) unstable; urgency=medium * Fix for the handling of 32-bit ELF xendump dumpfiles if the guest was configured with more than 4GB of memory. Without the patch, the crash session may fail during initialization with the error message "crash: vmlinux and do not match!". * Fix for file-handling errors when a compressed vmlinux.debug file is followed by a vmlinux file on the crash command line. When the crash session ends, two errors will occur: (1) the vmlinux file will be deleted (2) the temporary uncompressed version of the vmlinux.debug file will remain in /var/tmp This problem also occurs in the highly unlikely case where a compressed vmlinux file is followed by a vmlinux.debug file on the command line, and the uncompressed temporary version of the vmlinux file is larger than the vmlinux.debug file. In that case: (1) the vmlinux.debug file will be deleted (2) the temporary uncompressed version of the vmlinux file will remain in /var/tmp * Fix for the "search -t" option if the system has 2064 or more tasks. Without the patch, the command fails with a dump of the crash utility memory allocation statistics, ending with "search: cannot allocate any more memory!". * Fix for the "mod -S" command to find the debuginfo data for Red Hat "kpatch" modules. Without the patch, the command would display "mod: cannot find or load object file for module". * Deprecated the "mount -f" option for Linux 3.13 and later kernels containing commit eee5cc2702929fd41cce28058dc6d6717f723f87, which removed the super_block.s_files list_head member and the open files list that it contained. Without the patch, the command option fails with the error message "mount: invalid structure member offset: super_block_s_files" * If a compressed kdump is damaged/truncated such that the bitmap data in the dumpfile header is not contained within the file, attempts to analyze it with a vmlinux file, or using the "crash --osrelease" or "crash --log" options with just the vmcore, will result in the crash utility spinning forever, endlessly performing reads of 0 bytes from the file without recognizing the EOF condition. * Fix for an ARM64 compilation failure of the embedded gdb file "aarch-linux-nat.c" in the Fedora fc21 rawhide environment, which uses glibc-headers-2.19.90-24.fc21. * Document the reason behind the deprecation of the "mount -f" option for Linux 3.13 and later kernels if the option is attempted, and in the "help mount" output, similar to the deprecated "mount -d" option. * During initialization, reject useless ARM64 "(A)" absolute symbols that begin with "__crc_". Without the patch, several thousand of them may be displayed by "sym -l" prior to the first kernel virtual address symbol. * When running against an ARM64 dumpfile created with the "snap.so" extension module, do not attempt to read the crash_notes. Since the dumpfile was taken while running on a live system, the crash_notes, if configured into the kernel, would not contain valid data. Without the patch, the message "WARNING: could not retrieve crash_notes" is displayed during session initialization. * Determine the various ARM64 kernel virtual address ranges using the kernel's VA_BITS value. It currently is hardwired in the kernel to one of two values depending upon whether 4K or 64K pages are configured. However, there are plans to support 16K paqes, to make VA_BITS a configurable value, and to make the number of page-table levels configurable. Towards that end, the crash utility has been changed to determine the VA_BITS value based upon known kernel virtual addresses, and to then calculate the relevant kernel virtual address ranges on that value instead of hardwiring them based upon the page size. * Enhancement to the "kmem -S" option for Linux 3.2 and later kernels configured with CONFIG_SLUB to display the address of each per-cpu kmem_cache_cpu address and the contents of its per-cpu partial list. * If an ARM or ARM64 dumpfile does not contain the register sets of the active tasks in the kernel's per-cpu crash_notes, there is an initialization-time warning message indicating "could not retrieve crash_notes". It has been changed to a more meaningful warning message indicating "cannot retrieve registers for active tasks". * Implement support for ARM and ARM64 raw RAM dumpfiles. One or more "ramdump" files may be entered on the crash command line in an ordered pair format consisting of the RAM dump filename and the starting physical address expressed in hexadecimal, connected with an ampersand: $ crash vmlinux ramdump@address [ramdump@address] A temporary ELF header will be created in /var/tmp, and the combination of the header and the ramdump file(s) will be handled like a normal ELF vmcore. The ELF header will only exist during the crash session. If desired, an optional "-o " may be entered to create a permanent ELF vmcore file from the ramdump file(s). * Fix for the "help -[nD]" ELF header translation to recognize the EM_ARM and EM_AARCH values as "e_machine" types, and ELFOSABI_LINUX as an "e_ident[EI_OSABI]" type. Without the patch, the e_machine translation would show "40 (unsupported)" for 32-bit ARM, or "183 (unsupported)" on ARM64; and the ELFOSABI_LINUX type would be translated as "3 (?)". * Re-run a command in the history list by entering an "!" followed by the number identifying the command. However, unlike the similar "r" pseudo-command, if the number is a command name in the user's PATH, maintain the current behavior and execute that command. * Fix to recognize that the live system "crash.ko" memory driver may be compressed and named "crash.ko.xz". Without the patch, the driver is not recognized and loaded, and as a result the /dev/mem driver and/or /proc/kcore will be tried as the live memory source. * On a live system during session initialization, delay the first read error message (typically when reading the "cpu_possible_mask") until it is confirmed that all of the following are true: (1) /dev/crash does not exist, and (2) /dev/mem is restricted via CONFIG_STRICT_DEVMEM, and (3) /proc/kcore cannot be read/accessed. The "kernel may be configured with CONFIG_STRICT_DEVMEM" and the "trying /proc/kcore as an alternative" messages will still be displayed when appropriate. The read error message be displayed only if all three live memory read options fail. * Fortify the validity verification of the data structures traversed by the "kmem [-sS]" options for kernels configured with CONFIG_SLUB. Without the patch, the contents of several structure members are not validated, and may generate bogus or never-ending output, typically seen when running the commands on a "live dump" where the dumpfile was taken while the kernel was still running. The patch aborts the relevant parts of per-kmem_cache output when invalid data is encountered or if an object list contains duplicate entries, and error messages have been enhanced to more accurately describe the issues encountered. * Implement support for the ppc64le PPC64 little-endian architecture. Since this required a large number of patches to be applied to architecture-neutral files in the gdb-7.6 tree, the changes are only applied if the host build system is a ppc64le. * Fix for SMP active task register-gathering from "kvmdump" dumpfiles that were created with a cpu version id of 12 or greater that contain additional XSAVE related fields in their cpu device headers. Without the patch, active tasks running on cpus above 0 may have truncated backtraces. * Maintain backwards-compatibility for "kvmdump" dumpfiles that were created by older development versions of KVM tools in which the cpu version id was 12, but the cpu device headers did not contain the additional XSAVE related fields. * Address a "ps" command performance degradation that was introduced by a crash-7.0.4 patch which added per-thread task_struct.rss_stat page counts to the task's mm_struct.rss_stat page counts in order to show an accurate/synchronized RSS value. Without the patch, the "ps" command performance would degrade as the number of tasks increased, most notably when there were thousands of tasks. -- Troy Heber Wed, 17 Sep 2014 08:30:13 -0600 crash (7.0.7-1) unstable; urgency=low * Export the static ELF and compressed kdump vmcoreinfo_read_string() functions from netdump.c and kdump.c via a new read_vmcoreinfo() method in the global program_context structure. The function get_log_from_vmcoreinfo() will access vmcoreinfo data via the new pointer instead of requiring its callers to pass pointers to their dumpfile-specific function. * Linux 3.15 and later kernels configured with CONFIG_RANDOMIZE_BASE can be now be readily identified because of new kernel symbols that have been added. For those kernels, the new "--kaslr=" and/or "--kaslr=auto" options are not necessary for ELF or compressed kdump vmcores, or for live systems that have /proc/kallsyms showing the relocated symbol values. A new KASLR initialization function called kaslr_init() is now called by symtab_init() prior to the initial symbol-sorting operation. If kaslr_init() determines that KASLR may be in effect, it will trigger a search for the relevant vmlinux symbols during the sorting operation, which in turn will cause the relocation value to be automatically calculated. * Implemented a new "bt -c cpu(s)" option to display the backtrace of the active task on one or more cpus. The cpus must be specified in a comma- and/or dash-separated list; for examples ""3", "1,8,9", "1-23", or "1,8,9-14". Similar to "bt -a", the option is only applicable with crash dumps. * Fix for Linux 3.11 and later ARM kernels, in which all non-panicking cpus offline themselves during a kdump procedure. This causes an invalid cpu count determination during crash session initialization from an ARM vmcore. The patch utilizes the cpu count found in the cpu_active_map if it is greater than the count in the cpu_online_map. In addition, the maximum NR_CPUS value for the ARM architecture has been raised from 4 to 32. * Fix for the X86_64 "bt" command on Linux 3.3 and later kernels to properly display exception frame register contents on NMI stacks. Kernel commit 3f3c8b8c4b2a34776c3470142a7c8baafcda6eb0 added 12 more values to the NMI exception stack to handle nested NMIs caused by page faults or breakpoints that could occur while handling an NMI exception. * Kernel commit 28696f434fef0efa97534b59986ad33b9c4df7f8 changed the stack layout again, swapping the location of the "saved" and "copied" registers. This can be detected automatically, because the "copied" registers contain either a copy of the "saved" registers, or point to "repeat_nmi". So, if "repeat_nmi" is found as the return address, assume that this is the old layout, and adjust the stack pointer again. Without the patch, incorrect register values are displayed in the exception frame dump in the NMI stack backtrace. * Fix for the built-in "g" alias, which apparently has not worked correctly since crash-5.1.4. Without the patch, if the "g" alias and the first argument are separated by one space, then the first first character of that argument would get stripped prior to being passed to the embedded gdb module. * Removed the BASELEVEL_REVISION string from defs.h, which serves no purpose since the deprecation of the remote daemon, and typically has been out of sync with the crash version. * Fix for the "p", "irq", "struct", "union" and "*" commands if a cpu specification contains an invalid cpu number. Without the patch, a segmentation violation may be generated. * Implemented a new capability for the "ptov" command that takes a per-cpu offset and cpu specification argument and translates it into the kernel virtual addresses for the cpus specified. * Implemented a new "ps -m" option that is a similar, complementary option to "ps -l", but which translates the task timestamp value from a decimal or hexadecimal nanoseconds value into a more human-readable string consisting of the number of days, hours, minutes, seconds and milliseconds that have elapsed since the task started executing on a cpu. More accurately described, it is the time difference between the timestamp copied from the per-cpu runqueue clock when the task last started executing compared to the most current value of the per-cpu runqueue clock. * In addition, a new "ps -C " option has been added that can only be used with "ps -l" and "ps -m", which sorts the global task list into per-cpu blocks; the cpu-specifier uses the standard comma or dash separated list, expressed as "-C 1,3,5", "-C 1-3", "-C 1,3,5-7,10", or "-Call" or "-Ca" for all cpus. * Implemented a new "runq -m" option that is a simliar, complementary option to "runq -t", but which displays the amount of time that the active task on each cpu has been running, expressed in a format consisting of days, hours, minutes, seconds and milliseconds. * Implemented a new "kmem -h" option that displays the address of each hugepage hstate array entry, its hugepage size, its free and total counts, and name string. * Implemented a new "ps -S" option that displays a summary consisting of the number of tasks in a task state. * Fix for the "arguments-input-file" feature to protect against a called command modifying an argument string. For example, the "struct" command modifies "-l struct_name.member" argument strings, and so without the patch, all iterative calls after the first one will fail. * Fix failure to build from source when compiling the crash utility with gcc-4.9 (closes: #746835) * Fix for displaying enum values that are greater than 32-bits in size. Without the patch, the upper 32-bits are clipped off and displayed as integer-sized value. * If the kernel (live or dumpfile) has the "kpatch" module installed, the tag "[KPATCH]" will be displayed next to the kernel name in the initial system banner and by the "sys" command. * Fix for the "DEBUG KERNEL:" display in the initial system banner and by the "sys" command when using a System.map file with a Linux 3.0 and later debug kernel. Without the patch, the kernel version is not displayed in parentheses following the debug kernel name. * If the gdb-.patch file has changed and a rebuild is being done from within a previously-existing build tree, "patch -N" the gdb sources, and start the rebuild from the gdb- directory instead of the gdb-/gdb directory. * Fix to prevent a possible segmentation violation generated by the "runq -g" command when run on a very active live system due to an active task on a cpu exiting while the command is running. * Fix for the "runq -g" command on Linux 3.15 and later kernels, where the cgroup_name() function now utilizes kernfs_name(). Without the patch, the command fails with the error message "runq: invalid structure member offset: cgroup_dentry". * Fix for the "extend" command when running with an x86_64 crash binary that was built with "make target=ARM64" in order to analyze ARM64 dumpfiles on an x86_64 host. Without the patch, if the extend command is used with an extension module built in the same manner, it fails with the message "extend: .so: not an ELF format object file". * Introduce support for 32-bit ARM kernels that are configured with CONFIG_ARM_LPAE. The patch implements the virtual-to-physical address translation of 64-bit PTEs used by ARM LPAE kernels. -- Troy Heber Mon, 16 Jun 2014 10:24:39 -0600 crash (7.0.6-1) unstable; urgency=low * Fix for custom X86_64 kernels that change the declaration of the context_switch() function so that it is not an inline function. Without the patch, the message "crash: cannot determine thread return address" is displayed during invocation, and backtraces of blocked tasks may have missing or invalid frames. * Fix to prevent a possible invocation-time error on Linux 3.7 and later kernels configured with CONFIG_SLAB, running against vmcore files filtered with the makedumpfile(8) facility. Without the patch, the message "crash: page excluded: kernel virtual address:
type: kmem_cache buffer" is immediately followed by the message "crash: unable to initialize kmem slab cache subsystem". Because of a kernel data structure name change from "cache_cache" to "kmem_cache_boot", the crash utility failed to properly downsize the stored size of the kernel's kmem_cache data structure from the size indicated by the vmlinux debuginfo data. This in turn could lead to reading beyond the end of a kmem_cache data structure into a page of memory that had been excluded from the vmcore. The fix was also applied to kernels configured with CONFIG_SLUB. * Added a new "--kaslr " command line option for X86_64 kernels that are configured with CONFIG_RANDOMIZE_BASE. The offset value must be equal to the difference between the symbol values compiled into the vmlinux file and their relocated KASLR values. * Added a new "--kaslr=auto" command line option for X86_64 kernels that that are configured with CONFIG_RANDOMIZE_BASE. When set to "auto", the KASLR relocation value will be determined automatically by comparing the "_stext" symbol value compiled into the vmlinux file with the _stext symbol value stored in kdump vmcoreinfo data; on live systems the comparison will be made with the "_stext" symbol value that is found in /proc/kallsyms. * Enable kernel text line number capability for the "dis -l", "bt -l", "sys -c", and "sym" commands for kernels that are configured with CONFIG_RANDOMIZE_BASE. * Fix for the "crash --log vmcore" command to account for the kernel data structure and VMCOREINFO string name changes from "log" to "printk_log" in Linux 3.11-rc4 and later kernels. Without the patch, the command fails with the error message "crash: VMCOREINFO: no log buffer data". * Adjustment to the internal symbol-handling to prevent the usage of kernel system call alias/wrapper names, for examples, "SyS_read" and "compat_SyS_futex" instead of "sys_read" and "compat_sys_futex". Without the patch, commands such as "dis", "sym
", and "sys -c" display the alias/wrapper name instead of the real system call name in Linux 3.10 and later kernels. * Increase the internal hash queue head count from 128 to 32768. The hash queue is used for gathering and verifying lists, and the original count of 128 may be overwhelmed if a list is extremely large. For example, on a 256GB system with 192GB of free pages, the "kmem -f" command takes hours to complete; with this patch, the time is reduced to a few minutes. In addition, a new command line option "--hash " has been added to allow a user to override the default hash queue head count of 32768. * Fix for the "kmem -F" display and the "kmem -f
" or "kmem
" options. Without the patch, "kmem -F" does not display the first page in a list of free page blocks on its own line, but rather at the end of the previous line that shows the area number, block size, and free_area struct address that the page is linked to. Due to this error, both "kmem -f
" and "kmem -f address>" would not find the associated page or page block if it happened to be the first page or page block in the list. * Created a new feature for the internal do_list() function if it is necessary to immediately perform a function for each entry in a list while the list is being traversed. A callback function, and an option callback data pointer, can be registered in the list_data structure. The address of each entry in the list along with the optional callback data pointer will be passed to the callback function. If desired, the callback function may also dictate that do_list() should stop the list traversal and return immediately to its caller. * Made the "kmem -f
" and "kmem
" options more efficient by using the new do_list() callback function feature above as well as restricting the search to only the NUMA node that contains the address. * If the first assembly language instruction in an X86_64 function is "nopl 0x0(%rax,%rax,1)" or "data32 data32 data32 xchg %ax,%ax", which are generated when the ftrace facility is configured, the X86_64 "dis" command will append "[FTRACE NOP]" to the line. * Correction for the "crash -h" and crash.8 man page documentation of the "--machdep phys_base=" command line option. In both places the parameter mistakenly indicated "physbase". * If a host build system does not have /usr/bin/wget installed, and the crash package is built from a directory that was git-cloned from github.com/crash-utility/crash.git, the error message has been clarified to indicate "/usr/bin/wget is required to download gdb-7.6.tar.gz". Without the patch, the message indicates "tar (child): gdb-7.6.tar.gz: Cannot open: No such file or directory". * Updated the ARM64 implementation to support Linux 3.13 and later kernels that expand to a 42-bit address space when 64K pages are configured. This is also the first crash version that has been tested on a live ARM64 system with 4K pages, where it cleanly make it to the "crash>" prompt. However, it should be noted that some commands (most notably "bt") still do not work as of yet. * Document the "--machdep phys_offset=" command line option for the ARM64 architecture in the crash.8 man page and the "crash -h" output. * Fix for KVM dumpfiles created with "virsh dump --memory-only" if an X86_64 kernel was loaded with a non-zero "phys_base". Without the patch, the crash session fails with the warning message "WARNING: cannot read linux_banner string" followed by the fatal error message "crash: vmlinux and do not match!". * Initial working implementation of the basic ARM64 "bt" command, with several command options still under development. In-kernel exception frames are only dumped if the exception handler function is contained within the symbol boundaries from "__exception_text_start" to "__exception_text_end"; when ARM64 kdump is eventually implemented, further exception-related work will be resumed. * Cleaned up the exception frame displays of 64-bit in-kernel and both 32-bit and 64-bit user-mode exceptions. * Implemented support for the ARM64 "bt -e" option. * Implemented support for the ARM64 "bt -l" option. * Update for the X86_64 "bt -l" option such that it also displays the available file and line number information for functions indicated as the "exception RIP" in kernel exception frames. The line number information will follow the exception frame register dump. * Fix for the ARM64 virtual-to-physical translation of vmemmap page structure addresses for kernels configured with 4K pages. Without the patch, any command that required the contents of a page structure would fail with a readmem error. * Added support for the ARM64 architecture in the extensions/snap.c extension module. Also fixed the progress percentage display to correct for systems which have non-zero starting physical addresses. * Implemented support for the ARM64 "bt -f" and "bt -F[F]" options. * Increase the ARM64 PTRS_PER_PGD_L2_64K from 1024 to 9182 to account for the Linux 3.13 increase of the ARM64 virtual address space size from 39 to 42 bits when 64K pages are configured. Without the patch, the warning message "WARNING: cannot access vmalloc'd module memory" is displayed during session initialization. * Fix for the "vm -p" option on ARM64 so that file-backed pages are properly translated to the filename and offset. Without the patch, file-backed pages are erroneously shown as being backed on a swap device. * Increment maximum ARM64 physical address from 40 to 48 bits to match upstream kernel commit 87366d8cf7b3f6dc34633938aa8766e5a390ce33. * Fix for a segmentation violation generated by the "crash -g vmlinux" command on ARM64. * Fix for the ARM64 "vtop
" command on kernels configured with 64K pages if the address argument is located in the kernel logical memory map region, which uses 512MB hugepage mappings. Without the patch, the verbose page table walk mistakenly continues to the PTE level. * Fix for ARM64 /proc/kcore support. Without the patch, the crash session fails with the warning message "WARNING: cannot read linux_banner string" followed by the fatal error message "crash: vmlinux and do not match!". At this point in time, the kernel requires a patch to the ARM64 kern_addr_valid() function to properly allow memory to be read from the kernel logical memory map region. -- Troy Heber Thu, 05 Jun 2014 09:26:32 -0600 crash (7.0.5-1) unstable; urgency=low * New upstream version 7.0.5 * Fix for the "runq -g" option for kernels that are configured with CONFIG_FAIR_GROUP_SCHED, but not CONFIG_CFS_BANDWIDTH. Without the patch, the command fails with the message "runq: invalid structure member offset: cfs_rq_throttled". * Add support for Xen PVH guest types introduced in Xen 4.4. Without the patch, running against a Xen 4.4 hypervisor binary would fail during session initialization with the error message "crash: invalid structure member offset: domain_is_hvm". In addition, the PVH guest type is being registered internally as an HVM guest type, the debug "help -X ofs" command's display of the domain_domain_flags offset has been fixed to show it in decimal, and the setting of the internal dc->domain_flags has been fixed to contain all flags set, not just the first one found. * Fix for the "kmem -S" command on Linux 3.1 and later kernels that are configured with CONFIG_SLUB. Because the the page structure's inuse and objects fields used by SLUB were changed from discrete u16 types to bit-fields within an unsigned int, the display of per-node partial slab statistics are incorrect. Without the patch, the TOTAL and ALLOCATED values are incorrectly shown as equal values, and therefore the FREE value is always zero. * Fix for the "kmem -S" command for kernels that are configured with CONFIG_SLUB. Eash per-cpu slab object dump may show incorrect ALLOCATED and FREE values; and as seen on Linux 3.5 and later kernels, the TOTAL value and the number of individual objects dumped may also be incorrect (too small). * When executing the commands from an input file specified by the "-i " command line option, or when accepting input from a file as a set of commands or as a set of command arguments using the "<" redirection character, unconditionally cease the operation if CTRL-c is entered. Without the patch, depending upon the command that was running when the SIGINT was received, the operation may continue uninterruptibly until the file contents are consumed. * Enhanced the "bt -F" option such that if "-F" is entered twice, and if the stack frame contents reference a slab cache object, both the slab cache name and the stack contents will be displayed within brackets. * Enhanced the "rd -S" option such that if "-S" is entered twice, and if the memory contents reference a slab cache object, both the slab cache name and the memory contents will be displayed within brackets. * Fix for the X86_64 "bt" command to prevent an unwarranted message indicating "WARNING: possibly bogus exception frame" generated from a blocked kernel thread that was in the process of exec'ing a user process via the call_usermodehelper() facility. * Fix for the X86_64 "bt" command to more correctly determine the function frame that called into an interrupted function. Without the patch, the first frame just above an IRQ exception frame register dump may show an invalid/stale function. * Fix for the X86_64 "bt" command if a page fault exception was generated by the invalid contents of the RIP register. Without the patch, the exception frame register dump is not displayed above the "page_fault" stack frame; and in a related issue, the "bt -e" option will not find and display the exception frame. * When invoking a crash session with a compressed vmlinux file, make the same host-machine/vmlinux endian verification that is done with uncompressed vmlinx files. * Reduce the number of CTRL-c entries required to unconditionally terminate any manually-entered command from three to one. * Fix for the X86_64 "bt" command if an async page fault exception occurred in a KVM guest running a Linux 2.6.38 or later kernel. Without the patch, the exception frame register dump is not displayed above the "async_page_fault" stack frame. -- Troy Heber Mon, 14 Apr 2014 14:59:30 -0600 crash (7.0.3-3) unstable; urgency=low * Add autopkgtest and try to keep the Debian and Ubuntu crash packages in sync (closes: #721095) -- Troy Heber Thu, 07 Nov 2013 08:14:34 -0700 crash (7.0.3-2) unstable; urgency=low * Fix from Louis Bouchard to resolve FTBS on i386 -- Troy Heber Wed, 06 Nov 2013 09:41:06 -0700 crash (7.0.3-1) unstable; urgency=low * Fix for the ARM architecture if the backtrace unwind information cannot be gathered during session initialization. Without the patch, the two unwind-related warning messages indicating "WARNING: UNWIND: failed to gather unwind_table list" and "WARNING: UNWIND: failed to initialize module unwind tables" are followed by the fatal error message "crash: cannot hash task_struct entries". * Fix for the "help -[Dn]" dumpfile information display of the GUID EFI table in the header of SADUMP dumpfiles. Without the patch, only 33 of the 36 bytes in the table are translated. * Fix for the determination of the kernel NR_CPUS configurable for Linux 3.8 and later kernels that are configured with CONFIG_SLAB. Without the patch, the kernel's compiled-in NR_CPUS value was incorrectly calculated to be the sum of the kernel's NR_CPUS and MAX_NUMNODES configurables. * In the next release of makedumpfile, the status field of the dumpfile header of compressed kdumps will show the compression type that was utilized. The "help -[Dn]" output has been updated to display that information. * For kernels configured with CONFIG_SLAB in which an array_cache pointer referenced by a kmem_cache structure is invalid, the individual cache(s) will be marked as invalid. During session initialization, the message "crash: kmem_cache: : invalid array_cache pointer" will be displayed, and during runtime, attempts to access the cache(s) will result in a message indicating that the cache is "[INVALID/CORRPUTED]". Without the patch, the message "crash: unable to initialize kmem slab cache subsystem" is displayed during session initialization, and run-time commands that attempt to access the kmem slab cache subsystem fail with the error message "kmem cache slab subsystem not available". * Fix for the "kmem -[sS] " option in Linux 3.6 and later kernels configured with CONFIG_SLAB. Without the patch, the command fails with the message "kmem: address is not allocated in slab subsystem: . This also causes the "kmem " command to (quietly) fail to determine that the address is a slab object. * Fix for the "bt" command if a kernel __init text address is encountered. Without the patch, and depending upon the reallocation of the __init text memory, a bogus framesize may be calculated, or more likely, in a compressed kdump, a warning message indicating "bt: page excluded: kernel virtual address:
type: gdb_readmem_callback" will be displayed following the frame data. * Update for determining whether an S390X PTE contains a swap entry in Linux 3.12 and later kernels. * Resurrected the translation and display of the page.flags bits by the "kmem -p" command on Linux 2.6.26 and later kernels whose vmlinux debuginfo data contains either the "pageflags" enumerator or the "pageflag_names" array of trace_print_flags structures. If they are not available, just the page.flags value is printed in hexadecimal, as has been done since Linux 2.4.9. * Fix for the "bt" command when used with vmcore files that were created with the recently-introduced "virsh dump --memory-only", which dumps KVM guests into an ELF vmcore similar to those created by the kdump facility. Without the patch, a faulty backtrace for the panic task may be generated due to the use of incorrect starting RSP/RIP registers; this happens because (unlike kdump) the non-panicking cpus are offlined prior to the dumpfile being created, which in turn leads to the use of the wrong NT_PRSTATUS note. * Fix for the CPU number display on systems with 255 or more cpus during the initial banner, by the "set" command, the "ps" command, and by all commands that display the per-task header consisting of the task address, pid, cpu and command name. Without the patch, for cpu 255, the "sys" command displays "NO_PROC_ID", and the other commands would show a "-" for the cpu number; for cpu numbers greater than 255, garbage values would be displayed in the cpu number field. * Implemented support for compressed kdump header version 6, in which makedumpfile(8) adds new fields in the kdump_sub_header to support large memory systems with pfn values that are larger than 32-bits. Without the patch, if the system contains physical memory located in high memory such that its maximum pfn value is overflows the 32-bit "max_mapnr" field in the header, the crash session will fail with the error message "crash: vmlinux and vmcore do not match!". * Fix for the "net -s" command on Linux 3.8 and later kernels. Without the patch, the command fails with the message "net: invalid structure member offset: inet_opt_daddr". * Fix a build failure in a native ARM64 environment due to obsolete LKCD dumpfile headers. * Implementation of a new "per-cpu object" as an argument format that can be passed to the "p", "struct", "union" or "*" commands. The format is expressed as either : or as :, where the per-cpu symbol or per-cpu offset must precede a colon, and where the follows the colon. Without the patch, per-cpu symbols are only accepted by the "p" command, and the data type and the resolved kernel virtual address for each per-cpu instance are displayed shown. With this patch, a colon and a cpu-specifier may be appended to the symbol name, and the the contents of the symbol on each cpu that is specified will be displayed by the "p" command. For the "struct/union/*" commands, an argument may be specified using either a per-cpu offset value or per-cpu symbol name followed by a colon and cpu-specifier, and the contents of each structure/union on each specified cpu will be displayed. Fixed several minor flaws that were detected by a Coverity Scan. -- Troy Heber Wed, 30 Oct 2013 16:12:40 -0600 crash (7.0.2-1) unstable; urgency=low * Added "bison" to the BuildRequires line of the crash.spec file. Without the patch, the build of the embedded gdb-7.6 module will fail unless either /usr/bin/bison or /usr/bin/yacc are available. The failure will result in a stream of error messages from different files that indicate: multiple definition of 'main' undefined reference to 'c_parse_escape' undefined reference to 'ada_parse' undefined reference to 'ada_error' undefined reference to 'c_parse' undefined reference to 'c_error' undefined reference to 'cp_demangled_name_to_comp' undefined reference to 'cp_demangled_name_parse_free' undefined reference to 'cp_comp_to_string' undefined reference to 'cp_new_demangle_parse_info' and the build fails like so: collect2: ld returned 1 exit status make[4]: *** [gdb] Error 1 crash build failed If building with rpmbuild, the new BuildRequires "bison" entry will prevent the build from initiating unless the bison package has been installed. If building with the tar.gz file, the build attempt will proceed and fail unless either the bison or byacc (Berkeley Yacc) package is installed. * Fix the S390X initialization sequence on kernels that are configured with CONFIG_STRICT_DEVMEM to automatically try /proc/kcore if: (1) the /dev/crash driver is not available, and (2) the initial /dev/mem access fails. Without the patch, if /dev/mem is selected as the memory source and it is restricted, the crash session will fail during initialization with the error message "crash: read error: kernel virtual address:
type: cpu_possible_mask". * When checking whether a argument on the crash command line is a dumpfile that may be in makedumpfile's "flattened" format, do not bother checking character device files. * Fix for the PPC64 virtual-to-physical virtual address translation mechanism for vmalloc and user-space virtual addresses on Linux 3.10 and later kernels. Without the patch, the message "WARNING: cannot access vmalloc'd module memory" is displayed during initialization, and during the crash session, if a command attempts to translate or read a vmalloc or user-space virtual address, it will fail. * Clean up all files that emit "warning: format not a string literal and no format arguments" when compiled with -Wformat-security warning option. All instances of fprintf, sprintf and snprintf using the format "fprintf(fp, buf)" are replaced with "fprintf(fp, "%s", buf)". Also, the -Wformat-security warning option has been added to the option list used when compiling with "make warn". * Fix a build failure when compiling with very old gcc-3.4.6 version on a 2.6.9-based RHEL4 IA64 host. The bfd library in gdb-7.6 is compiled with the -Werror option, and it fails with the message "elflink.c:4733: warning: 'idx' might be used uninitialized in this function". * Fix a build failure when compiling with very old gcc-3.4.6 version on a 2.6.9-based RHEL4 S390 or S390X hosts. The embedded gdb-7.6 fails to compile with the error message "s390-nat.c:364: error: storage size of 'iov' isn't known". * Fix to properly store two-digit kernel version numbers. (closes: #717036) * Fix to provide hugepage address translation for the "vtop" command on the PPC64 architecture. * Fix for the "log" command to account for the kernel data structure name change from "log" to "printk_log" in Linux 3.11-rc4 and later kernels. Without the patch, the message "WARNING: log buf data structure(s) have changed" will be displayed during initialization and by the "log" command. * Fix to add a linefeed after the description of the "kmem -I" option in the "help kmem" output, which was recently added in crash-7.0.0. * Document the "-s" command line option in the "crash -h|--help" output and in the crash.8 man page to also indicate that runtime command scrolling is turned off by default. * Fix for the "irq -d" option on 2.6.25 and later X86_64 kernels to display the Intel interrupt descriptor table contents. Without the patch, those kernel versions would display "irq: -d option not supported or applicable on this architecture or kernel". * Fix for the "kmem -[sS]" options on Linux 3.11-rc1 and later kernels that are configured with CONFIG_SLAB. Without the patch, the command fails with the error message "kmem: invalid structure member offset: * Fix for the "kmem
" and the "bt -F" options on Linux 3.8 and later kernels that are configured with CONFIG_SLUB. Without the patch, the command would fail with the error message "kmem: invalid structure member offset: page_slab". * Fix misspellings in the "bt" and "search" help page output. * Fix for the determination of the base of the kernel's unity-mapped virtual address region on recent ARM kernels whose "_stext" variable address has changed from 0xc0008000 to 0xc0100000. Without the patch, the crash session fails during invocation with the error message "crash: vmlinux and vmcore do not match!". * When printing data structures, prevent the embedded gdb from symbolically translating pointers that are not kernel virtual addresses. Kernel or module symbols that are not virtual addresses can be mistaken for virtual addresses, leading to NULL pointers being invalidly translated into a symbol name from the vmlinux or module object file. For example, in X86_64 kernels, NULL pointers are translated into the symbol "irq_stack_union", whose value is not a virtual address, but rather a per-cpu offset value of 0. * Fix for the "kmem -s
" or "kmem
" options on Linux 3.11 and later kernels configured with CONFIG_SLAB. Without the patch, both commands fail with the error message "kmem: cannot resolve cache_cache". * Fix to prevent the "bt" command from generating a segmentation violation in a case where the per-cpu "current_task" variable and the runqueue's "curr" variable did not agree, and the panic task had overflowed its kernel stack. This led to the selection of the a starting RSP address which belonged to the other task; without the patch, the command generated a segmentation violation after printing the first frame of the backtrace. -- Troy Heber Wed, 16 Oct 2013 10:26:33 -0600 crash (7.0.1-3) unstable; urgency=low * Updated format-strings patch to cover additional architectures * Requested update to packages-arch-specific to enable s390x and armel (#717283) -- Troy Heber Tue, 16 Jul 2013 07:00:41 -0600 crash (7.0.1-2) unstable; urgency=low * Missed updating the Architecture line in the -1 upload, armel (closes: #656132) * Move defs.h to /usr/include/crash (closes: #702513) * Patch from Stefan Bader to add a format string to all *printf calls -- Troy Heber Thu, 11 Jul 2013 08:51:32 -0600 crash (7.0.1-1) unstable; urgency=low * Enable armel (closes: #656132) * Enable s390x (closes: #710675) * Include the crash/defs.h header (closes: #702513) * Sync with the Ubuntu crash package, build crash extensions, SPU has been dropped (closes: #584119), lpia has been dropped (closes: #504522). * Fix the -I include path sequence in the extensions/eppic.mk file to prevent a series of "redefined" and "redeclaration" warnings when compiling the EPPIC extension module. * Address two compile-time warnings generated as a result of the gdb*7.6.patch. Without the patch, there are "warning: no previous prototype" warnings for gdb_main_entry() and replace_ui_file_FILE(). * Implemented a new "mod -t" option that walks through the installed modules and checks for non*zero values in each module's "taints" bitmask, and translates the bits into symbolic letters if possible, or shows the hexadecimal value of the bitmask if not. In older kernels, the "license_gplok" field is checked, and if non*zero, its value is displayed in hexadecimal. Lastly, if the "gpgsig_ok" member exists and is zero, a "(U)" notation will also be displayed. * Fixed compiler warnings generated by extensions/trace.c when compiled with *DFORTIFY_SOURCE=2. Without the patch, the messages "warning: ignoring return value of 'mktemp', declared with attribute warn_unused_result", "warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result", and "warning: 'trace_dat' may be used uninitialized in this function" are generated. * Laid down the basic infrastructure for the ARM64 backtrace facility using the kernel's arm64 unwind facility as a basis. Compile*tested only. * Implemented the ARM64 virtual-to-physical kernel and user address translation functions, supporting both 2*level page tables with 64K pages, and 3*level page tables with 4K pages. Also added the associated PTE translator function. Compile*tested only. * Implemented the capability of building crash as an x86_64 binary for analyzing ARM64 dumpfiles on an x86_64 host, which can be done by entering "make target=ARM64". After the initial build is complete, subsequent builds can be done by entering "make" alone. * Added "aarch64" to the ExclusiveArch: line in the crash.spec file. * Fix for the S390X "bt" command for Linux 3.10 and later kernels. Without the patch, the starting stack location of the per*cpu async and panic stacks of active tasks would be incorrectly determined. -- Troy Heber Tue, 18 Jun 2013 13:38:49 -0600 crash (7.0.0-1) unstable; urgency=low * Updated the embedded gdb version to FSF gdb-7.6, which was officially released by the Free Software Foundation on http://www.gnu.org on 4/26/13. The primary motivation for upgrading from gdb-7.3.1 is for future ARM64 support, but there are also issues with respect to kernels built with gcc-4.8.0. The relevant pieces of gdb-7.3.1.patch were forward-ported to the gdb-7.6.patch, and the GDB_7_6 #define has been applied in the top-level sources where appropriate. * Continued incremental steps for support of the ARM64 architecture. * Fix for the "struct name.member
" option if the "member" name is also coincidentally a member of an embedded structure that is located before the targeted member. Without the patch, the value of the embedded structure's member is displayed instead of the targeted member. * Expose a heretofore unadvertised "kmem -[sS] -I slab[,slab]" option that specifies one or more slab cache names in a comma-separated list that the "kmem -[sS]" option should ignore. This can be helpful in cases where a corrupted slab cache may never complete, or in very large memory systems where one or more caches take an inordinate amount of time to complete. * Fix for the "kmem -i" option on Linux 3.9 and later kernels. Without the patch, the "TOTAL SWAP", "SWAP USED" and "SWAP FREE" lines are not displayed because the kernel's former "swapper_space" singular address_space structure has has been changed into a "swapper_spaces" array of address_space structures, with one for each swap partition. * Support for the PPC64 BOOK3E processor family, whose virtual memory layout and PTE format are significantly different. Without the patch, the crash session fails to initialize properly. (ataufer@us.ibm.com) * Fix for the PPC64 "sys", "mach" and initial system banner display of of the processor speed in more recent kernels. Without the patch, the "MACHINE" line in the initial banner and in the "sys" command display may show "MACHINE: ppc64 (unknown Mhz)", and the "mach" command may show "PROCESSOR SPEED: (unknown)". (anderson@redhat.com, ataufer@us.ibm.com) * Since the libgdb.a file no longer exists in gdb-7.6, the Makefile does not check for it as a determining factor for whether a build has succeeded. * gdb-7.6 requires that the bfd library's "config.h" file be #include'd before the "bfd.h" file by the top-level symbols.c file. * gdb-7.6 has replaced/moved the gnu_debuglink_crc32() utility function to bfd_calc_gnu_debuglink_crc32(); the call in symbols.c has been configured based upon the gdb version. * gdb-7.6 has reworked its do_cleanups() functionality, which requires the gdb_error_hook() function to pass all_cleanups() as an argument. * gdb-7.6 causes the anon_member_offset() function to fail due to a change in the output string; the function has been changed to work with both old and new gdb versions. * gdb-7.6 required changes to vm_stat_init() and vm_event_state_init() functions because enum lists get displayed differently on the S390X and PPC64 architectures, which in turn caused failures of "kmem -i", "kmem -z" and "kmem -V" on those two machine types. * Adjusted the alignment of the "kmem -V" and "kmem -z" display of the items in the vm_stat[] array based upon the longest enumerator name string. * Adjusted the alignment of the "kmem -V" display of the cumulative totals of the per-cpu "vm_event_states" items based upon the longest enumerator name string. * Modified the top-level Makefile such that if the tar.gz file of the configured gdb version does not exist in the build directory, try to wget the file from http://ftp.gnu.org/gnu/gdb. This is normally not necessary because the most recent gdb tar.gz file is bundled with the the crash utility tar.gz and src.rpm files. However, it will allow the use of the gdb-less crash.tar.gz file created via "make tar" to be copied to another location, or perhaps copied to a git tree, and then built without containing the the gdb tar.gz file. * Fix for the s390x.c file to handle a gcc-4.8.0 compiler warning when building crash with "make warn", or compiler failures when building with "make Warn" on an S390x machine. Without the patch, gcc-4.8.0 generates the message "error: variable ‘psw_addr’ set but not used [-Werror=unused-but-set-variable]". * Fixes for the s390dbf.c file to handle gcc-4.8.0 compiler warnings when building crash with "make warn", or compiler failures when building with "make Warn" on an S390X machine. Without the patch, gcc-4.8.0 generates three "error: variable ‘’ set but not used [-Werror=unused-but-set-variable]" messages. * Fix for an X86_64 warning message that gets displayed during session initialization when running against Linux 3.9 kernels that were compiled with gcc-4.8.0. Without the patch, the warning message "crash: cannot determine thread return address" is displayed prior to the system information. * Fix for lack of kernel text line number information by the "dis -l" and "sym " options on Linux 3.9 kernels that were compiled with gcc-4.8.0. Without the patch, the line number information for kernel text symbols of type "(T)" may not be able to be determined and displayed. -- Troy Heber Mon, 13 May 2013 11:59:26 -0600 crash (6.1.6-1) unstable; urgency=low * New upstream version 6.1.6 * Fix for a crash-6.1.5 regression that causes the "mount" command to fail on kernel versions prior to Linux 3.3. Without the patch, the command fails with the message "mount: invalid structure member offset: mount_mnt_devname". -- Troy Heber Mon, 06 May 2013 11:20:38 -0600 crash (6.1.5-1) UNRELEASED; urgency=low * New upstream version 6.1.6 * Fix for the ARM "irq" command. Without the patch, on 2.6.34 and later kernels configured with CONFIG_SPARSE_IRQ, the command fails with the error message "irq: cannot determine number of IRQs". * Fix for a segmentation violation generated during invocation while parsing a makedumpfile-created "flat-format" vmcore-incomplete file. Without the patch, the crash session would display the error message "crash: unable to seek dump file vmcore-incomplete", followed by a segmentation violation. * Fix for a segmentation violation generated by the "kmem -s" option when encountering a corrupted array_cache structure that contains a bogus "avail" count that is greater than the maximum legitimate limit value. Without the patch, the "kmem -s" command would print a warning message regarding the invalid array_cache, complete the command normally, and then generate a segmentation violation when freeing buffers used by the command. * Update to the "kmem -s" function to include the errors found in slab structures to the display of total errors found when the command completes. Without the patch, invalid list_head pointers, bad inuse counters, and bad s_mem pointers were not added to the total number of errors found. * Fix for "crash --osrelease " and "crash --log " when run on an ARM compressed kdump with a crash binary that was built with "make target=ARM" on an x86 or x86_64 host. Without the patch, if the compressed kdump header version is 4 or 5, "crash --osrelease" fails with the error message "crash: compressed kdump: cannot lseek dump vmcoreinfo" followed by "unknown", and "crash --log" fails with the error message "crash: : no VMCOREINFO section". * Enhancement to the "swap" command to display the swap_info_struct address of each configured swap device. The output has been changed to display the address in the first column, and the variable-length device name has been moved to the last column. * Fix for the "kmem -[sS]" options on kernels that configured with both CONFIG_SLUB and CONFIG_NODES_SHIFT, and that are running on hardware that generates NUMA nodes that contain no memory. Without the patch, both command options fail immediately with the message "kmem: invalid kernel virtual address: 8 type: kmem_cache_node nr_partial". * Increment the PPC64 NR_CPUS maximum value from 1024 to 2048. * Strip the ".isra." and ".part." appendages to cloned text symbol names, which seem to have been introduced by gcc-4.6.0. To keep them intact, a "--no_strip" command line option has been added. * Patch to the internal gdb_get_datatype() function to return the typecode and length of integer variables. * Fix for the "dev -d" option on Linux 3.6 and later kernels. Without the patch the option fails with the message "dev: invalid structure member offset: request_queue_rq". * Export the red/black tree utility functions rb_first(), rb_parent(), rb_right(), rb_left(), rp_next() and rb_last(). Without the patch, they are statically declared and only used by the "runq" command. * Implemented a new "timer -r" option that displays the hrtimer queues, supporting all versions from Linux 2.6.16 to the present. * Fix for "kmem -s" on Linux 3.8 and later kernels that are configured with CONFIG_SLAB. The kmem_cache.array[] length has been extended to store the nodelist pointers, so the original method to determine the per-cpu array limit can go out-of-range. Without the patch, during session initialization there may be a message that indicates "crash: invalid kernel virtual address:
type: array cache limit", followed by "crash: unable to initialize kmem slab cache subsystem"; if those messages do get shown, then "kmem -s" will subsequently fail during runtime with the message "kmem: kmem cache slab subsystem not available". * Two Xen hypervisor fixes: (1) Fix console buffer content length calculation: Function displaying console buffer always assumes its content length equal to console buffer size. This is not true and sometimes it sends garbage to the screen. This patch fixes this issue. (2) Improve calculation of beginning of virtual address space: Xen changeset 26447 (x86: re-introduce map_domain_page() et al) once again altered virtual address space. The current algorithm calculating its start could not cope with that change. New version establishes this value on the base of image start address and is more generic. * Fix for the ARM "vtop" command when run on a module address. Without the patch, the command fails with error message "vtop: ambiguous address: (requires -u or -k)". * Add the "--active" command line option to the crash(8) man page and to the "crash [-h|--help]" output. * Add the "--buildinfo" command line option to the crash(8) man page and to the "crash [-h|--help]" output. * Remove the unadvertised and unnecessary "--data_debug" command line option, given that it is the default setting. * Remove the unadvertised and obsolete "--no_namelist_gzip" command line option. * Add the "-g [namelist]" command line option to the crash(8) man page and to the "crash [-h|--help]" output. * Remove the unadvertised and never-implemented "--shadow_page_tables" command line option. * Fix for the ARM "vtop" command when run on a user virtual address of the panic task. Prior to Linux 3.3, the panic task's pgd gets overwritten with a pgd that identity-maps the whole address space, and therefore crash loses the capability of translating any user virtual address into its original physical address. * Fix to prevent the ARM linker mapping symbols "$d" and "$a" from being added to the list of symbols from kernel modules. Without the patch, the two symbols would only be rejected from the base kernel's symbol list, but would be added to the symbol list of individual kernel modules. * Fix for the X86_64 "bt" command to recognize that the kernel was built with CONFIG_FRAME_POINTER on Linux 3.7 and later kernels that are configured with CONFIG_FUNCTION_TRACER. In those kernels, the special 4-byte NOP instruction that can be overwritten during runtime for dynamic ftracing has been moved to the very beginning of each function, before the function preamble. Without the patch, the test that checks the function preamble to determine whether CONFIG_FRAME_POINTER was configured would fail, which could potentially lead to less reliable backtraces. -- Troy Heber Mon, 06 May 2013 11:20:38 -0600 crash (6.1.4-1) UNRELEASED; urgency=low * New upstream version 6.1.4 * Fix for a crash-6.1.3 regression with respect to the loading of extension modules. Because of the change that replaced the obsolete _init() and _fini() functions with constructor and destructor functions, extension modules may fail to load when the extension modules are built with older compiler/linkers. The problem is due to the continued usage of the -nostartfiles compiler option regardless whether the extension module has replaced its _init() function with a constructor function; with older compiler/linkers, the module may fail to load. The fix predetermines whether an extension module still uses _init() or if it has been updated to use a constructor function, and will use the -nostartfiles option only on older "legacy" modules. * Implemented a new "list -r" option that can be used with lists that are linked with list_head structures. When invoked, the command will traverse the linked list in the reverse order by using the "prev" pointer instead of "next". * Fix for the "swap" command's FILENAME display. In some kernels between 2.6.32 and 2.6.38 the swap partition's pathname may not show the "/dev" filename component. * Fix for the "swap" command's PCT display, which will display a a negative percentage value if more than 5368709 swap pages are in use. -- Troy Heber Mon, 06 May 2013 11:20:38 -0600 crash (6.1.3-1) unstable; urgency=low * New upstream version 6.1.3 * Implemented a new "crash --log dumpfile" option which dumps the kernel log buffer and exits. A kernel namelist is not required, but the dumpfile must contain the VMCOREINFO data from the ELF header of the original /proc/vmcore file that was created by the kexec/kdump facility. Accordingly, this option supports kdump ELF vmcores and compressed kdump vmcores created by the makedumpfile facility, including those that are in makedumpfile's intermediary "vmcore.flat" format. * Fixes for the ppc64.c file to handle gcc-4.7.2 compiler warnings when building crash with "make warn", or compiler failures when building with "make Warn" on a PPC64 machine. Without the patch, gcc-4.7.2 generates three "error: variable ‘’ set but not used [-Werror=unused-but-set-variable]" messages. * Update the PPC64 architecure's internal storage of the kernel's MAX_PHYSMEM_BITS value for Linux 3.7 and later kernels, which changed from 44 to 46 to for 64TB support. Without the patch, there is no known issue, but the stored value should be correct. * Fix for the "mount" command's header display to indicate "MOUNT" instead of "VFSMOUNT" on Linux 3.3 and later kernels because the the first column contains a mount structure address instead of a vfsmount structure address. For those later kernels, it is permissable to enter either the mount structure address, or the address of the vfsmount structure that is embedded within it, as an optional argument. The output has also been tightened up so that the DIRNAME field is not shifted to the right based upon the DEVNAME field length. * Fix for the "mount " search option on 2.6.32 and later kernels. Without the patch, it is possible that multiple filesystems will be displayed. * Update to the "mount" help page to indicate that a dentry address may be used as a search option. * Fix for the "ps -l [pid|task|command]" option to display the specified tasks sorted with the most recently-run task (the largest last_run/timestamp) shown first, as is done with the "ps -l" option with no arguments. Without the patch, the timestamp data gets displayed in the order of the "[pid|task|command]" arguments. * Added the "ps" command to the set of supported "foreach" commands, serving as an alternative manner of passing task-identifying arguments to the "ps" command. For example, a command such as "foreach RU ps" can be accomplished without having to pipe normal "ps" output to "grep RU". All "ps" options are supported from the "foreach" framework. * Fix for the "ps -G" restrictor option such that it also takes affect if the -p, -c, -l, -a, -r or -g options are used. Without the patch, thread group filtering would only take effect when the default "ps" command is used without any of the options above. * Fortify the internal hq_open() function to return FALSE if it is already open, and have restore_sanity() and restore_ifile_sanity() call hq_close() unconditionally. * Added the "extend" command to the set of built-in commands that support minimal mode. A new MINIMAL flag has been created for extension modules to set in their command_table_entry.flags field(s) to signal that a command supports minimal mode. If the crash session has been invoked with --minimal, then the "extend" command will require that the module registers at least one command that has the MINIMAL bit set. * Prevent the "__crc_*" symbols from being added to the the ARM kernel symbol list. * Prevent the "PRRR" and "NMRR" absolute symbols from being added to the ARM kernel symbol list. Without the patch, it allows an invalid set of addresses to pass the check in the in_ksymbol_range() function. * Fix for the ppc.c file to handle a gcc-4.7.2 compiler warning when building crash with "make warn", or compiler failures when building with "make Warn" on a PPC machine. Without the patch, gcc-4.7.2 generates the message "error: variable ‘dm’ set but not used [-Werror=unused-but-set-variable]". * Workaround for the "crash --osrelease dumpfile" option to be able to work with malformed ARM compressed kdump headers. ARM compressed kdumps that indicate header version 3 may contain a malformed kdump_sub_header structure with offset_vmcoreinfo and size_vmcoreinfo fields offset by 4 bytes, and the actual vmcoreinfo data is not preceded by its ELF note header and its "VMCOREINFO" string. This workaround finds the vmcoreinfo data and patches the stored header's offset_vmcoreinfo and size_vmcoreinfo values. Without the patch, the "--osrelease dumpfile" command line option fails with the message "crash: compressed kdump: cannot lseek dump vmcoreinfo", followed by "unknown". * Fix for the "help -n" option on 32-bit compressed kdumps. Without the patch, the offset_vmcoreinfo, offset_eraseinfo, and offset_note fields of the kdump_sub_header have their upper 32-bits clipped off when displayed. However, it should be harmless since the offset values point into the first few pages of the dumpfile. * Update of the extensions/echo.c extension module example, and the "extend" help page, to utilize a constructor function to call the register_extension() function. The _init() and _fini() functions have been designated as obsolete for usage by dlopen() and dlclose(). The echo.c example module has been modified to contain echo_init() and echo_fini() functions marked as __attribute__((constructor)) and __attribute__((destructor)) respectively. * Updated extensions/dminfo.c, extensions/snap.c and extensions/trace.c to replace their _init() and _fini() functions with constructor and destructor functions. * Fix for the "bt" command on the PPC64 architecture when running on Linux 3.7 kernel threads. Without the patch, some kernel threads may fail to terminate on the final ".ret_from_kernel_thread" frame, repeating that frame endlessly, because the stack linkage pointer points back to itself instead of being NULL. -- Troy Heber Wed, 13 Feb 2013 09:28:40 -0700 crash (6.1.2-1) UNRELEASED; urgency=low * New upstream version 6.1.2 * Enhancement of the "task" command to display both the task_struct and the thread_info structures of a task. The -R option accepts members of either/both structure types. * Fix for the X86_64 "search" and "rd" commands due to this commit: http://git.kernel.org/linus/027ef6c87853b0a9df53175063028edb4950d476 Upon any attempt to read a page within the RAM region reserved for AMD GART on a live system, the Linux 3.7rc1 commit above causes causes /dev/mem, /proc/kcore and the /dev/crash drivers to spin forever, leading to a kernel soft lockup. The RAM pages reserved for GART consist of 2MB large pages whose _PAGE_PRESENT bits are turned off. Prior to the above commit, a read() attempt on GART RAM would cause an unresolvable page fault, and would harmlessly return an EFAULT. The commit above has changed pmd_large() function such that it now returns TRUE if only _PAGE_PSE bit is set in the PTE, whereas before it required both _PAGE_PSE and _PAGE_PRESENT. So instead of just failing the read() system call with an EFAULT, the page fault handling code now considers it a spurious TLB fault, and the instruction is retried indefinitely. The crash utility patch stores the GART physical memory range, and disallows any attempts to read from it. * If an EPPIC_GIT_URL environment variable is defined, then the URL that it points to is used as an alternative to the code.google.com git source repository for the eppic.so extension module. However, the alternative site is only accessed if code.google.com can first be pinged; this patch removes that restriction. * Fix for the "files" command PATH display on kernels configured with CONFIG_DEVTMPFS, when the vfsmount pointer in an file structure's "f_path" member does not point to the root vfsmount required for reconstructing the full file pathname. Without the patch, open files in /dev directory may be truncated and not show the "/dev" filename component. * Enhancement to the "kmem -v" option on 2.6.28 and later kernels that utilize the "vmap_area_list" list of mapped kernel virtual memory regions, replacing the usage of the to-be-obsoleted "vmlist" list. In those kernels, the output of the command will also show each vmap_area structure address, in addition to its vm_struct address, memory range, and size. * Update to the exported do_rbtree() and do_rdtree() functions such that they will return the number of items found in the targeted tree, similar in nature to the do_list() function. The two functions have also been fixed such that the VERBOSE flag is actually recognized, so that external callers are able to gather the entries in a tree without having them displayed. The calls to either function may be enclosed with hq_open() and hq_close() so the that tree entries may be subsequently gathered by retrieve_list() into a supplied buffer, as well as to recognize a corrupted list with duplicate entries. * Fix for the "extend -u" option to prevent the usage of a member of a free()'d extension_table structure. No command failure occurs, but rather an inadvertent coding error. * Fix to allow error() to be called during an open_tmpfile() sequence prior to close_tmpfile() being called. There are no crash functions that call error() during an open_tmpfile() sequence, but there's no reason why it cannot be done. Without the patch, the error message gets displayed on stdout (as expected), but the error message will also overwrite/corrupt the tmpfile() data while it is being parsed. * Fix to properly determine whether X86_64 kernels were configured with CONFIG_FRAME_POINTER, due to this ftrace-related commit: http://git.kernel.org/linus/d57c5d51a30152f3175d2344cb6395f08bf8ee0c Without the patch, the crash utility fails to determine whether the kernel was built with CONFIG_FRAME_POINTER, and therefore the "bt" command cannot take advantage of it for more reliable backtraces. * Fix to properly determine whether 2.6.31 and earlier X86_64 kernels were configured with CONFIG_FRAME_POINTER. Without the patch, the crash utility may fail to determine whether the kernel was built with CONFIG_FRAME_POINTER. In those kernel versions -- which may be dependent upon the compiler version used -- one of the sample functions tested may have their "push %rbp, mov %rsp,%rbp" function preamble separated by other instruction(s), resulting in a false negative that precludes the "bt" command from taking advantage of framepointers. * Fix for the file and line-number string that is displayed by the "sym " option. Without the patch, the "/usr/src/" part of the string is stripped, and the filename string itself could have two corrupted characters in the pathname, for example, showing "k3.nel-3.6.fc17" instead of "kernel-3.6.fc17". This is dependent upon the compiler version, or perhaps the string library that is linked into the crash binary, because it only has been seen on crash binaries built with gcc-4.7. The fix now displays the full pathname, no longer dropping the "/usr/src" from beginning. * Restricted the X86_64 "line_number_hook" to kernels earlier than 2.6.24, i.e., kernels prior to the x86/x86_64 merge. Without the patch, the manufactured filename information for assembly-language files was incorrect for 2.6.24 and later kernels. Also, the kernel debuginfo data now has file/line-number data for assembly-language files as well, obviating the need for the hook. * Fix for the extensions/trace.c extension module to prevent a double free exception that would occur if a calloc() call fails during module initialization. * Fix for the "p -u" option if a 32-bit kernel symbol is incorrectly passed as an argument. Without the patch, the command fails, but the next command requiring the services of the embedded gdb module will generate an error message of the sort "*** glibc detected *** crash: free(): invalid pointer:
***", or "*** glibc detected *** crash: munmap_chunk(): invalid pointer:
***", followed by a backtrace, and an abort of the crash session. * Fix for the embedded gdb module to correctly handle kernel modules whose ELF header contains "__ksymtab" and "__ksymtab_gpl" sections with non-zero nonsensical "Address" values. * Without the patch, if one of the odd sections above is encountered, the "Offset" values of the remaining sections are not processed; and if the module's .data section is ignored, gdb incorrectly calculates the address of all symbols in the module's .data section, leading to incorrect output if, for example, data is printed with the gdb "p" command. This invalid ELF section format was introduced in Linux 3.0 by the kernel's "scripts/module-common.lds" file. * Fix for the "runq -g" option if the kernel contains more than 200 task groups. Without the patch, the command generates a segmentation violation. -- Troy Heber Wed, 13 Feb 2013 09:28:40 -0700 crash (6.1.1-1) UNRELEASED; urgency=low * New upstream version 6.1.1 * Fixes for the ARM "vtop" command display of kernel unity-mapped virtual addresses. Without the patch, the PGD, PMD values may be incorrect, and the PAGE value is always incorrectly calculated. * Fix for Linux 2.6.34 and later kernels that are configured with CONFIG_SLUB, but not configured with CONFIG_IKCONFIG, to be able to determine the kernel's CONFIG_NR_CPUS value. Without the patch, if the actual number of cpus is larger than the crash utility's per-architecture NR_CPUS maximum value, then the cpus beyond the NR_CPUS limit would not be accounted for. * Increment the X86_64 NR_CPUS maximum value from 4096 to 5120. * Try to determine whether the kernel is running as a virtual machine by using any available kernel-specific data or by dumpfile type. The results of the hypervisor type search will be stored in the internal kernel_table data structure, and if a hypervisor type can be determined, its name will be displayed by the "mach" command. The result of the hypervisor determination, successful or otherwise, may be viewed during session initialization if the -d command line option is invoked, or during runtime via the "help -k" option. Only applicable to the X86, X86_64 and IA64 architectures. * Allow the "ps command" and "foreach name" command options to contain more than the kernel's maximum of 15 characters that are stored in each task's task_struct.comm[] array. Without the patch, the two string arguments were required to be the possibly-truncated command name string in order to match. * Enhancement to the "ps" command to allow any of the "command" arguments to be POSIX extended regular expressions. The expression string must be encompassed by "'" characters, and will be matched against the names of all tasks. * Add support for 2GB pages in the S390X virtual-to-physical address translation function. Required for the new IBM zEC12 Mainframe. * Initial preparation for support of the ARM64 architecture. * Fix for the "log" command if a kernel message contains either a '\n' or a '\t'. Without the patch, the two characters are replaced with a '.', and the message continues. With the patch applied, the characters are printed, and if it is a '\n', spaces are inserted after the linefeed so that the subsequent characters in the message line up appropriately under the preceding line. * Fix for the "kmem -[sS]" options on kernels that configured with both CONFIG_SLUB and CONFIG_NODES_SHIFT, and that are running on hardware that generates NUMA node ids that are not numbered consecutively. Without the patch, both command options fail with the error message "kmem: invalid kernel virtual address: 8 type: kmem_cache_node nr_partial". * Fix for the "trace.so" extension module's "trace show" command. Without the patch, the output showing each trace point is shown with two hexadecimal virtual addresses instead of displaying them symbolically using the format " <-- ". * Fixes for handling incomplete/invalid ELF or compressed kdump vmcores whose per-cpu NT_PRSTATUS notes are missing. For example, this has been seen to happen when kexec/kdump incorrectly recognizes a Xen DomU kernel as a Xen Dom0 kernel. Without the patch, possible ramifications would be a NULL pointer dereference during session intialization when searching for the panic task, or during the "bt" command on an active task. * Implemented a new "runq -g" option that displays CFS runqueue tasks hierarchically by task_group. Tasks in throttled groups are also displayed. The "runq" command with no option will no longer display task_group data for the RT queue. * Patchset for Xen support up to version 4.2: * Fix for the S390X virtual-to-physical address translation to allow the HW Change-bit override bit (0x100) to be used in page table entries. * Fix for a rarely-seen circumstance in which a kdump ELF vmcore of a Xen dom0 kernel gets incorrectly identified as a old-style netdump ELF vmcore. This has only been seen after the original kdump ELF vmcore was transformed via "makedumpfile -d1". Without the patch, the crash session fails during initialization with the messages "crash: invalid size request: 0 type: xen kdump p2m mfn page", followed by "crash: cannot read xen kdump p2m mfn page". If run against the Xen hypervisor, the session fails during initialization with the error message "crash: read error: kernel virtual address:
type: crashing_cpu". -- Troy Heber Wed, 13 Feb 2013 09:28:40 -0700 crash (6.1.0-1) unstable; urgency=low * Fix for 32-bit SADUMP dumpfiles to correctly check whether a requested physical address is within the 0-640K backup region. Without the patch, requested physical addresses that are larger than 32-bits are truncated to 32-bit values, leading to unexpected results. * Added support for the ELF dumpfile type that is generated by the new "virsh dump --memory-only" option. The "--memory-only" option uses a new "dump-guest-memory" QEMU monitor command that creates an ELF kdump vmcore clone. The "virsh dump" command continues to borrow the "migrate" QEMU monitor command to create a file that is designed for guest migration, and not well-suited for a vmcore because it is not designed for random-access of physical memory. A new "help -r" option has been added to dump the registers that are stored in per-cpu "QEMU" ELF notes; those notes are used to distinguish this dumpfile type from regular kdump ELF vmcores. The patch also combines common functionality between the new format and the SADUMP format. * Fix for the "runq" command for kernels that have the CFS scheduler. Without the patch, a cpu's RT runqueue may incorrectly display "[no tasks queued]" when in fact there are tasks on its queue. * In the highly-unlikely event that a pre-Linux 3.5 kernel's log buffer cannot be read during initialization, display a message indicating "WARNING: cannot read log_buf contents", and just continue. Without the patch, a "readmem" error would be displayed and the crash session would be killed. * Updated the "net -a" option to support Linux 2.6.9 to 3.6.0. Without the patch, the option displayed "net: -a option not supported or applicable on this architecture or kernel". * Enhanced the "net -a" option to show the struct neighbour address associated with each line of output. * Fix for the "runq" command for kernels that are configured with CONFIG_RT_GROUP_SCHED. Without the patch, tasks contained within an RT group scheduling entity are not displayed. * Fix for "crash --version" or "crash -v" to prevent the sourcing of a .gdbinit file that is located in the current directory. * Preemptive fix to handle this patch to the x86 devmem_is_allowed() function that was posted on the Linux Kernel Mailing List here: https://lkml.org/lkml/2012/8/28/357 If the proposed kernel patch put into place, a failed attempt to use /dev/mem when the kernel is configured with CONFIG_STRICT_DEVMEM will not result in an automatic attempt to use /proc/kcore. With this crash utility patch, the automatic switch to /proc/kcore will be attempted regardless whether the kernel patch is accepted or not. * Patch for CVE-2012-3509: libiberty: objalloc_alloc integer overflows * Fix for Linux 3.0 and later kernels that have been configured with CONFIG_SLAB, and without CONFIG_NODES_SHIFT (or have set it to 0). Without the patch, the warning messages "crash: nr_node_ids: symbol does not exist" and "crash: unable to initialize kmem slab cache subsystem" are displayed during initialization, and the "kmem -[sS]" options fail with the message "kmem: kmem cache slab subsystem not available". * Allow the build procedure to use an alternate compiler by passing "make CC=" to the top-level Makefile. * Allow the user to append options to the "configure" script that is invoked by the initial embedded gdb build procedure. The additional options should be put in a file named "GDBFLAGS.extra" located in the top-level directory. * Change for the "ps" command if a task is stopped due to the task being traced by another task. Without the patch, the traced task is shown with the "ST" (stopped) status; with the patch it will be shown with a "TR" ncement of the "task" command to display both the task_struct and the thread_info structures of a task. The -R option accepts members of either/both structure types. * The "TR" state has been added to the "foreach" command's list of task state qualifiers. Without the patch, there is no way to filter out tasks that are stopped due to being traced by another task. * Fix for passing a a "gdb" command to a crash session via a pipe if there are any spaces preceding the "gdb" command name in the string. Without the patch, the command will fail with the error message "gdb: gdb request failed: ". * Preparation for the future S390/S390X structure name change from "_lowcore" to "lowcore". The patch checks which structure is defined and uses the correct name. * Replaced datatype_info() calls in do_radix_tree() and do_rdtree() with preferred MEMBER_SIZE() macro. -- Troy Heber Tue, 23 Oct 2012 09:48:28 -0600 crash (6.0.9-1) UNRELEASED; urgency=low * Fix for building on host machines that have glibc-2.15.90 installed, in which case the glibc header file /usr/include/bits/siginfo.h no longer declares a "struct siginfo", but only the "siginfo_t" typedef. Without the patch, the build of the embedded gdb module fails with the error message "linux-nat.h:63:18: error: field 'siginfo' has incomplete type". * Add support for reading compressed kdump dumpfiles that were compressed by the snappy compressor. This feature is disabled by default. To enable this feature, build the crash utility in the following manner: (1) Install the snappy libraries by using the host system's package manager or by directly downloading libraries from author's website. The packages required are: - snappy - snappy-devel The author's website is: http://code.google.com/p/snappy (2) Create a CFLAGS.extra file and an LDFLAGS.extra file in top-level crash sources directory: - enter -DSNAPPY in the CFLAGS.extra file - enter -lsnappy in the LDFLAGS.extra file. (3) Build crash with "make" as always. * Prevent the "ptov" command from returning an invalid virtual address on 32-bit architectures. Without the patch, the command may result in an invalid virtual address if the physical address entered cannot be accessed by a unity-mapped kernel virtual address. The patch verifies that the calculated virtual address can be translated back into the supplied physical address. * Fix to automatically try /proc/kcore as an alternative live memory source when the /dev/crash driver does not exist and /dev/mem is unusable because the kernel was configured with CONFIG_STRICT_DEVMEM. Without the patch, the automatic switch from /dev/mem to /proc/kcore is only attempted on the X86 and X86_64 architectures. * Added missing linefeeds to several error messages in makedumpfile.c. * Fix for a regression introduced by a crash-5.1.1 patch that reworked the handling of "set" commands that are put in .crashrc files, such that only certain command options would get resolved before the crash session is initialized. Without this patch, the "--less", "--more", "--no_scroll" and "--CRASHPAGER" crash command line options do not properly override conflicting "set scroll