BACKPORT: xfrm/compat: Translate 32-bit user_policy from sockptr
authorDmitry Safonov <dima@arista.com>
Mon, 21 Sep 2020 14:36:56 +0000 (15:36 +0100)
committerAlistair Delva <adelva@google.com>
Mon, 2 Nov 2020 16:18:15 +0000 (16:18 +0000)
commitc5bc319df82451e70b496aced6baf6a189c5e6d0
tree17f27c4f2b83634225658e8e9749dba2546f5dcc
parent8a9083efc58ef602517de57d871e67958b837231
BACKPORT: xfrm/compat: Translate 32-bit user_policy from sockptr

Provide compat_xfrm_userpolicy_info translation for xfrm setsocketopt().
Reallocate buffer and put the missing padding for 64-bit message.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 96392ee5a13b992563cfe07d23ee30d333b89126)
[adelva: Edited around removed compat check in Android kernels]
Bug: 163141236
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I32a6495cd92fa13c956fca88aa5d80716155b8ae
include/net/xfrm.h
net/xfrm/xfrm_compat.c
net/xfrm/xfrm_state.c