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:	Sun, 15 Mar 2009 14:58:25 +1100
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	sidc7 <siddhartha.chhabra@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: COW optimization on exec

On Sunday 15 March 2009 13:57:54 sidc7 wrote:
> The Linux kernel uses the COW optimization for fork, so the processes share
> the same pages, till on of the processes writes to the page. I was
> wondering, if I do a fork and do an exec immediately following the fork,
> will the COW optimization still be applied as it is most likely that the
> new process is going to write to the shared pages? So doing a COW will not

exec throws out all those pages, so go away without ever having been
copied. However it still costs memory CPU time TLB flushes etc in order
to set up the COW optimisation in the first place, so if you are doing
fork/exec, then I think vfork is the better option.


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