From owner-p4-projects@FreeBSD.ORG Tue May 24 23:28:57 2005 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 7301216A420; Tue, 24 May 2005 23:28:57 +0000 (GMT) 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 4E66C16A41C for ; Tue, 24 May 2005 23:28:57 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28CFD43D1F for ; Tue, 24 May 2005 23:28:57 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4ONSvSe009985 for ; Tue, 24 May 2005 23:28:57 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4ONSuFE009982 for perforce@freebsd.org; Tue, 24 May 2005 23:28:56 GMT (envelope-from peter@freebsd.org) Date: Tue, 24 May 2005 23:28:56 GMT Message-Id: <200505242328.j4ONSuFE009982@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 Cc: Subject: PERFORCE change 77425 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: Tue, 24 May 2005 23:28:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=77425 Change 77425 by peter@peter_melody on 2005/05/24 23:28:19 Only allow 32 bit ptrace clients to connect to 32 bit targets. Otherwise they cannot see the full register context. 64 bit gdb can debug 32 bit targets, but not the other way around. Affected files ... .. //depot/projects/hammer/sys/kern/sys_process.c#26 edit Differences ... ==== //depot/projects/hammer/sys/kern/sys_process.c#26 (text+ko) ==== @@ -380,8 +380,7 @@ #ifdef COMPAT_IA32 int wrap32 = 0; - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && - curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) + if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) wrap32 = 1; #endif addr = &r; @@ -539,9 +538,13 @@ } #ifdef COMPAT_IA32 - if (td->td_proc->p_sysent == &ia32_freebsd_sysvec && - td2->td_proc->p_sysent == &ia32_freebsd_sysvec) + if (td->td_proc->p_sysent == &ia32_freebsd_sysvec) { + if (td2->td_proc->p_sysent != &ia32_freebsd_sysvec) { + error = EINVAL; + goto fail; + } wrap32 = 1; + } #endif /* * Permissions check