Skip to content

Commit

Permalink
(halium) GKI: use Android ABI padding for SYSVIPC task_struct fields
Browse files Browse the repository at this point in the history
This allows to enable CONFIG_SYSVIPC=y without breaking module ABI
  • Loading branch information
NotKit authored and FakeShell committed Dec 6, 2023
1 parent 54a69d2 commit d8d63a1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d8d63a1

Please sign in to comment.