From: James Hogan <jhogan@kernel.org>
To: Georgi Guninski <guninski@guninski.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Potential BUG_ON() in do_group_exit() on 4.17.2
Date: Wed, 27 Jun 2018 22:14:04 +0100 [thread overview]
Message-ID: <20180627211403.GA11655@jamesdev> (raw)
In-Reply-To: <20180627121302.56nivw2adgov3fvn@sivokote.iziade.m$>
On Wed, Jun 27, 2018 at 03:13:02PM +0300, Georgi Guninski wrote:
> Does this BUG_ON() gets hit on mips?
>
> in 4.17.2 ./kernel/exit.c
>
> do_group_exit(int exit_code)
> {
> struct signal_struct *sig = current->signal;
>
> BUG_ON(exit_code & 0x80);
>
> |do_group_exit| is called from
>
> ./kernel/signal.c:2482: do_group_exit(ksig->info.si_signo);
>
> Appears to me si_signo can be 0x80 (in decimal 128) because of:
>
> arch/mips/include/uapi/asm/signal.h:15:#define _NSIG 128
>
> Probably testcase will be:
> $kill -128 `pidof program`
I've hit this by accident before, while tweaking GDB on MIPS. See here:
[RFC] kernel/signal.c: avoid BUG_ON with SIG128 (MIPS):
https://patchwork.linux-mips.org/patch/5343/
[v2] MIPS: Reduce _NSIG from 128 to 127 to avoid BUG_ON:
https://patchwork.linux-mips.org/patch/5461/
[v3] kernel/signal.c: fix BUG_ON with SIG128 (MIPS):
https://patchwork.linux-mips.org/patch/5538/
https://patchwork.linux-mips.org/patch/5550/
[v4] MIPS: Reduce _NSIG from 128 to 127 to avoid BUG_ON:
https://patchwork.linux-mips.org/patch/5564/
I think the fear of subtle user ABI breakage was probably prominent in
why it never got properly fixed. It'd be nice to get some resolution
though.
Cheers
James
next prev parent reply other threads:[~2018-06-27 21:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 12:13 Potential BUG_ON() in do_group_exit() on 4.17.2 Georgi Guninski
2018-06-27 21:14 ` James Hogan [this message]
2018-06-28 6:28 ` Georgi Guninski
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=20180627211403.GA11655@jamesdev \
--to=jhogan@kernel.org \
--cc=guninski@guninski.com \
--cc=linux-mips@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox