linux-mips
[Top] [All Lists]

Re: [RFC PATCH] kernel/signal.c: avoid BUG_ON with SIG128 (MIPS)

To: David Daney <ddaney.cavm@gmail.com>
Subject: Re: [RFC PATCH] kernel/signal.c: avoid BUG_ON with SIG128 (MIPS)
From: Oleg Nesterov <oleg@redhat.com>
Date: Wed, 29 May 2013 19:36:34 +0200
Cc: James Hogan <james.hogan@imgtec.com>, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>, Al Viro <viro@zeniv.linux.org.uk>, Andrew Morton <akpm@linux-foundation.org>, Kees Cook <keescook@chromium.org>
In-reply-to: <51A638A4.2000705@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1369846916-13202-1-git-send-email-james.hogan@imgtec.com> <51A638A4.2000705@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.18 (2008-05-17)
On 05/29, David Daney wrote:
>
> On 05/29/2013 10:01 AM, James Hogan wrote:
>> MIPS has 128 signals, the highest of which has the number 128. The
>
> I wonder if we should change the ABI and reduce the number of signals to
> 127 instead of this patch.

Same thoughts...

>> @@ -2366,8 +2366,12 @@ relock:
>>
>>              /*
>>               * Death signals, no core dump.
>> +             *
>> +             * MIPS has a signal number 128 which clashes with the core dump
>> +             * bit. If this was the signal we still want to report a valid
>> +             * exit code, so round it down to 127.
>>               */
>> -            do_group_exit(info->si_signo);
>> +            do_group_exit(min(info->si_signo, 127));

This avoids BUG_ON() but obviously fools WIFSIGNALED(), doesn't look
very nice.

Oleg.


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