android_kernel_msm-6.1_noth.../include/net/netns
Norihiko Hama bc4d82ee40 ANDROID: KMI workaround for CONFIG_NETFILTER_FAMILY_BRIDGE
Enabling CONFIG_NETFILTER_FAMILY_BRIDGE causes the new element,
hooks_bridge[] to be added to netns_nf. Since the KMI is frozen
this could not be added.

The only instantiation of struct netns_nf is as an embedded field
of struct net. So instead of adding the field to struct netns_nf,
a new "struct ext_net" is added that contains struct net and
the new hooks_bridge[] field. An accessor function,
get_nf_hooks_bridge() is added to get a pointer to the new
field.

There is a global init_net of type struct net which must be special
cased since it is not a member of a struct ext_net. All other
instances of struct net are allocated via net_alloc() which now
allocates a struct ext_net.

Since CONFIG_NETFILTER_FAMILY_BRIDGE is a hidden config that is
needed for vendor modules, it is enabled via init/Kconfig.gki.

Bug: 316040984
Fixes: 0145780bfc78 ("fix KASAN-related kernel crash by KMI W/A for NETFILTER_FAMILY_BRIDGE")

Change-Id: I2c7384e3df9b88f12464dc0138986fed12ca626a
Signed-off-by: Norihiko Hama <Norihiko.Hama@alpsalpine.com>
2024-01-09 23:37:43 +00:00
..
bpf.h bpf: Invert the dependency between bpf-netns.h and netns/bpf.h 2021-12-29 20:03:05 -08:00
can.h ANDROID: GKI: add kabi padding for structures for the android14 release 2023-06-07 14:24:51 +00:00
conntrack.h Revert "Revert "netfilter: ctnetlink: make event listener tracking global"" 2023-03-30 12:23:02 +01:00
core.h net: add missing includes and forward declarations under net/ 2022-07-22 12:53:22 +01:00
flow_table.h netfilter: nf_flow_table: count pending offload workqueue tasks 2022-07-11 16:25:14 +02:00
generic.h netns: Replace zero-length array with DECLARE_FLEX_ARRAY() helper 2022-09-28 18:51:47 -07:00
hash.h
ieee802154_6lowpan.h
ipv4.h ANDROID: GKI: add kabi padding for structures for the android14 release 2023-06-07 14:24:51 +00:00
ipv6.h UPSTREAM: net/ipv6: fix bool/int mismatch for skip_notify_on_dev_down 2023-06-14 23:02:42 +00:00
mctp.h net: add missing includes and forward declarations under net/ 2022-07-22 12:53:22 +01:00
mib.h
mpls.h net: add missing includes and forward declarations under net/ 2022-07-22 12:53:22 +01:00
netfilter.h ANDROID: KMI workaround for CONFIG_NETFILTER_FAMILY_BRIDGE 2024-01-09 23:37:43 +00:00
nexthop.h net: add missing includes and forward declarations under net/ 2022-07-22 12:53:22 +01:00
nftables.h ANDROID: GKI: add kabi padding for structures for the android14 release 2023-06-07 14:24:51 +00:00
packet.h
sctp.h net: add missing includes and forward declarations under net/ 2022-07-22 12:53:22 +01:00
smc.h net/smc: Unbind r/w buffer size from clcsock and make them tunable 2022-09-22 12:58:21 +02:00
unix.h net: add missing includes and forward declarations under net/ 2022-07-22 12:53:22 +01:00
xdp.h
xfrm.h ANDROID: GKI: add kabi padding for structures for the android14 release 2023-06-07 14:24:51 +00:00