ANDROID: xfrm: fix up CONFIG_ANDROID dependencies

In commit 1045a06724 ("remove CONFIG_ANDROID"), CONFIG_ANDROID was
removed, yet the xfrm networking code was doing some functionally
different things if this option was, or was not, enabled.  Restore the
functionality by having the xfrm code check CONFIG_GKI_HACKS_TO_FIX
instead.

Fixes: 1045a06724 ("remove CONFIG_ANDROID")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib153d5ef8a6935f56e634bcac5afef5070ec9f51
This commit is contained in:
Greg Kroah-Hartman 2022-08-12 15:55:37 +02:00
parent b79b8bbe42
commit c1710ded87
3 changed files with 3 additions and 3 deletions

View File

@ -237,7 +237,7 @@ static struct xfrm_algo_desc aalg_list[] = {
.uinfo = {
.auth = {
.icv_truncbits = IS_ENABLED(CONFIG_ANDROID) ? 128 : 96,
.icv_truncbits = IS_ENABLED(CONFIG_GKI_HACKS_TO_FIX) ? 128 : 96,
.icv_fullbits = 256,
}
},

View File

@ -2442,7 +2442,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_ANDROID) || IS_ENABLED(CONFIG_XFRM_USER_COMPAT)) {
if (!IS_ENABLED(CONFIG_GKI_HACKS_TO_FIX) || IS_ENABLED(CONFIG_XFRM_USER_COMPAT)) {
if (in_compat_syscall()) {
struct xfrm_translator *xtr = xfrm_get_translator();

View File

@ -2878,7 +2878,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_ANDROID) || IS_ENABLED(CONFIG_XFRM_USER_COMPAT)) {
if (!IS_ENABLED(CONFIG_GKI_HACKS_TO_FIX) || IS_ENABLED(CONFIG_XFRM_USER_COMPAT)) {
if (in_compat_syscall()) {
struct xfrm_translator *xtr = xfrm_get_translator();