Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kexec-tools for openSUSE:Factory 
checked in at 2022-08-19 17:53:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kexec-tools (Old)
 and      /work/SRC/openSUSE:Factory/.kexec-tools.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kexec-tools"

Fri Aug 19 17:53:11 2022 rev:143 rq:997688 version:2.0.25

Changes:
--------
--- /work/SRC/openSUSE:Factory/kexec-tools/kexec-tools.changes  2022-06-08 
14:24:25.488465472 +0200
+++ /work/SRC/openSUSE:Factory/.kexec-tools.new.2083/kexec-tools.changes        
2022-08-19 17:54:15.711821623 +0200
@@ -1,0 +2,9 @@
+Wed Aug 17 21:46:31 UTC 2022 - Dirk M??ller <[email protected]>
+
+- update to 2.0.25:
+  * kexec-tools: Remove duplicate ultoa() definitions and redefine it
+  * i386: pass rng seed via setup_data
+  * kexec-tools: mips: Pass initrd parameter via cmdline
+  * arm64/crashdump-arm64: increase CRASH_MAX_MEMORY_RANGES to 32k
+
+-------------------------------------------------------------------

Old:
----
  kexec-tools-2.0.24.tar.sign
  kexec-tools-2.0.24.tar.xz

New:
----
  kexec-tools-2.0.25.tar.sign
  kexec-tools-2.0.25.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kexec-tools.spec ++++++
--- /var/tmp/diff_new_pack.a5HLCU/_old  2022-08-19 17:54:16.511823299 +0200
+++ /var/tmp/diff_new_pack.a5HLCU/_new  2022-08-19 17:54:16.515823309 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           kexec-tools
-Version:        2.0.24
+Version:        2.0.25
 Release:        0
 Summary:        Tools for loading replacement kernels into memory
 License:        GPL-2.0-or-later

++++++ kexec-tools-2.0.24.tar.xz -> kexec-tools-2.0.25.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kexec-tools-2.0.24/configure 
new/kexec-tools-2.0.25/configure
--- old/kexec-tools-2.0.24/configure    2022-04-09 13:25:15.000000000 +0200
+++ new/kexec-tools-2.0.25/configure    2022-07-31 08:40:15.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for kexec-tools 2.0.24.
+# Generated by GNU Autoconf 2.69 for kexec-tools 2.0.25.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@
 # Identity of this package.
 PACKAGE_NAME='kexec-tools'
 PACKAGE_TARNAME='kexec-tools'
