ANDROID: GKI: Fix up abi issue in struct scm_fp_list

In commit e7026f590200 ("UPSTREAM: af_unix: Try to run GC async."), a
new field, count_unix, was added to the structure.  This structure is
ONLY dynamically allocated by the core kernel, and only accessable by a
pointer from anyone else.  To work around abi issues, move the new field
to the end of the structure, ensuring that anyone who was attempting to
access the fields of the structure, would continue to do so in a safe
way.

Add some __GENKSYMS__ magic to keep the crc generation sane, but the
field still needs to be documented as an abi break, so add it to the
abi_gki_aarch64.stg.allowed_breaks file.

Change-Id: I849000eac4f9001b04e4d110dfa74c63067cb786
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Fixes: e7026f590200 ("UPSTREAM: af_unix: Try to run GC async.")
This commit is contained in:
Greg Kroah-Hartman
2025-06-05 13:53:25 +00:00
committed by Treehugger Robot
parent cec9cb02ce
commit 452d899d2f
3 changed files with 14 additions and 2 deletions

View File

@@ -71069,6 +71069,12 @@ member {
name: "count_objects"
type_id: 0x0484940b
}
member {
id: 0x11d6bf1f
name: "count_unix"
type_id: 0xb0312d5a
offset: 16320
}
member {
id: 0x20014498
name: "counter"
@@ -266808,11 +266814,12 @@ struct_union {
kind: STRUCT
name: "scm_fp_list"
definition {
bytesize: 2040
bytesize: 2048
member_id: 0x65956ee9
member_id: 0x97463852
member_id: 0x042a2402
member_id: 0x5449f846
member_id: 0x11d6bf1f
}
}
struct_union {

View File

@@ -141,3 +141,6 @@ type 'struct kvm_hyp_req' changed
type changed from 'union { struct { u8 dest; int nr_pages; int sz_alloc; } mem; struct { unsigned long guest_ipa; size_t size; } map; }' to 'union { struct { u8 dest; int nr_pages; int sz_alloc; } mem; struct { unsigned long guest_ipa; size_t size; } map; struct { unsigned long guest_ipa; size_t size; } split; }'
member 'struct { unsigned long guest_ipa; size_t size; } split' was added
type 'struct scm_fp_list' changed
byte size changed from 2040 to 2048
member 'short count_unix' was added

View File

@@ -24,10 +24,12 @@ struct scm_creds {
struct scm_fp_list {
short count;
short count_unix;
short max;
struct user_struct *user;
struct file *fp[SCM_MAX_FD];
#ifndef __GENKSYMS__
short count_unix;
#endif
};
struct scm_cookie {