Hello community,

here is the log from the commit of package grub2 for openSUSE:Factory checked 
in at 2020-04-22 20:42:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/grub2 (Old)
 and      /work/SRC/openSUSE:Factory/.grub2.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "grub2"

Wed Apr 22 20:42:32 2020 rev:219 rq:794921 version:2.04

Changes:
--------
--- /work/SRC/openSUSE:Factory/grub2/grub2.changes      2020-04-13 
12:51:41.240606329 +0200
+++ /work/SRC/openSUSE:Factory/.grub2.new.2738/grub2.changes    2020-04-22 
20:42:33.638166877 +0200
@@ -1,0 +2,6 @@
+Thu Apr 16 13:35:10 UTC 2020 - Michael Chang <[email protected]>
+
+- Fix executable stack in grub-probe and other grub utility (bsc#1169137)
+  * grub2-btrfs-06-subvol-mount.patch
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ grub2.spec ++++++
--- /var/tmp/diff_new_pack.qxWsvM/_old  2020-04-22 20:42:35.846171200 +0200
+++ /var/tmp/diff_new_pack.qxWsvM/_new  2020-04-22 20:42:35.850171208 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package grub2
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed


++++++ grub2-btrfs-06-subvol-mount.patch ++++++
--- /var/tmp/diff_new_pack.qxWsvM/_old  2020-04-22 20:42:35.998171497 +0200
+++ /var/tmp/diff_new_pack.qxWsvM/_new  2020-04-22 20:42:35.998171497 +0200
@@ -3,11 +3,15 @@
 * Fix grub2-install --root-directory does not work for /boot/grub2/<arch> on
   separate btrfs subvolume (boo#1098420) 
 
-Index: grub-2.02/grub-core/fs/btrfs.c
+v3:
+* Fix executable stack on which function trampoline is constructed to support
+  closure (nested function). The closure sematic is replaced.
+
+Index: grub-2.04/grub-core/fs/btrfs.c
 ===================================================================
---- grub-2.02.orig/grub-core/fs/btrfs.c
-+++ grub-2.02/grub-core/fs/btrfs.c
-@@ -32,6 +32,7 @@
+--- grub-2.04.orig/grub-core/fs/btrfs.c
++++ grub-2.04/grub-core/fs/btrfs.c
+@@ -43,6 +43,7 @@
  #include <grub/command.h>
  #include <grub/env.h>
  #include <grub/extcmd.h>
@@ -15,7 +19,7 @@
  
  GRUB_MOD_LICENSE ("GPLv3+");
  
-@@ -245,6 +246,12 @@ static grub_err_t
+@@ -263,6 +264,12 @@ static grub_err_t
  grub_btrfs_read_logical (struct grub_btrfs_data *data,
                         grub_disk_addr_t addr, void *buf, grub_size_t size,
                         int recursion_depth);
@@ -28,7 +32,7 @@
  
  static grub_err_t
  read_sblock (grub_disk_t disk, struct grub_btrfs_superblock *sb)
-@@ -887,9 +894,26 @@ lookup_root_by_name(struct grub_btrfs_da
+@@ -1203,9 +1210,26 @@ lookup_root_by_name(struct grub_btrfs_da
    grub_err_t err;
    grub_uint64_t tree = 0;
    grub_uint8_t type;
@@ -55,7 +59,7 @@
    if (err)
        return grub_error(GRUB_ERR_FILE_NOT_FOUND, "couldn't locate %s\n", 
path);
  
-@@ -1758,11 +1782,20 @@ grub_btrfs_dir (grub_device_t device, co
+@@ -2179,11 +2203,20 @@ grub_btrfs_dir (grub_device_t device, co
    int r = 0;
    grub_uint64_t tree;
    grub_uint8_t type;
@@ -77,7 +81,7 @@
    if (err)
      {
        grub_btrfs_unmount (data);
-@@ -1864,11 +1897,21 @@ grub_btrfs_open (struct grub_file *file,
+@@ -2285,11 +2318,21 @@ grub_btrfs_open (struct grub_file *file,
    struct grub_btrfs_inode inode;
    grub_uint8_t type;
    struct grub_btrfs_key key_in;
@@ -100,7 +104,7 @@
    if (err)
      {
        grub_btrfs_unmount (data);
-@@ -2039,6 +2082,150 @@ grub_cmd_btrfs_info (grub_command_t cmd
+@@ -2460,6 +2503,150 @@ grub_cmd_btrfs_info (grub_command_t cmd
    return 0;
  }
  
@@ -251,7 +255,7 @@
  static grub_err_t
  get_fs_root(struct grub_btrfs_data *data, grub_uint64_t tree,
              grub_uint64_t objectid, grub_uint64_t offset,
-@@ -2245,6 +2432,7 @@ static struct grub_fs grub_btrfs_fs = {
+@@ -2666,6 +2853,7 @@ static struct grub_fs grub_btrfs_fs = {
  };
  
  static grub_command_t cmd_info;
@@ -259,7 +263,7 @@
  static grub_extcmd_t cmd_list_subvols;
  
  static char *
-@@ -2308,6 +2496,9 @@ GRUB_MOD_INIT (btrfs)
+@@ -2729,6 +2917,9 @@ GRUB_MOD_INIT (btrfs)
    cmd_info = grub_register_command("btrfs-info", grub_cmd_btrfs_info,
                                   "DEVICE",
                                   "Print BtrFS info about DEVICE.");
@@ -269,10 +273,10 @@
    cmd_list_subvols = grub_register_extcmd("btrfs-list-subvols",
                                         grub_cmd_btrfs_list_subvols, 0,
                                         "[-p|-n] [-o var] DEVICE",
-Index: grub-2.02/grub-core/osdep/linux/getroot.c
+Index: grub-2.04/grub-core/osdep/linux/getroot.c
 ===================================================================
---- grub-2.02.orig/grub-core/osdep/linux/getroot.c
-+++ grub-2.02/grub-core/osdep/linux/getroot.c
+--- grub-2.04.orig/grub-core/osdep/linux/getroot.c
++++ grub-2.04/grub-core/osdep/linux/getroot.c
 @@ -107,6 +107,14 @@ struct btrfs_ioctl_search_key
    grub_uint32_t unused[9];
  };
@@ -393,12 +397,12 @@
 +  return NULL;
 +}
 +
-+void (*grub_find_root_btrfs_mount_path_hook)(const char *mount_path);
++static char *grub_btrfs_mount_path;
 +
  char **
  grub_find_root_devices_from_mountinfo (const char *dir, char **relroot)
  {
-@@ -519,12 +630,15 @@ again:
+@@ -519,12 +630,17 @@ again:
        else if (grub_strcmp (entries[i].fstype, "btrfs") == 0)
        {
          ret = grub_find_root_devices_from_btrfs (dir);
@@ -408,8 +412,10 @@
 -            if (fs_prefix)
 -              free (fs_prefix);
              fs_prefix = xstrdup ("/");
-+            if (grub_find_root_btrfs_mount_path_hook)
-+              grub_find_root_btrfs_mount_path_hook (entries[i].enc_path);
++
++            if (grub_btrfs_mount_path)
++              grub_free (grub_btrfs_mount_path);
++            grub_btrfs_mount_path = grub_strdup (entries[i].enc_path);
 +          }
 +        else
 +          {
@@ -417,7 +423,7 @@
            }
        }
        else if (!retry && grub_strcmp (entries[i].fstype, "autofs") == 0)
-@@ -1148,6 +1262,34 @@ grub_util_get_grub_dev_os (const char *o
+@@ -1192,6 +1308,24 @@ grub_util_get_grub_dev_os (const char *o
    return grub_dev;
  }
  
@@ -425,38 +431,28 @@
 +char *
 +grub_util_get_btrfs_subvol (const char *path, char **mount_path)
 +{
-+  char *mp = NULL;
-+
 +  if (mount_path)
 +    *mount_path = NULL;
 +
-+  auto void
-+  mount_path_hook (const char *m)
-+  {
-+    mp = strdup (m);
-+  }
-+
-+  grub_find_root_btrfs_mount_path_hook = mount_path_hook;
 +  grub_free (grub_find_root_devices_from_mountinfo (path, NULL));
-+  grub_find_root_btrfs_mount_path_hook = NULL;
 +
-+  if (!mp)
++  if (!grub_btrfs_mount_path)
 +    return NULL;
 +
 +  if (mount_path)
-+    *mount_path = mp;
++    *mount_path = grub_strdup (grub_btrfs_mount_path);
 +
-+  return get_btrfs_subvol (mp);
++  return get_btrfs_subvol (grub_btrfs_mount_path);
 +}
 +
  char *
  grub_make_system_path_relative_to_its_root_os (const char *path)
  {
-Index: grub-2.02/util/grub-install.c
+Index: grub-2.04/util/grub-install.c
 ===================================================================
---- grub-2.02.orig/util/grub-install.c
-+++ grub-2.02/util/grub-install.c
-@@ -1560,6 +1560,58 @@ main (int argc, char *argv[])
+--- grub-2.04.orig/util/grub-install.c
++++ grub-2.04/util/grub-install.c
+@@ -1591,6 +1591,58 @@ main (int argc, char *argv[])
        prefix_drive = xasprintf ("(%s)", grub_drives[0]);
      }
  
@@ -515,10 +511,10 @@
    char mkimage_target[200];
    const char *core_name = NULL;
  
-Index: grub-2.02/include/grub/emu/getroot.h
+Index: grub-2.04/include/grub/emu/getroot.h
 ===================================================================
---- grub-2.02.orig/include/grub/emu/getroot.h
-+++ grub-2.02/include/grub/emu/getroot.h
+--- grub-2.04.orig/include/grub/emu/getroot.h
++++ grub-2.04/include/grub/emu/getroot.h
 @@ -53,6 +53,11 @@ char **
  grub_find_root_devices_from_mountinfo (const char *dir, char **relroot);
  #endif



Reply via email to