Kernel To User write (not to current)

Antonopoulos Xristos (antonop@ceid.upatras.gr)
Fri, 10 Jul 1998 22:33:03 +0300 (EET DST)


I am working on an Intel Pentium running Linux.
In the schedule() function, after deciding which is the next process
to run and before the context switch to it, I want to write some data to a
variable contained in its virtual address space (using put_user()). To do
this I have tried to change the values of CR3 and LDTR registers using the
values in the tss struct of the process to run, use put_user() and then
restore CR3 and LDTR registers using the values in the tss struct of the
'current' process.
Unfortunately this does not seem to work well in all cases. Some times (I
have not yet found when) I get a 'General protection:00e0' message.
Does anybody out there know why this happens and what I should do ?
Do I have to modify the Task Register? P L E A S E H E L P.

######################################################################
## Antonopoulos Christos ##
## Laboratory of High Performance Computing ##
## Department of Computer Engineering and Informatics (C.E.I.D.) ##
## University of Patras - H E L L A S ##
######################################################################
## E-Mail : antonop@ceid.upatras.gr ##
## URL : http://students.ceid.upatras.gr/~antonop ##
######################################################################

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html