[PATCH (hurd-web)] sidebar: don't collapse "Hurd" and (some of) "Mach"

2012-01-29 Thread Jeremie Koenig
Currently the "Hurd" and "Mach" entries of the sidebar are auto-collapsed when browsing the rest of the wiki. This is inconsistent with the rest of the sidebar, except for "MIG", which is under "Mach" and always visible. I think the following changes would make it more straightforward and consiste

Re: Interface for SCSI transactions ?

2011-08-30 Thread Jeremie Koenig
h are quite large). Keep in mind that qemu images can be sparse, so that the actual disk space they use will grow on demand. -- Jeremie Koenig http://jk.fr.eu.org

Re: [HURD PATCH 7/7] _hurd_exec_file_name: canonicalize filename

2011-08-21 Thread Jeremie Koenig
On Wed, Aug 17, 2011 at 09:35:32PM +0200, Jeremie Koenig wrote: > hurd/hurdexec.c (_hurd_exec_file_name): Canonicalize filename. Actually, there's an issue with this. Namely, when running shell scripts the canonical name is used instead of the one originally provided to _hurd_exec_f

[HURD PATCH 7/7] _hurd_exec_file_name: canonicalize filename

2011-08-17 Thread Jeremie Koenig
* hurd/hurdexec.c (_hurd_exec_file_name): Canonicalize filename. --- hurd/hurdexec.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c index c2f45cf..4a69df4 100644 --- a/hurd/hurdexec.c +++ b/hurd/hurdexec.c @@ -47,46

[HURD PATCH 6/7] Propagate _hurd_init_filename beyond dynamic loading

