9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] segattach in telnetd
Date: Mon, 15 Sep 2014 12:59:52 -0400	[thread overview]
Message-ID: <0f04bcc0fe4888e3b13ad731733417d7@ladd.quanstro.net> (raw)
In-Reply-To: <9de1e47e055870cdecf9001c33c7c81d@ladd.quanstro.net>

> nope.  9atom does this.  i had to deal with this for 64 bit
> quite a while ago, since the add to mb to the brk trick doesn't
> work when your page size is 2mb.  be aware if you're attaching segments
> that your idea of what the page size might be may be inaccurate.

i should be more clear on this, the magic numbers don't work.  this exposes
the fact that this code is making assumptions that aren't called out.  it's best
to avoid those by letting the kernel place the segment.  the kernel indeed has
the information to place this segment correctly.  ... or should have---there's a bug
in the labs kernel where an automaticly placed segment can collide with the
temporary stack.  i solved this by putting the temporary stack above the normal
stack, but i think there was some thought that there were better ideas.  i felt that
running a placement algorithm on the temporary stack for every exec was
excessive.

- erik



  parent reply	other threads:[~2014-09-15 16:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-14  2:54 arisawa
2014-09-14  3:17 ` cinap_lenrek
2014-09-14  3:49   ` arisawa
2014-09-14  4:23     ` cinap_lenrek
2014-09-14  4:41   ` arisawa
2014-09-14  4:51     ` cinap_lenrek
2014-09-14  5:33       ` arisawa
2014-09-14  5:55         ` cinap_lenrek
2014-09-14 14:43         ` erik quanstrom
2014-09-14 19:04           ` Charles Forsyth
2014-09-15 16:59           ` erik quanstrom [this message]
2014-09-14  5:04     ` cinap_lenrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0f04bcc0fe4888e3b13ad731733417d7@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).