Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package crash for openSUSE:Factory checked in at 2021-10-15 23:04:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crash (Old) and /work/SRC/openSUSE:Factory/.crash.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crash" Fri Oct 15 23:04:36 2021 rev:178 rq:925522 version:7.2.9 Changes: -------- --- /work/SRC/openSUSE:Factory/crash/crash.changes 2021-09-25 00:36:21.447189698 +0200 +++ /work/SRC/openSUSE:Factory/.crash.new.1890/crash.changes 2021-10-15 23:05:08.590147921 +0200 @@ -1,0 +2,7 @@ +Mon Oct 4 19:32:38 UTC 2021 - David Mair <dm...@suse.com> + +- Fix crash view of task_struct_state changes for kernel 5.14 + (bsc#1191206) + + crash-handle-by-kernel-task_struct-state-member-changes.patch + +------------------------------------------------------------------- New: ---- crash-handle-by-kernel-task_struct-state-member-changes.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crash.spec ++++++ --- /var/tmp/diff_new_pack.dR4gMP/_old 2021-10-15 23:05:09.562148614 +0200 +++ /var/tmp/diff_new_pack.dR4gMP/_new 2021-10-15 23:05:09.562148614 +0200 @@ -100,6 +100,8 @@ Patch46: %{name}-xen-pvops.patch # PATCH-FIX-UPSTREAM - https://github.com/crash-utility/crash/commit/cf0c8d10e1870d89b39f40382634db51aa8fcf2c.patch Patch47: %{name}-mod-fix-module-object-file-lookup.patch +# PATCH-FIX-UPSTREAM - https://github.com/crash-utility/crash/commit/d6b4f36d6b22b70fb14e692f36d20910ef5563c1.patch +Patch48: %{name}-handle-by-kernel-task_struct-state-member-changes.patch Patch90: %{name}-sial-ps-2.6.29.diff BuildRequires: bison BuildRequires: flex @@ -304,6 +306,7 @@ %patch45 -p1 %patch46 -p1 %patch47 -p1 +%patch48 -p1 %if %{have_snappy} %patch15 -p1 %endif ++++++ crash-handle-by-kernel-task_struct-state-member-changes.patch ++++++ >From d6b4f36d6b22b70fb14e692f36d20910ef5563c1 Mon Sep 17 00:00:00 2001 From: Alexander Egorenkov <egore...@linux.ibm.com> Date: Tue, 29 Jun 2021 08:39:00 +0200 Subject: [PATCH] Handle task_struct state member changes for kernels >= 5.14-rc1 Kernel commit 2f064a59a11ff9bc22e52e9678bc601404c7cb34 ("sched: Change task_struct::state") renamed the member state of task_struct to __state and its type changed from long to unsigned int. Without the patch, crash fails to start up with the following error: crash: invalid structure member offset: task_struct_state FILE: task.c LINE: 5929 FUNCTION: task_state() Signed-off-by: Alexander Egorenkov <egore...@linux.ibm.com> --- defs.h | 1 + symbols.c | 1 + task.c | 10 +++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) Index: b/defs.h =================================================================== --- a/defs.h +++ b/defs.h @@ -2265,6 +2265,7 @@ struct size_table { /* stash of long printk_info; long printk_ringbuffer; long prb_desc; + long task_struct_state; }; struct array_table { Index: b/symbols.c =================================================================== --- a/symbols.c +++ b/symbols.c @@ -10655,6 +10655,7 @@ dump_offset_table(char *spec, ulong make SIZE(page_cache_bucket)); fprintf(fp, " pt_regs: %ld\n", SIZE(pt_regs)); fprintf(fp, " task_struct: %ld\n", SIZE(task_struct)); + fprintf(fp, " task_struct_state: %ld\n", SIZE(task_struct_state)); fprintf(fp, " task_struct_flags: %ld\n", SIZE(task_struct_flags)); fprintf(fp, " task_struct_policy: %ld\n", SIZE(task_struct_policy)); fprintf(fp, " thread_info: %ld\n", SIZE(thread_info)); Index: b/task.c =================================================================== --- a/task.c +++ b/task.c @@ -297,6 +297,11 @@ task_init(void) } MEMBER_OFFSET_INIT(task_struct_state, "task_struct", "state"); + MEMBER_SIZE_INIT(task_struct_state, "task_struct", "state"); + if (INVALID_MEMBER(task_struct_state)) { + MEMBER_OFFSET_INIT(task_struct_state, "task_struct", "__state"); + MEMBER_SIZE_INIT(task_struct_state, "task_struct", "__state"); + } MEMBER_OFFSET_INIT(task_struct_exit_state, "task_struct", "exit_state"); MEMBER_OFFSET_INIT(task_struct_pid, "task_struct", "pid"); MEMBER_OFFSET_INIT(task_struct_comm, "task_struct", "comm"); @@ -5913,7 +5918,10 @@ task_state(ulong task) if (!tt->last_task_read) return 0; - state = ULONG(tt->task_struct + OFFSET(task_struct_state)); + if (SIZE(task_struct_state) == sizeof(ulong)) + state = ULONG(tt->task_struct + OFFSET(task_struct_state)); + else + state = UINT(tt->task_struct + OFFSET(task_struct_state)); exit_state = VALID_MEMBER(task_struct_exit_state) ? ULONG(tt->task_struct + OFFSET(task_struct_exit_state)) : 0;