Date: Fri, 12 Apr 2002 18:12:34 -0700 (PDT) From: Jake Burkholder <jake@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 9641 for review Message-ID: <200204130112.g3D1CYA40687@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204130112.g3D1CYA40687>