From 40549e6976cbee55fccba2921e8daf42d2f46f16 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Thu, 19 Jun 2025 11:17:03 +0100 Subject: [PATCH] ANDROID: af_unix: Provide ABI fixes for recently introduced 'struct scm_fp_list' attribute 'inflight' Adding new attributes to the ABI protected 'struct scm_fp_list' changes the offsets of the fields already present in the structure which could cause issues if modules already have a copy and are unaware of the changes. Let's add it to the end of the structure, under the protection of __GENKSYMS__ as is SOP. Bug: 404256079 Signed-off-by: Lee Jones Change-Id: I776f47b1268a44bfd3d890797d5031af145f2782 --- android/abi_gki_aarch64.stg | 27 ++++++++++++++-------- android/abi_gki_aarch64.stg.allowed_breaks | 6 +++++ include/net/scm.h | 4 +--- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/android/abi_gki_aarch64.stg b/android/abi_gki_aarch64.stg index 296fea9d7cd8..d480b60a49e1 100644 --- a/android/abi_gki_aarch64.stg +++ b/android/abi_gki_aarch64.stg @@ -71111,10 +71111,10 @@ member { type_id: 0x0484940b } member { - id: 0x11d6ba75 + id: 0x11d6bda9 name: "count_unix" type_id: 0xb0312d5a - offset: 16512 + offset: 16576 } member { id: 0x20014498 @@ -86203,10 +86203,10 @@ member { offset: 1728 } member { - id: 0x76d74bd1 + id: 0x76d74733 name: "edges" type_id: 0x1df3293f - offset: 16448 + offset: 16512 } member { id: 0x31c31f3f @@ -112759,6 +112759,12 @@ member { type_id: 0xd3c80119 offset: 2752 } +member { + id: 0x799ec517 + name: "inflight" + type_id: 0x6d7f5ff6 + offset: 16320 +} member { id: 0x79c0c441 name: "inflight" @@ -212702,10 +212708,10 @@ member { offset: 16 } member { - id: 0x7b11d7cc + id: 0x7b11d1cc name: "vertices" type_id: 0xd3c80119 - offset: 16320 + offset: 16384 } member { id: 0x444fc004 @@ -266989,14 +266995,15 @@ struct_union { kind: STRUCT name: "scm_fp_list" definition { - bytesize: 2072 + bytesize: 2080 member_id: 0x65956ee9 member_id: 0x97463852 member_id: 0x042a2402 member_id: 0x5449f846 - member_id: 0x7b11d7cc - member_id: 0x76d74bd1 - member_id: 0x11d6ba75 + member_id: 0x799ec517 + member_id: 0x7b11d1cc + member_id: 0x76d74733 + member_id: 0x11d6bda9 } } struct_union { diff --git a/android/abi_gki_aarch64.stg.allowed_breaks b/android/abi_gki_aarch64.stg.allowed_breaks index b01e09c100a4..2015780562f5 100644 --- a/android/abi_gki_aarch64.stg.allowed_breaks +++ b/android/abi_gki_aarch64.stg.allowed_breaks @@ -157,3 +157,9 @@ type 'struct scm_fp_list' changed member 'short count_unix' changed offset changed by 64 +type 'struct scm_fp_list' changed + byte size changed from 2072 to 2080 + member 'bool inflight' was added + 3 members ('struct list_head vertices' .. 'short count_unix') changed + offset changed by 64 + diff --git a/include/net/scm.h b/include/net/scm.h index 985d8a58ba0f..c1d97da8800d 100644 --- a/include/net/scm.h +++ b/include/net/scm.h @@ -29,13 +29,11 @@ struct unix_edge; struct scm_fp_list { short count; short max; -#ifdef CONFIG_UNIX - bool inflight; -#endif struct user_struct *user; struct file *fp[SCM_MAX_FD]; #ifndef __GENKSYMS__ #ifdef CONFIG_UNIX + bool inflight; struct list_head vertices; struct unix_edge *edges; #endif