Re: 64-bit fun with cache.c

[email protected] (Paul Jarc)
Newsgroups gmane.network.djbdns
Organization What did you have in mind? A short, blunt, human pyramid?
Message-ID <[email protected]>
Paul Theodoropoulos <[email protected]> wrote:
> it's also seemed somewhat odd to me that DATALIMIT even exists. per
> djb, you always set it 3mb larger than CACHESIZE.

The difference depends on the memory usage of libc, mostly, so it was
vary from one system to another.  Also, DATALIMIT is used by
softlimit, not dnscache, to apply a kernel-enforced limit to the
amount of memory the process can allocate - so even if an attacker
breaks into dnscache, they won't be able to hoard all of your
machine's memory.  If you don't mind the risk, you can get rid of
DATALIMIT with a small change to the run script.

If you wanted to get rid CACHESIZE, then dnscache would have to figure
out how much memory it can possibly get, and use that much.  But I
don't think it's possible to determine that on some systems (e.g.,
Linux with overcommit).


paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.