[PATCH 02/11] ipc: add protected payload

2014-02-17 Thread Justus Winter
* ipc/ipc_port.c (ipc_port_init): Initialize protected_payload. (ipc_port_print): Print protected_payload. (ipc_port_set_protected_payload): New function. * ipc/ipc_port.h (struct ipc_port): Add field protected_payload. (ipc_port_set_protected_payload): Add function declaration. --- ipc/ipc_port.c

[PATCH 07/11] include: define MACH_MSG_TYPE_PROTECTED_PAYLOAD

2014-02-17 Thread Justus Winter
* include/mach/message.h: Define MACH_MSG_TYPE_PROTECTED_PAYLOAD. (MACH_MSG_TYPE_LAST): Adjust accordingly. --- include/mach/message.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/mach/message.h b/include/mach/message.h index 7464a57..0a7297e 100644 --- a/include/

[PATCH 10/11] ipc: clear the payload when moving a receive port

2014-02-17 Thread Justus Winter
Clear the protected payload when a receive port is moved from one ipc space to another. This is done to retain the old behavior of mach_msg, so that a port name is sent in the msgh_local_port field. If the new owner of that receive right wishes to use the protected payload mechanism, it has to be

[PATCH 05/11] include: add msgh_protected_payload to mach_msg_header_t

2014-02-17 Thread Justus Winter
* include/mach/message.h (mach_msg_header_t): Add msgh_protected_payload as a union with msgh_local_port. --- include/mach/message.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/mach/message.h b/include/mach/message.h index f78e978..7464a57 100644 --- a/include

[PATCH 09/11] ipc: provide the protected payload in ipc_kmsg_copyout_header

2014-02-17 Thread Justus Winter
* ipc/ipc_kmsg.c (ipc_kmsg_copyout_header): If a protected payload is set for the destination port, provide it in msgh_protected_payload. --- ipc/ipc_kmsg.c | 58 +- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/ipc/ipc_km

[PATCH 08/11] doc: document MACH_MSG_TYPE_PROTECTED_PAYLOAD

2014-02-17 Thread Justus Winter
* doc/mach.texi (Message Format): Document MACH_MSG_TYPE_PROTECTED_PAYLOAD. --- doc/mach.texi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/mach.texi b/doc/mach.texi index 251c290..26bf0c6 100644 --- a/doc/mach.texi +++ b/doc/mach.texi @@ -1426,6 +1426,7 @@ types are predefined: @

[PATCH 06/11] doc: document msgh_protected_payload

2014-02-17 Thread Justus Winter
* doc/mach.texi (Message Format): Document msgh_protected_payload. --- doc/mach.texi | 9 + 1 file changed, 9 insertions(+) diff --git a/doc/mach.texi b/doc/mach.texi index 67c5fe9..251c290 100644 --- a/doc/mach.texi +++ b/doc/mach.texi @@ -1330,6 +1330,15 @@ which is conventionally used

[PATCH 11/11] doc: document message semantics with protected payloads

2014-02-17 Thread Justus Winter
* doc/mach.texi (Message Receive): Document message semantics with protected payloads. --- doc/mach.texi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/doc/mach.texi b/doc/mach.texi index 26bf0c6..b3cc2ec 100644 --- a/doc/mach.texi +++ b/doc/mach.texi @@ -1949,6 +1949,25

Re: protected payloads for GNU Mach

2014-02-19 Thread Justus Winter
Quoting Richard Braun (2014-02-19 10:47:03) > On Tue, Feb 18, 2014 at 09:49:23PM -0800, Samuel Thibault wrote: > > Apart from that and perhaps a function to clear the protected payload > > value (which may however not be really useful), the whole thing seems > > interesting and good to me, do other

[PATCH 1/5] ipc: add protected payload

2014-02-21 Thread Justus Winter
Add a field ip_protected_payload and a flag ip_has_protected_payload to struct ipc_port. Clear the protected payload when a receive port is moved from one ipc space to another. This is done to retain the old behavior of mach_msg, so that a port name is sent in the msgh_local_port field. If the ne

[PATCH 3/5] include: add msgh_protected_payload to mach_msg_header_t

