Re: [PATCH 07/13] trans: return nodes locked when creating fake nodes in fakeroot

2013-12-10 Thread Justus Winter
Quoting Samuel Thibault (2013-12-10 01:08:21) > Justus Winter, le Mon 09 Dec 2013 15:16:35 +0100, a écrit : > > + { > > + pthread_mutex_lock (&(*np)->lock); > > + netfs_nref (*np); /* Return a reference to the caller. */ > > +

Re: [PATCH 13/13] console-client: remove spurious pthread_spin_unlocks

2013-12-10 Thread Justus Winter
Quoting Samuel Thibault (2013-12-10 01:17:02) > Justus Winter, le Mon 09 Dec 2013 15:16:41 +0100, a écrit : > > * console-client/trans.c (netfs_attempt_mkfile): Remove spurious > > pthread_spin_unlock. > > (netfs_node_norefs): Likewise. > > It seems completely spuriou

[PATCH 1/5] utils/settrans: fix the teardown of chrooted environments

2013-12-10 Thread Justus Winter
Previously, settrans --chroot would just exec the target. Create a new process for that purpose. Wait for its completion, then ask the translator (nicely by default) to go away. If it refuses with EBUSY, it might be because some process has daemonized inside the chrooted environment. This fixes

[PATCH 2/5] trans/fakeroot: fix ownership of newly created files

2013-12-10 Thread Justus Winter
Previously, files created in the fakeroot environment were created with the uid and gid of the user running fakeroot: % fakeroot-hurd /bin/sh -c 'touch /tmp/$$; stat --format=%u:%g /tmp/$$' 1000:1000 * trans/fakeroot.c (netfs_S_dir_lookup): Fix ownership of newly created files. --- trans/fakeroo

[PATCH 3/5] trans/fakeroot: drop else

2013-12-10 Thread Justus Winter
* trans/fakeroot.c (netfs_S_dir_lookup): Drop else. --- trans/fakeroot.c | 76 ++ 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/trans/fakeroot.c b/trans/fakeroot.c index 6882618..f278db1 100644 --- a/trans/fakeroot.c +++ b/tra

[PATCH 4/5] trans/fakeroot: remove dead code

2013-12-10 Thread Justus Winter
* trans/fakeroot.c (netfs_S_dir_lookup): Remove dead code. --- trans/fakeroot.c | 67 +++--- 1 file changed, 29 insertions(+), 38 deletions(-) diff --git a/trans/fakeroot.c b/trans/fakeroot.c index f278db1..58f1112 100644 --- a/trans/fakeroot.c ++

[PATCH 5/5] trans/fakeroot: remove dead code

2013-12-10 Thread Justus Winter
* trans/fakeroot.c (netfs_S_dir_lookup): Remove dead code. --- trans/fakeroot.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/trans/fakeroot.c b/trans/fakeroot.c index 58f1112..203f2c1 100644 --- a/trans/fakeroot.c +++ b/trans/fakeroot.c @@ -371,10 +371,8 @@ netfs_S_

[PATCH] utils/settrans: fix the teardown of chrooted environments

2013-12-10 Thread Justus Winter
Previously, settrans --chroot would just exec the target. Create a new process for that purpose. Wait for its completion, then ask the translator (nicely by default) to go away. If it refuses with EBUSY, it might be because some process has daemonized inside the chrooted environment. This fixes

updated 1st patch

2013-12-10 Thread Justus Winter
err, rather this one, which honors goaway_flags. Justus

Re: [PATCH 1/3] trans: make the mtab translator a multithreaded server

2013-12-11 Thread Justus Winter
ping ;) Justus

[PATCH 1/3] utils/rpctrace: generalize code in rewrite_right

2013-12-11 Thread Justus Winter
* utils/rpctrace.c (rewrite_right): Generalize the code so we can use rewrite_right to rewrite MACH_MSG_TYPE_PORT_SEND rights for non-rpc ports. --- utils/rpctrace.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/rpctrace.c b/utils/rpctrace.c index ef7ab53..9433ef3

[PATCH 2/3] utils/rpctrace: generalize tracing code

2013-12-11 Thread Justus Winter
Currently, rpctrace dies if a tracee uses select(2) because it asserts that reply_type is a MACH_MSG_TYPE_PORT_SEND_ONCE right. Generalize the code surrounding the failing assertion. * utils/rpctrace.c (trace_and_forward): Generalize code by switching over reply_type. --- utils/rpctrace.c | 40

[PATCH 3/3] utils/rpctrace: handle MACH_MSG_TYPE_PORT_SEND rights in trace_and_forward

2013-12-11 Thread Justus Winter
This allows one to rpctrace processes doing select(2). * utils/rpctrace.c (trace_and_forward): Handle MACH_MSG_TYPE_PORT_SEND rights. --- utils/rpctrace.c |4 1 file changed, 4 insertions(+) diff --git a/utils/rpctrace.c b/utils/rpctrace.c index 5d3b2ca..b39b2e3 100644 --- a/utils/rpctr

