diff --git a/sys/amd64/amd64/ptrace_machdep.c b/sys/amd64/amd64/ptrace_machdep.c index 40d02e1f8e39..dbb3f13f947f 100644 --- a/sys/amd64/amd64/ptrace_machdep.c +++ b/sys/amd64/amd64/ptrace_machdep.c @@ -231,7 +231,7 @@ cpu_ptrace(struct thread *td, int req, void *addr, int data) error = copyin(addr, &rv, sizeof(rv)); if (error != 0) break; - if (rv >= VM_MAXUSER_ADDRESS) { + if (rv >= td->td_proc->p_sysent->sv_maxuser) { error = EINVAL; break; }