From owner-cvs-src-old@FreeBSD.ORG Thu Jul 29 02:32:43 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 500251065705 for ; Thu, 29 Jul 2010 02:32:43 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3DC4F8FC08 for ; Thu, 29 Jul 2010 02:32:43 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o6T2WhUZ078630 for ; Thu, 29 Jul 2010 02:32:43 GMT (envelope-from jmallett@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o6T2Wh4U078629 for cvs-src-old@freebsd.org; Thu, 29 Jul 2010 02:32:43 GMT (envelope-from jmallett@repoman.freebsd.org) Message-Id: <201007290232.o6T2Wh4U078629@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jmallett@repoman.freebsd.org using -f From: Juli Mallett Date: Thu, 29 Jul 2010 02:32:21 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/mips/mips pm_machdep.c trap.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 02:32:43 -0000 jmallett 2010-07-29 02:32:21 UTC FreeBSD src repository Modified files: sys/mips/mips pm_machdep.c trap.c Log: SVN rev 210595 on 2010-07-29 02:32:21Z by jmallett o) Subtract 64K from the default userland stack pointer. GCC generate code that with a 32-bit ABI on a system with 64-bit registers can attempt to access an invalid (well, kernel) memory address rather than the intended user address for stack-relative loads and stores. Lowering the stack pointer works around this. [1] o) Make TRAP_DEBUG code conditional on the trap_debug variable. Make trap_debug default to 0 instead of 1 now but make it possible to change it at runtime using sysctl. o) Kill programs that attempt an unaligned access of a kernel address. Note that with some ABIs, calling useracc() is not sufficient since the register may be 64-bit but vm_offset_t is 32-bit so a kernel address could be truncated to what looks like a valid user address, allowing the user to crash the kernel. o) Clean up unaligned access emulation to support unaligned 16-bit and 64-bit accesses. (For 16-bit accesses it was checking for user access to too much memory (4 bytes) and there was no 64-bit support.) This still lacks support for unaligned load-linked and store-conditional. Reviewed by: [1] gonzo Revision Changes Path 1.10 +29 -1 src/sys/mips/mips/pm_machdep.c 1.18 +97 -64 src/sys/mips/mips/trap.c