Date: Wed, 27 Apr 2005 07:06:52 +0800 From: David Xu <davidxu@freebsd.org> To: Scott Long <scottl@samsco.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 76006 for review Message-ID: <426EC98C.1080100@freebsd.org> In-Reply-To: <426E7886.4060303@samsco.org> References: <200504261407.j3QE7XdW009555@repoman.freebsd.org> <426E7886.4060303@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Scott Long wrote: > David Xu wrote: > >> http://perforce.freebsd.org/chv.cgi?CH=76006 >> >> Change 76006 by davidxu@davidxu_tiger on 2005/04/26 14:07:21 >> >> Add a temp stack for sysenter syscall since debug trap and nmi >> can occur before sysenter entry setup its stack. > > > > Are you aware that there is already a sysenter implementation in > perforce? Please take a look at //depot/user/jeffr/sysenter > > Scott > > I didn't know, are you working on it ? I know peter was trying to work on it. Just read some code in exception.s: sysenter_exit: | popl %fs | popl %es | popl %ds 295: | popal | addl $8,%esp | movl %edx,%ebx /* Save the old edx value. */ | popl %edx /* Pop user's EIP */ | addl $4,%esp 300: | popfl | popl %ecx /* Pop user's esp */ | sysexit This code is buggy, popfl enable interrupts, if thread is preempted, kernel code will use userland %ds, %es, and %fs, this is not good.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?426EC98C.1080100>