[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch for various things

From: Bas Wijnen
Subject: Re: patch for various things
Date: Sat, 5 Jun 2004 11:59:38 +0200
User-agent: Mutt/1.3.28i

On Wed, Jun 02, 2004 at 12:34:59PM +0200, Bas Wijnen wrote:
> On Wed, Jun 02, 2004 at 03:44:00AM +0200, Marcus Brinkmann wrote:
> > At Tue, 1 Jun 2004 01:36:56 +0200, Bas Wijnen wrote:
> > > Here I'd expect a "+ 1" is needed, because it should contain the
> > > trailing '\0'.  However, I'm not sure since it can be compensated.  If
> > > this is the case, there should be a comment about this.
> > 
> > Might very well be the case, I have to check myself (too lazy to do it now
> > :) How about reading the code of add_unused_area and following how it is
> > used?
> Good idea, I'll do that.

add_unused_area adds all pages where any part of the string is in to the
address space.  This is done with:
  /* Round down START and END.  */
  start = start & ~(min_page_size - 1);
  end = end & ~(min_page_size - 1);

  for (; start <= end; start += min_page_size)
Rounding down end is fine because the whole page is added using its starting

This means that if the trailing 0 of the string is exactly on a page boundary,
it will not be added to the address space.  The string is still supposed to be
0 ended, so the +1 should indeed be added:
  args = (char *) mod[i].string;
  while (*args && mods_args_len < sizeof (mods_args))

> > > This panic seems to be copy-pasted from serve_bootstrap_requests.  In
> > > serve_requests a MSG_SHUTDOWN would not be an error I'd think, and even if
> > > it is, the message shouldn't be that the bootstrap failed.
> > 
> > Actually, serve_requests is unused and unmaintained old crap that I didn't
> > bother to remove.  It hints at the idea that after bootstrap no bootstrap
> > RPCs will be parsed anymore.  However, this idea is probably wrong ;)  (If
> > you think of wortel as a sleazy manager OS).
> Unused?  I thought it was called from main (and doesn't return, of course.)
> It makes sense to me as well, if wortel should wrap all the priviledged l4
> calls.  How else should this be done?  Using several threads?  One for each
> connection perhaps?

I checked this, and currently it is indeed called from main as the last
statement.  I'll leave this part of the patch in.  If it's going to be removed
anyway, patching it before didn't harm :-)

I've been looking at error codes, and if I compare page 62 of the reference
manual to libl4/l4/syscall.h (l4_strerror), I don't understand at all why the
result would make any sense.  At least to me "invalid kip area" is not a
sensible message for an error described as "cancelled by another thread during
receive phase of ipc".  I guess I'm looking at the wrong error description,
but I couldn't find an other one.

New patch is attached.

Bas Wijnen

ChangeLog entry for doc/ChangeLog:

2004-06-05  Bas Wijnen  <address@hidden>

        * booting.tex, device-drivers.tex: Grammar fixes.

For libhurd-cap-server/ChangeLog:

2004-06-05  Bas Wijnen  <address@hidden>

        * README: Grammar fix.

and for wortel/ChangeLog:

2004-06-05  Bas Wijnen  <address@hidden>

        * ia32-cmain.c (find_components): Fixed off-by-one error.
        * wortel.c (setup_components): Grammar fix.
          (start_physmem): Made error readable.
          (serve_requests): Changed panic to shutdown on shutdown request.

I encourage sending me encrypted e-mail.
Please send the central message of e-mails as plain text in the message body,
   not as HTML and definitely not as MS Word.
Please do not use the MS Word format for attachments either.
for more information, see

Attachment: patch
Description: Text document

Attachment: pgpySb9Z8SfK7.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]