Date: Fri, 7 Jun 2002 06:26:43 -0700 From: Maxime Henrion <mux@freebsd.org> To: hackers@FreeBSD.org Cc: Alexey Privalov <lucky@land3.nsu.ru> Subject: Re: randompid Message-ID: <20020607132643.GF85244@elvis.mu.org> In-Reply-To: <20020607200648.M19436-100000@land3.nsu.ru> References: <20020607200648.M19436-100000@land3.nsu.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Alexey Privalov wrote: > hi all. > > i`m trying to set randompid: > > root@land3# sysctl kern.randompid=1 > kern.randompid: 0 -> 0 > > what`s a need to set on? The value you give to this sysctl is not a boolean, it's a value used in the formula which computes the randompid. This value is sanity checked, that's why giving 1 doesn't do anything. Here is the code which is responsible for this : if (pid < 0 || pid > PID_MAX - 100) /* out of range */ pid = PID_MAX - 100; else if (pid < 2) /* NOP */ pid = 0; else if (pid < 100) /* Make it reasonable */ pid = 100; This should give you enough information to chose a good value. :-) Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020607132643.GF85244>