ANDROID: struct io_uring ABI preservation hack for 5.10.162 changes
In the 5.10.162 release, the io_uring code was synced with the version
that is in the 5.15.y kernel tree in order to resolve a huge number of
potential, and known, problems with the codebase. This makes for a more
secure and easier-to-update-and-maintain 5.10.y kernel tree, so this is
a great thing, however this caused some issues when it comes to the
Android KABI preservation and checking tools.
A number of the io_uring structures get used in other core kernel
structures, only as "opaque" pointers, so there is not any real ABI
breakage. But, due to the visibility of the structures going away, the
CRC values of many scheduler variables and functions were changed.
In order to preserve the CRC values, to prevent all device kernels to be
forced to rebuild for no reason whatsoever from a functional point of
view, we need to keep around the "old" io_uring structures for the CRC
calculation only. This is done by the following definitions of struct
io_identity and struct io_uring_task which will only be visible when the
CRC calculation build happens, not in any functional kernel build.
Yes, this all is a horrible hack, and these really are not the true
structures that any code uses, but so life is in the world of stable
apis.
Note, libabigail will show a difference in structures here, that is
safe, and the .xml file is updated to reflect this:
type 'struct task_struct' changed
member 'union { void * pf_io_worker; struct { u64 android_kabi_reserved1; }; union { }; }' was added
member 'u64 android_kabi_reserved1' was removed
type 'struct io_uring_task' changed
byte size changed from 176 to 160
member 'int cached_refs' was added
2 members ('struct xarray xa' .. 'struct wait_queue_head wait') changed
offset changed by 64
member changed from 'struct file * last' to 'const struct io_ring_ctx * last'
offset changed from 320 to 384
type changed from 'struct file *' to 'const struct io_ring_ctx *'
pointed-to type changed from 'struct file' to 'const struct io_ring_ctx'
qualifier const added
underlying type changed from 'struct file' to 'struct io_ring_ctx'
member 'struct io_wq * io_wq' was added
member 'struct percpu_counter inflight' changed
offset changed by 128
member 'atomic_t inflight_tracked' was added
member 'struct io_identity __identity' was removed
member 'struct io_identity * identity' was removed
member 'atomic_t in_idle' changed
offset changed by -480
member 'spinlock_t task_lock' was added
member 'struct io_wq_work_list task_list' was added
member 'struct callback_head task_work' was added
member 'bool task_running' was added
member 'bool sqpoll' was removed
Bug: 161946584
Bug: 268174392
Fixes: 4a69d8da ("UPSTREAM: io_uring: import 5.15-stable io_uring")
Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2294f220ae78fe9aa32ee25b81829ae765e9deb2
Loading
Please sign in to comment