-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path0ac686b9e81ba331c2ad9b420fd21262a80daaa4.patch
47 lines (43 loc) · 1.49 KB
/
0ac686b9e81ba331c2ad9b420fd21262a80daaa4.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 0ac686b9e81ba331c2ad9b420fd21262a80daaa4 Mon Sep 17 00:00:00 2001
From: TheKit <[email protected]>
Date: Sat, 15 Oct 2022 11:20:36 +0000
Subject: [PATCH] (halium) GKI: use Android ABI padding for SYSVIPC task_struct
fields
This allows to enable CONFIG_SYSVIPC=y without breaking module ABI
---
include/linux/sched.h | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index a9427da2dfdd..a14925566baf 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -969,8 +969,10 @@ struct task_struct {
struct nameidata *nameidata;
#ifdef CONFIG_SYSVIPC
- struct sysv_sem sysvsem;
- struct sysv_shm sysvshm;
+ // struct sysv_sem sysvsem;
+ /* sysvsem is in the ANDROID_KABI_RESERVE(1) field below */
+ // struct sysv_shm sysvshm;
+ /* sysvshm is in the ANDROID_KABI_RESERVE(1) field below */
#endif
#ifdef CONFIG_DETECT_HUNG_TASK
unsigned long last_switch_count;
@@ -1383,9 +1385,18 @@ struct task_struct {
ANDROID_KABI_RESERVE(3);
ANDROID_KABI_RESERVE(4);
ANDROID_KABI_RESERVE(5);
+
+#if defined(CONFIG_SYSVIPC)
+ // struct sysv_sem sysvsem;
+ ANDROID_KABI_USE(6, struct sysv_sem sysvsem);
+ // struct sysv_shm sysvshm;
+ _ANDROID_KABI_REPLACE(ANDROID_KABI_RESERVE(7); ANDROID_KABI_RESERVE(8),
+ struct sysv_shm sysvshm);
+#else
ANDROID_KABI_RESERVE(6);
ANDROID_KABI_RESERVE(7);
ANDROID_KABI_RESERVE(8);
+#endif
/*
* New fields for task_struct should be added above here, so that