public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-boot/grub/files/2.02_beta2: 0006-change-stop-condition-to-avoid-infinite-loops.patch 0007-Improve-LVM-logical_volumes-string-matching.patch 0008-Fix-an-infinite-loop-in-grub-mkconfig.patch 0009-Fix-incorrect-address-reference-in-btrfs.patch
@ 2014-09-10 20:50 Mike Gilbert (floppym)
  0 siblings, 0 replies; only message in thread
From: Mike Gilbert (floppym) @ 2014-09-10 20:50 UTC (permalink / raw
  To: gentoo-commits

floppym     14/09/10 20:50:40

  Added:               
                        0006-change-stop-condition-to-avoid-infinite-loops.patch
                        0007-Improve-LVM-logical_volumes-string-matching.patch
                        0008-Fix-an-infinite-loop-in-grub-mkconfig.patch
                        0009-Fix-incorrect-address-reference-in-btrfs.patch
  Log:
  More backports, bug 522428.
  
  (Portage version: 2.2.12/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)

Revision  Changes    Path
1.1                  sys-boot/grub/files/2.02_beta2/0006-change-stop-condition-to-avoid-infinite-loops.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/files/2.02_beta2/0006-change-stop-condition-to-avoid-infinite-loops.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/files/2.02_beta2/0006-change-stop-condition-to-avoid-infinite-loops.patch?rev=1.1&content-type=text/plain

Index: 0006-change-stop-condition-to-avoid-infinite-loops.patch
===================================================================
From 6b0b3e87bc4de54e97c698f7c381e7c13589b19c Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Date: Tue, 21 Jan 2014 10:49:39 -0200
Subject: [PATCH 6/8] change stop condition to avoid infinite loops

In net/net.c there is a while (1) that only exits if there is a stop
condition and more then 10 packages or if there is no package received.

If GRUB is idle and enter in this loop, the only condition to leave is
if it doesn't have incoming packages. In a network with heavy traffic
this never happens.

Conflicts:
	ChangeLog
---
 grub-core/net/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index 0e57e93..56355f3 100644
--- a/grub-core/net/net.c
+++ b/grub-core/net/net.c
@@ -1453,7 +1453,7 @@ receive_packets (struct grub_net_card *card, int *stop_condition)
 	}
       card->opened = 1;
     }
-  while (1)
+  while (received < 100)
     {
       /* Maybe should be better have a fixed number of packets for each card
 	 and just mark them as used and not used.  */ 
-- 
2.1.0




1.1                  sys-boot/grub/files/2.02_beta2/0007-Improve-LVM-logical_volumes-string-matching.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/files/2.02_beta2/0007-Improve-LVM-logical_volumes-string-matching.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/files/2.02_beta2/0007-Improve-LVM-logical_volumes-string-matching.patch?rev=1.1&content-type=text/plain

Index: 0007-Improve-LVM-logical_volumes-string-matching.patch
===================================================================
From da77623a6762c655ae47fc595eaa9251f5ce5d5d Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Thu, 10 Apr 2014 14:42:41 +0100
Subject: [PATCH 7/8] Improve LVM "logical_volumes" string matching

* grub-core/disk/lvm.c (grub_lvm_detect): Search for
"logical_volumes" block a little more accurately.

Conflicts:
	ChangeLog
---
 grub-core/disk/lvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c
index 483c17e..862a966 100644
--- a/grub-core/disk/lvm.c
+++ b/grub-core/disk/lvm.c
@@ -333,10 +333,10 @@ grub_lvm_detect (grub_disk_t disk,
 	    }
 	}
 
