lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Dec 2019 20:52:59 +0100
From:   Christian Brauner <christian.brauner@...ntu.com>
To:     Oleg Nesterov <oleg@...hat.com>, qiwuchen55@...il.com
CC:     peterz@...radead.org, mingo@...nel.org, prsood@...eaurora.org,
        kernel-team@...roid.com, linux-kernel@...r.kernel.org,
        chenqiwu@...omi.com
Subject: Re: [PATCH v3] kernel/exit: do panic earlier to get coredump if global init task exit

On December 20, 2019 8:38:00 PM GMT+01:00, Oleg Nesterov <oleg@...hat.com> wrote:
>On 12/19, qiwuchen55@...il.com wrote:
>>
>> @@ -517,10 +517,6 @@ static struct task_struct
>*find_child_reaper(struct task_struct *father,
>>  	}
>>  
>>  	write_unlock_irq(&tasklist_lock);
>> -	if (unlikely(pid_ns == &init_pid_ns)) {
>> -		panic("Attempted to kill init! exitcode=0x%08x\n",
>> -			father->signal->group_exit_code ?: father->exit_code);
>> -	}
>>  
>>  	list_for_each_entry_safe(p, n, dead, ptrace_entry) {
>>  		list_del_init(&p->ptrace_entry);
>> @@ -766,6 +762,15 @@ void __noreturn do_exit(long code)
>>  	acct_update_integrals(tsk);
>>  	group_dead = atomic_dec_and_test(&tsk->signal->live);
>>  	if (group_dead) {
>> +		/*
>> +		 * If the last thread of global init exit, do panic
>> +		 * immeddiately to get the coredump to find any clue
>> +		 * for init task in userspace.
>> +		 */
>> +		if (unlikely(is_global_init(tsk)))
>> +			panic("Attempted to kill init! exitcode=0x%08x\n",
>> +				tsk->signal->group_exit_code ?: (int)code);
>> +
>
>Acked-by: Oleg Nesterov <oleg@...hat.com>

Thanks. I'll pick this up unless someone objects.

Christian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