2014-02-21 Thread Justus Winter
* include/mach/message.h (mach_msg_header_t): Add msgh_protected_payload as a union with msgh_local_port. * doc/mach.texi (Message Format): Document msgh_protected_payload. --- doc/mach.texi | 9 + include/mach/message.h | 5 - 2 files changed, 13 insertions(+), 1 deletion(-

[PATCH 2/5] ipc: implement mach_port_{set,clear}_protected_payload

2014-02-21 Thread Justus Winter
* include/mach/mach_port.defs: Add mach_port_{set,clear}_protected_payload. * ipc/mach_port.c: Implement mach_port_{set,clear}_protected_payload. * doc/mach.texi (Receive Rights): Document mach_port_{set,clear}_protected_payload. --- doc/mach.texi | 35 ++ include

[PATCH 5/5] ipc: provide the protected payload in ipc_kmsg_copyout_header

2014-02-21 Thread Justus Winter
* ipc/ipc_kmsg.c (ipc_kmsg_copyout_header): If a protected payload is set for the destination port, provide it in msgh_protected_payload. * doc/mach.texi (Message Receive): Document message semantics with protected payloads. --- doc/mach.texi | 19 +++ ipc/ipc_kmsg.c | 58 ++

[PATCH 4/5] include: define MACH_MSG_TYPE_PROTECTED_PAYLOAD

2014-02-21 Thread Justus Winter
* include/mach/message.h: Define MACH_MSG_TYPE_PROTECTED_PAYLOAD. (MACH_MSG_TYPE_LAST): Adjust accordingly. * doc/mach.texi (Message Format): Document MACH_MSG_TYPE_PROTECTED_PAYLOAD. --- doc/mach.texi | 6 ++ include/mach/message.h | 4 +++- 2 files changed, 9 insertions(+), 1 deleti

[PATCH 2/5] ipc: implement mach_port_{set,clear}_protected_payload

2014-02-21 Thread Justus Winter
* include/mach/mach_port.defs: Add mach_port_{set,clear}_protected_payload. * ipc/mach_port.c: Implement mach_port_{set,clear}_protected_payload. * doc/mach.texi (Receive Rights): Document mach_port_{set,clear}_protected_payload. --- doc/mach.texi | 35 ++ include

[PATCH 3/5] include: add msgh_protected_payload to mach_msg_header_t

2014-02-21 Thread Justus Winter
* include/mach/message.h (mach_msg_header_t): Add msgh_protected_payload as a union with msgh_local_port. * doc/mach.texi (Message Format): Document msgh_protected_payload. --- doc/mach.texi | 9 + include/mach/message.h | 5 - 2 files changed, 13 insertions(+), 1 deletion(-

[PATCH 5/5] ipc: provide the protected payload in ipc_kmsg_copyout_header

2014-02-21 Thread Justus Winter
* ipc/ipc_kmsg.c (ipc_kmsg_copyout_header): If a protected payload is set for the destination port, provide it in msgh_protected_payload. * doc/mach.texi (Message Receive): Document message semantics with protected payloads. --- doc/mach.texi | 19 +++ ipc/ipc_kmsg.c | 58 ++

[PATCH 4/5] include: define MACH_MSG_TYPE_PROTECTED_PAYLOAD

2014-02-21 Thread Justus Winter
* include/mach/message.h: Define MACH_MSG_TYPE_PROTECTED_PAYLOAD. (MACH_MSG_TYPE_LAST): Adjust accordingly. * doc/mach.texi (Message Format): Document MACH_MSG_TYPE_PROTECTED_PAYLOAD. --- doc/mach.texi | 6 ++ include/mach/message.h | 4 +++- 2 files changed, 9 insertions(+), 1 deleti

[PATCH 1/5] ipc: add protected payload

2014-02-21 Thread Justus Winter
Add a field ip_protected_payload and a flag ip_has_protected_payload to struct ipc_port. Clear the protected payload when a receive port is moved from one ipc space to another. This is done to retain the old behavior of mach_msg, so that a port name is sent in the msgh_local_port field. If the ne

[PATCH 1/2] exec: provide a meaningful name for new tasks

2014-02-21 Thread Justus Winter
The name will be used in error messages printed by the kernel. This makes attributing the errors to processes possible. * exec/exec.c (do_exec): Set the name of the new task. --- exec/exec.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/exec/exe

[PATCH 2/2] Fix build

2014-02-21 Thread Justus Winter
--- exec/Makefile | 2 +- exec/gnumach.defs | 74 +++ exec/mach_debug/hash_info.h | 41 ++ exec/mach_debug/ipc_info.h| 100 +++ exec/mach_debug/mach_debug.defs | 233

[PATCH] Fix variable-sized c strings

2014-02-21 Thread Justus Winter
Previously, the terminating zero of variable-sized c strings was only included when copying the message if the length of the string was not a multiple of four. mig_strncpy returns the length of the string excluding the terminating zero. Fix this by properly accounting for the byte for the termina

[PATCH] kern: fix mig_strncpy

2014-02-21 Thread Justus Winter
Previously, the function mig_strncpy would always zero-terminate the destination string. Make mig_strncpy behave like mig_strncpy and strncpy in the glibc. Also fix the implementation of mig_strncpy to return the length of the written string to align the implementation with the declaration in inc

[task #6990] Avoid copying source files from other projects

2014-02-21 Thread Justus Winter
Update of task #6990 (project hurd): Status:None => Done Open/Closed:Open => Closed Wiki-like text discussion box: => Fixed in b39be886ee3562ff924b631a365b1e46d424f636

[PATCH] kern: fix mig_strncpy

2014-02-21 Thread Justus Winter
Previously, the function mig_strncpy would always zero-terminate the destination string. Make mig_strncpy behave like mig_strncpy and strncpy in the glibc. Also fix the implementation of mig_strncpy to return the length of the written string to align the implementation with the declaration in inc

[PATCH] kern: fix mig_strncpy

2014-02-22 Thread Justus Winter
Previously, the function mig_strncpy would always zero-terminate the destination string. Make mig_strncpy behave like mig_strncpy and strncpy in the glibc. Also fix the implementation of mig_strncpy to return the length of the written string to align the implementation with the declaration in inc

Re: [PATCH] kern: fix mig_strncpy

2014-02-22 Thread Justus Winter
Quoting Samuel Thibault (2014-02-22 15:37:29) > Justus Winter, le Sat 22 Feb 2014 11:25:14 +0100, a écrit : > > * kern/ipc_mig.c (mig_strncpy): Do not zero-terminate the destination > > string. Return length of destination string. > > Well, that calls for some rationale :)

Re: [PATCH 2/2] Fix build

2014-02-22 Thread Justus Winter
Quoting Samuel Thibault (2014-02-22 15:20:28) > This is just for people who don't have the newer mach headers, right? > I'd rather not copy them, but simply depend on the newer gnumach. Yes. Justus

Re: [PATCH] kern: fix mig_strncpy

2014-02-24 Thread Justus Winter
Quoting Samuel Thibault (2014-02-22 16:53:11) > Justus Winter, le Sat 22 Feb 2014 16:17:13 +0100, a écrit : > > Quoting Samuel Thibault (2014-02-22 15:37:29) > > > Justus Winter, le Sat 22 Feb 2014 11:25:14 +0100, a écrit : > > > > * kern/ipc_mig.c (mig_strnc

Re: [PATCH] Fix variable-sized c strings

2014-02-24 Thread Justus Winter
Quoting Samuel Thibault (2014-02-22 16:54:28) > Justus Winter, le Fri 21 Feb 2014 23:12:03 +0100, a écrit : > > Previously, the terminating zero of variable-sized c strings was only > > included when copying the message if the length of the string was not > > a multiple

[PATCH 1/5] utils/umount: do not remove passive translator records

2014-02-24 Thread Justus Winter
Passive translator records are a Hurd concept. Therefore, the umount compatibility program should not remove them. * utils/umount.c (passive_flags): Unset FS_TRANS_SET. (doc): Adjust accordingly. --- utils/umount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/umo

[PATCH 3/5] mach-defpager: fix definition of seqnos_memory_object_data_unlock

2014-02-24 Thread Justus Winter
* mach-defpager/default_pager.c (seqnos_memory_object_data_unlock): Fix function arguments. --- mach-defpager/default_pager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c index 66b8587..4d604fe 100644 --- a/

[PATCH 4/5] mach-defpager: add function mig_reply_setup

2014-02-24 Thread Justus Winter
Currently, mig_reply_setup is not provided by libmachuser or the glibc. Provide it locally. * mach-defpager/default_pager.c (mig_reply_setup): New function. --- mach-defpager/default_pager.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/mach-defpager/defaul

[PATCH 5/5] mach-defpager: improve the default_pager_demux_object function

2014-02-24 Thread Justus Winter
Handle multiple request types as recommended by the Mach Server Writer's Guide section 4, subsection "Handling Multiple Request Types". This avoids initializing the reply message in every X_server function. * mach-defpager/default_pager.c (default_pager_demux_object): Improve the demuxer function

[PATCH 2/5] libpager: improve the pager_demuxer function

2014-02-24 Thread Justus Winter
Handle multiple request types as recommended by the Mach Server Writer's Guide section 4, subsection "Handling Multiple Request Types". This avoids initializing the reply message in every X_server function. The reply message has already been properly initialized in libports, so there is no need t

[PATCH 1/2] pfinet: improve the mig mutator functions

2014-02-25 Thread Justus Winter
Previously, the mig mutator functions were in misc.c, preventing them from being inlined into the mig-generated server functions. Put them in mig-decls.h instead. Rename mutations.h to mig-mutate.h. This is the naming convention used for pflocal. * pfinet/mutations.h: Rename to mig-mutate.h, ad

[PATCH 2/2] libtrivfs: improve the mig mutator functions

2014-02-25 Thread Justus Winter
Previously, the mig mutator functions were in migsupport.c, preventing them from being inlined into the mig-generated server functions. Put them in mig-decls.h instead. Rename mutations.h to mig-mutate.h. This is the naming convention used for pflocal. * libtrivfs/fsmutations.h: Rename to mig-mu

[PATCH 2/2] pfinet: fix receiver lookups in iioctl-ops.c

2014-02-27 Thread Justus Winter
* pfinet/iioctl-ops.c: Fix receiver lookups. * pfinet/mig-mutate.h: Add IIOCTL_IMPORTS. * pfinet/Makefile: Set iioctl-MIGSFLAGS. --- pfinet/Makefile | 1 + pfinet/iioctl-ops.c | 44 +--- pfinet/mig-mutate.h | 1 + 3 files changed, 19 insertions(+), 27

[PATCH 1/2] hurd: add IIOCTL_IMPORTS

2014-02-27 Thread Justus Winter
* hurd/iioctl.defs: Add IIOCTL_IMPORTS. --- hurd/iioctl.defs | 4 1 file changed, 4 insertions(+) diff --git a/hurd/iioctl.defs b/hurd/iioctl.defs index 4efe928..dfa8903 100644 --- a/hurd/iioctl.defs +++ b/hurd/iioctl.defs @@ -20,6 +20,10 @@ the Free Software Foundation, 675 Mass Ave, Cambri

[PATCH 1/2] term: fix receiver lookups in the tioctl server functions

2014-02-28 Thread Justus Winter
/null +++ b/term/mig-mutate.h @@ -0,0 +1,24 @@ +/* + Copyright (C) 2014 Free Software Foundation, Inc. + Written by Justus Winter. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public

[PATCH 2/2] term: fix receiver lookups in the term server functions

2014-02-28 Thread Justus Winter
* term/mig-mutate.h: Define TERM_IMPORTS. * term/Makefile: Set term-MIGSFLAGS. * term/users.c: Fix receiver lookups in the term server functions. --- term/Makefile | 1 + term/mig-mutate.h | 1 + term/users.c | 82 ++- 3 files changed,

[PATCH] auth: improve the mig mutator functions

2014-03-01 Thread Justus Winter
Copyright (C) 2014 Free Software Foundation, Inc. + Written by Justus Winter. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundati

teh cloud (was: GNU accepted as a mentoring organization in GSOC 2014)

2014-03-10 Thread Justus Winter
Hi Daniel, Quoting Daniel Versa (2014-03-10 16:07:17) > RMS on "The Cloud:" > > http://techrights.org/wp-content/uploads/2014/02/rms-gnu-online-storage.ogg > > Do we really want to be "cloud?" That seems contrary to Freedom. > > > On Sunday, March 9, 2014 8:13 PM, Thomas Schwinge > wrote: >

Re: New installation CDs and qemu image

2014-03-10 Thread Justus Winter
Hi Riccardo, Quoting Riccardo Mottola (2014-03-09 10:13:14) > Riccardo Mottola wrote: > > Samuel Thibault wrote: > >> /proc/mounts > >> /etc/mtab > >> /var/run/mtab > > my /proc is empty. That is bad. Please confirm that your /proc node has a passive translator record: % showtrans /proc /hurd/p

Re: New installation CDs and qemu image

2014-03-11 Thread Justus Winter
Quoting Gabriele Giacone (2014-03-11 01:31:01) > On Tue, Mar 11, 2014 at 1:01 AM, Riccardo Mottola > wrote: > > Justus Winter wrote: > >> % showtrans /proc > >> /hurd/procfs -c > > > > it is unset, showtrans returns nothing. > > Can I set it wit

Re: hurd does not compile

2014-03-12 Thread Justus Winter
Hi Peter :) Quoting Peter Baumgarten (2014-03-12 08:00:35) > So as the title suggests hurd from git.sv.gnu.org/hurd/ does not compile > for me, but hurd-0.5 from ftp.gnu.org/gnu/ does. The message I am > getting is > > ~/hurd/exec/exec.c:1173: undefined reference to `task_set_name' > collect2:

[PATCH 3/8] mach-defpager: add and use synchronized_printf for dprintf

2014-03-12 Thread Justus Winter
* mach-defpager/default_pager.c (synchronized_printf): New function. (printf_lock): Move to synchronized_printf. (dprintf): Use synchronized_printf. (ddprintf): Likewise. --- mach-defpager/default_pager.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff -

[PATCH 1/8] mach-defpager: remove comments around form feeds

2014-03-12 Thread Justus Winter
Form feed characters (\f) are whitespace and are treated as such by c compilers. There is no need to enclose them in comments. * mach-defpager/default_pager.c: Remove comments around form feeds. --- mach-defpager/default_pager.c | 13 - 1 file changed, 13 deletions(-) diff --git a/m

[PATCH 5/8] mach-defpager: fix warning about uninitialized variable

2014-03-12 Thread Justus Winter
Previously, failure to look up the given partition was detected after the loop by checking whether the loop ran over all existing partitions. Initialize part to NULL and check for that instead. This retains the behavior, but expresses it in a way the compiler understands better. * mach-defpager/

[PATCH 2/8] mach-defpager: fix warnings about unused variables

2014-03-12 Thread Justus Winter
* mach-defpager/default_pager.c (pager_alloc): Declare variables only when needed. (dealloc_direct): Remove unused variables. (seqnos_memory_object_terminate): Remove unused variable, adjust ddprintfs accordingly. (seqnos_memory_object_data_write): Remove unused variable. --- mach-defpager/default

[PATCH 4/8] mach-defpager: fix error handling in S_default_pager_object_set_size

2014-03-12 Thread Justus Winter
Fix a compiler warning about kr being potentially being uninitialized. * mach-defpager/default_pager.c (S_default_pager_object_set_size): Initialize kr. --- mach-defpager/default_pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mach-defpager/default_pager.c b/mach-defpa

[PATCH 8/8] mach-defpager: silently ignore requests to page to active partition

2014-03-12 Thread Justus Winter
Currently, if mach-defpager is asked to page to an already active partition, it ignores this request and returns success. It does, however, print a message about this to stdout. This message might indicate to the user that there is some kind of a problem with the configuration of the machine, eve

[PATCH 7/8] mach-defpager: fix type of size arguments

2014-03-12 Thread Justus Winter
* mach-defpager/default_pager.c (new_partition): Fix type of bsize. * mach-defpager/file_io.h (page_read_file_direct): Fix type of size argument. (page_write_file_direct): Likewise. * mach-defpager/setup.c (page_read_file_direct): Likewise. (page_write_file_direct): Likewise. --- mach-defpager/def

[PATCH 6/8] mach-defpager: fix warnings about uninitialized variables

2014-03-12 Thread Justus Winter
* mach-defpager/default_pager.c (S_default_pager_objects): Initialize address, size-pairs to 0. (S_default_pager_object_pages): Likewise. * mach-defpager/kalloc.c (kget_space): Likewise. --- mach-defpager/default_pager.c | 12 ++-- mach-defpager/kalloc.c| 2 +- 2 files changed, 7

Re: hurd does not compile

2014-03-12 Thread Justus Winter
Quoting Peter Baumgarten (2014-03-12 21:38:13) > On Wed, 2014-03-12 at 11:25 +0100, Samuel Thibault wrote: > > I's actually the Mach headers which need to be upgraded to the version > > which includes task_set_name, and glibc then recompiled against it. > > So does this mean I need to compile mach

Another round of receiver lookup fixes

2014-03-19 Thread Justus Winter
Hi :) in order to fix the receiver lookups in the Hurd components implementing the pager protocol, I need to extend the memory_object_t definitions in the kernel headers. In a follow-up, I'll send a patch series fixing the receiver lookups in mach-defpager. Cheers, Justus

[PATCH] include: make the memory_object_t types translation functions mutable

2014-03-19 Thread Justus Winter
Make the intran, outtran and destructor functions mutable using preprocessor macros. Make it possible to inject imports using the MEMORY_OBJECT_IMPORTS macro. This way, userspace servers can provide their own translation functions. * include/mach/mach_types.defs (memory_object_t): Make the trans

[PATCH 1/4] hurd: fix receiver type, honor DEFAULT_PAGER_IMPORTS

2014-03-19 Thread Justus Winter
* hurd/default_pager.defs: Honor DEFAULT_PAGER_IMPORTS. (default_pager_object_set_size): Fix receiver type. --- hurd/default_pager.defs | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hurd/default_pager.defs b/hurd/default_pager.defs index 8ad82dc..4885503 100644 --- a/hur

[PATCH 3/4] mach-defpager: fix local includes

2014-03-19 Thread Justus Winter
* mach-defpager/default_pager.c: Fix local includes. * mach-defpager/main.c: Likewise. * mach-defpager/setup.c: Likewise. --- mach-defpager/default_pager.c | 8 mach-defpager/main.c | 2 +- mach-defpager/setup.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-)

[PATCH 2/4] mach-defpager: fix receiver lookups

2014-03-19 Thread Justus Winter
ort_lookup(pager); if (ds == DEFAULT_PAGER_NULL) return KERN_INVALID_ARGUMENT; diff --git a/mach-defpager/mig-decls.h b/mach-defpager/mig-decls.h new file mode 100644 index 000..f63fef2 --- /dev/null +++ b/mach-defpager/mig-decls.h @@ -0,0 +1,37 @@ +/* + Copyright (C) 2014 Free Software

[PATCH 4/4] mach-defpager: replace the magic typecast with a hash table

2014-03-19 Thread Justus Winter
Previously, the mach-defpager used a "magic typecast" for object lookups. It renamed the port to the address of the associated object, and upon receiving a message it would cast the port name back to a pointer. While this might seem like an optimization, it actually makes the port handling in the

[PATCH 1/2] xen: avoid use of uninitialized variable

2014-03-19 Thread Justus Winter
Found using the Clang Static Analyzer. * xen/console.c (hypputc): Initialize variable "complain". --- xen/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/console.c b/xen/console.c index 884376f..cb330b5 100644 --- a/xen/console.c +++ b/xen/console.c @@ -47,7 +47,

[PATCH 2/2] xen: fix error handling

2014-03-19 Thread Justus Winter
Previously, the error KERN_RESOURCE_SHORTAGE was not properly propagated. Found using the Clang Static Analyzer. * xen/block.c (device_open): Fix error handling, remove unused label. * xen/net.c (device_open): Likewise. --- xen/block.c | 5 ++--- xen/net.c | 5 ++--- 2 files changed, 4 inserti

[PATCH 1/3] ext2fs: remove inappropriate assertion

2014-03-20 Thread Justus Winter
find_block may very well return no error but set block to zero. This indicates that the block in question has not been allocated. Skip those blocks instead. * ext2fs/pager.c (file_pager_write_page): Skip unallocated blocks. --- ext2fs/pager.c | 6 -- 1 file changed, 4 insertions(+), 2 delet

[PATCH 2/3] isofs: also copy the terminating zero in read_symlink_hook

2014-03-20 Thread Justus Winter
* isofs/inode.c (read_symlink_hook): Use memcpy, also copy terminating zero. --- isofs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isofs/inode.c b/isofs/inode.c index f9d4c41..f542d18 100644 --- a/isofs/inode.c +++ b/isofs/inode.c @@ -492,7 +492,7 @@ read_disknode (

[PATCH 3/3] libdiskfs: fix string termination

2014-03-20 Thread Justus Winter
Found using the Clang Static Analyzer. * libdiskfs/fsys-getroot.c (diskfs_S_fsys_getroot): Fix string termination. --- libdiskfs/fsys-getroot.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c index 5212214..10793c8 10

various fixes

2014-03-20 Thread Justus Winter
Hi :) [PATCH 1/3] ext2fs: remove inappropriate assertion This is an rfc. I had a root fs die because this assertion failed, and from what I have seen it is not appropriate to assert (block) here. Then again, this pager business is all new to me and I'm not really sure if it is okay to skip bloc

Re: [GSOC] Porting Valgrind to Hurd

2014-03-20 Thread Justus Winter
Hi :) Quoting Samuel Thibault (2014-03-20 16:30:23) > Anybody knows about tracing the syscalls? > I don't see anything for that in the kernel. http://www.gnu.org/software/hurd/gnumach-doc/Syscall-Emulation.html Justus

Re: [GSOC] Porting Valgrind to Hurd

2014-03-20 Thread Justus Winter
Quoting Samuel Thibault (2014-03-20 23:25:40) > Justus Winter, le Thu 20 Mar 2014 18:27:58 +0100, a écrit : > > Quoting Samuel Thibault (2014-03-20 16:30:23) > > > Anybody knows about tracing the syscalls? > > > I don't see anything for that in the kernel. > >

libpager fixes

2014-03-21 Thread Justus Winter
Hi ;) I'm trying to find and fix a deadlock that could very well be in libpager. So I came up with this patch, analogous to 901c61a1d25e7c8963e51012760a82730eda1910. I'm not yet sure I found "my" deadlock, but not releasing this lock here could very well be problematic. I just want to mention t

[PATCH 1/2] libpager: fix comment of pager_change_attributes

2014-03-21 Thread Justus Winter
* libpager/pager-attr.c: Fix comment. * libpager/pager.h: Likewise. --- libpager/pager-attr.c | 6 +++--- libpager/pager.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libpager/pager-attr.c b/libpager/pager-attr.c index 7629f1d..47da12a 100644 --- a/libpager/page

[PATCH 2/2] libpager: fix potential deadlock

2014-03-21 Thread Justus Winter
This patch releases the interlock before doing an rpc call, analogous to 901c61a1d25e7c8963e51012760a82730eda1910. * libpager/pager-attr.c (pager_change_attributes): Release interlock before calling memory_object_change_attributes, to let the callbacks take it. --- libpager/pager-attr.c | 7 +

Re: libpager fixes

2014-03-21 Thread Justus Winter
Quoting Justus Winter (2014-03-21 13:57:51) > Hi ;) > > I'm trying to find and fix a deadlock that could very well be in > libpager. So I came up with this patch, analogous to > 901c61a1d25e7c8963e51012760a82730eda1910. I'm not yet sure I found > "my" dead

Re: [PATCH 2/3] isofs: also copy the terminating zero in read_symlink_hook

2014-03-25 Thread Justus Winter
Quoting Cyril Roelandt (2014-03-25 02:43:40) > On 03/20/2014 02:01 PM, Justus Winter wrote: > > * isofs/inode.c (read_symlink_hook): Use memcpy, also copy terminating > > zero. > > --- > > > Are you interested in getting rid of the outdated bcopy() ? I have g

Re: libpager fixes

2014-03-25 Thread Justus Winter
Quoting Samuel Thibault (2014-03-25 11:52:43) > Justus Winter, le Fri 21 Mar 2014 13:57:51 +0100, a écrit : > > I'm trying to find and fix a deadlock that could very well be in > > libpager. > > When do you get it? What effect does it have: just deadlock a process,

[PATCH] kern: fix formatting of multiboot modules

2014-03-25 Thread Justus Winter
Previously, bootstrap_create would print the multiboot modules with padding applied to the end of the line. As multiboot modules as used by the Hurd span more than one line. This makes the list of modules hard to read and it looks unclean, more like an accident. Furthermore, it is not clear what

Re: mounted volume information

2014-03-26 Thread Justus Winter
Quoting Riccardo Mottola (2014-03-26 11:19:32) > Hi, > > my volume saga continues. I did quite some work in the past two evenings. > > * I commented out the mounting of the second partition on /home in > /etc/fstab > * Afterwards I could end boot without problems. > * I setup network and upgrade

Re: mounted volume information

2014-03-27 Thread Justus Winter
Quoting Riccardo Mottola (2014-03-26 13:04:58) > Hi, > > Justus Winter wrote: > > df gets its data from /proc/mounts, so if you look there, you should > > see your "mounts". The reason our mount does not show those is that > > mount simply does not

[PATCH] Steal all string functions from the libc

2014-03-28 Thread Justus Winter
Steal all string functions previously implemented in kern/strings.c from the libc. Those are most likely more optimized than our simple implementations. * Makefile.am (clib_routines): Add memset, strcmp, strncmp, strcpy, strncpy, and strlen. * Makefrag.am (libkernel_a_SOURCES): Drop kern/strings.

axxxp - a field access profiler

2014-03-30 Thread Justus Winter
Hi :) I'd like to share a neat hack with you. It is a field access profiler that can be used on any program written in C (well, in theory at least). I wrote it so that I can use it on gnumach. I used it to come up with 322fa73afed84fe37fb7bfe0583109ff33eb26d7. http://darnassus.sceen.net/gitweb

portseal - tools to locate port management bugs

2014-03-30 Thread Justus Winter
Hi :) here is another prototype of mine, also employing a source-transformation, that can detect port leaks: allocated receive port 154 test-obj/test: leaked receive right 154 test-obj/test[0x8048c36] test-obj/test[0x8048dcc] /lib/i386-gnu/libc.so.0.3(__libc_start_main+0xbc)[0x10aa69c] test-obj/t

Re: problem on shut-down

2014-04-01 Thread Justus Winter
Quoting Riccardo Mottola (2014-04-01 09:24:21) > my box hangs when shutting down. When it comes to "stopping the internet > superdaemon inetd" it just hangs. :/ As a workaround, using {reboot,halt}-hurd is safe (filesystem-wise) even when using sysvinit. Using those commands avoids such problem

Re: problem on shut-down

2014-04-02 Thread Justus Winter
Quoting Riccardo Mottola (2014-04-02 10:42:37) > Justus Winter wrote: > > As a workaround, using {reboot,halt}-hurd is safe (filesystem-wise) > > even when using sysvinit. Using those commands avoids such problems. > I will try! > > > > Then again, you should try to

Re: problem on shut-down

2014-04-04 Thread Justus Winter
Hi Riccardo :) Quoting Riccardo Mottola (2014-04-04 03:37:23) > Hi, > > On 04/02/2014 02:20 PM, Justus Winter wrote: > > Ok, I installed openbsd-inetd and telnetd on a test vm. service > > {start,stop} openbsd-inetd work as expected. > it's not inetd. It actuall

Re: problem on shut-down

2014-04-04 Thread Justus Winter
Quoting Riccardo Mottola (2014-04-04 15:29:06) > >> >"sendisgs stop" > > sendsigs uses killall5 which has been proven to be problematic. In > > short it does something like 'pkill -SIGSTOP . ; pkill -SIGXXX .'. > > This is problematic for a multiserver OS like Hurd, because stopping > > vital syst

[PATCH 1/3] hurd: add a new type for the exec_startup protocol

2014-04-04 Thread Justus Winter
* hurd/hurd_types.defs (exec_startup_t): New type. * hurd/hurd_types.h (exec_startup_t): Likewise. * hurd/exec_startup.defs: Honor EXEC_STARTUP_IMPORTS. (exec_startup_get_info): Use the new type as receiver. --- hurd/exec_startup.defs | 6 +- hurd/hurd_types.defs | 12 hurd/hur

[PATCH 2/3] exec: fix receiver lookup

2014-04-04 Thread Justus Winter
ull +++ b/exec/mig-decls.h @@ -0,0 +1,40 @@ +/* + Copyright (C) 2014 Free Software Foundation, Inc. + Written by Justus Winter. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public Licen

[PATCH 3/3] libdiskfs: fix receiver lookup

2014-04-04 Thread Justus Winter
* libdiskfs/Makefile (exec_startup-MIGSFLAGS): New variable. * libdiskfs/diskfs.h (struct bootinfo): New struct declaration. (diskfs_begin_using_bootinfo_port): New function. (diskfs_end_using_bootinfo): Likewise. * libdiskfs/fsmutations.h: Add mutators for exec_startup_t. * libdiskfs/priv.h (booti

two build system issues

2014-04-05 Thread Justus Winter
Hi :) there are two build system issues that are driving me mad (well, the first one at least). buildbot@pluto:/home/pluto/hurd/build/build-deb$ make -C libdiskfs || echo $? 2 Yes, that's most helpful. Not. buildbot@pluto:/home/pluto/hurd/build/build-deb/libdiskfs$ rm demuxer.d buildbot@pluto:

[PATCH] include: make the notify_port_t types translation functions mutable

2014-04-05 Thread Justus Winter
Make the intran, outtran and destructor functions mutable using preprocessor macros. Make it possible to inject imports using the NOTIFY_IMPORTS macro. This way, userspace servers can provide their own translation functions. * include/mach/notify.defs: Honor NOTIFY_IMPORTS. (notify_port_t): Make

Re: two build system issues

2014-04-06 Thread Justus Winter
Quoting Samuel Thibault (2014-04-05 23:42:23) > Justus Winter, le Sat 05 Apr 2014 20:16:12 +0200, a écrit : > > buildbot@pluto:/home/pluto/hurd/build/build-deb$ make -C libdiskfs || echo > > $? > > 2 > > > > Yes, that's most helpful. Not. > > I

[PATCH] libports: fix notify_port_t receiver lookups

2014-04-06 Thread Justus Winter
@@ -0,0 +1,40 @@ +/* + Copyright (C) 2014 Free Software Foundation, Inc. + Written by Justus Winter. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by

innocent-looking patch that breaks oot-builds

2014-04-06 Thread Justus Winter
Hi, here is the innocent-looking patch that breaks out of tree builds. Any thoughts how to fix this? Justus

Re: two build system issues

2014-04-06 Thread Justus Winter
Quoting Ivan Shmakov (2014-04-06 11:15:06) > >>>>> Justus Winter <4win...@informatik.uni-hamburg.de> writes: > > > The second issue is due to me doing an out-of-tree build. That it > > currently works is more or less by chance I fear. I just came up

RFC: upstreaming debian/patches/exec_filename_* and the dde stuff

2014-04-06 Thread Justus Winter
Hi, I'd like to see more of the debian/patches merged, especially the exec_filename_* series. These patches cover a lot of files, and they often break and I have to amend them manually. More often than not the fix is trivial, but it is still a nuisance. I'd also like to see the dde stuff from t

Re: RFC: upstreaming debian/patches/exec_filename_* and the dde stuff

2014-04-06 Thread Justus Winter
Hi, Quoting Samuel Thibault (2014-04-06 21:25:42) > Justus Winter, le Sun 06 Apr 2014 19:58:45 +0200, a écrit : > > I'd like to see more of the debian/patches merged, especially the > > exec_filename_* series. > > The discussion about it with Roland was unfortuna

Re: RFC: upstreaming debian/patches/exec_filename_* and the dde stuff

2014-04-06 Thread Justus Winter
Quoting Emilio Pozuelo Monfort (2014-04-07 00:38:28) > On 07/04/14 00:26, Justus Winter wrote: > > Hi, > > > > Quoting Samuel Thibault (2014-04-06 21:25:42) > >> Justus Winter, le Sun 06 Apr 2014 19:58:45 +0200, a écrit : > >>> I'd like to see mo

Re: Upstreaming patches

2014-04-07 Thread Justus Winter
Quoting Samuel Thibault (2014-04-07 01:02:56) > > This has caused me so much pain. And I imagine it is even worse for > > new developers. > > I fully understand all that, it's not fun for me either, and I'd really > love to find the time to fix all that. But for now apparently only I > have take

[PATCH] libports: fix notify_port_t receiver lookups

2014-04-07 Thread Justus Winter
@@ -0,0 +1,40 @@ +/* + Copyright (C) 2014 Free Software Foundation, Inc. + Written by Justus Winter. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by

Please merge procfs into the Hurd repository

2014-04-07 Thread Justus Winter
Dear maintainer :) please merge procfs (found in [0]) into the main Hurd repository. 0: git://git.sv.gnu.org/hurd/procfs.git Rationale: The procfs translator provides a Linux-compatible /proc filesystem. While there is no standard that defines the /proc filesystem, a lot of software depends on

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