commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnumach] 01/01: Fix boot hang in bad-luck module loads from grub


From: Samuel Thibault
Subject: [gnumach] 01/01: Fix boot hang in bad-luck module loads from grub
Date: Sun, 30 Oct 2016 23:55:05 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch master
in repository gnumach.

commit c117b2d138766edb45df84c7ee2b3c14eb5d14fe
Author: Samuel Thibault <address@hidden>
Date:   Sun Oct 30 23:44:10 2016 +0000

    Fix boot hang in bad-luck module loads from grub
    
    patches/git-unregister-boot-data.patch
---
 debian/changelog                              |  6 ++-
 debian/patches/git-unregister-boot-data.patch | 62 +++++++++++++++++++++++++++
 debian/patches/series                         |  1 +
 3 files changed, 67 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8e3e401..7578f4d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,14 @@
-gnumach (2:1.7+git20161023-2) UNRELEASED; urgency=medium
+gnumach (2:1.7+git20161023-2) unstable; urgency=medium
 
   * git-LDFLAGS: New patch to make build system take LDFLAGS into account.
   * rules:
     - Pass -no-pie -fno-PIE to compiler and -no-pie to linker to fix build on
     i386.
     - Fix passing flags to dbg variants.
+  * patches/git-unregister-boot-data.patch: Fix boot hang in bad-luck module
+    loads from grub.
 
- -- Samuel Thibault <address@hidden>  Mon, 24 Oct 2016 19:51:48 +0200
+ -- Samuel Thibault <address@hidden>  Sun, 30 Oct 2016 23:44:06 +0000
 
 gnumach (2:1.7+git20161023-1) unstable; urgency=medium
 
diff --git a/debian/patches/git-unregister-boot-data.patch 
b/debian/patches/git-unregister-boot-data.patch
new file mode 100644
index 0000000..df5062f
--- /dev/null
+++ b/debian/patches/git-unregister-boot-data.patch
@@ -0,0 +1,62 @@
+commit f6c9a501febff628fe542ee17ab3d789a4de2ac1
+Author: Samuel Thibault <address@hidden>
+Date:   Mon Oct 31 00:35:57 2016 +0100
+
+    Make multiboot cmdline and modules non-permanent reservations
+    
+    * i386/i386at/model_dep.c (register_boot_data): For multiboot cmdline,
+    module structure, module data and module strings, set
+    biosmem_register_boot_data temporary parameter to TRUE.
+
+diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
+index 239f63f..f57df63 100644
+--- a/i386/i386at/model_dep.c
++++ b/i386/i386at/model_dep.c
+@@ -280,31 +280,31 @@ register_boot_data(const struct multiboot_raw_info *mbi)
+ 
+       extern char _start[], _end[];
+ 
+-      /* XXX For now, register all boot data as permanent */
+-
+       biosmem_register_boot_data(_kvtophys(&_start), _kvtophys(&_end), FALSE);
+ 
++      /* cmdline and modules are moved to a safe place by i386at_init.  */
++
+       if ((mbi->flags & MULTIBOOT_LOADER_CMDLINE) && (mbi->cmdline != 0)) {
+               biosmem_register_boot_data(mbi->cmdline,
+                                          mbi->cmdline
+-                                         + strlen((void 
*)phystokv(mbi->cmdline)) + 1, FALSE);
++                                         + strlen((void 
*)phystokv(mbi->cmdline)) + 1, TRUE);
+       }
+ 
+       if (mbi->flags & MULTIBOOT_LOADER_MODULES) {
+               i = mbi->mods_count * sizeof(struct multiboot_raw_module);
+-              biosmem_register_boot_data(mbi->mods_addr, mbi->mods_addr + i, 
FALSE);
++              biosmem_register_boot_data(mbi->mods_addr, mbi->mods_addr + i, 
TRUE);
+ 
+               tmp = phystokv(mbi->mods_addr);
+ 
+               for (i = 0; i < mbi->mods_count; i++) {
+                       mod = (struct multiboot_raw_module *)tmp + i;
+-                      biosmem_register_boot_data(mod->mod_start, 
mod->mod_end, FALSE);
++                      biosmem_register_boot_data(mod->mod_start, 
mod->mod_end, TRUE);
+ 
+                       if (mod->string != 0) {
+                               biosmem_register_boot_data(mod->string,
+                                                          mod->string
+                                                          + strlen((void 
*)phystokv(mod->string)) + 1,
+-                                                         FALSE);
++                                                         TRUE);
+                       }
+               }
+       }
+@@ -364,7 +364,8 @@ i386at_init(void)
+       kernel_cmdline = (char*) boot_info.cmd_line;
+ #else /* MACH_XEN */
+       /* Copy content pointed by boot_info before losing access to it when it
+-       * is too far in physical memory.  */
++       * is too far in physical memory.
++       * Also avoids leaving them in precious areas such as DMA memory.  */
+       if (boot_info.flags & MULTIBOOT_CMDLINE) {
+               int len = strlen ((char*)phystokv(boot_info.cmdline)) + 1;
+               if (! init_alloc_aligned(round_page(len), &addr))
diff --git a/debian/patches/series b/debian/patches/series
index 03b130d..b2cca97 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
 50_initrd.patch
 70_dde.patch
 git-LDFLAGS
+git-unregister-boot-data.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/gnumach.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]