RE: [PATCH] libsemanage: free policydb before fork

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joshua Brindle wrote:
> While testing the recent memory-related patches on a low memory
> machine (512m total) I found that semodule still failed. It turns out
> that fork() requires enough free ram for the amount of private dirty
> memory in the parent process to succeed (even if it is never written
> to in the child process).

I would suggest trying to use vfork() instead of fork() in
semanage_exec_prog().
This should result in less of the parent's memory being copied into the
child.
You would also have to change the exit() following execve() failure to
_exit()
but that should be it.

 - todd


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux