Skip to content

introduce random32_get_bytes() and random32_get_bytes_state()

Akinobu Mita linux-mtd lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest11 patches 3 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11random32: rename prandom32 to random32_statedrivers/scsi/fcoe/fcoe_ctlr.c include/linux/random.h lib/interval_tree_test_main.c +2 more+23 -220 replies
2/11random32: introduce random32_get_bytes() and random32_get_bytes_state()include/linux/random.h lib/random32.c+40 -00 replies
3/11bnx2x: use random32_get_bytes()drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c+1 -40 replies
4/11mtd: nandsim: use random32_get_bytesdrivers/mtd/nand/nandsim.c+1 -40 replies
5/11ubifs: use random32_get_bytesfs/ubifs/debug.c+3 -50 replies
6/11mtd: mtd_nandecctest: use random32_get_bytes instead of get_random_bytes()drivers/mtd/tests/mtd_nandecctest.c+1 -10 replies
7/11mtd: mtd_oobtest: convert to use random32_get_bytes_state()drivers/mtd/tests/mtd_oobtest.c+16 -330 replies
8/11mtd: mtd_pagetest: convert to use random32_get_bytes_state()drivers/mtd/tests/mtd_pagetest.c+13 -300 replies
9/11mtd: mtd_speedtest: use random32_get_bytesdrivers/mtd/tests/mtd_speedtest.c+1 -80 replies
10/11mtd: mtd_subpagetest: convert to use random32_get_bytes_state()drivers/mtd/tests/mtd_subpagetest.c+12 -300 replies
11/11mtd: mtd_stresstest: use random32_get_bytes()drivers/mtd/tests/mtd_stresstest.c+1 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/11] introduce random32_get_bytes() and random32_get_bytes_state()

This patchset introduces new functions into random32 library for getting the requested number of pseudo-random bytes.

Before introducing these new functions into random32 library, prandom32() and prandom32_seed() with "prandom32" prefix are renamed to random32_state() and srandom32_state() respectively.

The purpose of this renaming is to prevent some kernel developers from assuming that prandom32() and random32() might imply that only prandom32() was the one using a pseudo-random number generator by prandom32's "p", and the result may be a very embarassing security exposure.

Changelog

* v2
- rename prandom32 to random32_state
- dropped lib/uuid.c patch
- add bnx2 and mtd_stresstest patches

Akinobu Mita (11):
random32: rename prandom32 to random32_state
random32: introduce random32_get_bytes() and

    random32_get_bytes_state()

bnx2x: use random32_get_bytes()
mtd: nandsim: use random32_get_bytes
ubifs: use random32_get_bytes
mtd: mtd_nandecctest: use random32_get_bytes instead of
get_random_bytes()
mtd: mtd_oobtest: convert to use random32_get_bytes_state()
mtd: mtd_pagetest: convert to use random32_get_bytes_state()
mtd: mtd_speedtest: use random32_get_bytes
mtd: mtd_subpagetest: convert to use random32_get_bytes_state()
mtd: mtd_stresstest: use random32_get_bytes()

 drivers/mtd/nand/nandsim.c                      |  5 +--
 drivers/mtd/tests/mtd_nandecctest.c             |  2 +-
 drivers/mtd/tests/mtd_oobtest.c                 | 49 +++++++-------------
 drivers/mtd/tests/mtd_pagetest.c                | 43 ++++++------------
 drivers/mtd/tests/mtd_speedtest.c               |  9 +---
 drivers/mtd/tests/mtd_stresstest.c              |  3 +-
 drivers/mtd/tests/mtd_subpagetest.c             | 42 +++++------------
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |  5 +--
 drivers/scsi/fcoe/fcoe_ctlr.c                   |  4 +-
 fs/ubifs/debug.c                                |  8 ++--
 include/linux/random.h                          |  8 ++--
 lib/interval_tree_test_main.c                   |  7 +--
 lib/random32.c                                  | 60 ++++++++++++++++++++-----
 lib/rbtree_test.c                               |  6 +--
 14 files changed, 112 insertions(+), 139 deletions(-)
Cc "Theodore Ts'o" <[email protected]>
Cc Artem Bityutskiy <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Eilon Greenstein <[email protected]>
Cc Robert Love <[email protected]>
Cc Michel Lespinasse <[email protected]>
Signature · 1 line
1.7.11.7