diff options
author | Mike Gilbert <floppym@gentoo.org> | 2014-09-10 20:50:43 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2014-09-10 20:50:43 +0000 |
commit | ec916c4d830e6b0c028e0bc0ae9c8780756c7686 (patch) | |
tree | c55ca77660c4c1395cb13bb52f2b1172392e08e2 /sys-boot/grub/files | |
parent | Remove old (diff) | |
download | historical-ec916c4d830e6b0c028e0bc0ae9c8780756c7686.tar.gz historical-ec916c4d830e6b0c028e0bc0ae9c8780756c7686.tar.bz2 historical-ec916c4d830e6b0c028e0bc0ae9c8780756c7686.zip |
More backports, bug 522428.
Package-Manager: portage-2.2.12/cvs/Linux x86_64
Manifest-Sign-Key: 0x0BBEEA1FEA4843A4
Diffstat (limited to 'sys-boot/grub/files')
4 files changed, 189 insertions, 0 deletions
diff --git a/sys-boot/grub/files/2.02_beta2/0006-change-stop-condition-to-avoid-infinite-loops.patch b/sys-boot/grub/files/2.02_beta2/0006-change-stop-condition-to-avoid-infinite-loops.patch new file mode 100644 index 000000000000..d61e3f934042 --- /dev/null +++ b/sys-boot/grub/files/2.02_beta2/0006-change-stop-condition-to-avoid-infinite-loops.patch @@ -0,0 +1,34 @@ +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 + diff --git a/sys-boot/grub/files/2.02_beta2/0007-Improve-LVM-logical_volumes-string-matching.patch b/sys-boot/grub/files/2.02_beta2/0007-Improve-LVM-logical_volumes-string-matching.patch new file mode 100644 index 000000000000..86c07c2f060c --- /dev/null +++ b/sys-boot/grub/files/2.02_beta2/0007-Improve-LVM-logical_volumes-string-matching.patch @@ -0,0 +1,34 @@ +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 + diff --git a/sys-boot/grub/files/2.02_beta2/0008-Fix-an-infinite-loop-in-grub-mkconfig.patch b/sys-boot/grub/files/2.02_beta2/0008-Fix-an-infinite-loop-in-grub-mkconfig.patch new file mode 100644 index 000000000000..ba0c029234bf --- /dev/null +++ b/sys-boot/grub/files/2.02_beta2/0008-Fix-an-infinite-loop-in-grub-mkconfig.patch @@ -0,0 +1,83 @@ +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 + diff --git a/sys-boot/grub/files/2.02_beta2/0009-Fix-incorrect-address-reference-in-btrfs.patch b/sys-boot/grub/files/2.02_beta2/0009-Fix-incorrect-address-reference-in-btrfs.patch new file mode 100644 index 000000000000..bedf1f05b23e --- /dev/null +++ b/sys-boot/grub/files/2.02_beta2/0009-Fix-incorrect-address-reference-in-btrfs.patch @@ -0,0 +1,38 @@ +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 + |