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
| ||
|
Date: Tue, 17 Apr 2012 20:35:13 +0200 From: Oleg Nesterov <oleg@...hat.com> To: Serge Hallyn <serge.hallyn@...onical.com> Cc: Andrew Morton <akpm@...ux-foundation.org>, Daniel Lezcano <daniel.lezcano@...e.fr>, linux-kernel@...r.kernel.org Subject: Re: [PATCH] pidns: reboot_pid_ns: use SEND_SIG_FORCED instead of force_sig() On 04/16, Oleg Nesterov wrote: > > I'll investigate and report tomorrow. Thanks again Serge, everything is clear. Afaics this needs another (almost off-topic) patch. Please forget about sys_reboot() for the moment. There is a minor and known problem with SIGKILL && SIGNAL_UNKILLABLE. If you send SIGKILL from the parent namespace to cinit, this doesn't make it SIGNAL_GROUP_EXIT immediately. Only after cinit actually dequeues SIGKILL it does do_group_exit() and set this flag. This should be fixed anyway, but not now. And this explain the problem. Note that your test-case does sys_reboot() from the init process, and reboot_pid_ns() does kill(pid_ns->child_reaper, SIGKILL); do_exit(0); so it sends SIGKILL to itself and exit. This means that cinit (current) obviously can't dequeue SIGKILL, and without SIGNAL_GROUP_EXIT wait_task_zombie() ignores signal->group_exit_code. That is why the patch makes a difference. But why reboot_pid_ns() does do_exit? Yes, it was copied from sys_reboot() and I didn't notice. It should use do_group_exit(), and sys_reboot() too. This is the patch I am going to send, but I'll try to think a bit more. Thanks! Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists