Re: [RFC PATCH] New SA_NOPRNOTIF sigaction flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 26, 2005 at 11:39:40AM -0600, Bhavesh P. Davda wrote:
> 
> Sometimes when a task is being ptraced (e.g. by a debugger), one would
> like to handle a certain signal (e.g. SIGSEGV) within the task without
> having to notify the ptracing task.
> 
> An example of this is if one would like to detect the rate at which pages
> are being modified, and therefore mprotect() the pages. The SIGSEGV
> handler just keeps track of how many writes are happening on each of the
> mprotect()ed pages, but you don't want to bother the debugger with these
> SIGSEGVs.
> 
> I'm proposing the addition of a new SA_NOPRNOTIF flag to struct sigaction
> { sa_flags }, which makes the kernel skip notifying the ptracing parent if
> the flag is set for a sighandler for a particular signal.
> 
> This trivial patch achieves just that.
> 
> Comments?

No way!  It needs to work the other way: allow the debugger to
short-circuit a signal for performance reasons if it wants to.  Ptrace
is supposed to report all signals and debuggers expect it to do so.
It'd be pretty confusing if, say, you were trying to debug the SIGSEGV
handler in an application which did this.

-- 
Daniel Jacobowitz
CodeSourcery, LLC
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux