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]
Message-ID: <m1wt0jva1i.fsf@ebiederm.dsl.xmission.com>
Date:	Tue, 10 Apr 2007 21:56:25 -0600
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Oleg Nesterov <oleg@...sign.ru>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Davide Libenzi <davidel@...ilserver.org>,
	Jan Engelhardt <jengelh@...ux01.gwdg.de>,
	Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Robin Holt <holt@....com>, Roland McGrath <roland@...hat.com>,
	"Serge E. Hallyn" <serge@...lyn.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] make kernel threads invisible to /sbin/init

Oleg Nesterov <oleg@...sign.ru> writes:

> 1. rename reparent_to_init() to reparent_kthread() and export it
>
> 2. use init_pid_ns.child_reaper instead of child_reaper(current)
>
> 3. set ->exit_signal = -1, so init can't see us and we don't use
>    it to reap the task.
>
> 4. add reparent_kthread() to kthread() and stopmachine()
>

If the goal is to hide from /sbin/init.  We don't need to touch
kernel/kthread.c or 
kernel/stop_machine.c

Their parents are already kernel threads.

Yes. There is a startup issue for kernel/kthread.c I just about have
a patch I can stand that addresses that issue.

For the kernel thread they all inherit signals with SIGCHLD set to
SIG_IGN, so there is child auto reaping in that form.  Adding
the ->exit_signal = -1 would be a bonus but is not required.

I am a little concerned with removing the knowledge of who our
real parent is as that may compromise debugging.  The reason
why kernel threads are visible in the first place.

I do support reparenting kernel threads that call daemonize,
and the modifications to reparent_kthread here look reasonable.

Eric
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