Page MenuHomeFreeBSD

libkern: Add arc4random_uniform
ClosedPublic

Authored by manu on Fri, May 22, 5:21 PM.

Details

Summary

This variant get a random number up to the limit passed as the argument.
This is simply a copy of the libc version.

Sponsored-by: The FreeBSD Foundation

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

manu created this revision.Fri, May 22, 5:21 PM
manu requested review of this revision.Fri, May 22, 5:21 PM
cem added a comment.Fri, May 22, 5:27 PM

Hm, libc version is (or was) a separate file with a different copyright. Usual pattern in libkern is to just copy the libc files to libkern verbatim and only fixup as needed to compile. I don't know that we always have to do that, but we should at least confirm the arc4random_uniform copyright follows the code.

manu added a comment.Fri, May 22, 5:32 PM
In D24962#549612, @cem wrote:

Hm, libc version is (or was) a separate file with a different copyright. Usual pattern in libkern is to just copy the libc files to libkern verbatim and only fixup as needed to compile. I don't know that we always have to do that, but we should at least confirm the arc4random_uniform copyright follows the code.

Right, I didn't pay attention to the licence of the file when I opened it. I'll fix that in a bit

hselasky accepted this revision.Fri, May 22, 6:06 PM
This revision is now accepted and ready to land.Fri, May 22, 6:06 PM
manu updated this revision to Diff 72131.Sat, May 23, 12:08 PM
This revision now requires review to proceed.Sat, May 23, 12:08 PM
cem accepted this revision.Sat, May 23, 4:09 PM

Thanks!

This revision is now accepted and ready to land.Sat, May 23, 4:09 PM
This revision was automatically updated to reflect the committed changes.