add_timer_randomness((int)p);
add_timer_randomness((u_long)p ^ (u_long)data ^ cmd);
randomioctl(dev, cmd, data, flag, p)	dev_t	dev;	u_long	cmd;	caddr_t	data;	int	flag;	struct proc *p;{	int	ret = 0;	u_int	cnt;	add_timer_randomness((int)p);	switch (cmd) {	case RNDGETENTCNT:		ret = copyout(&random_state.entropy_count, data,		    sizeof(random_state.entropy_count));		break;	case RNDADDTOENTCNT:		if (suser(p->p_ucred, &p->p_acflag) != 0)			ret = EPERM;		else {			copyin(&cnt, data, sizeof(cnt));			random_state.entropy_count += cnt;			if (random_state.entropy_count > POOLBITS)				random_state.entropy_count = POOLBITS;		}		break;	case RNDZAPENTCNT:		if (suser(p->p_ucred, &p->p_acflag) != 0)			ret = EPERM;		else			random_state.entropy_count = 0;		break;	case RNDSTIRARC4:		if (suser(p->p_ucred, &p->p_acflag) != 0)			ret = EPERM;		else if (random_state.entropy_count < 64)			ret = EAGAIN;		else			arc4random_initialized = 0;		break;	case RNDCLRSTATS:		if (suser(p->p_ucred, &p->p_acflag) != 0)			ret = EPERM;		else			bzero(&rndstats, sizeof(rndstats));		break;	default:		ret = EINVAL;	}	add_timer_randomness((int)p);	return ret;}