Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 May 2017 12:40:50 +0000 (UTC)
From:      Eric Badger <badger@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r318743 - in stable: 10/sys/sys 11/sys/kern 11/sys/sys
Message-ID:  <201705231240.v4NCeobS008485@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: badger
Date: Tue May 23 12:40:50 2017
New Revision: 318743
URL: https://svnweb.freebsd.org/changeset/base/318743

Log:
  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

Modified:
  stable/11/sys/kern/kern_thread.c
  stable/11/sys/sys/proc.h

Changes in other areas also in this revision:
Modified:
  stable/10/sys/sys/proc.h

Modified: stable/11/sys/kern/kern_thread.c
==============================================================================
--- stable/11/sys/kern/kern_thread.c	Tue May 23 12:03:59 2017	(r318742)
+++ stable/11/sys/kern/kern_thread.c	Tue May 23 12:40:50 2017	(r318743)
@@ -87,11 +87,11 @@ _Static_assert(offsetof(struct proc, p_f
     "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_f
     "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
 

Modified: stable/11/sys/sys/proc.h
==============================================================================
--- stable/11/sys/sys/proc.h	Tue May 23 12:03:59 2017	(r318742)
+++ stable/11/sys/sys/proc.h	Tue May 23 12:40:50 2017	(r318743)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705231240.v4NCeobS008485>