Date: Tue, 24 May 2005 23:28:56 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 77425 for review Message-ID: <200505242328.j4ONSuFE009982@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505242328.j4ONSuFE009982>
