Subject: Re: [PATCH v2] filter: added BPF random opcode

From: Daniel Borkmann <[email-masked]>
Date: Tue, 22 Apr 2014 23:10:44 +0200

On 04/21/2014 06:21 PM, Chema Gonzalez wrote:
> Added a new ancillary load (bpf call in eBPF parlance) that produces
> a 32-bit random number. We are implementing it as an ancillary load
> (instead of an ISA opcode) because (a) it is simpler, (b) allows easy
> JITing, and (c) seems more in line with generic ISAs that do not have
> "get a random number" as a instruction, but as an OS call.
>
> The main use for this ancillary load is to perform random packet sampling.
>
> Signed-off-by: Chema Gonzalez <[email-masked]>

Generally, I'm fine with your patch. If some day other use cases pop up
in non-packet filtering areas, we might need to let it return a 64 bit
number, but lets see. Thanks again for updating bpf_asm as well!

Acked-by: Daniel Borkmann <[email-masked]>