Skip to content

VM lacks entropy #160

Description

@coltonmercurio

Internally, gcc reads bits from /dev/urandom. So on the first compile, a user would see:
image

FYI The kernel message is generated whenever the first read from urandom
occurs -

http://lxr.free-electrons.com/source/drivers/char/random.c#L1458
1458 urandom_read(struct file _file, char _user *buf, size_t nbytes,
loff_t *ppos)
1459 {
1460 int ret;
1461
1462 if (unlikely(nonblocking_pool.initialized == 0))
1463 *printk_once
(KERN_NOTICE "random: %s urandom read "
1464 "with %d bits of entropy available\n",
1465 current->comm,
nonblocking_pool.entropy_total);
1466
1467 nbytes = min_t(size_t, nbytes, INT_MAX >> (ENTROPY_SHIFT + 3));
1468 ret = extract_entropy_user(&nonblocking_pool, buf, nbytes);
1469
1470 trace_urandom_read(8 * nbytes, ENTROPY_BITS(&nonblocking_pool),
1471 ENTROPY_BITS(&input_pool));
1472 return ret;
1473 }

Suggestion for an upstream future a Jor1K Feature: Provide an interface
to be able to add entropy from the outside i.e. the browser
@angrave PR #152

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions