[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnumach] 01/02: Imported Upstream version 1.4+git20150711
From: |
Samuel Thibault |
Subject: |
[gnumach] 01/02: Imported Upstream version 1.4+git20150711 |
Date: |
Sat, 11 Jul 2015 12:23:40 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch master
in repository gnumach.
commit a0930f557815ae27f807cbcbabda8f6c5a627d1f
Author: Samuel Thibault <address@hidden>
Date: Sat Jul 11 12:16:32 2015 +0000
Imported Upstream version 1.4+git20150711
---
ChangeLog | 47 +++++++++++++++++++++++++++++++++++++++++++++++
Makefile.am | 2 +-
Makefile.in | 2 +-
configure | 20 ++++++++++----------
device/net_io.c | 2 +-
doc/mach.info | 2 +-
doc/mach.info-1 | 4 ++--
doc/mach.info-2 | 2 +-
doc/stamp-vti | 4 ++--
doc/version.texi | 4 ++--
i386/i386at/immc.c | 2 +-
kern/bootstrap.c | 3 ++-
kern/printf.c | 29 ++++++++++++++++++++++-------
kern/printf.h | 2 +-
kern/queue.h | 31 ++++++++++++++++++++++++++-----
version.m4 | 2 +-
vm/vm_kern.c | 3 +--
vm/vm_object.c | 10 ----------
vm/vm_pageout.c | 2 +-
19 files changed, 123 insertions(+), 50 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 73aafea..3ef22c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,50 @@
+2015-07-11 Justus Winter <address@hidden>
+
+ kern: make sure the queue macros are only used on queues
+ This turns mistakes as the one corrected in e59f05e9 into compile-time
+ errors.
+
+ * kern/queue.h: Add a new macro, queue_assert, and use it to assert
+ that all arguments given to the queue macros have the correct type.
+ * device/net_io.c (ENQUEUE_DEAD): Adapt to the fact that
+ `queue_next(q)' is no longer an lvalue.
+
+2015-07-11 Justus Winter <address@hidden>
+
+ vm: fix traversing the list of inactive pages
+ Previously, the pageout code traversed the hash table chain instead of
+ the list of inactive pages. The code merely compiled by accident,
+ because the `struct page' also has a field called `next' for the hash
+ table chain.
+
+ * vm/vm_pageout.c (vm_pageout_scan): Fix traversing the list of
+ inactive pages.
+
+2015-07-10 Justus Winter <address@hidden>
+
+ vm: drop debugging remnants
+ * vm/vm_object.c (vm_object_terminate): Drop debugging remnants.
+
+ kern: make printf handle long long integers
+ * Makefile.am (clib_routines): Steal `__umoddi3'.
+ * kern/printf.c (MAXBUF): Increase size.
+ (printnum, _doprnt): Handle long long integers.
+ * kern/printf.h (printnum): Adjust declaration.
+
+2015-07-09 Justus Winter <address@hidden>
+
+ vm: fix panic message
+ * vm/vm_kern.c (kmem_init): Fix panic message.
+
+ i386: fix line wrapping in the immediate console
+ * i386/i386at/immc.c (immc_cnputc): Fix line wrapping.
+
+ kern: remove superfluous file
+ * kern/server_loop.ch: Remove superfluous file.
+
+ kern: improve error handling
+ * kern/bootstrap.c (boot_script_exec_cmd): Improve error handling.
+
2015-07-09 Samuel Thibault <address@hidden>
Allow non-privileged tasks to wire 64KiB task memory
diff --git a/Makefile.am b/Makefile.am
index 913db55..76a192b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -159,7 +159,7 @@ noinst_PROGRAMS += \
clib_routines := memcmp memcpy memmove \
strchr strstr strsep strtok \
htonl htons ntohl ntohs \
- udivdi3 __udivdi3 \
+ udivdi3 __udivdi3 __umoddi3 \
__rel_iplt_start __rel_iplt_end \
__ffsdi2 \
_START _start etext _edata end _end # actually ld magic, not
libc.
diff --git a/Makefile.in b/Makefile.in
index df09b69..1d3671b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2914,7 +2914,7 @@ gnumach_o_LINK = $(LD) -u _start -r -o $@
clib_routines := memcmp memcpy memmove \
strchr strstr strsep strtok \
htonl htons ntohl ntohs \
- udivdi3 __udivdi3 \
+ udivdi3 __udivdi3 __umoddi3 \
__rel_iplt_start __rel_iplt_end \
__ffsdi2 \
_START _start etext _edata end _end # actually ld magic, not
libc.
diff --git a/configure b/configure
index 53273ea..1e41680 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for GNU Mach 1.4+git20150709.
+# Generated by GNU Autoconf 2.69 for GNU Mach 1.4+git20150711.
#
# Report bugs to <address@hidden>.
#
@@ -579,8 +579,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GNU Mach'
PACKAGE_TARNAME='gnumach'
-PACKAGE_VERSION='1.4+git20150709'
-PACKAGE_STRING='GNU Mach 1.4+git20150709'
+PACKAGE_VERSION='1.4+git20150711'
+PACKAGE_STRING='GNU Mach 1.4+git20150711'
PACKAGE_BUGREPORT='address@hidden'
PACKAGE_URL=''
@@ -1584,7 +1584,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GNU Mach 1.4+git20150709 to adapt to many kinds of
systems.
+\`configure' configures GNU Mach 1.4+git20150711 to adapt to many kinds of
systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1654,7 +1654,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU Mach 1.4+git20150709:";;
+ short | recursive ) echo "Configuration of GNU Mach 1.4+git20150711:";;
esac
cat <<\_ACEOF
@@ -2002,7 +2002,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU Mach configure 1.4+git20150709
+GNU Mach configure 1.4+git20150711
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2094,7 +2094,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GNU Mach $as_me 1.4+git20150709, which was
+It was created by GNU Mach $as_me 1.4+git20150711, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2960,7 +2960,7 @@ fi
# Define the identity of the package.
PACKAGE='gnumach'
- VERSION='1.4+git20150709'
+ VERSION='1.4+git20150711'
# Some tools Automake needs.
@@ -12116,7 +12116,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GNU Mach $as_me 1.4+git20150709, which was
+This file was extended by GNU Mach $as_me 1.4+git20150711, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12187,7 +12187,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //;
s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GNU Mach config.status 1.4+git20150709
+GNU Mach config.status 1.4+git20150711
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/device/net_io.c b/device/net_io.c
index d2928cc..47ef2ea 100644
--- a/device/net_io.c
+++ b/device/net_io.c
@@ -353,7 +353,7 @@ decl_simple_lock_data(,net_hash_header_lock)
/* entry_p must be net_rcv_port_t or net_hash_entry_t */
#define ENQUEUE_DEAD(dead, entry_p, chain) { \
- queue_next(&(entry_p)->chain) = (queue_entry_t) (dead); \
+ (entry_p)->chain.next = (queue_entry_t) (dead); \
(dead) = (queue_entry_t)(entry_p); \
}
diff --git a/doc/mach.info b/doc/mach.info
index ea89d82..042fdee 100644
--- a/doc/mach.info
+++ b/doc/mach.info
@@ -3,7 +3,7 @@ This is mach.info, produced by makeinfo version 5.2 from
mach.texi.
This file documents the GNU Mach microkernel.
This is edition 0.4, last updated on 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.4+git20150709.
+Reference Manual', for version 1.4+git20150711.
Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
Inc.
diff --git a/doc/mach.info-1 b/doc/mach.info-1
index 16023a7..18ec847 100644
--- a/doc/mach.info-1
+++ b/doc/mach.info-1
@@ -3,7 +3,7 @@ This is mach.info, produced by makeinfo version 5.2 from
mach.texi.
This file documents the GNU Mach microkernel.
This is edition 0.4, last updated on 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.4+git20150709.
+Reference Manual', for version 1.4+git20150711.
Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
Inc.
@@ -46,7 +46,7 @@ Main Menu
This file documents the GNU Mach microkernel.
This is edition 0.4, last updated on 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.4+git20150709.
+Reference Manual', for version 1.4+git20150711.
Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
Inc.
diff --git a/doc/mach.info-2 b/doc/mach.info-2
index bdb8718..73e96dc 100644
--- a/doc/mach.info-2
+++ b/doc/mach.info-2
@@ -3,7 +3,7 @@ This is mach.info, produced by makeinfo version 5.2 from
mach.texi.
This file documents the GNU Mach microkernel.
This is edition 0.4, last updated on 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.4+git20150709.
+Reference Manual', for version 1.4+git20150711.
Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
Inc.
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 7f60e1a..1e9cbcd 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
@set UPDATED 9 July 2015
@set UPDATED-MONTH July 2015
address@hidden EDITION 1.4+git20150709
address@hidden VERSION 1.4+git20150709
address@hidden EDITION 1.4+git20150711
address@hidden VERSION 1.4+git20150711
diff --git a/doc/version.texi b/doc/version.texi
index 7f60e1a..1e9cbcd 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
@set UPDATED 9 July 2015
@set UPDATED-MONTH July 2015
address@hidden EDITION 1.4+git20150709
address@hidden VERSION 1.4+git20150709
address@hidden EDITION 1.4+git20150711
address@hidden VERSION 1.4+git20150711
diff --git a/i386/i386at/immc.c b/i386/i386at/immc.c
index ea95169..bd61522 100644
--- a/i386/i386at/immc.c
+++ b/i386/i386at/immc.c
@@ -86,7 +86,7 @@ immc_cnputc(dev_t dev, int c)
if (!immediate_console_enable)
return -1;
- if (ofs < 0)
+ if (ofs < 0 || ofs >= 80)
{
ofs = 0;
immc_cnputc(dev, '\n');
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index 4edae7b..e70e1f6 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -725,7 +725,8 @@ boot_script_exec_cmd (void *hook, task_t task, char *path,
int argc,
assert(err == 0);
thread->saved.other = &info;
thread_start (thread, user_bootstrap);
- thread_resume (thread);
+ err = thread_resume (thread);
+ assert(err == 0);
/* We need to synchronize with the new thread and block this
main thread until it has finished referring to our local state. */
diff --git a/kern/printf.c b/kern/printf.c
index 1db0d08..13f2dc0 100644
--- a/kern/printf.c
+++ b/kern/printf.c
@@ -126,11 +126,11 @@
#define isdigit(d) ((d) >= '0' && (d) <= '9')
#define Ctod(c) ((c) - '0')
-#define MAXBUF (sizeof(long int) * 8) /* enough for binary */
+#define MAXBUF (sizeof(long long int) * 8) /* enough for binary */
void printnum(
- unsigned long u,
+ unsigned long long u,
int base,
void (*putc)( char, vm_offset_t ),
vm_offset_t putc_arg)
@@ -178,8 +178,9 @@ void _doprnt(
int prec;
boolean_t ladjust;
char padc;
- long n;
- unsigned long u;
+ long long n;
+ unsigned long long u;
+ int have_long_long;
int plus_sign;
int sign_char;
boolean_t altfmt, truncate;
@@ -218,6 +219,7 @@ void _doprnt(
plus_sign = 0;
sign_char = 0;
altfmt = FALSE;
+ have_long_long = FALSE;
while (TRUE) {
c = *fmt;
@@ -276,6 +278,10 @@ void _doprnt(
if (c == 'l')
c = *++fmt; /* need it if sizeof(int) < sizeof(long) */
+ if (c == 'l') {
+ c = *++fmt; /* handle `long long' */
+ have_long_long = TRUE;
+ }
truncate = FALSE;
@@ -287,7 +293,10 @@ void _doprnt(
boolean_t any;
int i;
- u = va_arg(argp, unsigned long);
+ if (! have_long_long)
+ u = va_arg(argp, unsigned long);
+ else
+ u = va_arg(argp, unsigned long long);
p = va_arg(argp, char *);
base = *p++;
printnum(u, base, putc, putc_arg);
@@ -431,7 +440,10 @@ void _doprnt(
goto print_unsigned;
print_signed:
- n = va_arg(argp, long);
+ if (! have_long_long)
+ n = va_arg(argp, long);
+ else
+ n = va_arg(argp, long long);
if (n >= 0) {
u = n;
sign_char = plus_sign;
@@ -443,7 +455,10 @@ void _doprnt(
goto print_num;
print_unsigned:
- u = va_arg(argp, unsigned long);
+ if (! have_long_long)
+ u = va_arg(argp, unsigned long);
+ else
+ u = va_arg(argp, unsigned long long);
goto print_num;
print_num:
diff --git a/kern/printf.h b/kern/printf.h
index 86857d3..76047f0 100644
--- a/kern/printf.h
+++ b/kern/printf.h
@@ -35,7 +35,7 @@ extern void _doprnt (const char *fmt,
int radix,
vm_offset_t putc_arg);
-extern void printnum (unsigned long u, int base,
+extern void printnum (unsigned long long u, int base,
void (*putc)(char, vm_offset_t),
vm_offset_t putc_arg);
diff --git a/kern/queue.h b/kern/queue.h
index 518084d..f0b4002 100644
--- a/kern/queue.h
+++ b/kern/queue.h
@@ -87,6 +87,14 @@ void remqueue(queue_t, queue_entry_t);
void insque(queue_entry_t, queue_entry_t);
/*
+ * Macro: queue_assert
+ * Function:
+ * Used by macros to assert that the given argument is a
+ * queue.
+ */
+#define queue_assert(q) (void) ((void) (q)->next, (q)->prev)
+
+/*
* Macro: queue_init
* Function:
* Initialize the given queue.
@@ -104,7 +112,7 @@ void insque(queue_entry_t, queue_entry_t);
* queue_entry_t queue_first(q)
* queue_t q; *IN*
*/
-#define queue_first(q) ((q)->next)
+#define queue_first(q) (queue_assert(q), (q)->next)
/*
* Macro: queue_next
@@ -114,7 +122,7 @@ void insque(queue_entry_t, queue_entry_t);
* queue_entry_t queue_next(qc)
* queue_t qc;
*/
-#define queue_next(qc) ((qc)->next)
+#define queue_next(qc) (queue_assert(qc), (qc)->next)
/*
* Macro: queue_last
@@ -124,7 +132,7 @@ void insque(queue_entry_t, queue_entry_t);
* queue_entry_t queue_last(q)
* queue_t q; *IN*
*/
-#define queue_last(q) ((q)->prev)
+#define queue_last(q) (queue_assert(q), (q)->prev)
/*
* Macro: queue_prev
@@ -134,7 +142,7 @@ void insque(queue_entry_t, queue_entry_t);
* queue_entry_t queue_prev(qc)
* queue_t qc;
*/
-#define queue_prev(qc) ((qc)->prev)
+#define queue_prev(qc) (queue_assert(qc), (qc)->prev)
/*
* Macro: queue_end
@@ -146,7 +154,8 @@ void insque(queue_entry_t, queue_entry_t);
* queue_t q;
* queue_entry_t qe;
*/
-#define queue_end(q, qe) ((q) == (qe))
+#define queue_end(q, qe) (queue_assert(q), queue_assert(qe), \
+ (q) == (qe))
/*
* Macro: queue_empty
@@ -179,6 +188,8 @@ void insque(queue_entry_t, queue_entry_t);
*/
#define queue_enter(head, elt, type, field) \
{ \
+ queue_assert(head); \
+ queue_assert(&(elt)->field); \
queue_entry_t prev; \
\
prev = (head)->prev; \
@@ -206,6 +217,8 @@ void insque(queue_entry_t, queue_entry_t);
*/
#define queue_enter_first(head, elt, type, field) \
{ \
+ queue_assert(head); \
+ queue_assert(&(elt)->field); \
queue_entry_t next; \
\
next = (head)->next; \
@@ -239,6 +252,8 @@ void insque(queue_entry_t, queue_entry_t);
*/
#define queue_remove(head, elt, type, field) \
{ \
+ queue_assert(head); \
+ queue_assert(&(elt)->field); \
queue_entry_t next, prev; \
\
next = (elt)->field.next; \
@@ -266,6 +281,8 @@ void insque(queue_entry_t, queue_entry_t);
*/
#define queue_remove_first(head, entry, type, field) \
{ \
+ queue_assert(head); \
+ queue_assert(&(entry)->field); \
queue_entry_t next; \
\
(entry) = (type) ((head)->next); \
@@ -289,6 +306,8 @@ void insque(queue_entry_t, queue_entry_t);
*/
#define queue_remove_last(head, entry, type, field) \
{ \
+ queue_assert(head); \
+ queue_assert(&(entry)->field); \
queue_entry_t prev; \
\
(entry) = (type) ((head)->prev); \
@@ -306,6 +325,8 @@ void insque(queue_entry_t, queue_entry_t);
*/
#define queue_assign(to, from, type, field) \
{ \
+ queue_assert(&(to)->field); \
+ queue_assert(&(from)->field); \
((type)((from)->prev))->field.next = (to); \
((type)((from)->next))->field.prev = (to); \
*to = *from; \
diff --git a/version.m4 b/version.m4
index 55430c8..9aab66b 100644
--- a/version.m4
+++ b/version.m4
@@ -1,4 +1,4 @@
m4_define([AC_PACKAGE_NAME],[GNU Mach])
-m4_define([AC_PACKAGE_VERSION],[1.4+git20150709])
+m4_define([AC_PACKAGE_VERSION],[1.4+git20150711])
m4_define([AC_PACKAGE_BUGREPORT],address@hidden)
m4_define([AC_PACKAGE_TARNAME],[gnumach])
diff --git a/vm/vm_kern.c b/vm/vm_kern.c
index 775d8e8..9c0a20b 100644
--- a/vm/vm_kern.c
+++ b/vm/vm_kern.c
@@ -827,7 +827,6 @@ void kmem_init(
/*
* Reserve virtual memory allocated up to this time.
*/
-
if (start != VM_MIN_KERNEL_ADDRESS) {
kern_return_t rc;
vm_offset_t addr = VM_MIN_KERNEL_ADDRESS;
@@ -838,7 +837,7 @@ void kmem_init(
VM_PROT_DEFAULT, VM_PROT_ALL,
VM_INHERIT_DEFAULT);
if (rc)
- panic("%s:%d: vm_map_enter failed (%d)\n", rc);
+ panic("vm_map_enter failed (%d)\n", rc);
}
}
diff --git a/vm/vm_object.c b/vm/vm_object.c
index 8c6bbab..deac0c2 100644
--- a/vm/vm_object.c
+++ b/vm/vm_object.c
@@ -588,10 +588,6 @@ void vm_object_terminate(
VM_PAGE_CHECK(p);
- if (p->busy && !p->absent)
- panic("vm_object_terminate.2 0x%x 0x%x",
- object, p);
-
VM_PAGE_FREE(p);
}
} else while (!queue_empty(&object->memq)) {
@@ -599,9 +595,6 @@ void vm_object_terminate(
VM_PAGE_CHECK(p);
- if (p->busy && !p->absent)
- panic("vm_object_terminate.3 0x%x 0x%x", object, p);
-
vm_page_lock_queues();
VM_PAGE_QUEUES_REMOVE(p);
vm_page_unlock_queues();
@@ -619,9 +612,6 @@ void vm_object_terminate(
goto free_page;
}
- if (p->fictitious)
- panic("vm_object_terminate.4 0x%x 0x%x", object, p);
-
if (!p->dirty)
p->dirty = pmap_is_modified(p->phys_addr);
diff --git a/vm/vm_pageout.c b/vm/vm_pageout.c
index aff823a..b13128a 100644
--- a/vm/vm_pageout.c
+++ b/vm/vm_pageout.c
@@ -693,7 +693,7 @@ void vm_pageout_scan(void)
if (want_pages || m->external)
break;
- m = (vm_page_t) queue_next (m);
+ m = (vm_page_t) queue_next (&m->listq);
if (!m)
goto pause;
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/gnumach.git