Re: Potential BUG_ON() in do_group_exit() on 4.17.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux