Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package makedumpfile for openSUSE:Factory checked in at 2023-01-08 21:25:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/makedumpfile (Old) and /work/SRC/openSUSE:Factory/.makedumpfile.new.1563 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "makedumpfile" Sun Jan 8 21:25:13 2023 rev:88 rq:1056824 version:1.7.2 Changes: -------- --- /work/SRC/openSUSE:Factory/makedumpfile/makedumpfile.changes 2022-06-08 14:24:29.640470617 +0200 +++ /work/SRC/openSUSE:Factory/.makedumpfile.new.1563/makedumpfile.changes 2023-01-08 21:25:17.247157258 +0100 @@ -1,0 +2,7 @@ +Sat Dec 3 21:34:25 UTC 2022 - Dirk Müller <dmuel...@suse.com> + +- update to 1.7.2: + * LoongArch64 architecture support + * Support kernels up to v6.0 (x86_64) + +------------------------------------------------------------------- Old: ---- makedumpfile-1.7.1.tar.gz New: ---- makedumpfile-1.7.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ makedumpfile.spec ++++++ --- /var/tmp/diff_new_pack.N7hVvq/_old 2023-01-08 21:25:17.791160490 +0100 +++ /var/tmp/diff_new_pack.N7hVvq/_new 2023-01-08 21:25:17.795160514 +0100 @@ -40,7 +40,7 @@ # End of compatibility cruft Name: makedumpfile -Version: 1.7.1 +Version: 1.7.2 Release: 0 Summary: Partial kernel dump License: GPL-2.0-only ++++++ makedumpfile-1.7.1.tar.gz -> makedumpfile-1.7.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makedumpfile-1.7.1/Makefile new/makedumpfile-1.7.2/Makefile --- old/makedumpfile-1.7.1/Makefile 2022-04-18 06:50:25.000000000 +0200 +++ new/makedumpfile-1.7.2/Makefile 2022-10-20 02:39:03.000000000 +0200 @@ -1,7 +1,7 @@ # makedumpfile -VERSION=1.7.1 -DATE=18 Apr 2022 +VERSION=1.7.2 +DATE=20 Oct 2022 # Honour the environment variable CC ifeq ($(strip $CC),) @@ -47,7 +47,7 @@ SRC_BASE = makedumpfile.c makedumpfile.h diskdump_mod.h sadump_mod.h sadump_info.h SRC_PART = print_info.c dwarf_info.c elf_info.c erase_info.c sadump_info.c cache.c tools.c printk.c detect_cycle.c OBJ_PART=$(patsubst %.c,%.o,$(SRC_PART)) -SRC_ARCH = arch/arm.c arch/arm64.c arch/x86.c arch/x86_64.c arch/ia64.c arch/ppc64.c arch/s390x.c arch/ppc.c arch/sparc64.c arch/mips64.c +SRC_ARCH = arch/arm.c arch/arm64.c arch/x86.c arch/x86_64.c arch/ia64.c arch/ppc64.c arch/s390x.c arch/ppc.c arch/sparc64.c arch/mips64.c arch/loongarch64.c OBJ_ARCH=$(patsubst %.c,%.o,$(SRC_ARCH)) LIBS = -ldw -lbz2 -ldl -lelf -lz @@ -126,10 +126,10 @@ rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8 makedumpfile.conf.5 install: - install -m 755 -d ${DESTDIR}/usr/sbin ${DESTDIR}/usr/share/man/man5 ${DESTDIR}/usr/share/man/man8 ${DESTDIR}/etc + install -m 755 -d ${DESTDIR}/usr/sbin ${DESTDIR}/usr/share/man/man5 ${DESTDIR}/usr/share/man/man8 install -m 755 -t ${DESTDIR}/usr/sbin makedumpfile $(VPATH)makedumpfile-R.pl install -m 644 -t ${DESTDIR}/usr/share/man/man8 makedumpfile.8 install -m 644 -t ${DESTDIR}/usr/share/man/man5 makedumpfile.conf.5 - install -m 644 -D $(VPATH)makedumpfile.conf ${DESTDIR}/etc/makedumpfile.conf.sample mkdir -p ${DESTDIR}/usr/share/makedumpfile-${VERSION}/eppic_scripts + install -m 644 -D $(VPATH)makedumpfile.conf ${DESTDIR}/usr/share/makedumpfile-${VERSION}/makedumpfile.conf.sample install -m 644 -t ${DESTDIR}/usr/share/makedumpfile-${VERSION}/eppic_scripts/ $(VPATH)eppic_scripts/* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makedumpfile-1.7.1/README new/makedumpfile-1.7.2/README --- old/makedumpfile-1.7.1/README 2022-04-18 06:50:25.000000000 +0200 +++ new/makedumpfile-1.7.2/README 2022-10-20 02:39:03.000000000 +0200 @@ -6,11 +6,14 @@ * REQUIREMENTS Please download the following library file and install it exactly as below; do NOT use "make install". + - elfutils-0.144.tar.gz + The "make install" of elfutils installs some commands (ld, readelf, etc.), and compiling problems sometimes happen due to using the installed commands. To install only the library & header files, use the following method: + # tar -zxvf elfutils-0.144.tar.gz # cd elfutils-0.144 # ./configure @@ -27,32 +30,42 @@ # cp ./libdw/libdw.a /usr/local/lib/libdw.a # cp ./libasm/libasm.a /usr/local/lib/libasm.a # cp ./libebl/libebl.a /usr/local/lib/libebl.a - # * BUILD & INSTALL 1.Get the latest makedumpfile from the following site: https://github.com/makedumpfile/makedumpfile + 2.Uncompress the tar file: # tar -zxvf makedumpfile-x.y.z.tar.gz + 3.Enter the makedumpfile subdirectory: # cd makedumpfile-x.y.z + 4.Build, and install: # make; make install - 5.Build for a different architecture than the host : + + - Build with dynamic libraries, without -static option: + $ make LINKTYPE=dynamic + + - Build for a different architecture than the host: # make TARGET=<arch> ; make install where <arch> is the 'uname -m' of the target architecture. The user has to set the environment variable CC to appropriate compiler for the target architecture. - 6.Build with lzo support: + + - Build with lzo support: # make USELZO=on ; make install The user has to prepare lzo library. - 7.Build with snappy support: + + - Build with snappy support: # make USESNAPPY=on ; make install The user has to prepare snappy library. - 8.Build with zstd support: + + - Build with zstd support: # make USEZSTD=on ; make install The user has to prepare zstd library. - 9.Build the extension module for --eppic option. + + - Build the extension module for --eppic option. # make eppic_makedumpfile.so The user has to prepare eppic library from the following site: http://code.google.com/p/eppic/ @@ -150,6 +163,9 @@ 5.15 | | ** | | | | ** | | -- | | OK | | | 5.16 | | ** | | | | ** | | -- | | OK | | | 5.17 | | ** | | | | ** | | -- | | OK | | | + 5.18 | | ** | | | | ** | | -- | | OK | | | + 5.19 | | ** | | | | ** | | -- | | OK | | | + 6.0 | | ** | | | | ** | | -- | | OK | | | OK : Support. -- : Not support. @@ -214,6 +230,22 @@ This is a workaround for some linux distributions which does not contain static library files needed by makedumpfile. + 003: How can I verify the GPG signature of a tag? + + The public key to verify it is in the makedumpfile repository and + tagged as "pubkey*": + + $ git tag | grep pubkey + pubkey + pubkey2 + pubkey3 + pubkey4 + + As of September 2022, the pubkey4 is being used. + You can import it and verify a tag like this: + + $ git cat-file blob pubkey4 | gpg --import + $ git tag -v 1.7.1 * REFERENCES - The makedumpfile project page diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makedumpfile-1.7.1/arch/loongarch64.c new/makedumpfile-1.7.2/arch/loongarch64.c --- old/makedumpfile-1.7.1/arch/loongarch64.c 1970-01-01 01:00:00.000000000 +0100 +++ new/makedumpfile-1.7.2/arch/loongarch64.c 2022-10-20 02:39:03.000000000 +0200 @@ -0,0 +1,113 @@ +/* + * loongarch64.c + * + * Copyright (C) 2022 Loongson Technology Corporation Limited + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#ifdef __loongarch64__ + +#include "../print_info.h" +#include "../elf_info.h" +#include "../makedumpfile.h" + +int +get_phys_base_loongarch64(void) +{ + info->phys_base = 0ULL; + + DEBUG_MSG("phys_base : %lx\n", info->phys_base); + + return TRUE; +} + +int +get_machdep_info_loongarch64(void) +{ + info->section_size_bits = _SECTION_SIZE_BITS; + + /* Check if we can get MAX_PHYSMEM_BITS from vmcoreinfo */ + if (NUMBER(MAX_PHYSMEM_BITS) != NOT_FOUND_NUMBER) + info->max_physmem_bits = NUMBER(MAX_PHYSMEM_BITS); + else + info->max_physmem_bits = _MAX_PHYSMEM_BITS; + + /* Check if we can get SECTION_SIZE_BITS from vmcoreinfo */ + if (NUMBER(SECTION_SIZE_BITS) != NOT_FOUND_NUMBER) + info->section_size_bits = NUMBER(SECTION_SIZE_BITS); + else + info->section_size_bits = _SECTION_SIZE_BITS; + + DEBUG_MSG("max_physmem_bits : %ld\n", info->max_physmem_bits); + DEBUG_MSG("section_size_bits: %ld\n", info->section_size_bits); + + return TRUE; +} + +int +get_versiondep_info_loongarch64(void) +{ + info->page_offset = _PAGE_OFFSET; + + DEBUG_MSG("page_offset : %lx\n", info->page_offset); + + return TRUE; +} + +unsigned long long +vaddr_to_paddr_loongarch64(unsigned long vaddr) +{ + unsigned long long paddr = NOT_PADDR; + pgd_t *pgda, pgdv; + pmd_t *pmda, pmdv; + pte_t *ptea, ptev; + + if (vaddr >= _XKPRANGE && vaddr < _XKVRANGE) + return vaddr & ((1ULL << MAX_PHYSMEM_BITS()) - 1); + + if (SYMBOL(swapper_pg_dir) == NOT_FOUND_SYMBOL) { + ERRMSG("Can't get the symbol of swapper_pg_dir.\n"); + return NOT_PADDR; + } + + pgda = pgd_offset(SYMBOL(swapper_pg_dir), vaddr); + if (!readmem(VADDR, (unsigned long long)pgda, &pgdv, sizeof(pgdv))) { + ERRMSG("Can't read pgd\n"); + return NOT_PADDR; + } + + pmda = pmd_offset(&pgdv, vaddr); + if (!readmem(VADDR, (unsigned long long)pmda, &pmdv, sizeof(pmdv))) { + ERRMSG("Can't read pmd\n"); + return NOT_PADDR; + } + + if (pmdv & _PAGE_HUGE) { + paddr = (pmdv & PMD_MASK) + (vaddr & (PMD_SIZE - 1)); + return paddr; + } + + ptea = pte_offset(&pmdv, vaddr); + if (!readmem(VADDR, (unsigned long long)ptea, &ptev, sizeof(ptev))) { + ERRMSG("Can't read pte\n"); + return NOT_PADDR; + } + + if (!(ptev & _PAGE_PRESENT)) { + ERRMSG("Can't get a valid pte.\n"); + return NOT_PADDR; + } + + paddr = PAGEBASE(ptev) + (vaddr & (PAGESIZE() - 1)); + return paddr; +} + +#endif /* loongarch64 */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makedumpfile-1.7.1/arch/mips64.c new/makedumpfile-1.7.2/arch/mips64.c --- old/makedumpfile-1.7.1/arch/mips64.c 2022-04-18 06:50:25.000000000 +0200 +++ new/makedumpfile-1.7.2/arch/mips64.c 2022-10-20 02:39:03.000000000 +0200 @@ -52,7 +52,7 @@ int get_versiondep_info_mips64(void) { - info->page_offset = 0x9800000000000000ULL; + info->page_offset = _PAGE_OFFSET; DEBUG_MSG("page_offset : %lx\n", info->page_offset); @@ -79,7 +79,7 @@ /* * XKPHYS */ - if (vaddr >= 0x9000000000000000ULL && vaddr < 0xc000000000000000ULL) + if (vaddr >= _XKPHYS_START_ADDR && vaddr < _XKPHYS_END_ADDR) return vaddr & ((1ULL << MAX_PHYSMEM_BITS()) - 1); if (SYMBOL(swapper_pg_dir) == NOT_FOUND_SYMBOL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makedumpfile-1.7.1/makedumpfile.c new/makedumpfile-1.7.2/makedumpfile.c --- old/makedumpfile-1.7.1/makedumpfile.c 2022-04-18 06:50:25.000000000 +0200 +++ new/makedumpfile-1.7.2/makedumpfile.c 2022-10-20 02:39:03.000000000 +0200 @@ -3698,6 +3698,22 @@ return ret; } +/* + * SYMBOL(mem_section) varies with the combination of memory model and + * its source: + * + * SPARSEMEM + * vmcoreinfo: address of mem_section root array + * -x vmlinux: address of mem_section root array + * + * SPARSEMEM_EXTREME v1 + * vmcoreinfo: address of mem_section root array + * -x vmlinux: address of mem_section root array + * + * SPARSEMEM_EXTREME v2 (with 83e3c48729d9 and a0b1280368d1) 4.15+ + * vmcoreinfo: address of mem_section root array + * -x vmlinux: address of pointer to mem_section root array + */ static int get_mem_section(unsigned int mem_section_size, unsigned long *mem_maps, unsigned int num_section) @@ -3710,12 +3726,27 @@ strerror(errno)); return FALSE; } + + /* + * There was a report that the first validation wrongly returned TRUE + * with -x vmlinux and SPARSEMEM_EXTREME v2 on s390x, so skip it. + * Howerver, leave the fallback validation as it is for the -i option. + */ + if (is_sparsemem_extreme() && info->name_vmlinux) { + unsigned long flag = 0; + if (get_symbol_type_name("mem_section", DWARF_INFO_GET_SYMBOL_TYPE, + NULL, &flag) + && !(flag & TYPE_ARRAY)) + goto skip_1st_validation; + } + ret = validate_mem_section(mem_sec, SYMBOL(mem_section), mem_section_size, mem_maps, num_section); if (!ret && is_sparsemem_extreme()) { unsigned long mem_section_ptr; +skip_1st_validation: if (!readmem(VADDR, SYMBOL(mem_section), &mem_section_ptr, sizeof(mem_section_ptr))) goto out; @@ -9637,7 +9668,6 @@ { off_t offset_xen_crash_info; unsigned long size_xen_crash_info; - int ret = FALSE; void *buf; get_xen_crash_info(&offset_xen_crash_info, &size_xen_crash_info); @@ -9679,11 +9709,11 @@ else info->xen_crash_info_v = 0; - ret = TRUE; + return TRUE; out_error: free(buf); - return ret; + return FALSE; } int @@ -12346,6 +12376,8 @@ free(info->dump_header); if (info->splitting_info != NULL) free(info->splitting_info); + if (info->xen_crash_info.com != NULL) + free(info->xen_crash_info.com); if (info->p2m_mfn_frame_list != NULL) free(info->p2m_mfn_frame_list); if (info->page_buf != NULL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makedumpfile-1.7.1/makedumpfile.h new/makedumpfile-1.7.2/makedumpfile.h --- old/makedumpfile-1.7.1/makedumpfile.h 2022-04-18 06:50:25.000000000 +0200 +++ new/makedumpfile-1.7.2/makedumpfile.h 2022-10-20 02:39:03.000000000 +0200 @@ -501,7 +501,7 @@ #define KVER_MIN_SHIFT 16 #define KERNEL_VERSION(x,y,z) (((x) << KVER_MAJ_SHIFT) | ((y) << KVER_MIN_SHIFT) | (z)) #define OLDEST_VERSION KERNEL_VERSION(2, 6, 15) /* linux-2.6.15 */ -#define LATEST_VERSION KERNEL_VERSION(5, 17, 1) /* linux-5.17.1 */ +#define LATEST_VERSION KERNEL_VERSION(6, 0, 1) /* linux-6.0.1 */ /* * vmcoreinfo in /proc/vmcore @@ -965,8 +965,25 @@ #ifdef __mips64__ /* mips64 */ #define KVBASE PAGE_OFFSET + +#ifndef _XKPHYS_START_ADDR +#define _XKPHYS_START_ADDR 0x9000000000000000ULL /* _LOONGSON_XKPHYS_START_ADDR */ +#endif + +#ifndef _XKPHYS_END_ADDR +#define _XKPHYS_END_ADDR 0xc000000000000000ULL /* _LOONGSON_XKPHYS_END_ADDR */ +#endif + +#ifndef _PAGE_OFFSET +#define _PAGE_OFFSET 0x9800000000000000ULL +#endif + #define _SECTION_SIZE_BITS (28) + +#ifndef _MAX_PHYSMEM_BITS #define _MAX_PHYSMEM_BITS (48) +#endif + #define _PAGE_PRESENT (1 << 0) #define _PAGE_HUGE (1 << 4) @@ -996,6 +1013,42 @@ #endif /* mips64 */ +#ifdef __loongarch64__ +#define KVBASE (0x8000000000000000ULL) +#define _PAGE_OFFSET (0x9000000000000000ULL) +#define _XKPRANGE (0x8000000000000000ULL) +#define _XKVRANGE (0xc000000000000000ULL) +#define _SECTION_SIZE_BITS (29) +#define _MAX_PHYSMEM_BITS (48) +#define _PAGE_HUGE (1 << 6) /* HUGE is a PMD bit */ +#define _PAGE_PRESENT (1 << 7) + +typedef unsigned long pte_t; +typedef unsigned long pmd_t; +typedef unsigned long pgd_t; + +#define PAGE_MASK (~(PAGESIZE() - 1)) +#define PMD_MASK (~(PMD_SIZE - 1)) +#define PMD_SHIFT ((PAGESHIFT() - 3) * 2 + 3) +#define PMD_SIZE (1UL << PMD_SHIFT) +#define PGDIR_SHIFT ((PAGESHIFT() - 3) * 3 + 3) +#define PTRS_PER_PTE (1 << (PAGESHIFT() - 3)) +#define PTRS_PER_PMD PTRS_PER_PTE +#define PTRS_PER_PGD PTRS_PER_PTE + +#define pte_index(vaddr) (((vaddr) >> PAGESHIFT()) & (PTRS_PER_PTE - 1)) +#define pmd_page_paddr(pmd) (pmd & (int32_t)PAGE_MASK) +#define pte_offset(dir, vaddr) ((pte_t *)pmd_page_paddr((*dir)) + pte_index(vaddr)) + +#define pmd_index(vaddr) (((vaddr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) +#define pgd_page_paddr(pgd) (pgd & (int32_t)PAGE_MASK) +#define pmd_offset(pgd, vaddr) ((pmd_t *)pgd_page_paddr((*pgd)) + pmd_index(vaddr)) + +#define pgd_index(vaddr) (((vaddr) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1)) +#define pgd_offset(pgdir, vaddr) ((pgd_t *)(pgdir) + pgd_index(vaddr)) + +#endif /* loongarch64 */ + /* * The function of dependence on machine */ @@ -1167,6 +1220,22 @@ #define arch_crashkernel_mem_size() stub_false() #endif /* mips64 */ +#ifdef __loongarch64__ /* loongarch64 */ +int get_phys_base_loongarch64(void); +int get_machdep_info_loongarch64(void); +int get_versiondep_info_loongarch64(void); +unsigned long long vaddr_to_paddr_loongarch64(unsigned long vaddr); +#define find_vmemmap() stub_false() +#define get_phys_base() get_phys_base_loongarch64() +#define get_machdep_info() get_machdep_info_loongarch64() +#define get_versiondep_info() get_versiondep_info_loongarch64() +#define get_kaslr_offset(X) stub_false() +#define vaddr_to_paddr(X) vaddr_to_paddr_loongarch64(X) +#define paddr_to_vaddr(X) paddr_to_vaddr_general(X) +#define is_phys_addr(X) stub_true_ul(X) +#define arch_crashkernel_mem_size() stub_false() +#endif /* loongarch64 */ + typedef unsigned long long mdf_pfn_t; #ifndef ARCH_PFN_OFFSET @@ -2301,6 +2370,12 @@ #define get_xen_info_arch(X) FALSE #endif /* mips64 */ +#ifdef __loongarch64__ /* loongarch64 */ +#define kvtop_xen(X) FALSE +#define get_xen_basic_info_arch(X) FALSE +#define get_xen_info_arch(X) FALSE +#endif /* loongarch64 */ + struct cycle { mdf_pfn_t start_pfn; mdf_pfn_t end_pfn; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/makedumpfile-1.7.1/makedumpfile.spec new/makedumpfile-1.7.2/makedumpfile.spec --- old/makedumpfile-1.7.1/makedumpfile.spec 2022-04-18 06:50:25.000000000 +0200 +++ new/makedumpfile-1.7.2/makedumpfile.spec 2022-10-20 02:39:03.000000000 +0200 @@ -1,6 +1,6 @@ Name: makedumpfile Summary: makedumpfile package -Version: 1.7.1 +Version: 1.7.2 Release: 1 Group: Applications/Text License: GPL @@ -25,7 +25,6 @@ %install rm -rf %{buildroot} mkdir -p %{buildroot}/usr/sbin -mkdir -p %{buildroot}/etc mkdir -p %{buildroot}/usr/share/man/man5 mkdir -p %{buildroot}/usr/share/man/man8 mkdir -p %{buildroot}/usr/share/%{name}-%{version}/eppic-scripts/ @@ -35,11 +34,11 @@ rm -rf %{buildroot} %files -/etc/makedumpfile.conf.sample /usr/sbin/makedumpfile /usr/sbin/makedumpfile-R.pl /usr/share/man/man5/makedumpfile.conf.5.gz /usr/share/man/man8/makedumpfile.8.gz +/usr/share/%{name}-%{version}/makedumpfile.conf.sample /usr/share/%{name}-%{version}/eppic_scripts/ %changelog