Re: [PATCH 4/7] lib/random32.c: Use instead of hand-rolling it

2014-06-10 Thread Daniel Borkmann
On 06/08/2014 02:40 PM, George Spelvin wrote: ... + for (i = 0; i < round_down(bytes, sizeof(u32)); i += sizeof(u32)) + put_unaligned_le32(prandom_u32_state(state), p+i); Nit: 'p + i' I don't really care, but I'm happy without the spaces; I add them to show what binds

Re: [PATCH 4/7] lib/random32.c: Use instead of hand-rolling it

2014-06-08 Thread Hannes Frederic Sowa
On Sun, Jun 8, 2014, at 5:40, George Spelvin wrote: > > Seems fine by me, since it's random anyway archs might not care > > about the *_le32, though this might yield additional work in some > > cases I presume. > > If you think that's okay, sure. I kept it consistent to get byte-for-byte >

Re: [PATCH 4/7] lib/random32.c: Use instead of hand-rolling it

2014-06-08 Thread George Spelvin
> Seems fine by me, since it's random anyway archs might not care > about the *_le32, though this might yield additional work in some > cases I presume. If you think that's okay, sure. I kept it consistent to get byte-for-byte identical results. If variations in that are allowed, that can also

Re: [PATCH 4/7] lib/random32.c: Use instead of hand-rolling it

2014-06-08 Thread Daniel Borkmann
On 06/07/2014 10:25 AM, George Spelvin wrote: The functions exist for a reason; the manual byte-at-a-time code is unnecessarily slow (and bloated). Signed-off-by: George Spelvin Seems fine by me, since it's random anyway archs might not care about the *_le32, though this might yield

[PATCH 4/7] lib/random32.c: Use instead of hand-rolling it

2014-06-07 Thread George Spelvin
The functions exist for a reason; the manual byte-at-a-time code is unnecessarily slow (and bloated). Signed-off-by: George Spelvin --- lib/random32.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/random32.c b/lib/random32.c index