Re: GCC's -fsplit-stack disturbing Mach's vm_allocate

2014-04-11 Thread Samuel Thibault
Samuel Thibault, le Fri 11 Apr 2014 23:51:44 +0200, a écrit : > So, do we really want to let munmap poke a hole at address 0 and thus > let further vm_map() return address 0? i.e. we could apply this: diff --git a/sysdeps/mach/munmap.c b/sysdeps/mach/munmap.c index 57d99f9..a46e3f1 100644 --- a/s

Re: GCC's -fsplit-stack disturbing Mach's vm_allocate

2014-04-11 Thread Samuel Thibault
Thomas Schwinge, le Wed 09 Apr 2014 09:36:42 +0200, a écrit : > Well, the first step is to verify that TARGET_THREAD_SPLIT_STACK_OFFSET > and similar configury is correct for the Hurd, It's not. I've checked what TARGET_THREAD_SPLIT_STACK_OFFSET is, it's an offset inside the tcbhead_t structure,

Re: [PATCH 7/8] eth-filter: improve the demuxer function

2014-04-11 Thread Samuel Thibault
Justus Winter, le Fri 11 Apr 2014 23:09:57 +0200, a écrit : > 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

Re: [PATCH 8/8] eth-multiplexer: improve the demuxer function

2014-04-11 Thread Samuel Thibault
Justus Winter, le Fri 11 Apr 2014 23:09:58 +0200, a écrit : > 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

Re: [PATCH 6/8] libmachdev: improve the demuxer functions

2014-04-11 Thread Samuel Thibault
Justus Winter, le Fri 11 Apr 2014 23:09:56 +0200, a écrit : > 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

Re: [PATCH 5/8] devnode: improve the demuxer function

2014-04-11 Thread Samuel Thibault
Justus Winter, le Fri 11 Apr 2014 23:09:55 +0200, a écrit : > 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

Re: [PATCH 4/8] eth-multiplexer: fix argp_program_version, remove argp_program_bug_address

2014-04-11 Thread Samuel Thibault
Justus Winter, le Fri 11 Apr 2014 23:09:54 +0200, a écrit : > * eth-multiplexer/multiplexer.c: Fix argp_program_version, remove > argp_program_bug_address. Ack. > --- > eth-multiplexer/multiplexer.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/eth-multiplexer/mu

Re: [PATCH 3/8] eth-filter: fix argp_program_version, remove argp_program_bug_address

2014-04-11 Thread Samuel Thibault
Justus Winter, le Fri 11 Apr 2014 23:09:53 +0200, a écrit : > * eth-filter/filter.c: Fix argp_program_version, remove > argp_program_bug_address. Ack. > --- > eth-filter/filter.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/eth-filter/filter.c b/eth-filter/filte

Re: [PATCH 2/8] devnode: fix argp_program_version, remove argp_program_bug_address

2014-04-11 Thread Samuel Thibault
Justus Winter, le Fri 11 Apr 2014 23:09:52 +0200, a écrit : > * devnode/devnode.c: Fix argp_program_version, remove > argp_program_bug_address. Ack. > --- > devnode/devnode.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/devnode/devnode.c b/devnode/devnode.c > in

[PATCH 5/8] devnode: improve the demuxer function

2014-04-11 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

Re: [PATCH] include: fix the definition of device_open

2014-04-11 Thread Justus Winter
Quoting Samuel Thibault (2014-04-11 22:27:09) > Justus Winter, le Fri 11 Apr 2014 09:32:30 +0200, a écrit : > > Previously, every userspace server implementing the device protocol > > filtered the device definitions to replace the device_t type with > > mach_port_send_t to make the device argument

[PATCH 6/8] libmachdev: improve the demuxer functions

2014-04-11 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 8/8] eth-multiplexer: improve the demuxer function

2014-04-11 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 7/8] eth-filter: improve the demuxer function

2014-04-11 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 3/8] eth-filter: fix argp_program_version, remove argp_program_bug_address

