daemon, probe: whether CONFIG_CGROUP_BPF is compiled in
daemon, probe: whether CONFIG_CGROUP_BPF is compiled in

Given for new deployments, we probe the kernel and selectivly disable
kube-proxy replacement features, we need to dig a bit deeper to check
whether CONFIG_CGROUP_BPF is compiled in as otherwise we'd try to
proceed with host-reachable services and will later fail to start-up
in init.sh given we cannot attach:

  [...]
  level=warning msg="+ bpftool cgroup attach /var/run/cilium/cgroupv2 post_bind6 pinned /sys/fs/bpf/tc/globals/cilium_cgroups_post_bind6" subsys=datapath-loader
  level=warning msg="Error: failed to attach program" subsys=datapath-loader

I went improving TestDummyProg() rather than relying on a .config to
determine availability of CONFIG_CGROUP_BPF since a config may not
necessarily be available on the underlying system. I've explicitly used
an invalid fd as target cgroup fd to probe on EBADFD code. When compiled
out, we'll simply always get an EINVAL for all kernels.

Fixes: #10097
Signed-off-by: Daniel Borkmann <3d0f3b9ddcacec30c4008c5e030e6c13a478cb4f@iogearbox.net>

tklauser/cilium,tklauser/cilium,tgraf/cilium,cilium/cilium,tklauser/cilium,cilium/cilium,tklauser/cilium,tgraf/cilium,michi-covalent/cilium,michi-covalent/cilium,tgraf/cilium,michi-covalent/cilium,tgraf/cilium,tgraf/cilium,tklauser/cilium,michi-covalent/cilium,michi-covalent/cilium,cilium/cilium,cilium-team/cilium,cilium/cilium,cilium/cilium,tgraf/cilium,cilium-team/cilium