bpf: switch progs from using 'pin_prefix' to 'pin_location'

Note: I discovered that C considers:
  char s[4] = "abcd";
a valid initialization without a terminating NULL, resulting
in an invalid string.

(Specifically pinned programs had a '\1' as their last char
due to little endian encoding of the next field in the array
of prog def structs)

The simplest workaround appears to be to explicitly add a "\0"

That results in a string/array that ends with 2 NULLs,
and the compiler will at most *strip* the final one.

ie.
  char s[4] = "abcd\0";
fails to compile.

Obviously:
  char s[100] = "abcd\0";
also does the right thing, since it 0-pads with or without the extra null.

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iaeb8db2cd4750f8521a971382b9f9f9f216195b2
3 files changed