From b3d5bbd878b0cf6c582568a5a916f657a7aea556 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 27 Oct 2020 19:03:10 +0100 Subject: [PATCH] ANDROID: GKI: add vendor padding variable in struct sock Some vendors want to add things to 'struct sock', so give them a u64 where they can then have a pointer off to their private data and they can do whatever they want to do without breaking or changing any abi for anyone else. Note, usually an android trace hook is also needed to use this properly, so be aware that this will be required as well. Bug: 171013716 Signed-off-by: Greg Kroah-Hartman Change-Id: I8fdea13b185fba26010e2a2bf397d7982a8fa16e --- include/net/sock.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/net/sock.h b/include/net/sock.h index fb048b2c2c41..eb3c7e89b474 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -69,6 +69,7 @@ #include #include #include +#include /* * This structure really needs to be cleaned up. @@ -521,6 +522,8 @@ struct sock { ANDROID_KABI_RESERVE(6); ANDROID_KABI_RESERVE(7); ANDROID_KABI_RESERVE(8); + + ANDROID_VENDOR_DATA(1); }; enum sk_pacing {