PERFORCE change 32320 for review
peter at FreeBSD.org
Sun Jun 1 13:42:21 PDT 2003
Change 32320 by peter at peter_hammer on 2003/06/01 13:42:17
initial workaround for ERESTART causing suscall args to be trashed.
I've got to do this better and make fast_syscall() do the register
unwinding itself on the way to doreti since we shouldn't depend on
having arrived via fast_syscall here.
Affected files ...
.. //depot/projects/hammer/sys/amd64/amd64/trap.c#22 edit
==== //depot/projects/hammer/sys/amd64/amd64/trap.c#22 (text+ko) ====
@@ -760,10 +760,14 @@
- * Reconstruct pc, assuming lcall $X,y is 7 bytes,
- * int 0x80 is 2 bytes. We saved this in tf_err.
+ * Reconstruct pc, we know that 'syscall' is 2 bytes.
+ * We have to do a full context restore so that %r10
+ * (which was holding the value of %rcx) is restored for
+ * the next iteration.
frame.tf_rip -= frame.tf_err;
+ frame.tf_r10 = frame.tf_rcx;
+ td->td_pcb->pcb_flags |= PCB_FULLCTX;
More information about the p4-projects