mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-14 14:55:41 +00:00
Fix the build; Certain linkable symbols need to always be present.
Pass the pointy hat please. Also unblock the software (Yarrow) generator for now. This will be reverted; Yarrow needs to block until secure, not this behaviour of serving as soon as asked. Folks with specific requiremnts will be able to (can!) unblock this device with any write, and are encouraged to do so in /etc/rc.d/* scripting. ("Any" in this case could be "echo '' > /dev/random" as root).
This commit is contained in:
parent
4eb54166aa
commit
7c2af6212d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255379
@ -39,6 +39,12 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
static struct mtx pseudo_random_block_mtx;
|
||||
|
||||
/* Used to fake out unused random calls in random_adaptor */
|
||||
void
|
||||
random_null_func(void)
|
||||
{
|
||||
}
|
||||
|
||||
static int
|
||||
pseudo_random_block_read(void *buf __unused, int c __unused)
|
||||
{
|
||||
|
@ -53,6 +53,8 @@ static struct sx adaptors_lock; /* need a sleepable lock */
|
||||
/* List for the dynamic sysctls */
|
||||
static struct sysctl_ctx_list random_clist;
|
||||
|
||||
struct random_adaptor *random_adaptor;
|
||||
|
||||
MALLOC_DEFINE(M_RANDOM_ADAPTORS, "random_adaptors", "Random adaptors buffers");
|
||||
|
||||
int
|
||||
@ -230,7 +232,7 @@ random_sysctl_active_adaptor_handler(SYSCTL_HANDLER_ARGS)
|
||||
int error;
|
||||
|
||||
name = NULL;
|
||||
rsp = random_get_active_adaptor();
|
||||
rsp = random_adaptor;
|
||||
|
||||
if (rsp != NULL) {
|
||||
sx_slock(&adaptors_lock);
|
||||
|
@ -41,6 +41,8 @@ struct random_adaptor *random_adaptor_get(const char *);
|
||||
int random_adaptor_register(const char *, struct random_adaptor *);
|
||||
void random_adaptor_choose(struct random_adaptor **);
|
||||
|
||||
extern struct random_adaptor *random_adaptor;
|
||||
|
||||
/*
|
||||
* random_adaptor's should be registered prior to
|
||||
* random module (SI_SUB_DRIVERS/SI_ORDER_MIDDLE)
|
||||
|
@ -72,27 +72,12 @@ static struct cdevsw random_cdevsw = {
|
||||
.d_name = "random",
|
||||
};
|
||||
|
||||
static struct random_adaptor *random_adaptor;
|
||||
static eventhandler_tag attach_tag;
|
||||
static int random_inited;
|
||||
|
||||
|
||||
/* For use with make_dev(9)/destroy_dev(9). */
|
||||
static struct cdev *random_dev;
|
||||
|
||||
/* Used to fake out unused random calls in random_adaptor */
|
||||
void
|
||||
random_null_func(void)
|
||||
{
|
||||
}
|
||||
|
||||
struct random_adaptor *
|
||||
random_get_active_adaptor(void)
|
||||
{
|
||||
|
||||
return (random_adaptor);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
random_close(struct cdev *dev __unused, int flags, int fmt __unused,
|
||||
|
@ -53,4 +53,3 @@ struct random_adaptor {
|
||||
|
||||
extern void random_ident_hardware(struct random_adaptor **);
|
||||
extern void random_null_func(void);
|
||||
struct random_adaptor *random_get_active_adaptor(void);
|
||||
|
@ -79,7 +79,7 @@ static struct random_adaptor random_context = {
|
||||
.write = randomdev_write,
|
||||
.poll = randomdev_poll,
|
||||
.reseed = randomdev_flush_reseed,
|
||||
.seeded = 0,
|
||||
.seeded = 1,
|
||||
};
|
||||
#define RANDOM_MODULE_NAME yarrow
|
||||
#define RANDOM_CSPRNG_NAME "yarrow"
|
||||
@ -95,7 +95,7 @@ static struct random_adaptor random_context = {
|
||||
.write = randomdev_write,
|
||||
.poll = randomdev_poll,
|
||||
.reseed = randomdev_flush_reseed,
|
||||
.seeded = 0,
|
||||
.seeded = 1,
|
||||
};
|
||||
#define RANDOM_MODULE_NAME fortuna
|
||||
#define RANDOM_CSPRNG_NAME "fortuna"
|
||||
|
Loading…
Reference in New Issue
Block a user