From fbd783363d8d33b28aabade496b82b91171eea6c Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Thu, 19 Jun 2025 11:20:35 +0100 Subject: [PATCH] ANDROID: af_unix: Provide ABI fixes for recently introduced 'struct scm_fp_list' attribute 'dead' 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: If926b8a8bbf293304bbeb7cba66cafe158381fa6 --- android/abi_gki_aarch64.stg | 7 +++++++ android/abi_gki_aarch64.stg.allowed_breaks | 3 +++ include/net/scm.h | 4 +--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/android/abi_gki_aarch64.stg b/android/abi_gki_aarch64.stg index 549171e2c3a4..0de7176f5e86 100644 --- a/android/abi_gki_aarch64.stg +++ b/android/abi_gki_aarch64.stg @@ -76378,6 +76378,12 @@ member { type_id: 0x6d7f5ff6 offset: 3200 } +member { + id: 0x3bde3edb + name: "dead" + type_id: 0x6d7f5ff6 + offset: 16328 +} member { id: 0x6491a5c4 name: "dead" @@ -267019,6 +267025,7 @@ struct_union { member_id: 0x042a2402 member_id: 0x5449f846 member_id: 0x799ec517 + member_id: 0x3bde3edb member_id: 0x7b11d1cc member_id: 0x76d74733 member_id: 0x11d6bda9 diff --git a/android/abi_gki_aarch64.stg.allowed_breaks b/android/abi_gki_aarch64.stg.allowed_breaks index 13804f4bb984..8f5f52dbe65a 100644 --- a/android/abi_gki_aarch64.stg.allowed_breaks +++ b/android/abi_gki_aarch64.stg.allowed_breaks @@ -210,3 +210,6 @@ type 'struct scm_stat' changed byte size changed from 4 to 16 member 'unsigned long nr_unix_fds' was added +type 'struct scm_fp_list' changed + member 'bool dead' was added + diff --git a/include/net/scm.h b/include/net/scm.h index c5ea017d1a83..bdb2639f6bbf 100644 --- a/include/net/scm.h +++ b/include/net/scm.h @@ -29,14 +29,12 @@ struct unix_edge; struct scm_fp_list { short count; short max; -#ifdef CONFIG_UNIX - bool dead; -#endif struct user_struct *user; struct file *fp[SCM_MAX_FD]; #ifndef __GENKSYMS__ #ifdef CONFIG_UNIX bool inflight; + bool dead; struct list_head vertices; struct unix_edge *edges; #endif