android_kernel_motorola_sm6375/arch/mips
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Martynas Pumputis ae6919a83c UPSTREAM: net: retrieve netns cookie via getsocketopt
It's getting more common to run nested container environments for
testing cloud software. One of such examples is Kind [1] which runs a
Kubernetes cluster in Docker containers on a single host. Each container
acts as a Kubernetes node, and thus can run any Pod (aka container)
inside the former. This approach simplifies testing a lot, as it
eliminates complicated VM setups.

Unfortunately, such a setup breaks some functionality when cgroupv2 BPF
programs are used for load-balancing. The load-balancer BPF program
needs to detect whether a request originates from the host netns or a
container netns in order to allow some access, e.g. to a service via a
loopback IP address. Typically, the programs detect this by comparing
netns cookies with the one of the init ns via a call to
bpf_get_netns_cookie(NULL). However, in nested environments the latter
cannot be used given the Kubernetes node's netns is outside the init ns.
To fix this, we need to pass the Kubernetes node netns cookie to the
program in a different way: by extending getsockopt() with a
SO_NETNS_COOKIE option, the orchestrator which runs in the Kubernetes
node netns can retrieve the cookie and pass it to the program instead.

Thus, this is following up on Eric's commit 3d368ab87cf6 ("net:
initialize net->net_cookie at netns setup") to allow retrieval via
SO_NETNS_COOKIE.  This is also in line in how we retrieve socket cookie
via SO_COOKIE.

  [1] https://kind.sigs.k8s.io/

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Martynas Pumputis <m@lambda.lt>
Cc: Eric Dumazet <edumazet@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e8b9eab99232c4e62ada9d7976c80fd5e8118289)
Bug: 274789652
Tested: builds, net_test passes
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If784a592450af38d70f16da61e36cbbaff80ebca
2026-05-07 10:18:28 -04:00
..
alchemy MIPS: Alchemy: Fix an out-of-bound access in db1550_dev_setup() 2024-01-25 14:34:30 -08:00
ar7
ath25
ath79
bcm47xx MIPS: BCM47XX: Cast memcmp() of function to (void *) 2022-10-26 13:22:47 +02:00
bcm63xx MIPS: BCM63xx: Add check for NULL for clk in clk_enable 2023-01-18 11:40:58 +01:00
bmips mips: bmips: BCM6358: make sure CBR is correctly set 2024-07-05 09:08:22 +02:00
boot mips: lantiq: danube: add missing device_type in pci node 2025-12-03 12:45:10 +01:00
cavium-octeon MIPS: OCTEON: warn only once if deprecated link status is being used 2023-01-18 11:40:58 +01:00
cobalt
configs Remove DECnet support from kernel 2023-06-21 15:44:10 +02:00
crypto UPSTREAM: crypto: mips: add poly1305-core.S to .gitignore 2025-09-24 12:16:39 +02:00
dec MIPS: dec: Declare which_prom() as static 2025-05-02 07:39:23 +02:00
emma
fw MIPS: fw: Allow firmware to pass a empty env 2023-05-17 11:35:32 +02:00
generic MIPS: generic/yamon-dt: fix uninitialized variable error 2021-11-26 10:47:19 +01:00
include UPSTREAM: net: retrieve netns cookie via getsocketopt 2026-05-07 10:18:28 -04:00
jazz dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
jz4740 MIPS: fix build with gcc-12 2022-05-18 09:47:28 +02:00
kernel BACKPORT: maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault 2026-01-14 18:13:21 -08:00
kvm MIPS: KVM: Fix a build warning about variable set but not used 2023-12-08 08:44:24 +01:00
lantiq mips: lantiq: xway: sysctrl: rename stp clock 2025-12-03 12:45:11 +01:00
lasat BACKPORT: sysctl: pass kernel pointers to ->proc_handler 2025-12-23 13:36:15 -08:00
lib treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
loongson32 MIPS: Loongson32: Fix PHY-mode being left unspecified 2022-09-28 11:04:06 +02:00
loongson64
math-emu
mm Merge tag 'ASB-2025-10-06_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-10-08 15:17:54 +03:00
mti-malta MIPS: Malta: Fix !EVA SOC-it PCI MMIO 2025-12-03 12:45:20 +01:00
net
netlogic
oprofile
paravirt
pci MIPS: Octeron: remove source file executable bit 2024-08-19 05:33:33 +02:00
pic32 MIPS: pic32: treat port as signed integer 2022-12-08 11:22:57 +01:00
pistachio
pmcs-msp71xx
pnx833x
power
ralink MIPS: Use address-of operator on section symbols 2022-05-15 19:54:46 +02:00
rb532 MIPS: RB532: fix return value of __setup handler 2022-04-15 14:18:16 +02:00
sgi-ip22
sgi-ip27
sgi-ip32
sibyte
sni MIPS: sni: Fix the build 2021-11-26 10:47:16 +01:00
tools
txx9
vdso This is the 5.4.295 stable release 2025-06-30 08:05:33 +00:00
vr41xx MIPS: Remove repetitive increase irq_err_count 2022-06-29 08:58:46 +02:00
Kbuild
Kbuild.platforms
Kconfig mips/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:56:34 +02:00
Kconfig.debug
Makefile Merge tag 'ASB-2025-10-06_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-10-08 15:17:54 +03:00
Makefile.postlink