RE: force_sig_info

From: Davide Libenzi (davidel_at_xmailserver.org)
Date: 09/05/04

  • Next message: Grzegorz Kulewski: "Re: NVIDIA Driver 1.0-6111 fix"
    Date:	Sun, 5 Sep 2004 06:35:44 -0700 (PDT)
    To: "Zach, Yoav" <yoav.zach@intel.com>
    
    

    On Sun, 5 Sep 2004, Zach, Yoav wrote:

    > >-----Original Message-----
    > >From: Linus Torvalds [mailto:torvalds@osdl.org]
    > >Sent: Friday, September 03, 2004 21:12
    > >To: Yoav Zach
    > >Cc: akpm@osdl.org; linux-kernel@vger.kernel.org; Zach, Yoav
    > >Subject: Re: force_sig_info
    > >
    > >
    > >Why are you blocking signals that you want to get? Sounds like
    > >a bug in
    > >your program.
    >
    > It's a translator - it emulates the behavior of the translated
    > 'process', which is the one that sets the signal mask. On the
    > other hand, it has its own logic, which requires handling of
    > certain HW exceptions. In 2.4, signals that were raised due to
    > HW exceptions could be handled by the translator regardless of
    > the mask that was set by the translated process. We lost this
    > ability in 2.6. It will be very good for our product, and I
    > believe any similar product where a native process emulates
    > behavior of another process, if we could have this ability
    > back.

    Below is the latest patch I posted (applies on some Jun 2004 2.6.x) to
    bring 2.6 back to the 2.4 behaviour, but then it has been decided to leave
    2.6 as is.

    - Davide

    --- a/kernel/signal.c 2004-06-28 14:28:51.000000000 -0700
    +++ b/kernel/signal.c 2004-06-28 14:29:31.000000000 -0700
    @@ -820,8 +820,9 @@
             int ret;
     
             spin_lock_irqsave(&t->sighand->siglock, flags);
    - if (sigismember(&t->blocked, sig) || t->sighand->action[sig-1].sa.sa_handler == SIG_IGN) {
    + if (t->sighand->action[sig-1].sa.sa_handler == SIG_IGN)
                     t->sighand->action[sig-1].sa.sa_handler = SIG_DFL;
    + if (sigismember(&t->blocked, sig)) {
                     sigdelset(&t->blocked, sig);
                     recalc_sigpending_tsk(t);
             }
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Grzegorz Kulewski: "Re: NVIDIA Driver 1.0-6111 fix"

    Relevant Pages

    • Re: Insteon Test Report
      ... As for the translator, it's the size of an appliance module with a USB ... direct controller to Insteon is a bit faster, ... how the translator fairs when digesting a steady stream of signals. ... >> As for the bathroom, I have tried unplugging everything - there's not ...
      (comp.home.automation)
    • Re: Is all current television equipment becoming worthless?
      ... >>either a great picture or NO picture.Not everybody lives in areas with good ... >get a usuable picture per licensed station). ... I can guarantee you that the reflected signals ... friend of mine and I asked him why they didn't have a translator ...
      (alt.home.repair)
    • RE: force_sig_info
      ... It's a translator - it emulates the behavior of the translated ... signals that were raised due to ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • force_sig_info
      ... The product that my team is working on is a binary translator ... juggling between signals that are meant for the translated ... till now we managed to let the kernel handle the signal mask. ... proposed patch. ...
      (Linux-Kernel)
    • Re: short read from /dev/urandom
      ... * requested without giving time for the entropy pool to recharge, ... and is quite clear that reads can be interrupted by signals. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)