[OpenAFS-devel] Re: RFC: move rx epoch/cid generation into the rx core

Benjamin Kaduk kaduk@MIT.EDU
Fri, 14 Feb 2014 11:06:40 -0500 (EST)


On Tue, 11 Feb 2014, Andrew Deason wrote:

> On Tue, 11 Feb 2014 16:46:31 -0500 (EST)
> Benjamin Kaduk <kaduk@MIT.EDU> wrote:
>
>> [HEIMDAL_MUTEX_* initialization]
>> Is there a better place for something at this level?
> [...]
>> [fortuna rand seeding]
>> being the AFSOP_SET_THISCELL easily visible in afsd.c.  Since that
>> doesn't fire up rx, we are safe for now, but how future-proof are we?
>
> osi_Init() seems like a good place for initializing a mutex. That is
> called when the openafs/libafs module is loaded. That's where GLOCK is
> initialized on platforms that need procedural GLOCK initialization.

Thanks.  Further analysis and discussion on the heimdal pull request 
revealed that this patchset does not actually need to block on heimdal 
action, and will work okay if we define a slightly more functional 
gettimeofday() shim.  As such, it's 10840-10843 in gerrit.

> So, it seems like you could collect entropy in that syscall (calling the
> syscall 32+ times doesn't seem so bad really, but obviously a buffer
> would be better). And when we hit afs_InitSetup, you can track yourself
> if you've got the right amount of entropy, and fail to continue if
> something is wrong.

I don't think I followed what you were trying to say here (oops, maybe the 
context I trimmed was relevant).  In any case, the current version uses a 
buffer.

-Ben