Hello community, here is the log from the commit of package crash for openSUSE:Factory checked in at 2018-02-12 10:15:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crash (Old) and /work/SRC/openSUSE:Factory/.crash.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crash" Mon Feb 12 10:15:13 2018 rev:147 rq:575231 version:7.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/crash/crash.changes 2018-01-13 21:49:33.628723563 +0100 +++ /work/SRC/openSUSE:Factory/.crash.new/crash.changes 2018-02-12 10:15:16.473376433 +0100 @@ -1,0 +2,11 @@ +Mon Feb 5 18:56:04 UTC 2018 - [email protected] + +- Added: + crash-fix-error-cannot-resolve-schedulers-0001.patch + crash-fix-error-cannot-resolve-schedulers-0002.patch + crash-extend-direct-mapping-to-5TB.patch + + Fixes Xen dump files that cannot be opened in hypervisor mode. + bsc#1073993 + +------------------------------------------------------------------- New: ---- crash-extend-direct-mapping-to-5TB.patch crash-fix-error-cannot-resolve-schedulers-0001.patch crash-fix-error-cannot-resolve-schedulers-0002.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crash.spec ++++++ --- /var/tmp/diff_new_pack.CweG4r/_old 2018-02-12 10:15:18.337309264 +0100 +++ /var/tmp/diff_new_pack.CweG4r/_new 2018-02-12 10:15:18.337309264 +0100 @@ -87,6 +87,9 @@ Patch20: %{name}-x86_64_kvtop-usable-symtab_init.patch Patch21: %{name}-allow-use-of-sadump-captured-KASLR-kernel.patch Patch22: %{name}-ppc64-ensure-chosen-stack-symbol-relates-to-an-actual-backtrace.patch +Patch23: %{name}-fix-error-cannot-resolve-schedulers-0001.patch +Patch24: %{name}-fix-error-cannot-resolve-schedulers-0002.patch +Patch25: %{name}-extend-direct-mapping-to-5TB.patch Patch90: %{name}-sial-ps-2.6.29.diff BuildRequires: bison BuildRequires: flex @@ -286,6 +289,9 @@ %patch20 -p1 %patch21 -p1 %patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 %if %{have_snappy} %patch15 -p1 %endif ++++++ crash-extend-direct-mapping-to-5TB.patch ++++++ From: Petr Tesarik <[email protected]> Subject: Extend Xen hypervisor direct mapping on x86_64 References: bsc#1073993 Upstream: merged Git-commit: e9ae5eb9749a62060610dc29d1b2829999bc79d3 Xen commit 615588563e99a23aaf37037c3fee0c413b051f4d (Xen 4.0.0.) extended the direct mapping to 5 TB. This area was previously reserved for future use, so it is OK to simply change the upper bound unconditionally. Signed-off-by: Petr Tesarik <[email protected]> --- xen_hyper_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen_hyper_defs.h b/xen_hyper_defs.h index 6d5d256..b871bdd 100644 --- a/xen_hyper_defs.h +++ b/xen_hyper_defs.h @@ -63,7 +63,7 @@ #define HYPERVISOR_VIRT_START (0xffff800000000000) #define HYPERVISOR_VIRT_END (0xffff880000000000) #define DIRECTMAP_VIRT_START (0xffff830000000000) -#define DIRECTMAP_VIRT_END (0xffff840000000000) +#define DIRECTMAP_VIRT_END (0xffff880000000000) #define PAGE_OFFSET_XEN_HYPER DIRECTMAP_VIRT_START #define XEN_VIRT_START (xht->xen_virt_start) #define XEN_VIRT_ADDR(vaddr) \ ++++++ crash-fix-error-cannot-resolve-schedulers-0001.patch ++++++ From: Nikola Pajkovsky <[email protected]> Subject: dynamically allocate schedulers_buf References: bsc#1073993 Upstream: merged Git-commit: e4499a9de664826b0db2f650684959c2f3f9998c crash can simply determinate length of xen schedulers struct. static const struct scheduler *schedulers[] = { ... }; Signed-off-by: Nikola Pajkovsky <[email protected]> --- xen_hyper.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xen_hyper.c b/xen_hyper.c index 27e44c6e733d..479aa1acfd43 100644 --- a/xen_hyper.c +++ b/xen_hyper.c @@ -435,7 +435,6 @@ xen_hyper_misc_init(void) /* * Do initialization for scheduler of Xen Hyper system here. */ -#define XEN_HYPER_SCHEDULERS_ARRAY_CNT 10 #define XEN_HYPER_SCHEDULER_NAME 1024 static void @@ -443,7 +442,8 @@ xen_hyper_schedule_init(void) { ulong addr, opt_sched, schedulers, opt_name; long scheduler_opt_name; - long schedulers_buf[XEN_HYPER_SCHEDULERS_ARRAY_CNT]; + long *schedulers_buf; + int nr_schedulers; struct xen_hyper_sched_context *schc; char *buf; char opt_name_buf[XEN_HYPER_OPT_SCHED_SIZE]; @@ -469,15 +469,17 @@ xen_hyper_schedule_init(void) XEN_HYPER_OPT_SCHED_SIZE, "opt_sched,", RETURN_ON_ERROR)) { error(FATAL, "cannot read opt_sched,.\n"); } + nr_schedulers = get_array_length("schedulers", 0, 0); + schedulers_buf = (long *)GETBUF(nr_schedulers * sizeof(long)); schedulers = symbol_value("schedulers"); addr = schedulers; while (xhscht->name == NULL) { if (!readmem(addr, KVADDR, schedulers_buf, - sizeof(long) * XEN_HYPER_SCHEDULERS_ARRAY_CNT, - "schedulers", RETURN_ON_ERROR)) { + sizeof(long) * nr_schedulers, + "schedulers", RETURN_ON_ERROR)) { error(FATAL, "cannot read schedulers.\n"); } - for (i = 0; i < XEN_HYPER_SCHEDULERS_ARRAY_CNT; i++) { + for (i = 0; i < nr_schedulers; i++) { if (schedulers_buf[i] == 0) { error(FATAL, "schedule data not found.\n"); } @@ -514,9 +516,10 @@ xen_hyper_schedule_init(void) strncpy(xhscht->name, buf, strlen(buf)); break; } - addr += sizeof(long) * XEN_HYPER_SCHEDULERS_ARRAY_CNT; + addr += sizeof(long) * nr_schedulers; } FREEBUF(buf); + FREEBUF(schedulers_buf); /* get schedule_data information */ if((xhscht->sched_context_array = -- 2.13.6 -- Crash-utility mailing list [email protected] https://www.redhat.com/mailman/listinfo/crash-utility ++++++ crash-fix-error-cannot-resolve-schedulers-0002.patch ++++++ From: Nikola Pajkovsky <[email protected]> Subject: fix error crash: cannot resolve "schedulers" References: bsc#1073993 Upstream: merged Git-commit: e4499a9de664826b0db2f650684959c2f3f9998c Since Xen commit 666aca08175b ("sched: use the auto-generated list of schedulers") crash cannot open Xen vmcores, because symbol 'schedulers' does not exist. Xen 4.7 implemented schedulers as its own section. xen/arch/x86/xen.lds.S __start_schedulers_array = .; *(.data.schedulers) __end_schedulers_array = .; Crash must not look up for "schedulers" symbol and fails, if symbol is not found. It must check if __start_schedulers_array exits, and if it does, use it and get size of the section. Otherwise, crash fallback to looking up "schedulers" symbol. That way, crash can open vmcore before and after Xen 4.7. Signed-off-by: Nikola Pajkovsky <[email protected]> --- xen_hyper.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/xen_hyper.c b/xen_hyper.c index 479aa1acfd43..2a42e44b1f70 100644 --- a/xen_hyper.c +++ b/xen_hyper.c @@ -437,6 +437,16 @@ xen_hyper_misc_init(void) */ #define XEN_HYPER_SCHEDULER_NAME 1024 +static int section_size(char *start_section, char *end_section) +{ + ulong sp_start, sp_end; + + sp_start = symbol_value(start_section); + sp_end = symbol_value(end_section); + + return (sp_end - sp_start) / sizeof(long); +} + static void xen_hyper_schedule_init(void) { @@ -448,6 +458,7 @@ xen_hyper_schedule_init(void) char *buf; char opt_name_buf[XEN_HYPER_OPT_SCHED_SIZE]; int i, cpuid, flag; + char *sp_name; /* get scheduler information */ if((xhscht->scheduler_struct = @@ -469,9 +480,19 @@ xen_hyper_schedule_init(void) XEN_HYPER_OPT_SCHED_SIZE, "opt_sched,", RETURN_ON_ERROR)) { error(FATAL, "cannot read opt_sched,.\n"); } - nr_schedulers = get_array_length("schedulers", 0, 0); + + /* symbol exists since Xen 4.7 */ + if (symbol_exists("__start_schedulers_array")) { + sp_name = "__start_schedulers_array"; + nr_schedulers = section_size("__start_schedulers_array", + "__end_schedulers_array"); + } else { + sp_name = "schedulers"; + nr_schedulers = get_array_length("schedulers", 0, 0); + } + schedulers_buf = (long *)GETBUF(nr_schedulers * sizeof(long)); - schedulers = symbol_value("schedulers"); + schedulers = symbol_value(sp_name); addr = schedulers; while (xhscht->name == NULL) { if (!readmem(addr, KVADDR, schedulers_buf, -- 2.13.6 -- Crash-utility mailing list [email protected] https://www.redhat.com/mailman/listinfo/crash-utility ++++++ crash-ppc64-ensure-chosen-stack-symbol-relates-to-an-actual-backtrace.patch ++++++ --- /var/tmp/diff_new_pack.CweG4r/_old 2018-02-12 10:15:18.493303642 +0100 +++ /var/tmp/diff_new_pack.CweG4r/_new 2018-02-12 10:15:18.497303498 +0100 @@ -1,3 +1,9 @@ +From: Hari Bathini <[email protected]> +Subject: ppc64: fix bt for secondary threads for NMI IPIs +References: bsc#1072718 +Upstream: merged +Git-commit: ed2abb47be9846be7a47d769c420ee3992cc0196 + With latest NMI IPI changes, crash_ipi_callback is found multiple times on the stack. Ensure the chosen symbol relates to an actual backtrace.
