From owner-p4-projects Fri Apr 12 18:12:41 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5E57137B405; Fri, 12 Apr 2002 18:12:36 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B447A37B419 for ; Fri, 12 Apr 2002 18:12:34 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3D1CYA40687 for perforce@freebsd.org; Fri, 12 Apr 2002 18:12:34 -0700 (PDT) (envelope-from jake@freebsd.org) Date: Fri, 12 Apr 2002 18:12:34 -0700 (PDT) Message-Id: <200204130112.g3D1CYA40687@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to jake@freebsd.org using -f From: Jake Burkholder Subject: PERFORCE change 9641 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=9641 Change 9641 by jake@jake_sparc64 on 2002/04/12 18:11:48 Simple fix for a program sent by art@openbsd.org, which just misaligns the stack pointer and then calls into the kernel. This causes it to catch a sigbus instead of spin forever, which still isn't really right, but better than nothing. Affected files ... ... //depot/projects/sparc64/sys/sparc64/sparc64/rwindow.c#10 edit Differences ... ==== //depot/projects/sparc64/sys/sparc64/sparc64/rwindow.c#10 (text+ko) ==== @@ -60,6 +60,8 @@ for (i = 0; i < n; i++) { CTR1(KTR_TRAP, "rwindow_load: usp=%#lx", usp); usp += SPOFF; + if ((error = (usp & 0x7)) != 0) + break; error = copyin((void *)usp, &rw, sizeof rw); usp = rw.rw_in[6]; } @@ -91,6 +93,8 @@ usp = *ausp; CTR1(KTR_TRAP, "rwindow_save: usp=%#lx", usp); usp += SPOFF; + if ((error = (usp & 0x7)) != 0) + break; error = copyout(rw, (void *)usp, sizeof *rw); if (error) break; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message