Files
linux/include/net
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
..
2021-07-01 13:19:48 -07:00
2022-06-22 12:59:43 +01:00
2022-08-23 10:43:11 +02:00
2022-07-28 22:06:15 -07:00
2022-08-09 22:14:02 -07:00
2022-09-30 18:17:17 -07:00
2021-12-16 07:18:35 -08:00
2021-10-15 11:33:08 +01:00
2023-10-17 12:03:09 +00:00
2023-09-19 12:28:03 +02:00
2023-10-17 12:03:09 +00:00
2021-10-13 09:40:46 -07:00
2021-07-27 13:05:56 +01:00
2023-09-18 09:57:37 +00:00
2022-05-11 12:43:10 +01:00
2023-10-10 22:00:46 +02:00
2022-06-19 10:00:02 +01:00
2023-06-14 11:15:20 +02:00
2023-10-17 12:03:09 +00:00
2021-08-03 13:05:26 +01:00
2023-06-13 20:47:37 +00:00
2023-08-11 12:08:17 +02:00