diff options
author | Justus Winter <justus@gnupg.org> | 2016-04-15 14:41:55 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-04-15 14:41:55 +0200 |
commit | 4bb76da6edfbe13b6483250e504a3e602ef0a765 (patch) | |
tree | 889baa21c5ddfc79593261843dcc12daddf34e6a /debian | |
parent | 24c248bd7588ef4d9519b3496a0a32d1d05cb2ca (diff) |
add patch series
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/ndebug0001-i386-Fix-error-handling.patch | 59 | ||||
-rw-r--r-- | debian/patches/ndebug0002-Add-disable-assert-flag-to-disable-assertions.patch | 28 | ||||
-rw-r--r-- | debian/patches/series | 2 |
3 files changed, 89 insertions, 0 deletions
diff --git a/debian/patches/ndebug0001-i386-Fix-error-handling.patch b/debian/patches/ndebug0001-i386-Fix-error-handling.patch new file mode 100644 index 0000000..5a99ed3 --- /dev/null +++ b/debian/patches/ndebug0001-i386-Fix-error-handling.patch @@ -0,0 +1,59 @@ +From 82513815bde3005f20ab904d9d64673b53b6a7c4 Mon Sep 17 00:00:00 2001 +From: Justus Winter <justus@gnupg.org> +Date: Fri, 15 Apr 2016 14:38:52 +0200 +Subject: [PATCH gnumach 1/2] i386: Fix error handling + +* i386/i386at/model_dep.c (i386at_init): Fix error handling. + +Signed-off-by: Justus Winter <justus@gnupg.org> +--- + i386/i386at/model_dep.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c +index 62763ae..679d524 100644 +--- a/i386/i386at/model_dep.c ++++ b/i386/i386at/model_dep.c +@@ -301,7 +301,8 @@ i386at_init(void) + * is too far in physical memory. */ + if (boot_info.flags & MULTIBOOT_CMDLINE) { + int len = strlen ((char*)phystokv(boot_info.cmdline)) + 1; +- assert(init_alloc_aligned(round_page(len), &addr)); ++ if (! init_alloc_aligned(round_page(len), &addr)) ++ panic("could not allocate memory for multiboot command line"); + kernel_cmdline = (char*) phystokv(addr); + memcpy(kernel_cmdline, (void *)phystokv(boot_info.cmdline), len); + boot_info.cmdline = addr; +@@ -311,20 +312,26 @@ i386at_init(void) + struct multiboot_module *m; + int i; + +- assert(init_alloc_aligned(round_page(boot_info.mods_count * sizeof(*m)), &addr)); ++ if (! init_alloc_aligned( ++ round_page(boot_info.mods_count * sizeof(*m)), &addr)) ++ panic("could not allocate memory for multiboot modules"); + m = (void*) phystokv(addr); + memcpy(m, (void*) phystokv(boot_info.mods_addr), boot_info.mods_count * sizeof(*m)); + boot_info.mods_addr = addr; + + for (i = 0; i < boot_info.mods_count; i++) { + vm_size_t size = m[i].mod_end - m[i].mod_start; +- assert(init_alloc_aligned(round_page(size), &addr)); ++ if (! init_alloc_aligned(round_page(size), &addr)) ++ panic("could not allocate memory for multiboot " ++ "module %d", i); + memcpy((void*) phystokv(addr), (void*) phystokv(m[i].mod_start), size); + m[i].mod_start = addr; + m[i].mod_end = addr + size; + + size = strlen((char*) phystokv(m[i].string)) + 1; +- assert(init_alloc_aligned(round_page(size), &addr)); ++ if (! init_alloc_aligned(round_page(size), &addr)) ++ panic("could not allocate memory for multiboot " ++ "module command line %d", i); + memcpy((void*) phystokv(addr), (void*) phystokv(m[i].string), size); + m[i].string = addr; + } +-- +2.1.4 + diff --git a/debian/patches/ndebug0002-Add-disable-assert-flag-to-disable-assertions.patch b/debian/patches/ndebug0002-Add-disable-assert-flag-to-disable-assertions.patch new file mode 100644 index 0000000..762e5ab --- /dev/null +++ b/debian/patches/ndebug0002-Add-disable-assert-flag-to-disable-assertions.patch @@ -0,0 +1,28 @@ +From 600f59d7879d65bede34eda398f3e3b9126cd425 Mon Sep 17 00:00:00 2001 +From: Justus Winter <justus@gnupg.org> +Date: Fri, 15 Apr 2016 14:37:21 +0200 +Subject: [PATCH gnumach 2/2] Add --disable-assert flag to disable assertions + +* configfrag.ac: Use 'AC_HEADER_ASSERT'. + +Signed-off-by: Justus Winter <justus@gnupg.org> +--- + configfrag.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configfrag.ac b/configfrag.ac +index c0e04b3..cfc34c7 100644 +--- a/configfrag.ac ++++ b/configfrag.ac +@@ -113,6 +113,8 @@ AC_DEFINE([SLAB_USE_CPU_POOLS], [0], [SLAB_USE_CPU_POOLS]) + # Options. + # + ++AC_HEADER_ASSERT() ++ + AC_ARG_ENABLE([kdb], + AS_HELP_STRING([--enable-kdb], [enable use of in-kernel debugger])) + [if [ x"$enable_kdb" = xyes ]; then] +-- +2.1.4 + diff --git a/debian/patches/series b/debian/patches/series index cfe9db5..972eae4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -11,3 +11,5 @@ sysenter0001-yyy-sysenter-prototype.patch 700001-70_new_dde.patch.patch 700002-Port-Samuels-fix.patch +ndebug0001-i386-Fix-error-handling.patch +ndebug0002-Add-disable-assert-flag-to-disable-assertions.patch |