Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Nov 2006 00:19:40 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        trowa-4 <trowa-4@yahoo.com.tw>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Process Debugging questions
Message-ID:  <20061112001826.Y45016@fledge.watson.org>
In-Reply-To: <571883.4868.qm@web72011.mail.tp2.yahoo.com>
References:  <571883.4868.qm@web72011.mail.tp2.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 12 Nov 2006, trowa-4 wrote:

> FreeBSD provides the ptrace system call for controlling and debugging the 
> execution of a process.
>
> An alternative to the ptrace system call is the /proc filesystem. The 
> functionality provided by the /proc filesystem is the same as that provided 
> by ptrace; if differs only in its interface.
>
> Are there having a better method or other method?

Historically, procfs has been a major source of security vulnerabilities for 
all major UNIX platforms that have used it.  Since it largely duplicates the 
functionality of ptrace(), it is now disabled by default.  However, there is 
some functionality only present in procfs that leads people to enable it in 
some situations.  My advice is to use ptrace() if you can do everything you 
need with it, but otherwise consider using procfs.

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061112001826.Y45016>