2014-04-11 Thread Justus Winter
* eth-filter/filter.c: Fix argp_program_version, remove argp_program_bug_address. --- eth-filter/filter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eth-filter/filter.c b/eth-filter/filter.c index 8c76c7b..7a25c10 100644 --- a/eth-filter/filter.c +++ b/eth-filter/filt

[PATCH 4/8] eth-multiplexer: fix argp_program_version, remove argp_program_bug_address

2014-04-11 Thread Justus Winter
* eth-multiplexer/multiplexer.c: Fix argp_program_version, remove argp_program_bug_address. --- eth-multiplexer/multiplexer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eth-multiplexer/multiplexer.c b/eth-multiplexer/multiplexer.c index c36ab78..a133f45 100644 --- a/e

[PATCH 1/8] devnode: remove the ourdevice hack

2014-04-11 Thread Justus Winter
Previously, the device definitions were filtered using sed to replace the device_t type with mach_port_send_t to make the device argument of device_open polymorphic. Rather than doing that, which makes it impossible to use translation functions, the definition of device_open has been amended. * d

[PATCH 2/8] devnode: fix argp_program_version, remove argp_program_bug_address

2014-04-11 Thread Justus Winter
* devnode/devnode.c: Fix argp_program_version, remove argp_program_bug_address. --- devnode/devnode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devnode/devnode.c b/devnode/devnode.c index 101675d..dbbd40e 100644 --- a/devnode/devnode.c +++ b/devnode/devnode.c @@ -35,

Re: Hurd port for gcc go PATCH 7-9 (9)

2014-04-11 Thread Samuel Thibault
Svante Signell, le Fri 11 Apr 2014 14:57:35 +0200, a écrit : > --- a/src/libgo/mksysinfo.sh > +++ b/src/libgo/mksysinfo.sh Err, these seem to get applied to all systems, not just GNU/Hurd, isn't that a concern? > @@ -210,6 +210,11 @@ >egrep '#define E[A-Z0-9_]+ ' | \ >sed -e 's/^#define \

Re: Hurd port for gcc go PATCH 0-3 (9)

2014-04-11 Thread Samuel Thibault
Svante Signell, le Fri 11 Apr 2014 14:47:21 +0200, a écrit : > #ifdef TARGET_LIBC_PROVIDES_SSP > +/* i386 glibc provides __stack_chk_guard in %gs:0x14. */ > +#define TARGET_THREAD_SSP_OFFSET 0x14 Err, not the Hurd variant, no. Is it really needed? > @@ -682,7 +686,7 @@ > go_net_cgo_file =

Re: [PATCH] include: fix the definition of device_open

2014-04-11 Thread Samuel Thibault
Justus Winter, le Fri 11 Apr 2014 09:32:30 +0200, a écrit : > Previously, every userspace server implementing the device protocol > filtered the device definitions to replace the device_t type with > mach_port_send_t to make the device argument of device_open > polymorphic. Rather than doing that,

Re: [PATCH 1/6] eth-filter: fix receiver lookups

2014-04-11 Thread Samuel Thibault
Justus Winter, le Fri 11 Apr 2014 15:34:09 +0200, a écrit : > -DIST_FILES = ourdevice.defs notify.defs > +DIST_FILES = device.defs notify.defs Mmm, why keeping device.defs? Shouldn't we be using the one from gnumach? Samuel

Re: [PATCH 6/6] libmachdev: fix function declaration

2014-04-11 Thread Samuel Thibault
Justus Winter, le Fri 11 Apr 2014 15:34:14 +0200, a écrit : > * libmachdev/ds_routines.c: Include mig-generated device_S.h. > (ds_device_intr_register): Fix function declaration. Ack. > --- > libmachdev/ds_routines.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib

Re: Hurd support in libpcap

2014-04-11 Thread Samuel Thibault
Richard Braun, le Fri 11 Apr 2014 11:42:47 +0200, a écrit : > On Thu, Apr 10, 2014 at 02:01:17AM +0200, Richard Braun wrote: > > The first issue that can be noticed is that, despite the filter being > > filled with both NETF_IN and NETF_OUT, only incoming packets seem > > to be captured. This is pr

