patch to make maxssiz/maxdsiz/maxtsiz RW sysctls
rdivacky at freebsd.org
Wed Nov 28 09:17:38 PST 2007
this makes kern.max[dst]siz RW sysctls. please test this (seems to work
ok for me), here is an explanation/commit message:
Change a bunch of RD-only sysctls dealing with sizes of
data/stack/text segments into RW.
maxtsiz - maximal allowed size of the code segment, used only for checking
when loading various executable files (imgact_* files)
maxdsiz - maximal data segment size, set as a maximum for rlimit (rlim_max)
also a runtime check in kern_setrlimit.
maxssiz - maximal stack size, used for rlimit stuff. it is used to set up the
default vm map of the stack in exec_new_vmspace
sgrowsiz - amount of memory the stack grows of.
All of these are used during runtime and can be changed safely via sysctl. Some
paradoxes can be seen like when a process inherits [tds]siz of the default size
then root changes sysctl of the max[tds]siz to lower value and the process
calls setrlimit to maximal size which is lower than the default one.
All the sysctls handlers runtime check sanity of the argument passed in.
please report back so this can be commited
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20071128/eb3e9364/attachment.pgp
More information about the freebsd-current