On Fri, Jun 20, 2014 at 9:44 AM, Chema Gonzalez <chema@xxxxxxxxxx> wrote:...
A valid nop is a useful instruction: padding, filling up arrays of- nop: I'd like to have a nop. Do I know why? Nope.nope. Let's not add unnecessary instructions.
sock_filter_int correctly (as in lib/test_bpf.c, where we're currently
using a "ld #0", which loads zero to register A), and other use cases
(see http://en.wikipedia.org/wiki/NOP ).
especially I don't like to add 'nop' instruction.
code==0 to mean 'ld #0' is one of classic BPF ugliness.
We're not filling up arrays with nops in lib/test_bpf.c--
Zero is invalid opcode in eBPF and should stay so, since it's
an easy check for humans like me who are looking at eBPF in hex.