)]}'
{
  "commit": "a98406e22c12e514bac28fec0a49dc793edaf3a8",
  "tree": "3d6a14a416a5f8c61030df769a6a91ef0705f85e",
  "parents": [
    "c1e60bd4fe65ede0c7567d22b1e92a07b75c370f"
  ],
  "author": {
    "name": "Daniel Borkmann",
    "email": "dborkman@redhat.com",
    "time": "Sat Aug 23 17:03:28 2014 +0200"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Sun Aug 24 18:36:01 2014 -0700"
  },
  "message": "random32: improvements to prandom_bytes\n\nThis patch addresses a couple of minor items, mostly addesssing\nprandom_bytes(): 1) prandom_bytes{,_state}() should use size_t\nfor length arguments, 2) We can use put_unaligned() when filling\nthe array instead of open coding it [ perhaps some archs will\nfurther benefit from their own arch specific implementation when\nGCC cannot make up for it ], 3) Fix a typo, 4) Better use unsigned\nint as type for getting the arch seed, 5) Make use of\nprandom_u32_max() for timer slack.\n\nRegarding the change to put_unaligned(), callers of prandom_bytes()\nwhich internally invoke prandom_bytes_state(), don\u0027t bother as\nthey expect the array to be filled randomly and don\u0027t have any\ncontrol of the internal state what-so-ever (that\u0027s also why we\nhave periodic reseeding there, etc), so they really don\u0027t care.\n\nNow for the direct callers of prandom_bytes_state(), which\nare solely located in test cases for MTD devices, that is,\ndrivers/mtd/tests/{oobtest.c,pagetest.c,subpagetest.c}:\n\nThese tests basically fill a test write-vector through\nprandom_bytes_state() with an a-priori defined seed each time\nand write that to a MTD device. Later on, they set up a read-vector\nand read back that blocks from the device. So in the verification\nphase, the write-vector is being re-setup [ so same seed and\nprandom_bytes_state() called ], and then memcmp()\u0027ed against the\nread-vector to check if the data is the same.\n\nAkinobu, Lothar and I also tested this patch and it runs through\nthe 3 relevant MTD test cases w/o any errors on the nandsim device\n(simulator for MTD devs) for x86_64, ppc64, ARM (i.MX28, i.MX53\nand i.MX6):\n\n  # modprobe nandsim first_id_byte\u003d0x20 second_id_byte\u003d0xac \\\n                     third_id_byte\u003d0x00 fourth_id_byte\u003d0x15\n  # modprobe mtd_oobtest dev\u003d0\n  # modprobe mtd_pagetest dev\u003d0\n  # modprobe mtd_subpagetest dev\u003d0\n\nWe also don\u0027t have any users depending directly on a particular\nresult of the PRNG (except the PRNG self-test itself), and that\u0027s\njust fine as it e.g. allowed us easily to do things like upgrading\nfrom taus88 to taus113.\n\nSigned-off-by: Daniel Borkmann \u003cdborkman@redhat.com\u003e\nTested-by: Akinobu Mita \u003cakinobu.mita@gmail.com\u003e\nTested-by: Lothar Waßmann \u003cLW@KARO-electronics.de\u003e\nCc: Hannes Frederic Sowa \u003channes@stressinduktion.org\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "57fbbffd77a0406fe57ce2abb5c2a24d819c45f9",
      "old_mode": 33188,
      "old_path": "include/linux/random.h",
      "new_id": "b05856e16b75be8b7dea5015a5a6ff6afcb021eb",
      "new_mode": 33188,
      "new_path": "include/linux/random.h"
    },
    {
      "type": "modify",
      "old_id": "c9b6bf3afe0cbfd833f34304416ad21b5a7c94fc",
      "old_mode": 33188,
      "old_path": "lib/random32.c",
      "new_id": "0bee183fa18faaf3314ac37244469f111408cd26",
      "new_mode": 33188,
      "new_path": "lib/random32.c"
    }
  ]
}
