randprotect: KSM: add batch random generator helper

can_write_protect() returns a random boolean generated from a 50%
Bernoulli distribution (p = 1/2). This is an helper required later.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
1 file changed