ANDROID: eliminate 'CONFIG_GKI_NET_XFRM_HACKS'
Built via: git checkout remotes/linux/v6.10 -- net/xfrm/xfrm_algo.c net/xfrm/xfrm_state.c net/xfrm/xfrm_user.c plus manual fixups to init/Kconfig.gki Bug: 163141236 Test: TreeHugger, manually on UML with 32 and 64-bit Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I22f2eaca43b901dd127ee206129f9f4716c58d4a
This commit is contained in:
committed by
Treehugger Robot
parent
789fc69753
commit
1cf1608b4a
@@ -246,11 +246,6 @@ 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
|
||||
@@ -260,7 +255,6 @@ config GKI_NET_XFRM_HACKS
|
||||
#
|
||||
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
|
||||
|
||||
@@ -238,7 +238,7 @@ static struct xfrm_algo_desc aalg_list[] = {
|
||||
|
||||
.uinfo = {
|
||||
.auth = {
|
||||
.icv_truncbits = IS_ENABLED(CONFIG_GKI_NET_XFRM_HACKS) ? 128 : 96,
|
||||
.icv_truncbits = 96,
|
||||
.icv_fullbits = 256,
|
||||
}
|
||||
},
|
||||
|
||||
+11
-14
@@ -2685,22 +2685,19 @@ int xfrm_user_policy(struct sock *sk, int optname, sockptr_t optval, int optlen)
|
||||
if (IS_ERR(data))
|
||||
return PTR_ERR(data);
|
||||
|
||||
/* Use the 64-bit / untranslated format on Android, even for 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();
|
||||
if (in_compat_syscall()) {
|
||||
struct xfrm_translator *xtr = xfrm_get_translator();
|
||||
|
||||
if (!xtr) {
|
||||
kfree(data);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
if (!xtr) {
|
||||
kfree(data);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
err = xtr->xlate_user_policy_sockptr(&data, optlen);
|
||||
xfrm_put_translator(xtr);
|
||||
if (err) {
|
||||
kfree(data);
|
||||
return err;
|
||||
}
|
||||
err = xtr->xlate_user_policy_sockptr(&data, optlen);
|
||||
xfrm_put_translator(xtr);
|
||||
if (err) {
|
||||
kfree(data);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-14
@@ -3262,22 +3262,19 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
if (!netlink_net_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
/* Use the 64-bit / untranslated format on Android, even for 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();
|
||||
if (in_compat_syscall()) {
|
||||
struct xfrm_translator *xtr = xfrm_get_translator();
|
||||
|
||||
if (!xtr)
|
||||
return -EOPNOTSUPP;
|
||||
if (!xtr)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
nlh64 = xtr->rcv_msg_compat(nlh, link->nla_max,
|
||||
link->nla_pol, extack);
|
||||
xfrm_put_translator(xtr);
|
||||
if (IS_ERR(nlh64))
|
||||
return PTR_ERR(nlh64);
|
||||
if (nlh64)
|
||||
nlh = nlh64;
|
||||
}
|
||||
nlh64 = xtr->rcv_msg_compat(nlh, link->nla_max,
|
||||
link->nla_pol, extack);
|
||||
xfrm_put_translator(xtr);
|
||||
if (IS_ERR(nlh64))
|
||||
return PTR_ERR(nlh64);
|
||||
if (nlh64)
|
||||
nlh = nlh64;
|
||||
}
|
||||
|
||||
if ((type == (XFRM_MSG_GETSA - XFRM_MSG_BASE) ||
|
||||
|
||||
Reference in New Issue
Block a user