-PACKAGE_VERSION='2.0.24'
-PACKAGE_STRING='kexec-tools 2.0.24'
+PACKAGE_VERSION='2.0.25'
+PACKAGE_STRING='kexec-tools 2.0.25'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1280,7 +1280,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures kexec-tools 2.0.24 to adapt to many kinds of systems.
+\`configure' configures kexec-tools 2.0.25 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1347,7 +1347,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of kexec-tools 2.0.24:";;
+     short | recursive ) echo "Configuration of kexec-tools 2.0.25:";;
    esac
   cat <<\_ACEOF
 
@@ -1437,7 +1437,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-kexec-tools configure 2.0.24
+kexec-tools configure 2.0.25
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1735,7 +1735,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by kexec-tools $as_me 2.0.24, which was
+It was created by kexec-tools $as_me 2.0.25, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -5551,7 +5551,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by kexec-tools $as_me 2.0.24, which was
+This file was extended by kexec-tools $as_me 2.0.25, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5613,7 +5613,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-kexec-tools config.status 2.0.24
+kexec-tools config.status 2.0.25
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kexec-tools-2.0.24/configure.ac 
new/kexec-tools-2.0.25/configure.ac
--- old/kexec-tools-2.0.24/configure.ac 2022-04-09 13:24:36.000000000 +0200
+++ new/kexec-tools-2.0.25/configure.ac 2022-07-31 08:38:53.000000000 +0200
@@ -4,7 +4,7 @@
 dnl 
 
 dnl ---Required
-AC_INIT(kexec-tools, 2.0.24)
+AC_INIT(kexec-tools, 2.0.25)
 AC_CONFIG_AUX_DIR(./config)
 AC_CONFIG_HEADERS([include/config.h])
 AC_LANG(C)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kexec-tools-2.0.24/include/config.h 
new/kexec-tools-2.0.25/include/config.h
--- old/kexec-tools-2.0.24/include/config.h     2022-04-09 13:25:19.000000000 
+0200
+++ new/kexec-tools-2.0.25/include/config.h     2022-07-31 08:40:16.000000000 
+0200
@@ -56,7 +56,7 @@
 #define PACKAGE_NAME "kexec-tools"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "kexec-tools 2.0.24"
+#define PACKAGE_STRING "kexec-tools 2.0.25"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "kexec-tools"
@@ -65,7 +65,7 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "2.0.24"
+#define PACKAGE_VERSION "2.0.25"
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kexec-tools-2.0.24/kexec/arch/arm64/crashdump-arm64.h 
new/kexec-tools-2.0.25/kexec/arch/arm64/crashdump-arm64.h
--- old/kexec-tools-2.0.24/kexec/arch/arm64/crashdump-arm64.h   2022-01-14 
15:53:58.000000000 +0100
+++ new/kexec-tools-2.0.25/kexec/arch/arm64/crashdump-arm64.h   2022-06-26 
09:19:20.000000000 +0200
@@ -14,7 +14,7 @@
 
 #include "kexec.h"
 
-#define CRASH_MAX_MEMORY_RANGES        32
+#define CRASH_MAX_MEMORY_RANGES        32768
 
 /* crash dump kernel support at most two regions, low_region and high region. 
*/
 #define CRASH_MAX_RESERVED_RANGES      2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kexec-tools-2.0.24/kexec/arch/i386/crashdump-x86.c 
new/kexec-tools-2.0.25/kexec/arch/i386/crashdump-x86.c
--- old/kexec-tools-2.0.24/kexec/arch/i386/crashdump-x86.c      2021-11-04 
15:57:15.000000000 +0100
+++ new/kexec-tools-2.0.25/kexec/arch/i386/crashdump-x86.c      2022-07-19 
14:27:46.000000000 +0200
@@ -601,25 +601,6 @@
        return 0;
 }
 
-/* Converts unsigned long to ascii string. */
-static void ultoa(unsigned long i, char *str)
-{
-       int j = 0, k;
-       char tmp;
-
-       do {
-               str[j++] = i % 10 + '0';
-       } while ((i /=10) > 0);
-       str[j] = '\0';
-
-       /* Reverse the string. */
-       for (j = 0, k = strlen(str) - 1; j < k; j++, k--) {
-               tmp = str[k];
-               str[k] = str[j];
-               str[j] = tmp;
-       }
-}
-
 static void cmdline_add_memmap_internal(char *cmdline, unsigned long startk,
                                        unsigned long endk, int type)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kexec-tools-2.0.24/kexec/arch/i386/x86-linux-setup.c 
new/kexec-tools-2.0.25/kexec/arch/i386/x86-linux-setup.c
--- old/kexec-tools-2.0.24/kexec/arch/i386/x86-linux-setup.c    2021-04-02 
12:09:36.000000000 +0200
+++ new/kexec-tools-2.0.25/kexec/arch/i386/x86-linux-setup.c    2022-07-15 
11:26:13.000000000 +0200
@@ -24,6 +24,7 @@
 #include <limits.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/random.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <linux/fb.h>
@@ -544,6 +545,7 @@
 #define SETUP_DTB      2
 #define SETUP_PCI      3
 #define SETUP_EFI      4
+#define SETUP_RNG_SEED 9
        uint32_t len;
        uint8_t data[0];
 } __attribute__((packed));
@@ -824,6 +826,26 @@
        }
 }
 
+static void setup_rng_seed(struct kexec_info *info,
+                          struct x86_linux_param_header *real_mode)
+{
+       struct {
+               struct setup_data header;
+               uint8_t rng_seed[32];
+       } *sd;
+
+       sd = xmalloc(sizeof(*sd));
+       sd->header.next = 0;
+       sd->header.len = sizeof(sd->rng_seed);
+       sd->header.type = SETUP_RNG_SEED;
+
+       if (getrandom(sd->rng_seed, sizeof(sd->rng_seed), GRND_NONBLOCK) !=
+           sizeof(sd->rng_seed))
+               return; /* Not initialized, so don't pass a seed. */
+
+       add_setup_data(info, real_mode, &sd->header);
+}
+
 static int
 get_efi_mem_desc_version(struct x86_linux_param_header *real_mode)
 {
@@ -923,6 +945,9 @@
 
        setup_e820(info, real_mode);
 
+       /* pass RNG seed */
+       setup_rng_seed(info, real_mode);
+
        /* fill the EDD information */
        setup_edd_info(real_mode);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kexec-tools-2.0.24/kexec/arch/mips/crashdump-mips.c 
new/kexec-tools-2.0.25/kexec/arch/mips/crashdump-mips.c
--- old/kexec-tools-2.0.24/kexec/arch/mips/crashdump-mips.c     2021-04-02 
12:09:36.000000000 +0200
+++ new/kexec-tools-2.0.25/kexec/arch/mips/crashdump-mips.c     2022-07-19 
14:27:46.000000000 +0200
@@ -224,25 +224,6 @@
        return 0;
 }
 
-/* Converts unsigned long to ascii string. */
-static void ultoa(unsigned long i, char *str)
-{
-       int j = 0, k;
-       char tmp;
-
-       do {
-               str[j++] = i % 10 + '0';
-       } while ((i /= 10) > 0);
-       str[j] = '\0';
-
-       /* Reverse the string. */
-       for (j = 0, k = strlen(str) - 1; j < k; j++, k--) {
-               tmp = str[k];
-               str[k] = str[j];
-               str[j] = tmp;
-       }
-}
-
 /* Adds the appropriate mem= options to command line, indicating the
  * memory region the new kernel can use to boot into. */
 static int cmdline_add_mem(char *cmdline, unsigned long addr,
@@ -334,7 +315,10 @@
                if (strncmp(line, "cpu model", 9) == 0) {
                        /* OCTEON uses a different page_offset. */
                        if (strstr(line, "Octeon"))
-                               elf_info64.page_offset = 0x8000000000000000ULL;
+                               elf_info64.page_offset = OCTEON_PAGE_OFFSET;
+                       /* LOONGSON uses a different page_offset. */
+                       else if (strstr(line, "Loongson"))
+                               elf_info64.page_offset = LOONGSON_PAGE_OFFSET;
                        break;
                }
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kexec-tools-2.0.24/kexec/arch/mips/crashdump-mips.h 
new/kexec-tools-2.0.25/kexec/arch/mips/crashdump-mips.h
--- old/kexec-tools-2.0.24/kexec/arch/mips/crashdump-mips.h     2020-12-21 
09:07:22.000000000 +0100
+++ new/kexec-tools-2.0.25/kexec/arch/mips/crashdump-mips.h     2022-06-26 
09:21:28.000000000 +0200
@@ -13,6 +13,8 @@
 #endif
 #define __pa(x)                ((unsigned long)(X) & 0x7fffffff)
 
+#define LOONGSON_PAGE_OFFSET   0xffffffff80000000ULL
+#define OCTEON_PAGE_OFFSET     0x8000000000000000ULL
 
 #define CRASH_MAX_MEMMAP_NR    (KEXEC_MAX_SEGMENTS + 1)
 #define CRASH_MAX_MEMORY_RANGES        (MAX_MEMORY_RANGES + 2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kexec-tools-2.0.24/kexec/arch/mips/kexec-elf-mips.c 
new/kexec-tools-2.0.25/kexec/arch/mips/kexec-elf-mips.c
--- old/kexec-tools-2.0.24/kexec/arch/mips/kexec-elf-mips.c     2020-12-21 
09:07:22.000000000 +0100
+++ new/kexec-tools-2.0.25/kexec/arch/mips/kexec-elf-mips.c     2022-07-19 
14:27:46.000000000 +0200
@@ -40,6 +40,58 @@
 #define CMDLINE_PREFIX "kexec "
 static char cmdline_buf[COMMAND_LINE_SIZE] = CMDLINE_PREFIX;
 
+/* Adds initrd parameters to command line. */
+static int cmdline_add_initrd(char *cmdline, unsigned long addr, char 
*new_para)
+{
+       int cmdlen, len;
+       char str[30], *ptr;
+
+       ptr = str;
+       strcpy(str, new_para);
+       ptr += strlen(str);
+       ultoa(addr, ptr);
+       len = strlen(str);
+       cmdlen = strlen(cmdline) + len;
+       if (cmdlen > (COMMAND_LINE_SIZE - 1))
+               die("Command line overflow\n");
+       strcat(cmdline, str);
+
+       return 0;
+}
+
+/* add initrd to cmdline to compatible with previous platforms. */
+static int patch_initrd_info(char *cmdline, unsigned long base,
+                            unsigned long size)
+{
+       const char cpuinfo[] = "/proc/cpuinfo";
+       char line[MAX_LINE];
+       FILE *fp;
+       unsigned long page_offset = PAGE_OFFSET;
+
+       fp = fopen(cpuinfo, "r");
+       if (!fp) {
+               fprintf(stderr, "Cannot open %s: %s\n",
+               cpuinfo, strerror(errno));
+               return -1;
+       }
+       while (fgets(line, sizeof(line), fp) != 0) {
+               if (strncmp(line, "cpu model", 9) == 0) {
+                       if (strstr(line, "Loongson")) {
+                               /* LOONGSON64  uses a different page_offset. */
+                               if (arch_options.core_header_type ==
+                                   CORE_TYPE_ELF64)
+                                       page_offset = LOONGSON_PAGE_OFFSET;
+                               cmdline_add_initrd(cmdline,
+                                            page_offset + base, " rd_start=");
+                               cmdline_add_initrd(cmdline, size, " rd_size=");
+                               break;
+                       }
+               }
+       }
+       fclose(fp);
+       return 0;
+}
+
 int elf_mips_probe(const char *buf, off_t len)
 {
        struct mem_ehdr ehdr;
@@ -171,9 +223,10 @@
                /* Now that the buffer for initrd is prepared, update the dtb
                 * with an appropriate location */
                dtb_set_initrd(&dtb_buf, &dtb_length, initrd_base, initrd_base 
+ initrd_size);
-       }
-
 
+               /* Add the initrd parameters to cmdline */
+               patch_initrd_info(cmdline_buf, initrd_base, initrd_size);
+       }
        /* This is a legacy method for commandline passing used
         * currently by Octeon CPUs only */
        add_buffer(info, cmdline_buf, sizeof(cmdline_buf),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kexec-tools-2.0.24/kexec/arch/ppc64/crashdump-ppc64.c 
new/kexec-tools-2.0.25/kexec/arch/ppc64/crashdump-ppc64.c
--- old/kexec-tools-2.0.24/kexec/arch/ppc64/crashdump-ppc64.c   2021-11-04 
15:57:15.000000000 +0100
+++ new/kexec-tools-2.0.25/kexec/arch/ppc64/crashdump-ppc64.c   2022-07-19 
14:27:46.000000000 +0200
@@ -436,25 +436,6 @@
        return -1;
 }
 
-/* Converts unsigned long to ascii string. */
-static void ultoa(uint64_t i, char *str)
-{
-       int j = 0, k;
-       char tmp;
-
-       do {
-               str[j++] = i % 10 + '0';
-       } while ((i /=10) > 0);
-       str[j] = '\0';
-
-       /* Reverse the string. */
-       for (j = 0, k = strlen(str) - 1; j < k; j++, k--) {
-               tmp = str[k];
-               str[k] = str[j];
-               str[j] = tmp;
-       }
-}
-
 static int add_cmdline_param(char *cmdline, uint64_t addr, char *cmdstr,
                                char *byte)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kexec-tools-2.0.24/kexec/arch/sh/crashdump-sh.c 
new/kexec-tools-2.0.25/kexec/arch/sh/crashdump-sh.c
--- old/kexec-tools-2.0.24/kexec/arch/sh/crashdump-sh.c 2020-12-21 
09:07:22.000000000 +0100
+++ new/kexec-tools-2.0.25/kexec/arch/sh/crashdump-sh.c 2022-07-19 
14:27:46.000000000 +0200
@@ -90,25 +90,6 @@
        page_offset: PAGE_OFFSET,
 };
 
-/* Converts unsigned long to ascii string. */
-static void ultoa(unsigned long i, char *str)
-{
-       int j = 0, k;
-       char tmp;
-
-       do {
-               str[j++] = i % 10 + '0';
-       } while ((i /=10) > 0);
-       str[j] = '\0';
-
-       /* Reverse the string. */
-       for (j = 0, k = strlen(str) - 1; j < k; j++, k--) {
-               tmp = str[k];
-               str[k] = str[j];
-               str[j] = tmp;
-       }
-}
-
 static int add_cmdline_param(char *cmdline, uint64_t addr, char *cmdstr,
                                char *byte)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kexec-tools-2.0.24/kexec/kexec.h 
new/kexec-tools-2.0.25/kexec/kexec.h
--- old/kexec-tools-2.0.24/kexec/kexec.h        2022-03-23 15:58:27.000000000 
+0100
+++ new/kexec-tools-2.0.25/kexec/kexec.h        2022-07-19 14:27:46.000000000 
+0200
@@ -329,4 +329,20 @@
 
 extern unsigned long long get_kernel_sym(const char *text);
 
+/* Converts unsigned long to ascii string. */
+static inline void ultoa(unsigned long val, char *str)
+{
+       char buf[36];
+       int len = 0, pos = 0;
+
+       do {
+               buf[len++] = val % 10;
+               val /= 10;
+       } while (val);
+
+       while (len)
+               str[pos++] = buf[--len] + '0';
+       str[pos] = 0;
+}
+
 #endif /* KEXEC_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kexec-tools-2.0.24/kexec-tools.spec 
new/kexec-tools-2.0.25/kexec-tools.spec
--- old/kexec-tools-2.0.24/kexec-tools.spec     2022-04-09 13:26:25.000000000 
+0200
+++ new/kexec-tools-2.0.25/kexec-tools.spec     2022-07-31 08:40:16.000000000 
+0200
@@ -1,6 +1,6 @@
 Summary: Load one kernel from another
 Name: kexec-tools
-Version: 2.0.24
+Version: 2.0.25
 Release: 0
 License: GPL
 Group: Development/Tools

Reply via email to