[ANNOUNCE] crash-9.0.1 is available
by Tao Liu
Hi,
Thank you all for your contributions to the crash-utility, crash-9.0.1 is
now available.
Download from:
https://crash-utility.github.io/
or
https://github.com/crash-utility/crash/releases
The GitHub master branch serves as a development branch that will contain
all patches that are queued for the next release:
$ git clone https://github.com/crash-utility/crash.git
Changelog:
9cd43f5 crash-9.0.0 -> crash-9.0.1
82e6523 Add blk_mq_tag_set shared_tags check
72e2776 Revert "vmcoreinfo: read vmcoreinfo using 'vmcoreinfo_data' when
unavailable in elf note"
fbb2e9e s390x: Add basic 'bt -e' support for s390x
8d8fb30 s390x: Expand bt output with PSW mode and pt_regs address
141d542 gdb: set req->typecode when type resolvation success
3631b85 Revert "eppic.patch: Add customized functions to eppic"
3d57b4b Fix for "set" command failure
7636c13 vmcoreinfo: read vmcoreinfo using 'vmcoreinfo_data' when
unavailable in elf note
3fc8d40 eppic.patch: Add customized functions to eppic
5a564c2 extensions: Search all possible paths
536a0d7 RISCV64: fix wrong information of PMD and PTE - SA39(4K page)
support
21bdb00 s390x: Always perform kernel address translation in vtop verbose
mode.
0c55a29 s390x: Remove redundant vmalloc_start check from s390x_kvtop()
7debd84 s390x: Add non-zero vmalloc_start check to
s390x_vr_IS_VMALLOC_ADDR()
5190061 bpf: Implement ringbuf_map memory usage calculation
7b7e3e2 Fix the misleading uncompress error message
37c1e2b Add "log -R" to display human readable Rust symbol name
c62b317 Fix "mount" MNT_CURSOR entries (kernels 5.8-6.7)
be38ac1 Fix "mount <address>" fail when "super_block.s_files" unavaliable
8f1f826 Fix get_pathname() not handling stacked mounts
069ab89 Optimize extensions's compiler from gcc to $(CC)
0df7634 Fix for log command printed a couple of empty lines
9495fa7 Fix a compilation error on the old gcc version 8.5.0
99bb57a Enable resolving mangled Rust symbol in lockless ring buffer
a5942e3 Enable demangling a mangled Rust support
bd977d8 Add a rustfilt command to demangle a mangled Rust symbol
33f492f Fix the segfault issue caused by "dis -s" command
4e848b2 vmware_guestdump: support segment registers
4f2426d vmware_vmss: support segment registers
b3c8d98 RISCV64: Add 'PAGE DIRECTORY' property to the 'vtop' command
d2fb3f6 Support running on X86_64 with RISCV target
6248640 Add blk_mq shared tags support for dev -d/-D
2c69f93 gdb: Disable DT_DEBUG lookup by GDB inside the vmcore
31a69d3 Fix crash initialization failure on LoongArch with recent GDB
versions
6642b27 gdb: Fix a regression for eppic extension on gdb-16.2
6167a55 doc: Update requirements for building on Fedora
145cc6a x86_64: filter unwanted warning message for "bt -T" cmd
7e8a279 Fix "kmem -p" option on Linux 6.16-rc1 and later kernels
e906eac Fix the issue of "page excluded" messages flooding
0c14080 ppc64: Add gdb multi-stack unwind support
08271e4 arm64: Add gdb multi-stack unwind support
7b48881 x86_64: Add gdb multi-stack unwind support
d3ef6e4 Call cmd_bt silently after "set pid"
099f746 Add multi-threads support in crash target
6eb51d8 Fix incorrect task state during exit
a18b8a7 vmware_guestdump: Version 7 support
57c97d4 CI: enable ci-test with Testing Farm as github action
4002f53 Mark start of 9.0.1 development phase with version 9.0.0++
Full ChangeLog:
https://crash-utility.github.io/changelog/ChangeLog-9.0.1.txt
or
https://github.com/crash-utility/crash/compare/9.0.0...9.0.1
1 month, 2 weeks
Re: [PATCH] Revert "vmcoreinfo: read vmcoreinfo using 'vmcoreinfo_data' when unavailable in elf note"
by lijiang
On Wed, Nov 19, 2025 at 12:51 PM <devel-request(a)lists.crash-utility.osci.io>
wrote:
> Date: Wed, 19 Nov 2025 17:06:32 +1300
> From: Tao Liu <ltao(a)redhat.com>
> Subject: [Crash-utility] [PATCH] Revert "vmcoreinfo: read vmcoreinfo
> using 'vmcoreinfo_data' when unavailable in elf note"
> To: devel(a)lists.crash-utility.osci.io
> Cc: Tao Liu <ltao(a)redhat.com>
> Message-ID: <20251119040631.19214-2-ltao(a)redhat.com>
> Content-Type: text/plain; charset="US-ASCII"; x-default=true
>
> This patch will cause a regression on some x86_64 vmcores.
>
> $ crash -s vmcore vmlinux.gz
> WARNING: vmcoreinfo is empty, will read from symbols
> crash: cannot malloc vmcoreinfo buffer
> crash: /var/tmp/vmlinux.gz_fWV3kA and vmcore do not match!
>
> The root cause is, in main.c, is_kdump() calls is_netdump(), which will
> set pc->read_vmcoreinfo as vmcoreinfo_read_from_memory(), rather than
> original vmcoreinfo_read_string().
>
> Later in machdep_init(PRE_SYMTAB), vmcoreinfo_read_from_memory() doesn't
> get "relocate" string, so fails for set kaslr flag, then fails for
> linux_banner detection:
>
> Thread 1 "crash" hit Breakpoint 2, verify_version ():
> 1096 if (!IS_KVADDR(linux_banner))
> (gdb) p/x linux_banner
> $4 = 0xffffffff81e00100
>
> crash> sym linux_banner
> ffffffff9aa00100 (R) linux_banner
>
> As we can see with the patch applied, linux_banner got a wrong address.
> So this patch currently is unsafe, and should be reverted before the fix.
>
> Signed-off-by: Tao Liu <ltao(a)redhat.com>
> ---
>
> Since it is too close to the new release date of crash utility, I don't
> have enough time for full root cause analysis and re-testing. So currently
> the best option is to revert it for now, and fix it in the next release
> then
> re-apply.
>
>
Agree. Thanks for working on it, Tao. So: Acke
Lianbo
---
> defs.h | 1 -
> diskdump.c | 18 ------------------
> kernel.c | 17 +++++------------
> netdump.c | 19 -------------------
> 4 files changed, 5 insertions(+), 50 deletions(-)
>
> diff --git a/defs.h b/defs.h
> index ab4aee8..ae6ea01 100644
> --- a/defs.h
> +++ b/defs.h
> @@ -6225,7 +6225,6 @@ void dump_kernel_table(int);
> void dump_bt_info(struct bt_info *, char *where);
> void dump_log(int);
> void parse_kernel_version(char *);
> -char *vmcoreinfo_read_from_memory(const char *);
>
> #define LOG_LEVEL(v) ((v) & 0x07)
> #define SHOW_LOG_LEVEL (0x1)
> diff --git a/diskdump.c b/diskdump.c
> index de90755..ce3cbb7 100644
> --- a/diskdump.c
> +++ b/diskdump.c
> @@ -1041,13 +1041,6 @@ pfn_to_pos(ulong pfn)
> return desc_pos;
> }
>
> -/**
> - * Check if vmcoreinfo in vmcore is missing/empty
> - */
> -static bool is_diskdump_vmcoreinfo_empty(void)
> -{
> - return (dd->sub_header_kdump->size_vmcoreinfo == 0);
> -}
>
> /*
> * Determine whether a file is a diskdump creation, and if TRUE,
> @@ -1095,17 +1088,6 @@ is_diskdump(char *file)
>
> pc->read_vmcoreinfo = vmcoreinfo_read_string;
>
> - /*
> - * vmcoreinfo can be empty in case of dump collected via virsh-dump
> - *
> - * check if vmcoreinfo is not available in vmcore, and try to read
> - * the vmcoreinfo from memory, using "vmcoreinfo_data" symbol
> - */
> - if (is_diskdump_vmcoreinfo_empty()) {
> - error(WARNING, "vmcoreinfo is empty, will read from
> symbols\n");
> - pc->read_vmcoreinfo = vmcoreinfo_read_from_memory;
> - }
> -
> if ((pc->flags2 & GET_LOG) && KDUMP_CMPRS_VALID()) {
> pc->dfd = dd->dfd;
> pc->readmem = read_diskdump;
> diff --git a/kernel.c b/kernel.c
> index 13f3374..e077275 100644
> --- a/kernel.c
> +++ b/kernel.c
> @@ -99,6 +99,7 @@ static ulong dump_audit_skb_queue(ulong);
> static ulong __dump_audit(char *);
> static void dump_audit(void);
> static void dump_printk_safe_seq_buf(int);
> +static char *vmcoreinfo_read_string(const char *);
> static void check_vmcoreinfo(void);
> static int is_pvops_xen(void);
> static int get_linux_banner_from_vmlinux(char *, size_t);
> @@ -11894,8 +11895,8 @@ dump_printk_safe_seq_buf(int msg_flags)
> * Returns a string (that has to be freed by the caller) that contains the
> * value for key or NULL if the key has not been found.
> */
> -char *
> -vmcoreinfo_read_from_memory(const char *key)
> +static char *
> +vmcoreinfo_read_string(const char *key)
> {
> char *buf, *value_string, *p1, *p2;
> size_t value_length;
> @@ -11905,14 +11906,6 @@ vmcoreinfo_read_from_memory(const char *key)
>
> buf = value_string = NULL;
>
> - if (!(pc->flags & GDB_INIT)) {
> - /*
> - * GDB interface hasn't been initialised yet, so can't
> - * access vmcoreinfo_data
> - */
> - return NULL;
> - }
> -
> switch (get_symbol_type("vmcoreinfo_data", NULL, NULL))
> {
> case TYPE_CODE_PTR:
> @@ -11968,10 +11961,10 @@ check_vmcoreinfo(void)
> switch (get_symbol_type("vmcoreinfo_data", NULL, NULL))
> {
> case TYPE_CODE_PTR:
> - pc->read_vmcoreinfo = vmcoreinfo_read_from_memory;
> + pc->read_vmcoreinfo = vmcoreinfo_read_string;
> break;
> case TYPE_CODE_ARRAY:
> - pc->read_vmcoreinfo = vmcoreinfo_read_from_memory;
> + pc->read_vmcoreinfo = vmcoreinfo_read_string;
> break;
> }
> }
> diff --git a/netdump.c b/netdump.c
> index 69100a9..c7ff009 100644
> --- a/netdump.c
> +++ b/netdump.c
> @@ -111,14 +111,6 @@ map_cpus_to_prstatus(void)
> FREEBUF(nt_ptr);
> }
>
> -/**
> - * Check if vmcoreinfo in vmcore is missing/empty
> - */
> -static bool is_netdump_vmcoreinfo_empty(void)
> -{
> - return (nd->size_vmcoreinfo == 0);
> -}
> -
> /*
> * Determine whether a file is a netdump/diskdump/kdump creation,
> * and if TRUE, initialize the vmcore_data structure.
> @@ -472,17 +464,6 @@ is_netdump(char *file, ulong source_query)
>
> pc->read_vmcoreinfo = vmcoreinfo_read_string;
>
> - /*
> - * vmcoreinfo can be empty in case of dump collected via virsh-dump
> - *
> - * check if vmcoreinfo is not available in vmcore, and try to read
> - * the vmcoreinfo from memory, using "vmcoreinfo_data" symbol
> - */
> - if (is_netdump_vmcoreinfo_empty()) {
> - error(WARNING, "vmcoreinfo is empty, will read from
> symbols\n");
> - pc->read_vmcoreinfo = vmcoreinfo_read_from_memory;
> - }
> -
> if ((source_query == KDUMP_LOCAL) &&
> (pc->flags2 & GET_OSRELEASE))
> kdump_get_osrelease();
> --
> 2.47.0
>
1 month, 2 weeks
Re: [PATCH] Add blk_mq_tag_set shared_tags check
by lijiang
On Wed, Nov 19, 2025 at 12:51 PM <devel-request(a)lists.crash-utility.osci.io>
wrote:
> Date: Wed, 19 Nov 2025 15:36:29 +1300
> From: Tao Liu <ltao(a)redhat.com>
> Subject: [Crash-utility] [PATCH] Add blk_mq_tag_set shared_tags check
> To: devel(a)lists.crash-utility.osci.io
> Cc: Tao Liu <ltao(a)redhat.com>
> Message-ID: <20251119023628.15998-2-ltao(a)redhat.com>
> Content-Type: text/plain; charset="US-ASCII"; x-default=true
>
> A regression of cmd dev -d/-D noticed on some vmcores as:
>
> dev: invalid structure member offset: blk_mq_tag_set_shared_tags
> FILE: dev.c LINE: 4468 FUNCTION: blk_mq_queue_tag_busy_iter()
>
> MAJOR GENDISK NAME REQUEST_QUEUE TOTAL ASYNC
> SYNC
> [crash] error trace: 91aa85 => 91a552 => 94d6ba => 94d647
>
> 94d647: OFFSET_verify.part.0+55
> 94d6ba: OFFSET_verify+42
> 91a552: get_diskio_1+2194
> 91aa85: display_all_diskio+1253
>
> The root cause is, though upstream kernel have defined
> BLK_MQ_F_TAG_HCTX_SHARED
> as (1 << 3), the value might be set different, e.g. [1]. So a single
>
We should be able to get the value of BLK_MQ_F_TAG_HCTX_SHARED via
the dump_enumerator_list(), and then test it in the following function:
static bool blk_mq_is_shared_tags(unsigned int flags)
{
return flags & BLK_MQ_F_TAG_HCTX_SHARED;
}
That can follow the changes once the upstream kernel modifies the value.
blk_mq_is_shared_tags() check is not sufficient. This patch will add
> shared_tagsblk_mq_is_shared_tags() check is not sufficient. This patch will
> add shared_tags
> member check within blk_mq_tag_set struct as an enhancment.
>
Anyway, this change looks good, so: Ack
Lianbo
[1]:
> https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-8/-/blob...
>
> Fixes: 62486400d35b ("Add blk_mq shared tags support for dev -d/-D")
> Signed-off-by: Tao Liu <ltao(a)redhat.com>
> ---
> dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dev.c b/dev.c
> index 8391d71..27318e8 100644
> --- a/dev.c
> +++ b/dev.c
> @@ -4464,7 +4464,7 @@ static void blk_mq_queue_tag_busy_iter(ulong q,
> ulong *hctx, uint cnt,
> readmem(addr + OFFSET(blk_mq_tag_set_flags), KVADDR,
> &flags, sizeof(uint), "blk_mq_tag_set.flags",
> RETURN_ON_ERROR);
>
> - if (blk_mq_is_shared_tags(flags)) {
> + if (blk_mq_is_shared_tags(flags) &&
> VALID_MEMBER(blk_mq_tag_set_shared_tags)) {
> addr = addr + OFFSET(blk_mq_tag_set_shared_tags);
> queue_for_each_hw_ctx(q, addr, bitmap_tags_is_ptr, dio);
> return;
> --
> 2.47.0
>
1 month, 2 weeks
[PATCH v3] Enhance blk_mq_tag_set shared_tags check
by Tao Liu
A regression of cmd dev -d/-D noticed on some vmcores as:
dev: invalid structure member offset: blk_mq_tag_set_shared_tags
FILE: dev.c LINE: 4468 FUNCTION: blk_mq_queue_tag_busy_iter()
MAJOR GENDISK NAME REQUEST_QUEUE TOTAL ASYNC SYNC
[crash] error trace: 91aa85 => 91a552 => 94d6ba => 94d647
94d647: OFFSET_verify.part.0+55
94d6ba: OFFSET_verify+42
91a552: get_diskio_1+2194
91aa85: display_all_diskio+1253
The root cause is, though upstream kernel have defined BLK_MQ_F_TAG_HCTX_SHARED
as (1 << 3), the value might be set different, e.g. [1]. So a single
blk_mq_is_shared_tags() check is not sufficient. This patch will resolve
BLK_MQ_F_TAG_HCTX_SHARED at runtime and add shared_tags member check within
blk_mq_tag_set struct as an enhancment.
[1]: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-8/-/blob...
Fixes: 62486400d35b ("Add blk_mq shared tags support for dev -d/-D")
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
v2 -> v3: replace arg_to_datatype() to enumerator_value().
---
dev.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/dev.c b/dev.c
index 8391d71..5ab6855 100644
--- a/dev.c
+++ b/dev.c
@@ -4326,11 +4326,25 @@ struct bt_iter_data {
#define MQ_RQ_IN_FLIGHT 1
#define REQ_OP_BITS 8
#define REQ_OP_MASK ((1 << REQ_OP_BITS) - 1)
-#define BLK_MQ_F_TAG_HCTX_SHARED (1 << 3)
static bool blk_mq_is_shared_tags(unsigned int flags)
{
- return flags & BLK_MQ_F_TAG_HCTX_SHARED;
+ static long value = -1;
+ static bool value_fetched = false;
+ struct datatype_member dm;
+
+ if (value_fetched)
+ goto out;
+
+ value_fetched = true;
+ if (enumerator_value("BLK_MQ_F_TAG_HCTX_SHARED", &value))
+ value = dm.value;
+out:
+ if (value < 0)
+ /* Invalid BLK_MQ_F_TAG_HCTX_SHARED */
+ return false;
+ else
+ return flags & value;
}
static uint op_is_write(uint op)
@@ -4464,7 +4478,7 @@ static void blk_mq_queue_tag_busy_iter(ulong q, ulong *hctx, uint cnt,
readmem(addr + OFFSET(blk_mq_tag_set_flags), KVADDR,
&flags, sizeof(uint), "blk_mq_tag_set.flags", RETURN_ON_ERROR);
- if (blk_mq_is_shared_tags(flags)) {
+ if (blk_mq_is_shared_tags(flags) && VALID_MEMBER(blk_mq_tag_set_shared_tags)) {
addr = addr + OFFSET(blk_mq_tag_set_shared_tags);
queue_for_each_hw_ctx(q, addr, bitmap_tags_is_ptr, dio);
return;
--
2.47.0
1 month, 2 weeks
[PATCH v2] Enhance blk_mq_tag_set shared_tags check
by Tao Liu
A regression of cmd dev -d/-D noticed on some vmcores as:
dev: invalid structure member offset: blk_mq_tag_set_shared_tags
FILE: dev.c LINE: 4468 FUNCTION: blk_mq_queue_tag_busy_iter()
MAJOR GENDISK NAME REQUEST_QUEUE TOTAL ASYNC SYNC
[crash] error trace: 91aa85 => 91a552 => 94d6ba => 94d647
94d647: OFFSET_verify.part.0+55
94d6ba: OFFSET_verify+42
91a552: get_diskio_1+2194
91aa85: display_all_diskio+1253
The root cause is, though upstream kernel have defined BLK_MQ_F_TAG_HCTX_SHARED
as (1 << 3), the value might be set different, e.g. [1]. So a single
blk_mq_is_shared_tags() check is not sufficient. This patch will resolve
BLK_MQ_F_TAG_HCTX_SHARED at runtime and add shared_tags member check within
blk_mq_tag_set struct as an enhancment.
[1]: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-8/-/blob...
Fixes: 62486400d35b ("Add blk_mq shared tags support for dev -d/-D")
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
dev.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/dev.c b/dev.c
index 8391d71..7384de4 100644
--- a/dev.c
+++ b/dev.c
@@ -4326,11 +4326,28 @@ struct bt_iter_data {
#define MQ_RQ_IN_FLIGHT 1
#define REQ_OP_BITS 8
#define REQ_OP_MASK ((1 << REQ_OP_BITS) - 1)
-#define BLK_MQ_F_TAG_HCTX_SHARED (1 << 3)
static bool blk_mq_is_shared_tags(unsigned int flags)
{
- return flags & BLK_MQ_F_TAG_HCTX_SHARED;
+ static int value = -1;
+ static bool value_fetched = false;
+ struct datatype_member dm;
+
+ if (value_fetched)
+ goto out;
+
+ value_fetched = true;
+ if (!arg_to_datatype("BLK_MQ_F_TAG_HCTX_SHARED", &dm, RETURN_ON_ERROR) ||
+ (dm.size < 0) || (dm.type != 0x2000)) {
+ goto out;
+ }
+ value = dm.value;
+out:
+ if (value < 0)
+ /* Invalid BLK_MQ_F_TAG_HCTX_SHARED */
+ return false;
+ else
+ return flags & value;
}
static uint op_is_write(uint op)
@@ -4464,7 +4481,7 @@ static void blk_mq_queue_tag_busy_iter(ulong q, ulong *hctx, uint cnt,
readmem(addr + OFFSET(blk_mq_tag_set_flags), KVADDR,
&flags, sizeof(uint), "blk_mq_tag_set.flags", RETURN_ON_ERROR);
- if (blk_mq_is_shared_tags(flags)) {
+ if (blk_mq_is_shared_tags(flags) && VALID_MEMBER(blk_mq_tag_set_shared_tags)) {
addr = addr + OFFSET(blk_mq_tag_set_shared_tags);
queue_for_each_hw_ctx(q, addr, bitmap_tags_is_ptr, dio);
return;
--
2.47.0
1 month, 2 weeks
[PATCH] Add blk_mq_tag_set shared_tags check
by Tao Liu
A regression of cmd dev -d/-D noticed on some vmcores as:
dev: invalid structure member offset: blk_mq_tag_set_shared_tags
FILE: dev.c LINE: 4468 FUNCTION: blk_mq_queue_tag_busy_iter()
MAJOR GENDISK NAME REQUEST_QUEUE TOTAL ASYNC SYNC
[crash] error trace: 91aa85 => 91a552 => 94d6ba => 94d647
94d647: OFFSET_verify.part.0+55
94d6ba: OFFSET_verify+42
91a552: get_diskio_1+2194
91aa85: display_all_diskio+1253
The root cause is, though upstream kernel have defined BLK_MQ_F_TAG_HCTX_SHARED
as (1 << 3), the value might be set different, e.g. [1]. So a single
blk_mq_is_shared_tags() check is not sufficient. This patch will add shared_tags
member check within blk_mq_tag_set struct as an enhancment.
[1]: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-8/-/blob...
Fixes: 62486400d35b ("Add blk_mq shared tags support for dev -d/-D")
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev.c b/dev.c
index 8391d71..27318e8 100644
--- a/dev.c
+++ b/dev.c
@@ -4464,7 +4464,7 @@ static void blk_mq_queue_tag_busy_iter(ulong q, ulong *hctx, uint cnt,
readmem(addr + OFFSET(blk_mq_tag_set_flags), KVADDR,
&flags, sizeof(uint), "blk_mq_tag_set.flags", RETURN_ON_ERROR);
- if (blk_mq_is_shared_tags(flags)) {
+ if (blk_mq_is_shared_tags(flags) && VALID_MEMBER(blk_mq_tag_set_shared_tags)) {
addr = addr + OFFSET(blk_mq_tag_set_shared_tags);
queue_for_each_hw_ctx(q, addr, bitmap_tags_is_ptr, dio);
return;
--
2.47.0
1 month, 2 weeks
Re: Bug report: "timer -r" option fails on 6.18-rc kernels
by lijiang
On Thu, Nov 13, 2025 at 11:10 AM <devel-request(a)lists.crash-utility.osci.io>
wrote:
> Date: Thu, 13 Nov 2025 01:35:47 +0000
> From: HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab(a)nec.com>
> Subject: [Crash-utility] Bug report: "timer -r" option fails on
> 6.18-rc kernels
> To: "devel(a)lists.crash-utility.osci.io"
> <devel(a)lists.crash-utility.osci.io>
> Message-ID: <011ccc03-c0ca-4a26-8ffe-97081e2d2dd6(a)nec.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Lianbo, Tao,
>
> The following error is observed on 6.18-rc kernels.
>
> crash> timer -r
>
> timer: invalid structure member offset: hrtimer_clock_base_get_time
> FILE: kernel.c LINE: 7953 FUNCTION: dump_hrtimer_clock_base()
> ...
>
> This is due to [1].
>
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
>
>
Thank you for reporting the current issue, Kazu.
>
> The "timer -r" option displays the base->get_time function, but now kernel
> switches the function by base->clockid, which are CLOCK_* macro values.
> We can copy the function names and macro values from the kernel, but if
> they are modified, crash cannot follow the changes automatically.
>
> How should we fix this? or in the first place, maybe we can change what
> the "timer -r" displays there, instead of .get_time function name.
> For example, if we show enum hrtimer_base_type values by base->index:
>
> crash> timer -r
> CPU: 0 HRTIMER_CPU_BASE: ffff8b7aefc20640
> CLOCK: 0 HRTIMER_CLOCK_BASE: ffff8b7aefc20680 [HRTIMER_BASE_MONOTONIC]
> ...
> CLOCK: 1 HRTIMER_CLOCK_BASE: ffff8b7aefc206c0 [HRTIMER_BASE_REALTIME]
> ...
>
> What do you think?
>
I agree with you to display the clock type name there, this looks
reasonable.
But I haven't investigated the details, can you show your code(if any)?
Thanks
Lianbo
> Thanks,
> Kazu
>
1 month, 2 weeks
[PATCH v3 0/2] Add basic 'bt -e' support for s390x
by Mikhail Zaslonko
Expand s390x bt output.
Add basic 'bt -e' support for s390x.
Mikhail Zaslonko (2):
s390x: Expand bt output with PSW mode and pt_regs address
s390x: Add basic 'bt -e' support for s390x
Changelog:
V2->V3:
- Fix build warnings.
s390x.c | 45 +++++++++++++++++++++++++++++++++------------
1 file changed, 33 insertions(+), 12 deletions(-)
--
2.49.0
1 month, 3 weeks
Re: [PATCH] gdb: set req->typecode when type resolvation success
by lijiang
On Wed, Nov 5, 2025 at 5:42 PM <devel-request(a)lists.crash-utility.osci.io>
wrote:
> Date: Tue, 4 Nov 2025 12:44:38 +1300
> From: Tao Liu <ltao(a)redhat.com>
> Subject: [Crash-utility] [PATCH] gdb: set req->typecode when type
> resolvation success
> To: devel(a)lists.crash-utility.osci.io
> Cc: Tao Liu <ltao(a)redhat.com>
> Message-ID: <20251103234438.58969-1-ltao(a)redhat.com>
> Content-Type: text/plain; charset="US-ASCII"; x-default=true
>
> In gdb_get_datatype(), the req->typecode is set as TYPE_CODE_UNDEF, and
> it won't be set to other value in OP_TYPE case. If the type doesn't exist,
> it will bail out in parse_expression() by exception catch of
> gdb_command_funnel(),
> and req->typecode stays TYPE_CODE_UNDEF, which is expected. But if the
> type is
> exist, it will be resolved by drillDownType(), so req->typecode shouldn't
> be
> TYPE_CODE_UNDEF anymore, otherwise upper functions will regard this as a
> type
> resolvation failure.
>
Do you know what type it is here? In gdb 16.2, the type code has been
extended(see: gdb-16.2/gdb/type-codes.def).
Thanks
Lianbo
>
> This issue only affects eppic extensions because currently the only user
> of req->tcb is eppic.
>
> Signed-off-by: Tao Liu <ltao(a)redhat.com>
> ---
> gdb-16.2.patch | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/gdb-16.2.patch b/gdb-16.2.patch
> index 6767bf7..78cf605 100644
> --- a/gdb-16.2.patch
> +++ b/gdb-16.2.patch
> @@ -2000,3 +2000,13 @@ exit 0
> /* This may be a static executable. Look for the symbol
> conventionally named _r_debug, as a last resort. */
> bound_minimal_symbol msymbol
> +--- gdb-16.2/gdb/symtab.c.orig
> ++++ gdb-16.2/gdb/symtab.c
> +@@ -7726,6 +7726,7 @@
> + type = expr->evaluate_type()->type();
> +
> + if (req->tcb) {
> ++ req->typecode = TYPE_CODE(type);
> + drillDownType(req, type);
> + } else {
> + req->typecode = TYPE_CODE(type);
> --
> 2.47.0
>
1 month, 3 weeks
Re: [PATCH] Revert "eppic.patch: Add customized functions to eppic"
by lijiang
On Thu, Nov 13, 2025 at 5:43 AM <devel-request(a)lists.crash-utility.osci.io>
wrote:
> Date: Thu, 13 Nov 2025 10:34:22 +1300
> From: Tao Liu <ltao(a)redhat.com>
> Subject: [Crash-utility] [PATCH] Revert "eppic.patch: Add customized
> functions to eppic"
> To: devel(a)lists.crash-utility.osci.io
> Cc: Tao Liu <ltao(a)redhat.com>
> Message-ID: <20251112213421.7465-2-ltao(a)redhat.com>
> Content-Type: text/plain; charset="US-ASCII"; x-default=true
>
> This reverts commit 3fc8d4023c0d5dfbf21ea7cdce96a24ece00d4f2 because
> the customized functions will be moved to eppic side[1]. So the
> eppic.patch is no longer needed. Let's revert those to make a
> clean code.
>
Thank you for the update, Tao.
For the patch: Ack.
Lianbo
>
> [1]: https://github.com/lucchouina/eppic/pull/30
>
> Signed-off-by: Tao Liu <ltao(a)redhat.com>
> ---
>
> This patch is the follow-up of discussion [2].
>
> [2]:
> https://www.mail-archive.com/devel@lists.crash-utility.osci.io/msg01816.html
>
> ---
> extensions/eppic.mk | 9 +-
> extensions/eppic.patch | 210 -----------------------------------------
> 2 files changed, 1 insertion(+), 218 deletions(-)
> delete mode 100644 extensions/eppic.patch
>
> diff --git a/extensions/eppic.mk b/extensions/eppic.mk
> index bf80dd1..9435793 100644
> --- a/extensions/eppic.mk
> +++ b/extensions/eppic.mk
> @@ -53,14 +53,7 @@ all:
> fi; \
> if [ -f $(APPFILE) ]; \
> then \
> - if patch --dry-run -N -p0 < eppic.patch
> >/dev/null ; then \
> - patch -N -p0 < eppic.patch; \
> - make -f eppic.mk eppic.so; \
> - elif patch --dry-run -N -p0 -R <
> eppic.patch >/dev/null ; then \
> - make -f eppic.mk eppic.so; \
> - else \
> - echo "eppic.so: apply eppic.patch
> error"; \
> - fi; \
> + make -f eppic.mk eppic.so; \
> else \
> echo "eppic.so: failed to pull eppic code
> from git repo"; \
> fi; \
> diff --git a/extensions/eppic.patch b/extensions/eppic.patch
> deleted file mode 100644
> index 6a08b09..0000000
> --- a/extensions/eppic.patch
> +++ /dev/null
> @@ -1,210 +0,0 @@
> ---- eppic/applications/crash/eppic.c.orig
> -+++ eppic/applications/crash/eppic.c
> -@@ -20,6 +20,7 @@
> - #include "defs.h"
> -
> - #include <eppic_api.h>
> -+#include "eppic.h"
> -
> - /*
> - * Global data (global_data.c)
> -@@ -788,6 +789,39 @@ char *sclass_help[]={
> - NULL
> - };
> -
> -+char *eppic_help[]={
> -+ "eppic",
> -+ "Run eppic program(es).",
> -+ "<fileName1.c>[, <fileName2.c>]",
> -+ " Oneshot run eppic program(es) which with a main()
> entry each.",
> -+ NULL
> -+};
> -+
> -+void
> -+eppic_command(void)
> -+{
> -+ char *buf;
> -+ optind = 1;
> -+
> -+ if (!args[optind]) {
> -+ cmd_usage(crash_global_cmd(), SYNOPSIS);
> -+ return;
> -+ }
> -+
> -+ while(args[optind]) {
> -+ buf = eppic_filempath(args[optind]);
> -+ if (!buf) {
> -+ eppic_msg("eppic_filempath error on %s\n",
> args[optind]);
> -+ return;
> -+ }
> -+ eppic_load(buf);
> -+ if (eppic_findfile(buf, 0))
> -+ eppic_unload(buf);
> -+ eppic_free(buf);
> -+ optind++;
> -+ }
> -+}
> -+
> - #define NCMDS 200
> - static struct command_table_entry command_table[NCMDS] = {
> -
> -@@ -797,6 +831,7 @@ static struct command_table_entry
> command_table[NCMDS] = {
> - {"sdebug", sdebug_cmd, sdebug_help},
> - {"sname", sname_cmd, sname_help},
> - {"sclass", sclass_cmd, sclass_help},
> -+ {"eppic", eppic_command, eppic_help},
> - {(char *)0 }
> - };
> -
> -@@ -885,6 +920,13 @@ char **help=malloc(sizeof *help * 5);
> - }
> - }
> - free(help);
> -+
> -+ if (load && !strcmp(name, "main")) {
> -+ int optind_save = optind;
> -+ eppic_cmd(name, NULL, 0);
> -+ optind = optind_save;
> -+ }
> -+
> - return;
> - }
> -
> ---- eppic/libeppic/eppic_api.h.orig
> -+++ eppic/libeppic/eppic_api.h
> -@@ -16,6 +16,9 @@
> - /* minor and major version number
> - 4.0 switch to new Eppic name and use of fully typed symbols.
> - */
> -+#ifndef EPPIC_API_H
> -+#define EPPIC_API_H
> -+
> - #define S_MAJOR 5
> - #define S_MINOR 0
> -
> -@@ -298,3 +301,5 @@ void eppic_dbg_named(int class, char *name, int
> level, char *, ...);
> -
> - /* parsers debug flags */
> - extern int eppicdebug, eppicppdebug;
> -+
> -+#endif
> -\ No newline at end of file
> ---- eppic/libeppic/eppic_func.c.orig
> -+++ eppic/libeppic/eppic_func.c
> -@@ -22,6 +22,8 @@
> - #include <sys/types.h>
> - #include <time.h>
> - #include <sys/stat.h>
> -+#include <fcntl.h>
> -+#include <unistd.h>
> - #include "eppic.h"
> -
> - /*
> -@@ -793,6 +795,42 @@ char *ed=getenv("EDITOR");
> - if(!system(buf)) eppic_load(fname);
> - }
> -
> -+static const char *example[] = {
> -+"/*
> ",
> -+" * Example: Print all tasks' PID & command
> ",
> -+" *
> ",
> -+" * // Kernel's global variables and data structures can be used
> directly without",
> -+" * // pre-define it in kernel header. If any are within kernel modules,
> should",
> -+" * // preload the .ko first via \"mod -S/-s\" cmd in crash before
> invoke your",
> -+" * // eppic program.
> ",
> -+" * //
> ",
> -+" * // Eppic program's syntax is similar to C but with slight
> differences. ",
> -+" * // Code samples:
> ",
> -+" * //
> https://github.com/lucchouina/eppic/tree/master/applications/crash/code",
> -+" * // Available eppic functions:
> ",
> -+" * //
> https://github.com/lucchouina/eppic/blob/master/libeppic/eppic_builtin.c#...
> ",
> -+" *
> ",
> -+" * int main(void)
> ",
> -+" * {
> ",
> -+" * struct task_struct *p;
> ",
> -+" * unsigned long offset;
> ",
> -+" *
> ",
> -+" * p = (struct task_struct *)&init_task;
> ",
> -+" * offset = (unsigned long)&(p->tasks) - (unsigned long)p;
> ",
> -+" *
> ",
> -+" * do {
> ",
> -+" * printf(\"PID: %d Command: %s\\n\", (int)(p->pid),
> getstr((char *)&(p->comm[0])));",
> -+" * p = (struct task_struct *)((unsigned long)(p->tasks.next) -
> offset);",
> -+" * } while(p != &init_task);
> ",
> -+" *
> ",
> -+" * return 0;
> ",
> -+" * }
> ",
> -+" *
> ",
> -+" * crash> eppic program_file.c
> ",
> -+" */
> ",
> -+};
> -+
> -+char *eppic_get_func_file(char *);
> - /*
> - This funciton is called to start a vi session on a function
> - (file=0) or a file (file=1);
> -@@ -800,24 +838,31 @@ char *ed=getenv("EDITOR");
> - void
> - eppic_vi(char *fname, int file)
> - {
> --int line, freeit=0;
> -+int line=1, freeit=0, fd;
> - char *filename;
> -+char newline = '\n';
> -
> - if(file) {
> -
> - filename=eppic_filempath(fname);
> -
> - if(!filename) {
> --
> -- eppic_msg("File not found : %s\n", fname);
> -- return;
> --
> -- }
> --
> -- line=1;
> -- freeit=1;
> --
> --
> -+ fd = open(fname, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> -+ if (fd < 0) {
> -+ eppic_msg("File not found : %s\n", fname);
> -+ return;
> -+ } else {
> -+ for (int i = 0; i < sizeof(example)/sizeof(char *); i++) {
> -+ write(fd, example[i], strlen(example[i]));
> -+ write(fd, &newline, sizeof(newline));
> -+ }
> -+ close(fd);
> -+ filename = fname;
> -+ freeit=0;
> -+ }
> -+ } else {
> -+ freeit=1;
> -+ }
> - } else {
> -
> - func *f=eppic_getfbyname(fname, 0);
> -@@ -837,6 +882,10 @@ char *filename;
> -
> - eppic_exevi(filename, line);
> -
> -+ char *fi_name = eppic_get_func_file("main");
> -+ if (fi_name)
> -+ eppic_deletefile(fi_name);
> -+
> - if(freeit) eppic_free(filename);
> -
> - }
> -@@ -1184,3 +1233,10 @@ eppic_runcmd(char *fname, var_t*args)
> - return 0;
> - }
> -
> -+char *eppic_get_func_file(char *funcname)
> -+{
> -+ func *fn = eppic_getfbyname(funcname, 0);
> -+ if (!fn)
> -+ return NULL;
> -+ return fn->file->fname;
> -+}
> --
> 2.47.0
>
1 month, 3 weeks