bpf_map_def: increase BPF_PIN_SUBDIR_CHAR_ARRAY_SIZE from 32 to 66

will allow us to store full pin location, longest we currently have is 64 + NULL:
  $ adb shell find /sys/fs/bpf | egrep net | egrep '.{64}'
  /sys/fs/bpf/netd_shared/prog_netd_cgroupsockrelease_inet_release
  $ adb shell find /sys/fs/bpf | egrep net | egrep '.{65}'
  <nothing>

Choose small value so we don't needlessly bloat the .o's.
This can be trivially increased on demand.

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I62015d2703fdee004fb7279d8f9ca83f7462a4df
This commit is contained in:
Maciej Żenczykowski 2025-07-29 17:27:11 -07:00
commit 5765db482c

View file

@ -120,7 +120,7 @@ void validatePinDir(const char s[BPF_PIN_SUBDIR_CHAR_ARRAY_SIZE]) {
if (!strncmp(s, "netd_shared/", BPF_PIN_SUBDIR_CHAR_ARRAY_SIZE)) return;
if (!strncmp(s, "loader/", BPF_PIN_SUBDIR_CHAR_ARRAY_SIZE)) return;
}
ALOGE("unrecognized pin_subdir '%-32s'", s);
ALOGE("unrecognized pin_subdir '%-*s'", BPF_PIN_SUBDIR_CHAR_ARRAY_SIZE, s);
// Note: we *can* just abort() here as we only load bpf .o files shipped
// in the same mainline module / apex as NetBpfLoad itself.
abort();