From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 15 Sep 2014 12:59:52 -0400 To: 9fans@9fans.net Message-ID: <0f04bcc0fe4888e3b13ad731733417d7@ladd.quanstro.net> In-Reply-To: <9de1e47e055870cdecf9001c33c7c81d@ladd.quanstro.net> References: <77591e1e424eda53000894003b4dbd9d@felloff.net> <9de1e47e055870cdecf9001c33c7c81d@ladd.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] segattach in telnetd Topicbox-Message-UUID: 16a8f41a-ead9-11e9-9d60-3106f5b1d025 > 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