All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@debian.org>
To: "Bhavesh P. Davda" <bhavesh@avaya.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] New SA_NOPRNOTIF sigaction flag
Date: Tue, 27 Sep 2005 09:06:39 -0400	[thread overview]
Message-ID: <20050927130639.GA606@nevyn.them.org> (raw)
In-Reply-To: <Pine.GSO.4.33.0509261129280.20665-200000@drces.dr.avaya.com>

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

  reply	other threads:[~2005-09-27 13:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-26 17:39 [RFC PATCH] New SA_NOPRNOTIF sigaction flag Bhavesh P. Davda
2005-09-27 13:06 ` Daniel Jacobowitz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-09-27 14:45 Davda, Bhavesh P (Bhavesh)
2005-09-27 15:55 ` Daniel Jacobowitz
2005-09-27 23:26 ` Valdis.Kletnieks
2005-09-27 16:24 Davda, Bhavesh P (Bhavesh)
2005-09-27 20:39 ` Daniel Jacobowitz
2005-09-27 21:55 Davda, Bhavesh P (Bhavesh)
2005-09-28 14:10 ` Daniel Jacobowitz
2005-09-28 18:06 Davda, Bhavesh P (Bhavesh)
2005-09-28 18:33 ` Daniel Jacobowitz
2005-09-28 19:11 Davda, Bhavesh P (Bhavesh)
2005-10-03  0:27 ` Daniel Jacobowitz
2005-10-03 15:21 Davda, Bhavesh P (Bhavesh)
2005-10-03 16:12 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050927130639.GA606@nevyn.them.org \
    --to=dan@debian.org \
    --cc=bhavesh@avaya.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.