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> |
||
---|---|---|
.. | ||
.gitignore | ||
build-version | ||
calibrate.c | ||
do_mounts_initrd.c | ||
do_mounts_rd.c | ||
do_mounts.c | ||
do_mounts.h | ||
init_task.c | ||
initramfs.c | ||
Kconfig | ||
Kconfig.gki | ||
main.c | ||
Makefile | ||
noinitramfs.c | ||
version-timestamp.c | ||
version.c |