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: <4561E923.3080305@hogyros.de>
Date:	Mon, 20 Nov 2006 18:42:59 +0100
From:	Simon Richter <Simon.Richter@...yros.de>
To:	Mark Rustad <mrustad@....com>
Cc:	Linux-Kernel mailing-list <linux-kernel@...r.kernel.org>
Subject: Re: RFC: implement daemon() in the kernel

Hi,

Mark Rustad schrieb:

> There is a better way. Simply implement fork(). It can be done even 
> without an MMU. People think it is impossible, but that is only because 
> they don't consider the possibility of copying memory back and forth on 
> task switch. It sounds horrible, but in the vast majority of cases, 
> either the parent or child either exits or does an exec pretty quickly, 
> so in reality it doesn't cost much. The benefits are many: being able to 
> use real shells such as bash and thereby being able to use real shell 
> scripts.

This imposes quite a significant overhead for the common case (in which 
the application has specifically requested that the parent process be 
terminated after the child process is fork()ed off). Even if the cost of 
transferring memory contents was cheap (which it isn't), you'd annoy the 
memory management subsystem unless you did a lot of weird tricks to 
avoid allocating from a large block.

> You do have to look out for any applications that fork and do not either 
> exit or exec, but that is so much better than having to modify so many 
> things just to get them to run.

Well, in fact just having a libc that does not define a symbol for 
"fork" and then going to the places the linker mentions as having 
undefined references is a pretty easy way. Mind you, in 90% of cases you 
can replace them by a vfork() and be done.

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