Date: Tue, 9 Jul 2002 16:08:16 +0800 From: "David Xu" <davidx@viasoft.com.cn> To: "Julian Elischer" <julian@elischer.org>, "FreeBSD current users" <current@FreeBSD.ORG> Subject: Re: userret() , ast() and the end of syscalls Message-ID: <013b01c2271f$ce6e9be0$ef01a8c0@davidwnt> References: <Pine.BSF.4.21.0207082328510.32617-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I found the problem two weeks ago, but I can not find a better way to avoid userret() to be called twice. so I keep silence. :( David Xu Gartner: Apache is vulnerable, we recommend switching back to IIS to = protect yourselves ----- Original Message -----=20 From: "Julian Elischer" <julian@elischer.org> To: "FreeBSD current users" <current@FreeBSD.ORG> Sent: Tuesday, July 09, 2002 2:40 PM Subject: userret() , ast() and the end of syscalls >=20 > A question to those who know.. >=20 > why is userret() called both at the end of trap() or syscall() > and also almost immediatly again (often) at the end of ast(). >=20 > It seems that really there is no one place that one can put code that = will > be called ONCE and ONLY ONCE as a thread progresses to userland. >=20 > There is no one place where you can say "after this point we are in > userland" right up until that iret instruction. There is always the = danger > that FTER ny insruction that decides that we are now definitly going = to > user space, there could occur an interrupt that causes a reschedule so > that some OTHER thread goes to user land. >=20 > Is it possible to clear interrupts and have the iret instruction > itself re-enable them? > (that would give a few instructions 'atomically' with the iret > which may be all I need). >=20 > is this possible in other architectures? >=20 >=20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?013b01c2271f$ce6e9be0$ef01a8c0>