Re: problem on shut-down

2014-04-11 Thread Riccardo Mottola
Hi, Justus Winter wrote: appears to be something with my xinted/telnetd! Could you please specify which packages you are using? Debian has three telnetd packages, and I don't seem to be able to locate the xinetd package at all. Justus dpkg-query shows me: ii telnet

Re: Circular dependency with glibc libpthread libihash

2014-04-11 Thread Ludovic Courtès
Manolis Ragkousis skribis: > 0:00 Ludovic Courtès : >> >> Could you show what test tries to compile a program? (Send config.log.) >> > > Here it is Thanks. > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. > > It w

Re: Circular dependency with glibc libpthread libihash

2014-04-11 Thread Manolis Ragkousis
0:00 Ludovic Courtès : > > Could you show what test tries to compile a program? (Send config.log.) > Here it is This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GNU Hurd configure 0.5, which was genera

Re: Circular dependency with glibc libpthread libihash

2014-04-11 Thread Ludovic Courtès
Manolis Ragkousis skribis: > When libpthread tries to link against "libihash.so" I get the error: > > /lib/libihash.so: file not recognized: File format not recognized. > > This happens because libihash was built using the native compiler. > So I changed the flag in libihash configure to "--host"

Re: Cleaning up dde for the Hurd (was: Hurd support in libpcap)

2014-04-11 Thread Richard Braun
On Fri, Apr 11, 2014 at 03:13:02PM +0200, Justus Winter wrote: > This is most likely just an oversight. I started going over the dde > code. Zheng Da got lot's of little details wrong. This is not meant > to sound harsh, I'm full of respect that he got dde-based drivers > up and running during a

[PATCH 3/6] libmachdev: avoid doing pointer arithmetic to get the port_info

2014-04-11 Thread Justus Winter
Previously, mach_convert_port_to_device would return a pointer to struct emul_device, which is embedded in struct mach_device. In order to get to the port_info structure which is right before that, device_to_pi would subtract offsetof (struct mach_device, dev) from the pointer. Avoid that by maki

[PATCH 5/6] libmachdev: fix receiver lookups

2014-04-11 Thread Justus Winter
Previously, the device definitions were filtered using sed to replace the device_t type with mach_port_send_t to make the device argument of device_open polymorphic. Rather than doing that, which makes it impossible to use translation functions, the definition of device_open has been amended. * l

[PATCH 6/6] libmachdev: fix function declaration

2014-04-11 Thread Justus Winter
* libmachdev/ds_routines.c: Include mig-generated device_S.h. (ds_device_intr_register): Fix function declaration. --- libmachdev/ds_routines.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index e415cdb..bbf5488 100644 --

dde cleanups

2014-04-11 Thread Justus Winter
Here are some patches for the dde stuff currently residing in the incubator repo. Justus

[PATCH 1/6] eth-filter: fix receiver lookups

2014-04-11 Thread Justus Winter
Previously, the device definitions were filtered using sed to replace the device_t type with mach_port_send_t to make the device argument of device_open polymorphic. Rather than doing that, which makes it impossible to use translation functions, the definition of device_open has been amended. * e

[PATCH 2/6] eth-multiplexer: fix receiver lookups

2014-04-11 Thread Justus Winter
Previously, the device definitions were filtered using sed to replace the device_t type with mach_port_send_t to make the device argument of device_open polymorphic. Rather than doing that, which makes it impossible to use translation functions, the definition of device_open has been amended. * e

[PATCH 4/6] libmachdev: remove unused function

2014-04-11 Thread Justus Winter
* libmachdev/ds_routines.c (mach_device_reference): Remove unused function. --- libmachdev/ds_routines.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index a1fb058..66e5756 100644 --- a/libmachdev/ds_routines.c +++ b/libmachdev/ds_rou

Cleaning up dde for the Hurd (was: Hurd support in libpcap)

