From owner-p4-projects@FreeBSD.ORG Fri Aug 4 13:56:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8ABB816A4E2; Fri, 4 Aug 2006 13:56:37 +0000 (UTC) X-Original-To: perforce@FreeBSD.org 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 610FE16A4DF for ; Fri, 4 Aug 2006 13:56:37 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BF1643D68 for ; Fri, 4 Aug 2006 13:56:34 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k74DuYkL090382 for ; Fri, 4 Aug 2006 13:56:34 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k74DuXm9090379 for perforce@freebsd.org; Fri, 4 Aug 2006 13:56:33 GMT (envelope-from rdivacky@FreeBSD.org) Date: Fri, 4 Aug 2006 13:56:33 GMT Message-Id: <200608041356.k74DuXm9090379@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103168 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2006 13:56:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=103168 Change 103168 by rdivacky@rdivacky_witten on 2006/08/04 13:56:07 Check for the uaddr being in userspace. Otherwise return EFAULT via our fault handler. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/i386/support.s#3 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/i386/support.s#3 (text+ko) ==== @@ -1553,6 +1553,8 @@ movl $futex_fault, PCB_ONFAULT(%eax) movl 4(%esp), %eax movl 8(%esp), %edx + cmpl $VM_MAXUSER_ADDRESS,%edx + ja futex_fault xchgl %eax, (%edx) movl 0xc(%esp), %edx @@ -1570,6 +1572,8 @@ movl $futex_fault, PCB_ONFAULT(%eax) movl 4(%esp), %eax movl 8(%esp), %edx + cmpl $VM_MAXUSER_ADDRESS,%edx + ja futex_fault MPLOCKED xaddl %eax, (%edx) movl 0xc(%esp), %edx @@ -1587,6 +1591,8 @@ movl $futex_fault, PCB_ONFAULT(%eax) movl 4(%esp), %eax movl 8(%esp), %edx + cmpl $VM_MAXUSER_ADDRESS,%edx + ja futex_fault orl %eax, (%edx) movl 0xc(%esp), %edx @@ -1604,6 +1610,8 @@ movl $futex_fault, PCB_ONFAULT(%eax) movl 4(%esp), %eax movl 8(%esp), %edx + cmpl $VM_MAXUSER_ADDRESS,%edx + ja futex_fault notl (%edx) andl %eax, (%edx) @@ -1622,6 +1630,8 @@ movl $futex_fault, PCB_ONFAULT(%eax) movl 4(%esp), %eax movl 8(%esp), %edx + cmpl $VM_MAXUSER_ADDRESS,%edx + ja futex_fault xorl %eax, (%edx) movl 0xc(%esp), %edx