2011-08-17 Thread Jeremie Koenig
This is not strictly required to support $ORIGIN in RPATH, but the principle of least surprise would compel us not to leave a blanked out _hurd_init_filename after the dynamic loading phase. * hurd/hurdstartup.h (hurd_startup_data): Add a filename field. * hurd/hurdstartup.c (_hurd

[HURD PATCH 5/7] Hurd dl-origin.c: Use _hurd_init_filename if available

2011-08-17 Thread Jeremie Koenig
* sysdeps/mach/hurd/dl-origin.c (_dl_get_origin): Use _hurd_init_filename if LD_ORIGIN_PATH is not defined. --- sysdeps/mach/hurd/dl-origin.c | 33 + 1 files changed, 29 insertions(+), 4 deletions(-) diff --git a/sysdeps/mach/hurd/dl-origin.c b/sy

[HURD PATCH 3/7] Hurd startup: fetch the exec filename using exec_startup_get_info_2

2011-08-17 Thread Jeremie Koenig
* hurd/hurd.h (_hurd_init_filename): Declare new variable. * hurd/hurdstartup.c (_hurd_init_filename): Define. (_hurd_startup): Use exec_startup_get_info_2 if available, to fetch _hurd_init_filename. * sysdeps/mach/hurd/configure.in: Check for exec_startup_ge

[HURD PATCH 4/7] Hurd dl-origin.c: start with a copy of elf/dl-origin.c

2011-08-17 Thread Jeremie Koenig
* sysdeps/mach/hurd/dl-origin.c: New file, copy elf/dl-origin.c. --- sysdeps/mach/hurd/dl-origin.c | 51 + 1 files changed, 51 insertions(+), 0 deletions(-) create mode 100644 sysdeps/mach/hurd/dl-origin.c diff --git a/sysdeps/mach/hurd/dl-origin

[HURD PATCH 1/7] Use the new file_exec_file_name RPC

2011-08-17 Thread Jeremie Koenig
/hurd/spawni.c: Likewise. Signed-off-by: Jeremie Koenig --- hurd/Versions |3 ++ hurd/hurd.h | 14 -- hurd/hurdexec.c | 52 ++--- sysdeps/mach/hurd/execve.c |6 +++- sysdeps/mach/hurd/fexecve.c |7

[HURD PATCH 2/7] Add check for file_exec_file_name

2011-08-17 Thread Jeremie Koenig
From: Emilio Pozuelo Monfort * aclocal.m4: Define AC_CHECK_MIG_FUNC. * sysdeps/mach/hurd/configure.in: Use it for file_exec_file_name. Signed-off-by: Jeremie Koenig --- aclocal.m4 | 17 + sysdeps/mach/hurd/configure.in |3 +++ 2 files

[HURD PATCH 0/7] $ORIGIN substitution in RPATH

2011-08-17 Thread Jeremie Koenig
k for file_exec_file_name Jeremie Koenig (5): Hurd startup: fetch the exec filename using exec_startup_get_info_2 Hurd dl-origin.c: start with a copy of elf/dl-origin.c Hurd dl-origin.c: Use _hurd_init_filename if available Propagate _hurd_init_filename beyond dynamic loading _hurd_exec_file

[PATCH 2/4] Add a file_exec_file_name RPC

2011-08-17 Thread Jeremie Koenig
-by: Jeremie Koenig --- TODO |2 +- doc/hurd.texi | 16 exec/hashexec.c | 32 ++ hurd/fs.defs | 28 +++-- hurd/hurd_types.h |9 ++-- init/init.c

[PATCH 4/4] Make the exec filename available at exec_startup time

2011-08-17 Thread Jeremie Koenig
* hurd/exec_startup.defs (exec_startup_get_info_2): Define a new version of exec_startup_get_info to get the executable filename. (exec_startup_get_info): Mark as deprecated. * exec/priv.h (struct bootinfo): Add a filename field. * exec/exec.c (do_exec): Fill it in. (S_exec_startup_get_info): Mark

[PATCH 3/4] Use the new _hurd_exec_file_name function

2011-08-17 Thread Jeremie Koenig
From: Emilio Pozuelo Monfort * configure.in: Check for _hurd_exec_file_name. * utils/fakeauth.c: Call _hurd_exec_file_name instead of _hurd_exec if it's available. * utils/rpctrace.c: Likewise. * utils/shd.c: Likewise. Signed-off-by: Jeremie Koenig --- configure.in |4 ++--

[PATCH 1/4] Add a new exec_exec_file_name RPC

2011-08-17 Thread Jeremie Koenig
argument. Don't guess the file name if file_name_exec is set. * exec/priv.h (check_hashbang): Add argument. Signed-off-by: Jeremie Koenig --- doc/hurd.texi |8 exec/exec.c | 50 +- exec/hashexec.c | 18 --

[PATCH 0/4] $ORIGIN substitution in RPATH

2011-08-17 Thread Jeremie Koenig
PC Add a file_exec_file_name RPC Use the new _hurd_exec_file_name function Jeremie Koenig (1): Make the exec filename available at exec_startup time TODO |2 +- configure.in |4 +- doc/hurd.texi | 22 +- e

Re: [PATCH 11/15] Hurd signals: fix sigwait() for global signals

2011-07-19 Thread Jeremie Koenig
On Sun, Jul 03, 2011 at 02:32:00AM +0200, Samuel Thibault wrote: > Jeremie Koenig, le Wed 29 Jun 2011 18:30:23 +0200, a écrit : > > * sysdeps/mach/hurd/sigwait.c (__sigwait): Change the blocking mask > > temporarily so that we catch global as well as thread-specific signals. &g

Re: [PATCH 09/15] Hurd signals: implement global signal dispositions

2011-07-19 Thread Jeremie Koenig
On Wed, Jul 06, 2011 at 01:09:27AM +0200, Samuel Thibault wrote: > Jeremie Koenig, le Tue 05 Jul 2011 05:15:28 +0200, a écrit : > > I was worried about a case where the user would install a minuscule > > stack, sufficient for their own handler, but not for a preemptor's one

Re: [PATCH 15/15] Hurd signals: Use POSIX sigcodes

2011-07-19 Thread Jeremie Koenig
On Thu, Jun 30, 2011 at 12:27:51AM +0200, Samuel Thibault wrote: > Jeremie Koenig, le Wed 29 Jun 2011 18:30:27 +0200, a écrit : > > * sysdeps/mach/hurd/i386/bits/sigcontext.h: Remove the constants formerly > > used as sigcodes. > > I don't think you can do that. I'

Re: [PATCH 14/15] Hurd signals: SA_SIGINFO support

2011-07-19 Thread Jeremie Koenig
On Sun, Jul 03, 2011 at 02:55:06AM +0200, Samuel Thibault wrote: > Jeremie Koenig, le Wed 29 Jun 2011 18:30:26 +0200, a écrit : > > + uc->uc_sigmask = sc->sc_mask; > > + uc->uc_stack.ss_sp = (__ptr_t) sc->sc_esp; > > + uc->uc_stack.ss_size = 0; >

Re: [PATCH 09/15] Hurd signals: implement global signal dispositions

2011-07-04 Thread Jeremie Koenig
On Sun, Jul 03, 2011 at 02:16:34AM +0200, Samuel Thibault wrote: > Jeremie Koenig, le Wed 29 Jun 2011 18:30:21 +0200, a écrit : > > +sigstate_is_global_rcv (const struct hurd_sigstate *ss) > > +_hurd_sigstate_lock (struct hurd_sigstate *ss) > > +_hurd_sigstate_unlock (str

Re: [PATCH 04/15] Hurd signals: refactor check_pending_signals

2011-07-03 Thread Jeremie Koenig
On Sun, Jul 03, 2011 at 09:30:01PM +0200, Jeremie Koenig wrote: > | if (act != ignore && /* Signals ignored now are forgotten now. > */ > | __sigismember (&ss->blocked, signo) || > | (signo != SIGKILL && _hurd_stopped)) > | { &g

Re: [PATCH 04/15] Hurd signals: refactor check_pending_signals

2011-07-03 Thread Jeremie Koenig
Hi, thanks for your thorough review. On Sun, Jul 03, 2011 at 12:34:22AM +0200, Samuel Thibault wrote: > Jeremie Koenig, le Wed 29 Jun 2011 18:30:16 +0200, a écrit : > > * hurd/hurdsig.c (check_pending_signals): Split into pending_signals, > > post_pending and post_all_

[PATCH 12/15] Hurd signals: fix global untraced signals.

2011-06-29 Thread Jeremie Koenig
Delivering global signals by making them temporarily pending in the global mask looses their untracedness status, so we need to deliver them directly whenever we can. * hurd/hurdsig.c (post_signal): Attempt to find a receiver thread right away for global signals. --- hurd/hurdsig.c | 46 +++

[PATCH 07/15] Hurd signals: fix uninitialized value.

2011-06-29 Thread Jeremie Koenig
* hurd/hurdsig.c (post_signal): Don't call resume() with ACT uninitialized, as it might result in the target thread being left suspended. --- hurd/hurdsig.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index 0ec0f27..74a01a6 100644

[PATCH 10/15] Hurd signals: provide a sigstate destructor

2011-06-29 Thread Jeremie Koenig
We can no longer afford to keep stale sigstate structures in the _hurd_sigstates list if some of them are marked as global receivers, otherwise we might try to use them to deliver signals. * hurd/hurdsig.c (_hurd_sigstate_delete): New function. Remove a sigstate from the list and release its memor

[PATCH 02/15] _hurd_internal_post_signal: Scope variables more restrictively

2011-06-29 Thread Jeremie Koenig
* hurd/hurdsig.c (_hurd_internal_post_signal): Move the variable declarations into the first-level inner functions which actually use them. --- hurd/hurdsig.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index 63418ea..320cb

[PATCH 00/15] Hurd signals: please review

2011-06-29 Thread Jeremie Koenig
Hi, I believe my signal-related series of patches for Hurd are mature enough to be reviewed and considered for inclusion. They are relatively complicated and I understand the review could take a while. It would be useful, however, if we could agree in principle on the public interfaces they intro

[PATCH 15/15] Hurd signals: Use POSIX sigcodes

2011-06-29 Thread Jeremie Koenig
* sysdeps/mach/hurd/i386/bits/sigcontext.h: Remove the constants formerly used as sigcodes. * manual/signal.texi: "GNU systems" no longer use them. * hurd/hurdinit.c (_hurd_new_proc_init): Use sigcode TRAP_TRACE for SIGTRAP on exec. * sysdeps/mach/hurd/i386/exc2signal.c (_hurd_exception2signal): Us

[PATCH 09/15] Hurd signals: implement global signal dispositions

2011-06-29 Thread Jeremie Koenig
Currently each thread has a full "sigstate" structure which keeps track of the signal dispositions, blocking mask and pending signals for this thread. Process-wide signals are delivered to the main thread. However, the semantics for POSIX threads is that all of them share the same signal dispositi

[PATCH 03/15] _hurd_internal_post_signal: Split out inner functions

2011-06-29 Thread Jeremie Koenig
By having post_signal and check_pending_signal as top-level functions, the way they communicate with the outside is made more transparent. * hurd/hurdsig.c (_hurd_internal_post_signal): Make post_signal and check_pending_signal top-level static helper functions. (check_pending_signal): Fix the gen

[PATCH 04/15] Hurd signals: refactor check_pending_signals

2011-06-29 Thread Jeremie Koenig
* hurd/hurdsig.c (check_pending_signals): Split into pending_signals, post_pending and post_all_pending_signals. (_hurd_internal_post_signal): Handle the distinction between poll requests and real signals there. --- hurd/hurdsig.c | 134 +--- 1

[PATCH 13/15] Hurd signals: Copy bits/sigaction.h

2011-06-29 Thread Jeremie Koenig
* sysdeps/mach/hurd/bits/sigaction.h: New file, start with a copy of bits/sigaction.h. --- sysdeps/mach/hurd/bits/sigaction.h | 78 1 files changed, 78 insertions(+), 0 deletions(-) create mode 100644 sysdeps/mach/hurd/bits/sigaction.h diff --git a/sysdeps/

[PATCH 14/15] Hurd signals: SA_SIGINFO support

2011-06-29 Thread Jeremie Koenig
Based on a preliminary patch by Samuel Thibault. * sysdeps/mach/hurd/bits/sigaction.h: Define SA_SIGINFO. * sysdeps/mach/hurd/i386/trampoline.c (fill_siginfo): New function, fill in a siginfo_t structure. (fill_ucontext): New function, fill in a ucontext_t structure. (_hurd_setup_sighandler): Add

[PATCH 06/15] Hurd signals: make sigsuspend POSIX-conformant.

2011-06-29 Thread Jeremie Koenig
* hurd/hurdsig.c (wake_sigsuspend): New function. (post_signal): wake up sigsuspend calls in the "handle" case. (post_signals): no longer wake up sigsuspend calls indiscriminately. --- hurd/hurdsig.c | 46 -- 1 files changed, 28 insertions(+), 18 delet

[PATCH 01/15] _hurd_internal_post_signal: Split into more functions

2011-06-29 Thread Jeremie Koenig
* hurd/hurdsig.c (_hurd_internal_post_signal): Use inner functions instead of gotos for the overall flow control. This patch should change nothing besides replacing gotos with function calls and return statements. Note that the "signo == 0" test at the beginning of post_signal, is now done on eve

[PATCH 05/15] Hurd signals: reindent

2011-06-29 Thread Jeremie Koenig
* hurd/hurdsig.c (post_pending): reindent. --- hurd/hurdsig.c | 64 1 files changed, 32 insertions(+), 32 deletions(-) diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index 2715d37..c8cae6a 100644 --- a/hurd/hurdsig.c +++ b/hurd/hurdsig.c @@

[PATCH 11/15] Hurd signals: fix sigwait() for global signals

2011-06-29 Thread Jeremie Koenig
* sysdeps/mach/hurd/sigwait.c (__sigwait): Change the blocking mask temporarily so that we catch global as well as thread-specific signals. --- sysdeps/mach/hurd/sigwait.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sysdeps/mach/hurd/sigwait.c b/sysdeps/mach

[PATCH 08/15] Versions.def: add GLIBC_2.15

2011-06-29 Thread Jeremie Koenig
* Versions.def: add GLIBC_2.15 --- Versions.def |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Versions.def b/Versions.def index 666ea73..98c2800 100644 --- a/Versions.def +++ b/Versions.def @@ -31,6 +31,7 @@ libc { GLIBC_2.12 GLIBC_2.13 GLIBC_2.14 + GLIBC_2.15

Re: [PATCH 0/8] Hurd signal code improvements

2011-06-13 Thread Jeremie Koenig
On Wed, May 25, 2011 at 11:10:43PM +, Jérémie Koenig wrote: > On Wed, May 25, 2011 at 3:59 PM, Jeremie Koenig wrote: > > If you would like to test these patches, I have built > > glibc and hurd (for libpthread) Debian packages with these changes, > > which are avail

exec server, /dev/fd/N, RPATH and $ORIGIN

2011-06-09 Thread Jeremie Koenig
file_name in > hurdexec.c. What's the status on this? Currently ld.so's expansion of $ORIGIN in RPATH does not work unless the LD_ORIGIN_PATH environment variable is set, and we need to know the executable's file name to implement it. Emilio's patches are probably a good starti

[PATCH 3/8] _hurd_internal_post_signal: Split out inner functions

2011-05-25 Thread Jeremie Koenig
By having post_signal and check_pending_signal as top-level functions, the way they communicate with the outside is made more transparent. * hurd/hurdsig.c (_hurd_internal_post_signal): Make post_signal and check_pending_signal top-level static helper functions. (check_pending_signal): Fix the gen

[PATCH 0/8] Hurd signal code improvements

2011-05-25 Thread Jeremie Koenig
Hurd [1]. I have assigned copyright to the FSF for past and future changes to both glibc and hurd. [1] See http://www.bddebian.com/~hurd-web/user/jkoenig/java. Jeremie Koenig (8): _hurd_internal_post_signal: Split into more functions _hurd_internal_post_signal: Scope variables more restricti

[PATCH 2/8] _hurd_internal_post_signal: Scope variables more restrictively

2011-05-25 Thread Jeremie Koenig
* hurd/hurdsig.c (_hurd_internal_post_signal): Move the variable declarations into the first-level inner functions which actually use them. --- hurd/hurdsig.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index c139805..0ea78

[PATCH 6/8] Hurd signals: make sigsuspend POSIX-conformant.

2011-05-25 Thread Jeremie Koenig
* hurd/hurdsig.c (wake_sigsuspend): New function. (post_signal): wake up sigsuspend calls in the "handle" case. (post_signals): no longer wake up sigsuspend calls indiscriminately. --- hurd/hurdsig.c | 46 -- 1 files changed, 28 insertions(+), 18 delet

[PATCH 5/8] Hurd signals: reindent

2011-05-25 Thread Jeremie Koenig
* hurd/hurdsig.c (post_pending): reindent. --- hurd/hurdsig.c | 66 1 files changed, 33 insertions(+), 33 deletions(-) diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index 6923c87..234da1e 100644 --- a/hurd/hurdsig.c +++ b/hurd/hurdsig.c @@

[PATCH 4/8] Hurd signal cleanup: refactor check_pending_signals

2011-05-25 Thread Jeremie Koenig
* hurd/hurdsig.c (check_pending_signals): Split into pending_signals, post_pending and post_all_pending_signals. (_hurd_internal_post_signal): Handle the distinction between poll requests and real signals there. --- hurd/hurdsig.c | 134 +--- 1

[PATCH 1/8] _hurd_internal_post_signal: Split into more functions

2011-05-25 Thread Jeremie Koenig
* hurd/hurdsig.c (_hurd_internal_post_signal): Use inner functions instead of gotos for the overall flow control. This patch should change nothing besides replacing gotos with function calls and return statements. Note that the "signo == 0" test at the beginning of post_signal, is now done on eve

[PATCH 7/8] Hurd signals: fix uninitialized value.

2011-05-25 Thread Jeremie Koenig
* hurd/hurdsig.c (post_signal): Don't call resume() with ACT uninitialized, as it might result in the target thread being left suspended. --- hurd/hurdsig.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index b6fbb14..75d60b0 100644

[PATCH] Hurd libpthread changes for global signal dispositions

2011-05-25 Thread Jeremie Koenig
This patch against Hurd's libpthread "activates" global signal dispositions for newly created threads, if glibc supports it. I'll submit a pkg-hurd version (which also updates libpthread_sigmask.patch) to debian-hurd right away. Jeremie Koenig (1): Mark new threads as glo

[PATCH] Mark new threads as global signal receivers

2011-05-25 Thread Jeremie Koenig
* sysdeps/mach/hurd/pt-sigstate-init.c (__pthread_sigstate_init): Call _hurd_sigstate_set_global_rcv for newly created threads. Declare it as a weak symbol so that we stay compatible with previous glibc versions. --- sysdeps/mach/hurd/pt-sigstate-init.c | 20 +++- 1 files c

Re: New procfs implementation

2010-09-04 Thread Jeremie Koenig
On Sat, Sep 04, 2010 at 05:10:04PM +0200, Samuel Thibault wrote: > Jeremie Koenig, le Sat 04 Sep 2010 01:07:21 +0200, a écrit : > > How about "--default-owner" or "--default-uid" ? > > "default" could imply that it's used for much more cases th

Re: New procfs implementation

2010-09-03 Thread Jeremie Koenig
understood as "anybody can read it, that's fine", it > should probably be called for instance "unknown-user", as it belongs > to somebody, we just don't know whom. How about "--default-owner" or "--default-uid" ? -- Jeremie Koenig http://jk.fr.eu.org

Re: Problems with signal delivery

2010-09-03 Thread Jeremie Koenig
ould include the initial one and those created through pthread_create(). They would also need to have a common set of signal handlers. I'll try to come up with a patch this week-end. -- Jeremie Koenig http://jk.fr.eu.org

Re: [PATCH] Deliver pending signals unblocked by pthread_sigmask.

2010-09-02 Thread Jeremie Koenig
On Fri, Sep 03, 2010 at 02:14:30AM +0200, Samuel Thibault wrote: > Jeremie Koenig, le Fri 03 Sep 2010 01:38:29 +0200, a écrit : > > + pending = ss->pending & ~ss->blocked; > > + > >__pthread_spin_unlock (&ss->lock); > > > > + if (! err &a

Re: Problems with signal delivery

2010-09-02 Thread Jeremie Koenig
On Thu, Sep 02, 2010 at 05:15:04PM +0200, Jeremie Koenig wrote: > Needs a second signal: > $ ./testsigthread > *kill* > Unblocking now. > *nothing happens, re-kill* > Got it! > Got it! So this is a problem with libpthread rather than glibc (sigprocmask handles this correctly)

Re: Problems with signal delivery

2010-09-02 Thread Jeremie Koenig
on these Hurd semantics, and that therefore we should not try to change them to match POSIX, except maybe when the pthread functions are used? -- Jeremie Koenig http://jk.fr.eu.org

[PATCH] Deliver pending signals unblocked by pthread_sigmask.

2010-09-02 Thread Jeremie Koenig
* sysdeps/mach/hurd/pt-sigstate.c (__pthread_sigstate): Wake up the message thread if any pending signals have been unblocked (code grabbed from glibc). --- sysdeps/mach/hurd/pt-sigstate.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/sysdeps/mach/hurd/pt-sigstat

Problems with signal delivery

2010-09-02 Thread Jeremie Koenig
ll* Got it! Needs a second signal: $ ./testsigthread *kill* Unblocking now. *nothing happens, re-kill* Got it! Got it! Separate thread: $ ./testsigthread x Unblocking now. *kill* (hangs forever) $ ./testsigthread x *kill* Unblocking now. (hangs forever) -- Jeremie Koenig http://jk.fr.eu.o

Re: New procfs implementation

2010-09-01 Thread Jeremie Koenig
dy done in libnetfs; if some are missing I guess it would be better to add them there. (As for read()-ing directories, it's allowed by ext2fs too so I figured it would be okay.) > rootdir.c: you have #define KERNEL_PID 2 while it was made a translator > parameter in main.c, is it on purpose? If so, it's probably worth > documenting. It's not really on purpose (it was initially INIT_PID and used for uptime only). Changed (7f3a812). Thanks for your comments, -- Jeremie Koenig http://jk.fr.eu.org

New procfs implementation

2010-08-30 Thread Jeremie Koenig
busybox and htop. It seems to be stable, not too slow, and it stays under 1.5M in resident size. - How you can try it out If you already have a hurd git clone, you can grab the branch with these commands: $ git remote add jk git://github.com/jeremie-koenig/hurd.git $ git fetch jk $ git

[PATCH 2/4] libps (_proc_stat_free): Fix memory leak

2010-08-25 Thread Jeremie Koenig
The thread_waits field was never freed; this change adds the code to do so if the corresponding flag is set. Users are also warned of the consequences, namely, that they should not free process proc_stats before all their associated thread ones are gone, since the latter may reference the former's

[PATCH 4/4] libps (proc_stat_set_flags): Fix pointer signedness warning

2010-08-25 Thread Jeremie Koenig
--- libps/procstat.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libps/procstat.c b/libps/procstat.c index 13f1829..6e920f4 100644 --- a/libps/procstat.c +++ b/libps/procstat.c @@ -961,7 +961,7 @@ proc_stat_set_flags (struct proc_stat *ps, ps_flags_t flags) when

[PATCH 3/4] libps (fetch_procinfo): Fix non-set flag PSTAT_TASK_EVENTS

2010-08-25 Thread Jeremie Koenig
The fetch_procinfo function failed to set the PSTAT_TASK_EVENTS when those has been retreived. It should be noted that GNU Mach does not support the TASK_EVENTS_INFO flavor, so this is of minor importance. The new code also checks that all the requested proc server flags related to a given proc_st

[PATCH 1/4] libps (_proc_stat_free): Fix deadly typo

2010-08-25 Thread Jeremie Koenig
PSTAT_PROCINFO is a set of flags, some of which can be obtained in alternative ways. In this case, _proc_stat_free will try to deallocate an uninitialised field. PSTAT_PROC_INFO is the flag we want. --- libps/procstat.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libp

Patches for libps

2010-08-25 Thread Jeremie Koenig
Hi, these patches fix a few issues with libps which I have come across while rewriting procfs (in good shape, coming soon!) [PATCH 1/4] libps (_proc_stat_free): Fix deadly typo [PATCH 2/4] libps (_proc_stat_free): Fix memory leak These two should probably be applied. This one fixes an error whi

Re: unsubscribe

2010-08-18 Thread Jeremie Koenig
I am already unsubscripted. I get this: This is bug-hurd@gnu.org, not debian-h...@lists.debian.org. You can unsubscribe at http://lists.gnu.org/mailman/listinfo/bug-hurd. Hope this helps, -- Jeremie Koenig http://jk.fr.eu.org

Re: [PATCH 1/4] Fix /proc/*/cmdline.

2010-08-18 Thread Jeremie Koenig
Hi Samuel, thanks for the review. On Wed, Aug 18, 2010 at 01:22:03AM +0200, Samuel Thibault wrote: > Jeremie Koenig, le Fri 13 Aug 2010 19:05:12 +0200, a écrit : > > On Linux, /proc//cmdline is a NUL-separated list of arguments. > > We used to truncate after the first o

Re: [PATCH 4/5] Implement /proc/cmdline as a symlinks to 2/cmdline

2010-08-18 Thread Jeremie Koenig
On Wed, Aug 18, 2010 at 01:34:49AM +0200, Samuel Thibault wrote: > Jeremie Koenig, le Mon 16 Aug 2010 13:36:51 +0200, a écrit : > > This is not perfect, as the format of > > /proc/cmdline and /proc/*/cmdline are different on Linux. Namely, the > > latter includes NUL bytes t

[PATCH 5/7] Makeconf: simplify the directory logic

2010-08-16 Thread Jeremie Koenig
) hack with a (hopefully) simpler one. Also, include paths are moved after the extra definitions so that the latter are grouped with the ones from config.make (this is purely cosmetic). Signed-off-by: Jeremie Koenig --- Makeconf | 67

[PATCH 6/7] Makeconf: let config.make define $(configured)

2010-08-16 Thread Jeremie Koenig
Replaces the convoluted attempts at detecting whether config.make was found in Makeconf by a simple definition in config.make itself. Signed-off-by: Jeremie Koenig --- Makeconf |8 ++-- config.make.in |3 +++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a

[PATCH 1/7] Fix the build system to handle part stores

2010-08-16 Thread Jeremie Koenig
ARTED_LIBS) to static binaries which use libstore_part.a. * libstore/Makefile: include the 'part' store type when appropriate, remove the previous attempt. Signed-off-by: Jeremie Koenig --- Makeconf |4 +++- configure.in | 33 + libs

[PATCH 7/7] Makeconf: simplify the decoding of $(makemode)

2010-08-16 Thread Jeremie Koenig
* Remove the mostly unused $(doinst). * Set $(installationdir) directly rather than through $(makemode-instdir). * Reorganize the logic to be more straightforward. Signed-off-by: Jeremie Koenig --- Makeconf | 89 +- 1 files changed

[PATCH 2/7] Fix the way FOOFLAGS is handled

2010-08-16 Thread Jeremie Koenig
lication which still happens when building the Debian package is the combined result of dpkg-buildpackage and cdbs and is not related to any of this. Signed-off-by: Jeremie Koenig --- Makeconf| 13 ++--- config.make.in | 14 -- configure.in

Build system improvements

2010-08-16 Thread Jeremie Koenig
Hello, me again, these patches are related to the build system. The first three actually have an effect: [PATCH 1/7] Fix the build system to handle part stores [PATCH 2/7] Fix the way FOOFLAGS is handled [PATCH 3/7] Update ./configure (you may want to do this yourself) The latter ones are cleanu

[PATCH 4/7] Makeconf: remove redundant $($*-FOOFLAGS)

2010-08-16 Thread Jeremie Koenig
The target-specific $($*-CFLAGS) and $($*-CPPFLAGS) are already embedded into $(CFLAGS) and $(CPPFLAGS), so it's not necessary to add them at the usage site. Signed-off-by: Jeremie Koenig --- Makeconf |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makec

[PATCH 2/5] update_pid_entries(): fix awkwardly indented uninitialized memory leak

2010-08-16 Thread Jeremie Koenig
Signed-off-by: Jeremie Koenig --- procfs_pid_files.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/procfs_pid_files.c b/procfs_pid_files.c index 9dbe3eb..3008145 100644 --- a/procfs_pid_files.c +++ b/procfs_pid_files.c @@ -46,14 +46,12 @@ update_pid_entries

[PATCH 4/5] Implement /proc/cmdline as a symlinks to 2/cmdline

2010-08-16 Thread Jeremie Koenig
Process 2 is usually gnumach. This is not perfect, as the format of /proc/cmdline and /proc/*/cmdline are different on Linux. Namely, the latter includes NUL bytes to separate subsequent arguments, while the former contains only spaces and a trailing newline. Signed-off-by: Jeremie Koenig

[PATCH 3/5] Set an appropriate st_mode on symlinks

2010-08-16 Thread Jeremie Koenig
Signed-off-by: Jeremie Koenig --- procfs_pid_files.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/procfs_pid_files.c b/procfs_pid_files.c index 3008145..e2ad2fd 100644 --- a/procfs_pid_files.c +++ b/procfs_pid_files.c @@ -49,7 +49,16 @@ update_pid_entries

[PATCH 5/5] Implement /proc/mounts as a symlink to /etc/mtab

2010-08-16 Thread Jeremie Koenig
manage the mtab in d-i. Signed-off-by: Jeremie Koenig --- procfs_dir.c |3 +++ procfs_nonpid_files.c | 13 + 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/procfs_dir.c b/procfs_dir.c index 598b2e3..f99f402 100644 --- a/procfs_dir.c +++ b/procfs_dir.c

[PATCH 1/5] Fix /proc/*/cmdline

2010-08-16 Thread Jeremie Koenig
On Linux, /proc//cmdline is a NUL-separated list of arguments. We used to truncate after the first one and add some whitespace. Signed-off-by: Jeremie Koenig --- procfs_pid_files.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/procfs_pid_files.c b

Updated procfs series

2010-08-16 Thread Jeremie Koenig
Hi, here comes the latest (hopefully final) version of my procfs series. Changes: * fix the typo; * split the last patch in two. Could someone consider you merge this?

Re: [PATCH 3/4] Set an appropriate st_mode on symlinks.

2010-08-15 Thread Jeremie Koenig
On Fri, Aug 13, 2010 at 07:05:14PM +0200, Jeremie Koenig wrote: > + stat.st_size = strlen (symlink_target) : 0; whoops -- Jeremie Koenig http://jk.fr.eu.org

Re: [PATCH 1/2] Fix /proc/*/cmdline.

2010-08-13 Thread Jeremie Koenig
fix/refactor stuff as I go. This being said, here comes the new series. -- Jeremie Koenig http://jk.fr.eu.org

[PATCH 3/4] Set an appropriate st_mode on symlinks.

2010-08-13 Thread Jeremie Koenig
--- procfs_pid_files.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/procfs_pid_files.c b/procfs_pid_files.c index 3008145..548497c 100644 --- a/procfs_pid_files.c +++ b/procfs_pid_files.c @@ -49,7 +49,16 @@ update_pid_entries (struct procfs_dir *dir, const ch

[PATCH 4/4] Implement /proc/cmdline and /proc/mounts as symlinks.

2010-08-13 Thread Jeremie Koenig
* /proc/cmdline -> /proc/2/cmdline (process 2 is usually gnumach) This is not perfect, as the format of /proc/cmdline and /proc/*/cmdline are different on Linux. Namely, the latter includes NUL bytes to separate subsequent arguments, while the former contains only spaces and a trailing ne

[PATCH 2/4] update_pid_entries(): fix awkwardly indented uninitialized memory leak

2010-08-13 Thread Jeremie Koenig
--- procfs_pid_files.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/procfs_pid_files.c b/procfs_pid_files.c index 9dbe3eb..3008145 100644 --- a/procfs_pid_files.c +++ b/procfs_pid_files.c @@ -46,14 +46,12 @@ update_pid_entries (struct procfs_dir *dir, const cha

[PATCH 1/4] Fix /proc/*/cmdline.

2010-08-13 Thread Jeremie Koenig
On Linux, /proc//cmdline is a NUL-separated list of arguments. We used to truncate after the first one and add some whitespace. --- procfs_pid_files.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/procfs_pid_files.c b/procfs_pid_files.c index 4686153..9d

Re: [PATCH 2/2] Implement some (global) symlinks.

2010-08-13 Thread Jeremie Koenig
On Fri, Aug 13, 2010 at 06:06:42AM +0200, Jeremie Koenig wrote: > + stat.st_size = symlink_target ? strlen (symlink_target) : 0; > + stat.st_mode = symlink_target ? S_IFLNK : S_IFREG; > + stat.st_mode |= S_IRUSR | S_IRGRP | S_IROTH; Hmm, those symlinks should be mode 0777, shoul

[PATCH 1/2] Fix /proc/*/cmdline.

2010-08-12 Thread Jeremie Koenig
On Linux, the per-process cmdline files should include the whole command line, with subsequent arguments separated by NUL bytes. However, for some reason we used to truncate it after the first one and append " \n". Signed-off-by: Jeremie Koenig --- procfs_pid_files.c | 15

[PATCH 2/2] Implement some (global) symlinks.

2010-08-12 Thread Jeremie Koenig
nts -> /etc/mtab libext2fs and some other stuff sometimes insists that this file must exist. Signed-off-by: Jeremie Koenig --- procfs_dir.c |6 ++ procfs_nonpid_files.c | 26 ++ procfs_pid_files.c| 10 +++--- 3 files changed, 39 insertions

Re: preliminary patch for initrd support in Mach

2010-08-04 Thread Jeremie Koenig
Hi, On Sat, Jul 31, 2010 at 04:49:08PM +0200, Samuel Thibault wrote: > Jérémie Koenig, le Sat 12 Jun 2010 19:05:20 +0200, a écrit : > > @@ -128,7 +129,7 @@ > > } > >else > > { > > - int i, losers, maxlen; > > + int i, losers; > > > >/* Initialize boot script varia

Expecting to miss the next meeting

2010-07-28 Thread Jeremie Koenig
Hello, 10:30 UTC is 6:30 in my current timezone, my cell phone does not work here, and I have not yet put my hands on an alarm clock... As a result I'm probably going to miss one more meeting. As a poor substitute I'll go through the usual points in this email. Administrative stuff: nothing that

Re: Fixing grub-probe to work with user-space part stores

2010-07-28 Thread Jeremie Koenig
e underlying device, we use grub's own partition information to find the one which contains the file, then cook a /dev/hdXsY device name for it. (This is the approach used in the patch sent.) -- Jeremie Koenig