[PATCH] utils/mount: fix autodetection of fat file systems

2013-12-13 Thread Justus Winter
mount uses libblkid (if available) to detect the file system type when using mount -t auto. libblkid calls fat file systems "vfat", our fat translator is called "fatfs". Fix this discrepancy in mount. * utils/mount.c (do_mount): Fix autodetection of fat file systems. --- utils/mount.c |7 ++

[PATCH 4/4] utils/rpctrace: escape non-printable characters in strings

2013-12-13 Thread Justus Winter
* utils/rpctrace.c (escape_sequences): New char array mapping characters to their escape sequence. (print_data): Escape non-printable characters when printing strings. --- utils/rpctrace.c | 48 ++-- 1 file changed, 46 insertions(+), 2 deletions(-) di

[PATCH 5/5] utils/rpctrace: fix output so that replies can be attributed to requests

2013-12-13 Thread Justus Winter
Currently, it is impossible to properly attribute response messages to requests. Even though rpctrace is single-threaded, its tracee may not. Or there might be more than one tracee. In any such case it is not guaranteed that the reply message we just processed is for the request we just printed.

Re: [PATCH 4/4] utils/rpctrace: escape non-printable characters in strings

2013-12-14 Thread Justus Winter
Quoting Ivan Shmakov (2013-12-13 17:05:19) > >>>>> Justus Winter <4win...@informatik.uni-hamburg.de> writes: > > > * utils/rpctrace.c (escape_sequences): New char array mapping > > characters to their escape sequence. > > […] > > > +

[PATCH] xen: add missing includes

2013-12-17 Thread Justus Winter
* xen/console.h: Add missing includes. --- xen/console.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/console.h b/xen/console.h index 2b78f29..061ba28 100644 --- a/xen/console.h +++ b/xen/console.h @@ -21,7 +21,9 @@ #include #include +#include #include +#include #define h

continuous integration // GNU Mach for Xen fails to build

2013-12-18 Thread Justus Winter
Hi :) I've been playing around with buildbot, the goal is to automatically produce Debian packages from the upstream git repositories. This is work in progress. To that end I took the Debian repositories of Hurd, MIG and GNU Mach and removed anything that is present in the upstream repositories.

[PATCH] i386: add missing includes

2013-12-18 Thread Justus Winter
* i386/i386at/kd_event.h: Add missing includes. --- i386/i386at/kd_event.h | 4 1 file changed, 4 insertions(+) diff --git a/i386/i386at/kd_event.h b/i386/i386at/kd_event.h index f1295cb..9568fa5 100644 --- a/i386/i386at/kd_event.h +++ b/i386/i386at/kd_event.h @@ -26,6 +26,10 @@ #ifndef _KD

Re: continuous integration // GNU Mach for Xen fails to build

2013-12-18 Thread Justus Winter
Quoting Justus Winter (2013-12-18 12:38:31) > While doing that I discovered that the recent cleanups broke GNU Mach > when compiled for the Xen target. Two issues were merely missing > includes, but now it fails like this: > > % ./configure --enable-kdb --enable-platform=xen --enab

[PATCH] trans/fakeroot: shutdown the translator if the last client is gone

2013-12-18 Thread Justus Winter
Previously, fakeroot would not exit if a process outlived the original process started by settrans. This caused bugs like this: % fakeroot-hurd /bin/sh -c 'sleep 1&' 2>&1 | tee Fix this by exiting if the last client of fakeroot goes away. * trans/fakeroot.c (fakeroot_netfs_release_protid): Shu

[PATCH] trans/fakeroot: shutdown the translator if the last client is gone

2013-12-19 Thread Justus Winter
Previously, fakeroot would not exit if a process outlived the original process started by settrans. This caused bugs like this: % fakeroot-hurd /bin/sh -c 'sleep 1&' 2>&1 | tee Fix this by exiting if the last client of fakeroot goes away. If noone has a right to any control or protid port, noo

updated patch

2013-12-19 Thread Justus Winter
Richard mentioned a use case I had not considered, binding /hurd/fakeroot to a node rather than using settrans --chroot. The patch now covers this use case by also checking for control ports. Justus

[PATCH 1/5] vm: remove NS32000-specific padding from struct vm_page

2014-01-02 Thread Justus Winter
Apparently, the NS32000 was a 32-bit CPU from the 1990ies. The string "ns32000" appears nowhere else in the source. * vm/vm_page.h (struct vm_page): Remove NS32000-specific padding. --- vm/vm_page.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/vm/vm_page.h b/vm/vm_page.h index 4445cb0..

[PATCH 2/5] vm: merge the two bit fields in struct vm_page

