From owner-p4-projects@FreeBSD.ORG Sun Jun 1 13:42:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ACB2E37B404; Sun, 1 Jun 2003 13:42:20 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6463637B401 for ; Sun, 1 Jun 2003 13:42:20 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E95443FB1 for ; Sun, 1 Jun 2003 13:42:20 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h51KgJ0U069323 for ; Sun, 1 Jun 2003 13:42:19 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h51KgJkS069320 for perforce@freebsd.org; Sun, 1 Jun 2003 13:42:19 -0700 (PDT) Date: Sun, 1 Jun 2003 13:42:19 -0700 (PDT) Message-Id: <200306012042.h51KgJkS069320@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 32320 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2003 20:42:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=32320 Change 32320 by peter@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 Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/trap.c#22 (text+ko) ==== @@ -760,10 +760,14 @@ case ERESTART: /* - * 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; break; case EJUSTRETURN: