Could we please get: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... 'net: retrieve netns cookie via getsocketopt'
included in 5.10 LTS.
This is technically a feature, but it's absolutely trivial - it just adds a new getsockopt to fetch a u64. Using netns cookies from bpf without it is pretty annoying.
It doesn't cherrypick to 5.10 cleanly, due to trivial conflicts in header files (previous constants haven't yet been defined), and because of a post 5.10 change from atomic64_t to u64 - which requires adding in an atomic_read(&).
I've uploaded a compiling version to: https://android-review.googlesource.com/c/kernel/common/+/2503056 I think you should be able to cherrypick it via: git fetch https://android.googlesource.com/kernel/common refs/changes/56/2503056/2 && git cherry-pick FETCH_HEAD
Thanks!
Maciej Żenczykowski, Kernel Networking Developer @ Google