Make kernel hcrypto calloc return zeroed memory
authorBenjamin Kaduk <kaduk@mit.edu>
Thu, 24 Jul 2014 13:40:21 +0000 (09:40 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 13 Aug 2014 15:24:03 +0000 (11:24 -0400)
commit64da7c133a66a15233c2cdc5d9a8f71d17d80d77
tree5ec84f93e7f04fbaae3c158d6ea8ba347968ba80
parent9dd67783bb2bd9ef8a972a1aac47b1925069a655
Make kernel hcrypto calloc return zeroed memory

As far as I can tell, the afs_osi_Alloc contract does not
guarantee zeroed memory.  On FreeBSD, with a debug kernel, it
definitely does not currently provide zeroed memory, returning
instead memory initialized with 0xdeadc0de.

Properly speaking, the role of calloc() is to both check for overflow
from the multiplication and to produce zeroed memory.  However, since
we do not have a reasonable way to report failure, do not bother
checking for overflow at this time.

Change-Id: I187c2057d473fba869692c1dfa11735502b260c1
Reviewed-on: http://gerrit.openafs.org/11322
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/crypto/hcrypto/kernel/alloc.c