Subject: Re: SIGTRAP for traced processes and COMPAT_MACH
To: Emmanuel Dreyfus <manu@NetBSD.org>
From: Matthew Orgass <darkstar@city-net.com>
List: tech-kern
Date: 11/27/2003 20:59:25
On 2003-11-27 manu@NetBSD.org wrote:

> Yes, that's the problem: Mach exceptions ignore the signal mask, but if
> no exception port was set to catch an exeption, then a signal is
> delivered, and this signal should respect the signal mask. Therefore
> alowing anything in the signal mask is not the solution.
>
> Let's imagine we don't touch the numerous psignal() that are everywhere
> in the kernel. What about adding an emulation flag? EMUL_NEED_TRAPSIGNAL
> could be checked in psignal(), and call trapsignal() from there if the
> emulation needs that. It costs only one test for the native code path.

  Don't forget kpsignal; I would guess it need the same treatment?

> I'm running out of good ideas. Anyone has a good idea?

  It looks like kpsignal, psignal, and sched_signal are now macroized
anyway, so perhaps they should be redefined to use e_kpsignal and
e_psignal if __NEEDS_SIGNAL_EMUL (or whatever name is best) is defined
(to be set by ports that might need this).

Matthew Orgass
darkstar@city-net.com