2014-01-02 Thread Justus Winter
* vm/vm_page.h (struct vm_page): Merge the two bit fields. --- vm/vm_page.h | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/vm/vm_page.h b/vm/vm_page.h index 7392044..339d355 100644 --- a/vm/vm_page.h +++ b/vm/vm_page.h @@ -92,11 +92,8 @@ struct vm_page {

[PATCH 3/5] vm: reduce the size of struct vm_page

2014-01-02 Thread Justus Winter
Previously, the bit field left 31 bits unused. By reducing the size of wire_count by one bit, the size of the whole struct is reduced by four bytes. * vm/vm_page.h (struct vm_page): Reduce the size of wire_count to 15 bits. --- vm/vm_page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 5/5] kern: make struct kmem_cache fit into two cache lines

2014-01-02 Thread Justus Winter
Previously, the size of struct kmem_cache was 136 bytes, just eight bytes larger than 128 bytes, which is typically two cache lines on today's CPUs. By reducing the size of the name field which holds a human-readable description by eight bytes to 24 bytes, the struct kmem_cache can be made fit int

[PATCH 4/5] kern: reduce the size of struct task

2014-01-02 Thread Justus Winter
* kern/task.h (struct task): Reduce the size of struct task by 2 * sizeof boolean_t by using a bit field for the boolean flags. --- kern/task.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kern/task.h b/kern/task.h index 9bfea57..e852033 100644 --- a/kern/task.h +++

Re: [RFC] kern: simple futex for gnumach (version 9)

2014-01-04 Thread Justus Winter
Hi :) Quoting Marin Ramesa (2014-01-04 11:12:42) > This is not yet ready to be called from userspace since glibc > build on the Hurd doesn't seem to compile the new RPCs. I don't > know how to actually call them. mig is your friend: % mig pong.defs % ls pong* pong.defs pong.h pongServer.c pon

[PATCH 1/4] linux: fix bit tests

2014-01-05 Thread Justus Winter
The pattern is !x&y. An expression of this form is almost always meaningless, because it combines a boolean operator with a bit operator. In particular, if the rightmost bit of y is 0, the result will always be 0. Fixed using coccinelle. // !x&y combines boolean negation with bitwise and // // Co

[PATCH 3/4] kern: explain the significance of the chosen length

2014-01-05 Thread Justus Winter
* kern/slab.h (KMEM_CACHE_NAME_SIZE): Explain the significance of the chosen length. --- kern/slab.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kern/slab.h b/kern/slab.h index a4219c4..fd65893 100644 --- a/kern/slab.h +++ b/kern/slab.h @@ -147,7 +147,9 @@ typedef vm_off

[PATCH 4/4] kern: optimize the layout of struct kmem_cache

2014-01-05 Thread Justus Winter
* kern/slab.h (struct kmem_cache): Reorder the fields so that all hot fields are within the first cache line. --- kern/slab.h | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/kern/slab.h b/kern/slab.h index fd65893..457dee4 100644 --- a/kern/slab.h +++ b/kern

[PATCH 2/4] linux: fix bit tests

2014-01-05 Thread Justus Winter
The pattern is !x&y. An expression of this form is almost always meaningless, because it combines a boolean operator with a bit operator. In particular, if the rightmost bit of y is 0, the result will always be 0. Fixed using coccinelle. // !x&y combines boolean negation with bitwise and // // Co

Re: [PATCH 4/4] kern: optimize the layout of struct kmem_cache

2014-01-06 Thread Justus Winter
Quoting Samuel Thibault (2014-01-06 02:43:20) > Justus Winter, le Mon 06 Jan 2014 00:34:55 +0100, a écrit : > > * kern/slab.h (struct kmem_cache): Reorder the fields so that all hot > > fields are within the first cache line. > > Did you try to benchmark this a bit? >

Re: [PATCH 1/4] linux: fix bit tests

2014-01-06 Thread Justus Winter
Quoting Samuel Thibault (2014-01-06 02:41:03) > > * linux/src/drivers/net/tlan.c: Fix bit tests. > > * linux/src/drivers/scsi/AM53C974.c: Likewise. > > * linux/src/drivers/scsi/FlashPoint.c: Likewise. > > * linux/src/drivers/scsi/NCR5380.c: Likewise. > > * linux/src/drivers/scsi/t128.c: Likewise. >

[PATCH 1/2] include: add new file for cache-related definitions

2014-01-07 Thread Justus Winter
* include/cache.h (__cacheline_aligned): This macro can be used to align statically allocated objects so that they start at a cache line. --- include/cache.h | 25 + 1 file changed, 25 insertions(+) create mode 100644 include/cache.h diff --git a/include/cache.h b/include

[PATCH 2/2] Align kmem_cache objects using __cacheline_aligned

2014-01-07 Thread Justus Winter
* device/dev_lookup.c: Align kmem_cache objects using __cacheline_aligned. * device/dev_pager.c: Likewise. * device/ds_routines.c: Likewise. * device/net_io.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/machine_task.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/intel/pmap.c: Likewise. *

