linux-mips
[Top] [All Lists]

Re: [PATCH 0/7] Clean up signal code

To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Subject: Re: [PATCH 0/7] Clean up signal code
From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 23 Jan 2007 14:32:14 +0000
Cc: linux-mips@linux-mips.org
In-reply-to: <1169561903878-git-send-email-fbuihuu@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1169561903878-git-send-email-fbuihuu@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.2.2i
On Tue, Jan 23, 2007 at 03:18:16PM +0100, Franck Bui-Huu wrote:

> This patchset cleans up signal related code by factorizing code
> shared by all signal sources. The consequence is that the signal
> code is decreased a lot.
> 
> This patchset has been splitted out into 7 differents patches
> to ease code review.
> 
> Two questions are still open: 
> 
>     (a) It seems that the status register is not saved by
>         setup_sigcontext() and therefore not restored by
>         restore_sigcontext(). Is it a bug ?

No.  All the information in the MIPS c0_status register is priviledged.
Unlike CISC architectures MIPS has no flags such as zero, equal, overflow
or similar in the status register that is nothing that would constitute
part of the thread context.

The one flag one could possibly argument about might be c0_status.fr - but
none of the ABIs or tools or application software can make use of it ...

>     (b) Status register is saved by setup_sigcontext32() but
>         not restored by restore_sigcontext(). Is it a bug ?

Not really a bug but useless code, yes.  We used to save c0_status in the
dark ages but again, no known code - not even IRIX code - relies on this
field.

> Unfortunately I do not have any 64 bits cross compiler setup
> and no adequate plateforms to test the changes introduced by
> this patchset in signal32.c and signal_n32.c. If someone
> could give it a try, that would be nice.

Will try to find some time but likely it'll take me well over a week so
maybe somebody else?

  Ralf

<Prev in Thread] Current Thread [Next in Thread>