hardcoded SIGSEGV in __die() ?
    Joakim Tjernlund 
    Joakim.Tjernlund at infinera.com
       
    Tue Mar 24 01:17:36 AEDT 2020
    
    
  
In __die(), see below, there is this call to notify_send() with SIGSEGV hardcoded, this seems odd
to me as the variable "err" holds the true signal(in my case SIGBUS)
Should not SIGSEGV be replaced with the true signal no.?
  Jocke
static int __die(const char *str, struct pt_regs *regs, long err)
{
	printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
	if (IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN))
		printk("LE ");
	else
		printk("BE ");
	if (IS_ENABLED(CONFIG_PREEMPT))
		pr_cont("PREEMPT ");
	if (IS_ENABLED(CONFIG_SMP))
		pr_cont("SMP NR_CPUS=%d ", NR_CPUS);
	if (debug_pagealloc_enabled())
		pr_cont("DEBUG_PAGEALLOC ");
	if (IS_ENABLED(CONFIG_NUMA))
		pr_cont("NUMA ");
	pr_cont("%s\n", ppc_md.name ? ppc_md.name : "");
	if (notify_die(DIE_OOPS, str, regs, err, 255, SIGSEGV) == NOTIFY_STOP)
		return 1;
	print_modules();
	show_regs(regs);
	return 0;
}
    
    
More information about the Linuxppc-dev
mailing list