[PATCH 2/8] trans/mtab: remove the loop detection logic

2014-01-12 Thread Justus Winter
Previously the mtab detector tried to detect whether it talks to itself by comparing the control port of the translator it currently visits with its own. This was done to prevent deadlocks. However, this did not detect non-trivial loops, i.e. two mtab translators would still dead-lock each other.

[PATCH 1/8] trans/mtab: populate mtab objects on demand

2014-01-12 Thread Justus Winter
..9b867b7 100644 --- a/trans/mtab.c +++ b/trans/mtab.c @@ -1,6 +1,6 @@ /* This is an mtab translator. - Copyright (C) 2013 Free Software Foundation, Inc. + Copyright (C) 2013,14 Free Software Foundation, Inc. Written by Justus Winter <4win...@informatik.uni-hamburg.de> @@ -594,7 +

[PATCH 4/8] trans/mtab: make the translator multithreaded

2014-01-12 Thread Justus Winter
* trans/mtab.c (main): Use ports_manage_port_operations_multithread. --- trans/mtab.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/trans/mtab.c b/trans/mtab.c index 5a5a07d..adfb345 100644 --- a/trans/mtab.c +++ b/trans/mtab.c @@ -235,9 +235,13 @@ main (int argc,

[PATCH 3/8] trans/mtab: properly lock mtab objects

2014-01-12 Thread Justus Winter
* trans/mtab.c (struct mtab): Add lock. (open_hook): Initialize lock. (close_hook): Destroy lock. (trivfs_S_io_read): Lock mtab object, adjust error handling accordingly. (trivfs_S_io_seek): Likewise. (trivfs_S_io_readable): Likewise. --- trans/mtab.c | 44 -

[PATCH 5/8] trans/mtab: do not include non-filesystem translators by default

2014-01-12 Thread Justus Winter
Traditionally, /proc/mounts includes only filesystem mount points. Previously though, the mtab translator included any kind of translator, like all /hurd/storeio translators. This causes problems with umount --all as this would remove the passive translator records from nodes in /dev. Fix this by

[PATCH 7/8] libdiskfs: register passive translator startups

2014-01-12 Thread Justus Winter
Detect passive translator startup and add the resulting active translator to the list of active translators. Note that newpi is properly deallocated in the function epilogue. * libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Detect and register passive translator startup. --- libdiskfs/dir-looku

[PATCH 8/8] libnetfs: register passive translator startups

2014-01-12 Thread Justus Winter
Detect passive translator startup and add the resulting active translator to the list of active translators. * libnetfs/dir-lookup.c (netfs_S_dir_lookup): Detect and register passive translator startup. --- libnetfs/dir-lookup.c | 43 +-- 1 file changed,

[PATCH 6/8] libfshelp: fix the api of fshelp_set_active_translator

2014-01-12 Thread Justus Winter
fshelp/translator-list.c index 87dcb21..3ece711 100644 --- a/libfshelp/translator-list.c +++ b/libfshelp/translator-list.c @@ -1,6 +1,6 @@ /* A list of active translators. - Copyright (C) 2013 Free Software Foundation, Inc. + Copyright (C) 2013,14 Free Software Foundation, Inc.

Re: [PATCH] Replaced bz2 decompression code with libbz2

2014-01-13 Thread Justus Winter
Hi Ignazio :) Quoting Ignazio Sgalmuzzo (2014-01-12 23:22:37) > While testing, I noticed a little problem with "settrans -ca test > /hurd/storeio -T bunzip2 test.bz2": it seems it looks for a .so module > with wrong name (something like "libstore_test.bz2.so.0.3)": I want to > investigate furth

Re: [PATCH v14] kern: simple futex for gnumach

2014-01-13 Thread Justus Winter
Hi Marin :) Quoting Marin Ramesa (2014-01-13 15:38:19) > Fixed a bug in private wakeups by calling ipc_entry_alloc_name(). > > This is the last version as everything works now. Heh, how many times did I think just that >,< > To do a quick userspace mutex test with timed waits: Good to see you

Re: [PATCH v14] kern: simple futex for gnumach

2014-01-13 Thread Justus Winter
Quoting Marin Ramesa (2014-01-13 19:15:41) > Thanks for your reviews, I learned a lot. You are welcome :) > I won't take up your time anymore. Why not? We are all consenting adults here, right? Anyone can decide by herself how much time she wants to spend on stuff. > I will do this privately

Re: [PATCH v15] kern: simple futex for gnumach

2014-01-15 Thread Justus Winter
Quoting Marin Ramesa (2014-01-15 01:48:01) > So, I decided to keep working on this. Awesome :) > [..] > I tested a simple userspace mutex based on this and multiple futexes, > all tests passed. Could you put that somewhere? I still have so little "context", I'd like to see how futexe are used i

Re: [PATCH v15] kern: simple futex for gnumach

2014-01-15 Thread Justus Winter
Quoting Marin Ramesa (2014-01-15 14:12:08) > On 01/15/2014 10:56:25 AM, Justus Winter wrote: > > > I tested a simple userspace mutex based on this and multiple > > futexes, > > > all tests passed. > > > > Could you put that somewhere? I still have so li

Re: [PATCH 5/5] Generate a x_server_routine in the sheader so it can be inlined

2014-01-16 Thread Justus Winter
Quoting Justus Winter (2013-12-02 17:25:23) > Quoting Samuel Thibault (2013-12-02 13:09:44) > > Well, it means that whenever a protocol gets augmented, one has to > > recompile all demuxer functions calling these inlines. In the example > > of trivfs_demuxer, the application

[PATCH 1/2] vm: remove the declaration of memory_object_create_proxy

2014-01-16 Thread Justus Winter
It is not clear to me why the declaration was put there in the first place. It is not used anywhere, and it conflicts with the declaration generated by mig. * vm/memory_object_proxy.h (memory_object_create_proxy): Remove declaration. --- vm/memory_object_proxy.h | 11 --- 1 file changed,

[PATCH 2/2] kern: include the mig-generated server headers in ipc_kobject.c

2014-01-16 Thread Justus Winter
GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the ipc_kobject_server function. * kern/ipc_kobject.c: Include the mig-generated server headers. --- kern/ipc

Re: [PATCH v16] kern: simple futex for gnumach

2014-01-17 Thread Justus Winter
Quoting Marin Ramesa (2014-01-17 15:32:05) > Function __atomic_load_n() is now used. Private futex structure and queue > was defined to avoid conflicts in block and wakeup events. Now, private > futex is really private and may only be used by threads of the task where > it was locked. > > All of l

[PATCH 1/2] trans: fix the receiver lookup in password

2014-01-18 Thread Justus Winter
Use translation functions instead of doing the lookup manually. * trans/Makefile (password-MIGSFLAGS): Add mutators. * trans/password.c (S_password_check_user): Update accordingly. (S_password_check_group): Likewise. --- trans/Makefile | 6 +- trans/password.c | 30 ++--

[PATCH 2/2] proc: fix the receiver lookup in S_proc_exception_raise

2014-01-18 Thread Justus Winter
dex 000..0d5bd4d --- /dev/null +++ b/proc/mig-decls.h @@ -0,0 +1,42 @@ +/* Translation functions for mig. + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd

[PATCH 1/2] auth: include the mig-generated server headers in auth.c

2014-01-19 Thread Justus Winter
GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the demuxer function. * auth/auth.c: Include the mig-generated server headers. --- auth/auth.c | 10 -

[PATCH 2/2] utils: include the mig-generated server headers in fakeauth.c

2014-01-19 Thread Justus Winter
GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the demuxer function. * utils/fakeauth.c: Include the mig-generated server headers. --- utils/fakeauth.c | 6

[PATCH] Rename variables with the name "error" to "err".

2014-01-19 Thread Justus Winter
The canonical name for variables of the type error_t is err. There are, however, places where the variable is called error instead. This is unfortunate, as this shadows the error function. Rename such variables to err. For reference, this is accomplished using the following semantic patch: @@

Re: [PATCH 2/2] proc: fix the receiver lookup in S_proc_exception_raise

2014-01-20 Thread Justus Winter
Quoting Samuel Thibault (2014-01-19 21:14:03) > Justus Winter, le Sat 18 Jan 2014 18:19:26 +0100, a écrit : > > * proc/mgt.c (S_proc_exception_raise): Update accordingly. > > * proc/mig-decls.h: New file. > > * proc/proc_exc.defs: Add translation functions. > > Why pu

[PATCH] daemons/getty: display /etc/issue if available

2014-01-28 Thread Justus Winter
Previously, a banner was hardcoded in Hurds getty. Load /etc/issue instead. Fall back to a hardcoded version if that fails. Expand common \char sequences. If no /etc/issue is provided, the old behavior is retained. * daemons/getty.c (load_banner): New function. (print_banner): Expand \char seq

[PATCH 2/8] kern: add snprintf

2014-02-01 Thread Justus Winter
* kern/printf.c (snprintf): New function. * kern/printf.h (snprintf): New declaration. --- kern/printf.c | 10 ++ kern/printf.h | 1 + 2 files changed, 11 insertions(+) diff --git a/kern/printf.c b/kern/printf.c index af59d5a..ea78d48 100644 --- a/kern/printf.c +++ b/kern/printf.c @@ -61

[PATCH 1/8] kern: fix printing of kmem_cache names

2014-02-01 Thread Justus Winter
The name field is not necessarily zero-terminated. Use a precision argument to limit the number of characters written when printing the name. * kern/slab.c (kmem_cache_error): Fix printing of cache names. --- kern/slab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kern/

[PATCH 4/8] ipc: use the name of the task for error messages

2014-02-01 Thread Justus Winter
* ipc/mach_port.c (mach_port_destroy): Use the name of the task for error messages. (mach_port_deallocate): Likewise. --- ipc/mach_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipc/mach_port.c b/ipc/mach_port.c index fbc5e69..13572a1 100644 --- a/ipc/mach_port.c ++

[PATCH 3/8] kern: add a name field to struct task

2014-02-01 Thread Justus Winter
* kern/task.c (task_create): Initialize name with the address of the task. * kern/task.h (TASK_NAME_SIZE): New definition. (struct task): Add field name. --- kern/task.c | 3 +++ kern/task.h | 9 + 2 files changed, 12 insertions(+) diff --git a/kern/task.c b/kern/task.c index 13b3c76..0b5

[PATCH 5/8] include: add a fixed-size string type for debugging purposes

2014-02-01 Thread Justus Winter
* include/mach/debug.defs: New file. * include/mach/debug.h: Likewise. --- include/mach_debug/mach_debug_types.defs | 2 ++ include/mach_debug/mach_debug_types.h| 11 +++ 2 files changed, 13 insertions(+) diff --git a/include/mach_debug/mach_debug_types.defs b/include/mach_debug/mac

[PATCH 6/8] kern: implement task_set_name

2014-02-01 Thread Justus Winter
task_set_name sets the name of a task. This is a debugging aid. The name will be used in error messages printed by the kernel. * kern/task.c (task_set_name): New function. * kern/task.h (task_set_name): New declaration. --- kern/task.c | 16 kern/task.h | 4 2 files chang

[PATCH 7/8] include: add task_set_name

2014-02-01 Thread Justus Winter
task_set_name sets the name of a task. This is a debugging aid. The name will be used in error messages printed by the kernel. * include/mach/gnumach.defs (task_set_name): New procedure. --- include/mach/gnumach.defs | 9 + 1 file changed, 9 insertions(+) diff --git a/include/mach/gnum

[PATCH 8/8] doc: document task_set_name

2014-02-01 Thread Justus Winter
* doc/mach.texi (Task Information): Document the new task_set_name procedure. --- doc/mach.texi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/doc/mach.texi b/doc/mach.texi index 9ad9e70..d089224 100644 --- a/doc/mach.texi +++ b/doc/mach.texi @@ -5037,6 +5037,17 @@ total system r

Re: [PATCH 1/8] kern: fix printing of kmem_cache names

2014-02-01 Thread Justus Winter
Quoting Samuel Thibault (2014-02-01 15:20:55) > Justus Winter, le Sat 01 Feb 2014 15:09:21 +0100, a écrit : > > The name field is not necessarily zero-terminated. Use a precision > > argument to limit the number of characters written when printing the > > name. > > M

Re: [PATCH 1/8] kern: fix printing of kmem_cache names

2014-02-02 Thread Justus Winter
Quoting Samuel Thibault (2014-02-02 00:11:59) > Justus Winter, le Sat 01 Feb 2014 16:34:20 +0100, a écrit : > > Quoting Samuel Thibault (2014-02-01 15:20:55) > > > Justus Winter, le Sat 01 Feb 2014 15:09:21 +0100, a écrit : > > > > The name field is not neces

Re: llvm / clang / scan-build of the Hurd

2014-02-04 Thread Justus Winter
Hi :) Quoting Thomas Schwinge (2013-10-25 15:48:06) > When I recently read about it somewhere, I've also had the idea about > feeding the Hurd code into the Coverity scanner, which I think offers > such a service for Free Software projects. I also thought about dping > the same for GNU Mach and g

[PATCH 1/3] kern: implement task_set_name

2014-02-04 Thread Justus Winter
task_set_name sets the name of a task. This is a debugging aid. The name will be used in error messages printed by the kernel. * kern/task.c (task_set_name): New function. * kern/task.h (task_set_name): New declaration. --- kern/task.c | 17 + kern/task.h | 4 2 files chan

[PATCH 1/4] kern: use kmem_warn instead of kmem_error in kmem_cache_error

2014-02-04 Thread Justus Winter
* kern/slab.c (kmem_cache_error): Use kmem_warn instead of kmem_error to print the cache name and its address. --- kern/slab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kern/slab.c b/kern/slab.c index d1e3632..adf07e7 100644 --- a/kern/slab.c +++ b/kern/slab.c @@ -662,7 +

[PATCH 3/4] ddb: safely copy symbol names into the symtab structure

2014-02-04 Thread Justus Winter
Use strncpy instead of strcpy to copy the name of a symbol into the symtab structure. Make sure that the string is properly terminated. Found using Coverity. * ddb/db_sym.c (db_add_symbol_table): Use strncpy instead of strcpy, ensure string termination. --- ddb/db_sym.c | 3 ++- 1 file changed,

[PATCH 2/4] kern: make kmem_error panic

2014-02-04 Thread Justus Winter
The slab allocator relies on the fact that kmem_cache_error does not return. Previously, kmem_error was using printf. Use panic instead. Found using the Clang Static Analyzer. * kern/slab.c (kmem_error): Use panic instead of printf. --- kern/slab.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 4/4] xen: fix buffer size

2014-02-04 Thread Justus Winter
Previously, only strlen(device_name) bytes were allocated, missing one byte for the terminating zero. * xen/block.c (hyp_block_init): Fix buffer size. --- xen/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/block.c b/xen/block.c index 3e4ce7c..bd3758f 100644 --- a/

[PATCH 1/2] exec: connect std{in,out,err} to the mach console

2014-02-04 Thread Justus Winter
* exec/main.c (S_exec_init): Get the device master port and connect std{in,out,err} to the mach console. --- exec/main.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/exec/main.c b/exec/main.c index c1f347c..27f33b1 100644 --- a/exec/main.c +++ b/exec/main.

[PATCH 2/2] daemons/getty: always print a newline before the banner

2014-02-04 Thread Justus Winter
* daemons/getty.c (load_banner): Drop first newline from default banner. (print_banner): Print a newline. --- daemons/getty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemons/getty.c b/daemons/getty.c index 7112660..40ad4d7 100644 --- a/daemons/getty.c +++ b/daemons/ge

Re: [PATCH 1/2] exec: connect std{in,out,err} to the mach console

2014-02-04 Thread Justus Winter
Quoting Samuel Thibault (2014-02-05 01:25:40) > Justus Winter, le Wed 05 Feb 2014 01:07:46 +0100, a écrit : > > * exec/main.c (S_exec_init): Get the device master port and connect > > std{in,out,err} to the mach console. > > Mmm, stdin too, really? I haven't thought a

Re: [PATCH 1/2] exec: connect std{in,out,err} to the mach console

2014-02-05 Thread Justus Winter
Quoting Samuel Thibault (2014-02-05 18:21:48) > Ludovic Courtès, le Wed 05 Feb 2014 14:52:27 +0100, a écrit : > > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > > > > > * exec/main.c (S_exec_init): Get the device master port and connect > > &

Re: [PATCH] Replaced bz2 decompression code with libbz2

2014-02-10 Thread Justus Winter
Hi Ignazio :) Quoting Samuel Thibault (2014-02-09 21:39:07) > Hello, > > Ignazio Sgalmuzzo, le Sat 04 Jan 2014 22:59:25 +, a écrit : > > configure.ac: added check for libbz2 > > libstore/Makefile: linked libbz2 > > ext2fs/Makefile: linked libbz2 > > do-bunzip2.c: rewritten do_bunzip2 using li

[PATCH 1/2] isofs: add bz2 to OTHERLIBS

2014-02-10 Thread Justus Winter
* isofs/Makefile (OTHERLIBS): Add bz2. --- isofs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isofs/Makefile b/isofs/Makefile index 053b622..a037c21 100644 --- a/isofs/Makefile +++ b/isofs/Makefile @@ -22,7 +22,7 @@ SRCS = inode.c main.c lookup.c pager.c rr.c OBJ

[PATCH 2/2] fatfs: add bz2 to OTHERLIBS

2014-02-10 Thread Justus Winter
* fatfs/Makefile (OTHERLIBS): Add bz2. --- fatfs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fatfs/Makefile b/fatfs/Makefile index c673b1b..9a04fbb 100644 --- a/fatfs/Makefile +++ b/fatfs/Makefile @@ -23,7 +23,7 @@ SRCS = inode.c main.c dir.c pager.c fat.c virt-ino

fix the get-children and get-source procedures

2014-02-11 Thread Justus Winter
Hi :) when I implemented the mtab stuff last summer I made quite a blunder. I added fsys_get_{children,source}, but send those messages to ports associated with nodes, not to control ports. So: [PATCH 1/6] hurd: fix the get-children and get-source procedures Removes fsys_get_{children,source}, a

[PATCH 6/6] New RPCs, fix build

2014-02-11 Thread Justus Winter
--- trans/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trans/Makefile b/trans/Makefile index c0386d0..90df479 100644 --- a/trans/Makefile +++ b/trans/Makefile @@ -56,7 +56,7 @@ magic: ../libiohelp/libiohelp.a hello: ../libtrivfs/libtrivfs.a ../libfshelp/libfshelp.a

[PATCH 5/6] trans/mtab: do not map unknown source strings to "none"

2014-02-11 Thread Justus Winter
Previously, map_device_to_path mapped unknown device strings to "none". Return a copy of the original source string instead so that e.g. nfs mount point points are properly handled. * trans/mtab.c (map_device_to_path): Do not map unknown source strings to "none". --- trans/mtab.c | 2 +- 1 file

[PATCH 2/6] nfs: implement netfs_get_source

2014-02-11 Thread Justus Winter
Implement netfs_get_source so that nfs translators show up in /proc/mounts. * nfs/main.c (netfs_get_source): New function. --- nfs/main.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/nfs/main.c b/nfs/main.c index 3ce75a9..cd1c29a 100644 --- a/nfs/main.c +++ b/nfs/main.c @@

[PATCH 3/6] trans/mtab: ignore translators that do not implement file_get_source

2014-02-11 Thread Justus Winter
Previously, the mtab translator would guess the source of a filesystem translator from its last argument. This made all kinds of non-filesystem translators appear in /proc/mounts, causing severe problems due to umount --all removing vital passive translator records. Fix this by ignoring all trans

[PATCH 4/6] tmpfs: set diskfs_disk_name to "none"

2014-02-11 Thread Justus Winter
By default diskfs_disk_name is returned as the source of libdiskfs-based translators. Hurds fstab allows multiple entries with the mnt_fsname being "none". * tmpfs/tmpfs.c (diskfs_disk_name): Set to "none". --- tmpfs/tmpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmp

[PATCH 1/6] hurd: fix the get-children and get-source procedures

2014-02-11 Thread Justus Winter
@@ -0,0 +1,95 @@ +/* file_get_children + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or modify + it under the

[PATCH 3/3] libdiskfs: fix receiver lookups in fsys server functions

2014-02-12 Thread Justus Winter
* libdiskfs/diskfs.h (struct diskfs_control): New declaration. (diskfs_begin_using_control_port): New declaration and function. (diskfs_end_using_control_port): Likewise. * libdiskfs/fsmutations.h: Add translation functions. * libdiskfs/priv.h (control_t): New type declaration for mig. * libdiskfs/

[PATCH 1/3] libdiskfs: fix typo

2014-02-12 Thread Justus Winter
* libdiskfs/boot-start.c (diskfs_S_fsys_init): Fix typo. --- libdiskfs/boot-start.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c index 6d9a773..05d3b43 100644 --- a/libdiskfs/boot-start.c +++ b/libdiskfs/boot-start.c @@ -460,7

[PATCH 2/3] libnetfs: fix receiver lookups in fsys server functions

2014-02-12 Thread Justus Winter
* mutations.h: Add translation functions. * netfs.h (struct netfs_control): New declaration. * priv.h: Define translation functions. * fsys-get-options.c: Fix receiver lookups. * fsys-getroot.c: Likewise. * fsys-goaway.c: Likewise. * fsys-set-options.c: Likewise. * fsys-syncfs.c: Likewise. * fsysst

Re: [PATCH 2/3] libnetfs: fix receiver lookups in fsys server functions

2014-02-12 Thread Justus Winter
Hi :) Quoting Samuel Thibault (2014-02-12 18:27:21) > Could you mention the rationale of these changes? It's far from obvious > for anybody who does not know RPCs very well :) This is a prelude to my protected payload patch series. I'm fixing the receiver lookups that are currently done "by foo

protected payloads for GNU Mach

2014-02-17 Thread Justus Winter
Hi :) this patch series implements protected payloads on top of the mach messaging system. It preserves the semantics for programs not using this functionality. This is the kernel part of my work that will (hopefully) speed up the Hurd. For a detailed sketch see: id:20131128235647.1092.90...@t

[PATCH 03/11] ipc: implement mach_port_set_protected_payload

2014-02-17 Thread Justus Winter
* include/mach/mach_port.defs: Add mach_port_set_protected_payload. * ipc/mach_port.c: Implement mach_port_set_protected_payload. --- include/mach/mach_port.defs | 9 + ipc/mach_port.c | 37 + 2 files changed, 46 insertions(+) diff --git a/

[PATCH 04/11] doc: document mach_port_set_protected_payload

2014-02-17 Thread Justus Winter
* doc/mach.texi (Receive Rights): Document mach_port_set_protected_payload. --- doc/mach.texi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/doc/mach.texi b/doc/mach.texi index d089224..67c5fe9 100644 --- a/doc/mach.texi +++ b/doc/mach.texi @@ -2715,6 +2715,24 @@ In additi

[PATCH 01/11] include: skip routines related to migrating threads

2014-02-17 Thread Justus Winter
* include/mach/mach_port.defs: Skip the routines mach_port_set_rpcinfo and mach_port_create_act if MIGRATING_THREADS is not defined. --- include/mach/mach_port.defs | 5 + 1 file changed, 5 insertions(+) diff --git a/include/mach/mach_port.defs b/include/mach/mach_port.defs index e1f45e3..7

<    1   2   3   4   5   6   7   8   9   10   >