diff options
author | badger <badger@FreeBSD.org> | 2017-05-23 12:40:50 +0000 |
---|---|---|
committer | badger <badger@FreeBSD.org> | 2017-05-23 12:40:50 +0000 |
commit | 4be195ca42f9809dadcafc6e7eb30d4b32827cde (patch) | |
tree | 3316bf72a71da3af780f15a12616baab974a1ac3 /sys | |
parent | ec6744a8aa29e6f78a6680cfc47e0fcf8a164b85 (diff) | |
download | FreeBSD-src-4be195ca42f9809dadcafc6e7eb30d4b32827cde.zip FreeBSD-src-4be195ca42f9809dadcafc6e7eb30d4b32827cde.tar.gz |
move p_sigqueue to the end of struct proc
In order to preserve KBI in stable branches, replace the existing
p_sigqueue slot with padding and move the expanded (as of r315949)
p_sigqueue to the end of the struct.
This is a repeat of r317529 (which concerned td_sigqueue in struct
thread) for p_sigqueue in struct proc.
Virtualbox modules (and possibly others) are affected without this fix.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D10843
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_thread.c | 12 | ||||
-rw-r--r-- | sys/sys/proc.h | 6 |
2 files changed, 10 insertions, 8 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 6a42950..03ecabe 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -87,11 +87,11 @@ _Static_assert(offsetof(struct proc, p_flag) == 0xb0, "struct proc KBI p_flag"); _Static_assert(offsetof(struct proc, p_pid) == 0xbc, "struct proc KBI p_pid"); -_Static_assert(offsetof(struct proc, p_filemon) == 0x3d0, +_Static_assert(offsetof(struct proc, p_filemon) == 0x3c0, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x3e0, +_Static_assert(offsetof(struct proc, p_comm) == 0x3d0, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b0, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4a0, "struct proc KBI p_emuldata"); #endif #ifdef __i386__ @@ -107,11 +107,11 @@ _Static_assert(offsetof(struct proc, p_flag) == 0x68, "struct proc KBI p_flag"); _Static_assert(offsetof(struct proc, p_pid) == 0x74, "struct proc KBI p_pid"); -_Static_assert(offsetof(struct proc, p_filemon) == 0x278, +_Static_assert(offsetof(struct proc, p_filemon) == 0x268, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x284, +_Static_assert(offsetof(struct proc, p_comm) == 0x274, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x304, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x2f4, "struct proc KBI p_emuldata"); #endif diff --git a/sys/sys/proc.h b/sys/sys/proc.h index bb0136d..d32807a 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -567,8 +567,8 @@ struct proc { struct mtx p_itimmtx; /* Lock for the virt/prof timers */ struct mtx p_profmtx; /* Lock for the profiling */ struct ksiginfo *p_ksi; /* Locked by parent proc lock */ - sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ -#define p_siglist p_sigqueue.sq_signals + uint64_t padding1[4]; + void *padding2[4]; /* The following fields are all zeroed upon creation in fork. */ #define p_startzero p_oppid @@ -660,6 +660,8 @@ struct proc { u_int p_ptevents; /* (c) ptrace() event mask. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ + sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ +#define p_siglist p_sigqueue.sq_signals }; #define p_session p_pgrp->pg_session |