Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jul 2001 20:24:28 +0100 (BST)
From:      rich@rdrose.org
To:        Peter Pentchev <roam@orbitel.bg>
Cc:        freebsd-security@FreeBSD.ORG
Subject:   Re: kern.randompid
Message-ID:  <Pine.LNX.4.21.0107121953090.22325-100000@pkl.net>
In-Reply-To: <20010712183721.B849@ringworld.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 12 Jul 2001, Peter Pentchev wrote:
> The kern.randompid sysctl is not a boolean flag, but an estimate
> of the random value that will be added to each newly created pid.

Oh. That would make much more sense as to why it's not working. Having
been using OpenBSD though (where the pids can be anything between about 30
and 32760), just adding a random amount between 1 and kern.randompid seems
not very random really. Please do correct me if this is wrong.

The comments in the code say "Using a modulus that is too big causes a LOT
more process table scans". What is "too big"? I had a quick peer at
kern_fork.c, and pidchecked is mentioned a lot, but nothing lept out at me
saying "which would make <foo> too big".

pidchecked is calculated on the fly, and not in a manner I can look at and
estimate a good value for randompid. Pointers (not of the void *
variety) would be welcome.

rik



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0107121953090.22325-100000>