lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <74c79362-495f-4177-85fc-b348f7ac1c7b@infradead.org>
Date: Fri, 22 Dec 2023 11:30:21 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Ruipeng Qi <ruipengqi7@...il.com>, corbet@....net,
 rafael.j.wysocki@...el.com, gregkh@...uxfoundation.org,
 bagasdotme@...il.com, carlos.bilbao@....com, vegard.nossum@...cle.com
Cc: skhan@...uxfoundation.org, srinivas.pandruvada@...ux.intel.com,
 qiruipeng@...iang.com, linux@...mhuis.info, linux-doc@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 3/7] doc: Add osdump guide



On 12/21/23 05:29, Ruipeng Qi wrote:
> From: qiruipeng <qiruipeng@...iang.com>
> 
> Add osdump guide for the users who try to compile with osdump enabled,
> use, and analysis real system problem.
> 
> Signed-off-by: qiruipeng <qiruipeng@...iang.com>
> ---
>  Documentation/admin-guide/index.rst  |  1 +
>  Documentation/admin-guide/osdump.rst | 94 ++++++++++++++++++++++++++++
>  2 files changed, 95 insertions(+)
>  create mode 100644 Documentation/admin-guide/osdump.rst
> 

> diff --git a/Documentation/admin-guide/osdump.rst b/Documentation/admin-guide/osdump.rst
> new file mode 100644
> index 000000000000..5738b03ff684
> --- /dev/null
> +++ b/Documentation/admin-guide/osdump.rst
> @@ -0,0 +1,94 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +===================================================
> +Documentation for osdump - The Os Minidump Solution

                                  OS ?

> +===================================================
> +
> +Overview
> +========
> +
> +Osdump is a new crash dumping solution aiming at specific embedded

                   crash-dumping

> +devices within Automotive or Industrial having the following features:
> + - limited memory.
> + - require quick reboots after system faults.
> +
> +To minimize the dump file size and maximize the dump process speed,
> +Osdump provides the following features:
> + - excludes userspace memory, focusing solely on resolving OS-related issues.
> + - eliminates constant data such as text segments.
> + - core OS data for dumping, this includes:
> +    - static allocated bss and data segments
> +    - dynamic data such as:
> +       - slub data for small-sized data
> +       - some large-sized data alloced in pages.

I prefer                          allocated

> + - compresses dump data to help reduce dump file size
> +
> +Considering the large volume of non-contiguous data, a binary data format is
> +used directly.
> +
> +By utilizing the dump file and vmlinux, a standard elf format file can be

                                                      ELF

> +reassembled and parsed using crash tool.
> +
> +Declare
> +========
> +Mainly test on arm64 with 2G DDR, selecting slub as SLAB allocator, 39-bit for
> +address space size.
> +
> +Configure and Build
> +===================
> +
> +Kernel config
> +-------------
> +Disable CRASH_CORE, SLUB_DEBUG, and SLUB_TINY, and then select CONFIG_OS_MINIDUMP.
> +
> +Dts config
> +----------
> +Add one reserved region for osdump. Its size depends DDR size you are using. Here
> +add one 16M reserved region with 2G's DDR.
> +
> +osdump {
> +	compatible = "osdump";
> +	reg = <0 0x64000000 0 0x1000000>;
> +};
> +
> +Build the image after you have done with configuration.

                             are
or
                   after you have done configuration.

> +
> +Trigger one panic and analysis it
> +=================================
> +
> +0) Precondition
> +---------------
> +DDR won't poweroff during panic. Its content should not be lose.
> +
> +1) Generate dump file
> +---------------------
> +When a panic occurs, it will dump core data into specific reserved region.
> +
> +echo c > /proc/sysrq-trigger
> +
> +2) Get dump file
> +----------------
> +When system reboot from panic, run the following command to get dump file.
> +
> +cat /proc/osdump > ./osdump
> +
> +Got 13M dump file on my side.
> +
> +3) Run crash tool to generate standard elf file

                                          ELF
> +-----------------------------------------------
> +
> +crash --enable_raw_dumpfile ./vmlinux ./osdump  -m vabits_actual=39 --machdep\
> +	kimage_voffset=0xffffffbf8f000000 --machdep phys_offset=0x80000000
> +
> +Add new feature for crash tool that reassemble a standard elf format file with

                                       reassembles           ELF

> +the dump file and vmlinux. Will submit this patch later.

but this paragraph shouldn't be here...

> +
> +4) Analysis with crash tool
> +---------------------------
> +
> +crash ./vmlinux ./osdump_elf
> +
> +
> +Note
> +====
> +disable when select CRASH_CORE, SLUB_DEBUG, or SLUB_TINY.

Don't repeat that, please.

Vegard made a lot of good points. I tried not to repeat them.

-- 
#Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://subspace.kernel.org/etiquette.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