diff --git a/init/Kconfig.gki b/init/Kconfig.gki index 5cc681ed5e63..29eb1eefbd3d 100644 --- a/init/Kconfig.gki +++ b/init/Kconfig.gki @@ -235,6 +235,11 @@ config GKI_HIDDEN_DMA_CONFIGS Dummy config option used to enable the hidden DMA configs, required by various SoC platforms. +config GKI_NET_XFRM_HACKS + bool "XFRM changes required by Android" + help + Android Networking tests fail without this. + # Atrocities needed for # a) building GKI modules in separate tree, or # b) building drivers that are not modularizable @@ -244,6 +249,7 @@ config GKI_HIDDEN_DMA_CONFIGS # config GKI_HACKS_TO_FIX bool "GKI Dummy config options" + select GKI_NET_XFRM_HACKS select GKI_HIDDEN_CRYPTO_CONFIGS select GKI_HIDDEN_DRM_CONFIGS select GKI_HIDDEN_MCP251XFD_CONFIGS diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index 02913caa9a88..8ff6e87aeebf 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c @@ -237,7 +237,7 @@ static struct xfrm_algo_desc aalg_list[] = { .uinfo = { .auth = { - .icv_truncbits = IS_ENABLED(CONFIG_GKI_HACKS_TO_FIX) ? 128 : 96, + .icv_truncbits = IS_ENABLED(CONFIG_GKI_NET_XFRM_HACKS) ? 128 : 96, .icv_fullbits = 256, } }, diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 33bd21ec0811..802304c38e7a 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -2443,7 +2443,7 @@ int xfrm_user_policy(struct sock *sk, int optname, sockptr_t optval, int optlen) return PTR_ERR(data); /* Use the 64-bit / untranslated format on Android, even for compat */ - if (!IS_ENABLED(CONFIG_GKI_HACKS_TO_FIX) || IS_ENABLED(CONFIG_XFRM_USER_COMPAT)) { + if (!IS_ENABLED(CONFIG_GKI_NET_XFRM_HACKS) || IS_ENABLED(CONFIG_XFRM_USER_COMPAT)) { if (in_compat_syscall()) { struct xfrm_translator *xtr = xfrm_get_translator(); diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index d2798a2ffca8..96058961b799 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -3008,7 +3008,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, return -EPERM; /* Use the 64-bit / untranslated format on Android, even for compat */ - if (!IS_ENABLED(CONFIG_GKI_HACKS_TO_FIX) || IS_ENABLED(CONFIG_XFRM_USER_COMPAT)) { + if (!IS_ENABLED(CONFIG_GKI_NET_XFRM_HACKS) || IS_ENABLED(CONFIG_XFRM_USER_COMPAT)) { if (in_compat_syscall()) { struct xfrm_translator *xtr = xfrm_get_translator();