[Qemu-devel] [PATCH v2 00/14] Add qemu_getrandom and ARMv8.5-RNG

Richard Henderson posted 14 patches 5 days ago
Test asan failed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190314045526.13342-1-richard.henderson@linaro.org
Makefile                      |  12 ++--
Makefile.objs                 |   8 +--
Makefile.target               |   4 --
include/crypto/random.h       |   2 +-
include/qemu/random.h         |  58 +++++++++++++++++++
include/qom/cpu.h             |   1 +
target/arm/cpu.h              |   5 ++
cpus.c                        |   9 +++
crypto/random-gcrypt.c        |   2 +-
crypto/random-gnutls.c        |   2 +-
crypto/random-platform.c      |  95 +++++++++++++++++-------------
linux-user/aarch64/cpu_loop.c |  16 +----
linux-user/elfload.c          |   8 +--
linux-user/main.c             |  31 +++++-----
linux-user/syscall.c          |   3 +
target/arm/cpu64.c            |   1 +
target/arm/helper.c           |  32 ++++++++++
ui/vnc.c                      |   8 +--
util/random.c                 | 106 ++++++++++++++++++++++++++++++++++
vl.c                          |   4 ++
configure                     |  27 ++++++---
crypto/Makefile.objs          |   5 +-
qemu-options.hx               |  10 ++++
util/Makefile.objs            |   1 +
24 files changed, 340 insertions(+), 110 deletions(-)
create mode 100644 include/qemu/random.h
create mode 100644 util/random.c

[Qemu-devel] [PATCH v2 00/14] Add qemu_getrandom and ARMv8.5-RNG

Posted by Richard Henderson 5 days ago
Changes since v1:
  * Build crypto-obj-y for linux-user as well.
  * Several patches to tidy crypto/random-platform.c.
  * Use getrandom(2) in crypto/random-platform.c.
  * Use qcrypto_random_bytes in ui/vnc.c.
  * In qemu_getrandom:
    - Use g_rand_int instead of srand48.
    - Use qcrypto_random_bytes instead of getrandom directly.


r~


Richard Henderson (14):
  crypto: Merge crypto-obj-y into libqemuutil.a
  crypto: Reverse code blocks in random-platform.c
  crypto: Do not fail for EINTR during qcrypto_random_bytes
  crypto: Use O_CLOEXEC in qcrypto_random_init
  crypto: Use getrandom for qcrypto_random_bytes
  crypto: Change the qcrypto_random_bytes buffer type to void*
  ui/vnc: Use qcrypto_random_bytes for make_challenge
  util: Add qemu_getrandom and support functions
  util: Use qcrypto_random_bytes for qemu_getrandom
  linux-user: Call qcrypto_init if not using -seed
  linux-user: Use qemu_getrandom for AT_RANDOM
  linux-user/aarch64: Use qemu_getrandom for arm_init_pauth_key
  linux-user: Remove srand call
  target/arm: Implement ARMv8.5-RNG

 Makefile                      |  12 ++--
 Makefile.objs                 |   8 +--
 Makefile.target               |   4 --
 include/crypto/random.h       |   2 +-
 include/qemu/random.h         |  58 +++++++++++++++++++
 include/qom/cpu.h             |   1 +
 target/arm/cpu.h              |   5 ++
 cpus.c                        |   9 +++
 crypto/random-gcrypt.c        |   2 +-
 crypto/random-gnutls.c        |   2 +-
 crypto/random-platform.c      |  95 +++++++++++++++++-------------
 linux-user/aarch64/cpu_loop.c |  16 +----
 linux-user/elfload.c          |   8 +--
 linux-user/main.c             |  31 +++++-----
 linux-user/syscall.c          |   3 +
 target/arm/cpu64.c            |   1 +
 target/arm/helper.c           |  32 ++++++++++
 ui/vnc.c                      |   8 +--
 util/random.c                 | 106 ++++++++++++++++++++++++++++++++++
 vl.c                          |   4 ++
 configure                     |  27 ++++++---
 crypto/Makefile.objs          |   5 +-
 qemu-options.hx               |  10 ++++
 util/Makefile.objs            |   1 +
 24 files changed, 340 insertions(+), 110 deletions(-)
 create mode 100644 include/qemu/random.h
 create mode 100644 util/random.c

-- 
2.17.1