2014-04-11 Thread Justus Winter
Hi :) Quoting Richard Braun (2014-04-11 11:42:47) > On Thu, Apr 10, 2014 at 02:01:17AM +0200, Richard Braun wrote: > > The first issue that can be noticed is that, despite the filter being > > filled with both NETF_IN and NETF_OUT, only incoming packets seem > > to be captured. This is probably a

Hurd port for gcc go PATCH 7-9 (9)

2014-04-11 Thread Svante Signell
(continued) patch7.diff: src/libgo/go/syscall/wait.c Set WCONTINUED to zero if not defined (same fix as for lto in gcc-4.9) patch8.diff: src/libgo/mksysinfo.sh Add special treatment of EWOULDBLOCK, SYS_FCNTL and st_dev since they are either not defined or defined differently for the script to cat

Hurd port for gcc go PATCH 4-6 (9)

2014-04-11 Thread Svante Signell
(continued) patch4.diff: src/libgo/go/syscall/libcall_posix-1.go: New file, a copy of libcall_posix.go with the mount call removed. mount/umount functionality exists but is currently part of Hurd utilities. patch5.diff: src/libgo/go/net/sock_gnu.go Create a dummy function for maxListenerBacklog()

Re: GDB: "warning: Can't wait for pid ???: No child processes"

2014-04-11 Thread Thomas Schwinge
Hi! On Fri, 11 Apr 2014 20:18:19 +0800, Zhang Cong wrote: > On Wed, Apr 9, 2014 at 8:57 PM, Yue Lu wrote: > So, The question left is why the code was not merge to upstream, And if it > can do, many hurder will thank you. > > The upstream reject your patch? Not at all. It "just" needs to be

Hurd port for gcc go PATCH 0-3 (9)

2014-04-11 Thread Svante Signell
Hi, Attached are patches to enable gccgo to build properly on Debian GNU/Hurd on gcc-4.9 (4.9-20140406). With split stack disabled around 70 libgo tests PASS and 50 FAIL (result seems to be somewhat random, alignment problems there too?). With split stack enabled _all_ tests fail, see https://list

Re: GDB: "warning: Can't wait for pid ???: No child processes" (was: GNU accepted as a mentoring organization in GSOC 2014)

2014-04-11 Thread Zhang Cong
Hi, On Wed, Apr 9, 2014 at 8:57 PM, Yue Lu wrote: > > > > The reason is that the native _GDB_ doesn't work either on Hurd. So as > gdbserver. You can try to attach to a exist process by GDB, you will get > that warnning. In detail, there is no distinct difference between the > implementation of G

Re: Hurd support in libpcap

2014-04-11 Thread Richard Braun
On Thu, Apr 10, 2014 at 02:01:17AM +0200, Richard Braun wrote: > The first issue that can be noticed is that, despite the filter being > filled with both NETF_IN and NETF_OUT, only incoming packets seem > to be captured. This is probably a minor bug in libbpf but I didn't > investigate yet. The is

[PATCH] boot: remove the ourdevice hack

2014-04-11 Thread Justus Winter
Previously, the device definitions were filtered using sed to replace the device_t type with mach_port_send_t to make the device argument of device_open polymorphic. Rather than doing that, which makes it impossible to use translation functions, the definition of device_open has been amended. * b

[PATCH] include: fix the definition of device_open

2014-04-11 Thread Justus Winter
Previously, every userspace server implementing the device protocol filtered the device definitions to replace the device_t type with mach_port_send_t to make the device argument of device_open polymorphic. Rather than doing that, which makes it impossible to use translation functions, fix the def

Re: [PATCH 1/3] Add a new exec_exec_file_name RPC

2014-04-11 Thread Samuel Thibault
Hello, As a reminder, here is the issue: “ $ cat bar #!/bin/sh echo "\$0: $0" $ cat foo.c ... char *arg[] = { argv[1], NULL }; execv (*arg, arg); perror ("execv"); ... $ ./foo ./bar $0: ./bar $ ./foo bar $0: /dev/fd/3 Having /dev/fd/N in $0 instead of the real file name