mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
ANDROID: GKI: fix ABI breakage in struct userfaultfd_ctx
The following two commits move 'userfaultfd_ctx' struct from
fs/userfaultfd.c to header file and then add a rw_semaphore to it. The
ABI is broken by the change. However, given that the type should be
private and not accessed by vendor modules, use some GENKSYMS #define
magic to preserve the CRC. Also update the .stg file for offset
adjustment within 'userfaultfd_ctx'.
5e4c24a57b0c ("userfaultfd: protect mmap_changing with rw_sem in userfaulfd_ctx")
f91e6b41dd11 ("userfaultfd: move userfaultfd_ctx struct to header file")
Bug: 320478828
Change-Id: I5f97ff34dd8c88fe3d18c4dc902452488ba28cbd
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
This commit is contained in:
@@ -122166,6 +122166,12 @@ member {
|
||||
type_id: 0x1d46f863
|
||||
offset: 128
|
||||
}
|
||||
member {
|
||||
id: 0xa03c8629
|
||||
name: "map_changing_lock"
|
||||
type_id: 0x28b9ec9a
|
||||
offset: 960
|
||||
}
|
||||
member {
|
||||
id: 0x7031173c
|
||||
name: "map_check_btf"
|
||||
@@ -128778,10 +128784,10 @@ member {
|
||||
offset: 128
|
||||
}
|
||||
member {
|
||||
id: 0x3025dd18
|
||||
id: 0x3025df0c
|
||||
name: "mm"
|
||||
type_id: 0x1b36c7a2
|
||||
offset: 960
|
||||
offset: 1536
|
||||
}
|
||||
member {
|
||||
id: 0xf2c3ca3b
|
||||
@@ -128982,10 +128988,10 @@ member {
|
||||
offset: 576
|
||||
}
|
||||
member {
|
||||
id: 0xdd180b6b
|
||||
id: 0xdd180ba9
|
||||
name: "mmap_changing"
|
||||
type_id: 0x74d29cf1
|
||||
offset: 928
|
||||
offset: 1472
|
||||
}
|
||||
member {
|
||||
id: 0xc392230a
|
||||
@@ -267504,7 +267510,7 @@ struct_union {
|
||||
kind: STRUCT
|
||||
name: "userfaultfd_ctx"
|
||||
definition {
|
||||
bytesize: 128
|
||||
bytesize: 208
|
||||
member_id: 0x3162bad8
|
||||
member_id: 0x05e73814
|
||||
member_id: 0xc409a485
|
||||
@@ -267514,8 +267520,10 @@ struct_union {
|
||||
member_id: 0x2d2d0282
|
||||
member_id: 0xc55df36f
|
||||
member_id: 0x79d263fe
|
||||
member_id: 0xdd180b6b
|
||||
member_id: 0x3025dd18
|
||||
member_id: 0xa03c8629
|
||||
member_id: 0xdd180ba9
|
||||
member_id: 0x3025df0c
|
||||
member_id: 0x2d081c8a
|
||||
}
|
||||
}
|
||||
struct_union {
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
* since fd_wqh.lock is taken by aio_poll() while it's holding a lock that's
|
||||
* also taken in IRQ context.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ANDROID: CRC fix for commit f91e6b41dd11 ("userfaultfd: move userfaultfd_ctx
|
||||
* struct to header file")
|
||||
*/
|
||||
#ifndef __GENKSYMS__
|
||||
struct userfaultfd_ctx {
|
||||
/* waitqueue head for the pending (i.e. not read) userfaults */
|
||||
wait_queue_head_t fault_pending_wqh;
|
||||
@@ -80,7 +86,10 @@ struct userfaultfd_ctx {
|
||||
atomic_t mmap_changing;
|
||||
/* mm with one ore more vmas attached to this userfaultfd_ctx */
|
||||
struct mm_struct *mm;
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
};
|
||||
#endif
|
||||
|
||||
extern int sysctl_unprivileged_userfaultfd;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user