Date: Sun, 20 Sep 1998 22:21:25 +0800 From: Peter Wemm <peter@netplex.com.au> To: Greg Lehey <grog@lemis.com> Cc: Warner Losh <imp@village.org>, freebsd-hackers@FreeBSD.ORG Subject: Re: syscalls and the stack Message-ID: <199809201421.WAA04063@spinner.netplex.com.au> In-Reply-To: Your message of "Fri, 11 Sep 1998 10:40:50 %2B0930." <19980911104050.B13960@freebie.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Greg Lehey wrote: > On Wednesday, 9 September 1998 at 20:35:29 -0600, Warner Losh wrote: > > > > Question: > > do system calls need to be made from the executable stack? > > No. That's why copyin() and copyout() exist. > > > If this were disallowed, what would break? > > Who knows? I think the official answer is "nothing", but I'm sure > that some code uses pointers instead of copying the data. Yes, there is a small chunk of code copied to the very top of the user stack at process startup time. This code makes syscalls as part of the signal trampoline (sigreturn() in particular). If this trampoline was present in (say) libc, there is a slight problem of the kernel "finding" it in the current process address space, and even more of a problem if it's an "old" libc binary. This could probably all be patched up if we were willing to break binary compatability in a fairly major way (ie: would not be able to run old binaries). Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809201421.WAA04063>