-      p = grub_strstr (p, "logical_volumes");
+      p = grub_strstr (p, "logical_volumes {");
       if (p)
 	{
-	  p += sizeof ("logical_volumes = ") - 1;
+	  p += sizeof ("logical_volumes {") - 1;
 
 	  /* And add all the lvs to the volume group. */
 	  while (1)
-- 
2.1.0




1.1                  sys-boot/grub/files/2.02_beta2/0008-Fix-an-infinite-loop-in-grub-mkconfig.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/files/2.02_beta2/0008-Fix-an-infinite-loop-in-grub-mkconfig.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/files/2.02_beta2/0008-Fix-an-infinite-loop-in-grub-mkconfig.patch?rev=1.1&content-type=text/plain

Index: 0008-Fix-an-infinite-loop-in-grub-mkconfig.patch
===================================================================
From 21a85381a1586a0989f2cf9d151b746231984c92 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Tue, 8 Jul 2014 23:54:30 +0100
Subject: [PATCH 8/8] Fix an infinite loop in grub-mkconfig

* util/grub.d/10_hurd.in: Make kernel list progression not fail on
kernels whose paths contain regex metacharacters.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.

Reported by: Heimo Stranner.

Conflicts:
	ChangeLog
---
 util/grub.d/10_hurd.in      | 2 +-
 util/grub.d/10_kfreebsd.in  | 2 +-
 util/grub.d/10_linux.in     | 2 +-
 util/grub.d/20_linux_xen.in | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
index 82dfe19..29b4554 100644
--- a/util/grub.d/10_hurd.in
+++ b/util/grub.d/10_hurd.in
@@ -168,7 +168,7 @@ while [ "x$kernels" != "x" ] ; do
   hurd_entry "$kernel" advanced
   hurd_entry "$kernel" recovery
 
-  kernels=`echo $kernels | tr ' ' '\n' | grep -vx $kernel | tr '\n' ' '`
+  kernels=`echo $kernels | tr ' ' '\n' | fgrep -vx "$kernel" | tr '\n' ' '`
 done
 
 # If at least one kernel was found, then we need to
diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
index a524762..ba7175b 100644
--- a/util/grub.d/10_kfreebsd.in
+++ b/util/grub.d/10_kfreebsd.in
@@ -228,7 +228,7 @@ while [ "x$list" != "x" ] ; do
     kfreebsd_entry "${OS}" "${version}" recovery "-s"
   fi
 
-  list=`echo $list | tr ' ' '\n' | grep -vx $kfreebsd | tr '\n' ' '`
+  list=`echo $list | tr ' ' '\n' | fgrep -vx "$kfreebsd" | tr '\n' ' '`
 done
 
 # If at least one kernel was found, then we need to
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 00d1931..d2e2a8f 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -241,7 +241,7 @@ while [ "x$list" != "x" ] ; do
                 "single ${GRUB_CMDLINE_LINUX}"
   fi
 
-  list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
+  list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
 done
 
 # If at least one kernel was found, then we need to
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index a608435..2e77758 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -255,12 +255,12 @@ while [ "x${xen_list}" != "x" ] ; do
 		"single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
 	fi
 
-	list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
+	list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
     done
     if [ x"$is_top_level" != xtrue ]; then
 	echo '	}'
     fi
-    xen_list=`echo $xen_list | tr ' ' '\n' | grep -vx $current_xen | tr '\n' ' '`
+    xen_list=`echo $xen_list | tr ' ' '\n' | fgrep -vx "$current_xen" | tr '\n' ' '`
 done
 
 # If at least one kernel was found, then we need to
-- 
2.1.0




1.1                  sys-boot/grub/files/2.02_beta2/0009-Fix-incorrect-address-reference-in-btrfs.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/files/2.02_beta2/0009-Fix-incorrect-address-reference-in-btrfs.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/files/2.02_beta2/0009-Fix-incorrect-address-reference-in-btrfs.patch?rev=1.1&content-type=text/plain

Index: 0009-Fix-incorrect-address-reference-in-btrfs.patch
===================================================================
From c00568e2648bf7a9c4c517bf0acfbd0c62d48ef3 Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Thu, 14 Aug 2014 18:17:45 +0800
Subject: [PATCH 9/9] Fix incorrect address reference in btrfs

We encountered a weird random kernel initrd unpacking error on btrfs
and finally found it was caused by incorrect address reference in range
check for type GRUB_BTRFS_EXTENT_REGULAR and the entire result is
unpredictable.

This is a quick fix to make the address reference to the
grub_btrfs_extent_data structure correctly, not the pointer variable
to it.

Any suggestions to this patch is welcome.

Conflicts:
	ChangeLog
---
 grub-core/fs/btrfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index 89666b6..d1b930d 100644
--- a/grub-core/fs/btrfs.c
+++ b/grub-core/fs/btrfs.c
@@ -1051,7 +1051,7 @@ grub_btrfs_extent_read (struct grub_btrfs_data *data,
 
 	  data->extend = data->extstart + grub_le_to_cpu64 (data->extent->size);
 	  if (data->extent->type == GRUB_BTRFS_EXTENT_REGULAR
-	      && (char *) &data->extent + elemsize
+	      && (char *) data->extent + elemsize
 	      >= (char *) &data->extent->filled + sizeof (data->extent->filled))
 	    data->extend =
 	      data->extstart + grub_le_to_cpu64 (data->extent->filled);
-- 
2.1.0






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-10 20:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10 20:50 [gentoo-commits] gentoo-x86 commit in sys-boot/grub/files/2.02_beta2: 0006-change-stop-condition-to-avoid-infinite-loops.patch 0007-Improve-LVM-logical_volumes-string-matching.patch 0008-Fix-an-infinite-loop-in-grub-mkconfig.patch 0009-Fix-incorrect-address-reference-in-btrfs.patch Mike Gilbert (floppym)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox