svn commit: r340860 - in head/sys: kern sys

Konstantin Belousov kib at FreeBSD.org
Fri Nov 23 23:08:04 UTC 2018


Author: kib
Date: Fri Nov 23 23:07:57 2018
New Revision: 340860
URL: https://svnweb.freebsd.org/changeset/base/340860

Log:
  Provide storage for the process feature control flags in struct proc.
  
  The flags are cleared on exec, it is up to the image activator to set
  them.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/kern/kern_exec.c
  head/sys/kern/kern_thread.c
  head/sys/sys/proc.h

Modified: head/sys/kern/kern_exec.c
==============================================================================
--- head/sys/kern/kern_exec.c	Fri Nov 23 23:07:49 2018	(r340859)
+++ head/sys/kern/kern_exec.c	Fri Nov 23 23:07:57 2018	(r340860)
@@ -488,6 +488,7 @@ interpret:
 		goto exec_fail_dealloc;
 
 	imgp->proc->p_osrel = 0;
+	imgp->proc->p_fctl0 = 0;
 
 	/*
 	 * Implement image setuid/setgid.

Modified: head/sys/kern/kern_thread.c
==============================================================================
--- head/sys/kern/kern_thread.c	Fri Nov 23 23:07:49 2018	(r340859)
+++ head/sys/kern/kern_thread.c	Fri Nov 23 23:07:57 2018	(r340860)
@@ -92,9 +92,9 @@ _Static_assert(offsetof(struct proc, p_pid) == 0xbc,
     "struct proc KBI p_pid");
 _Static_assert(offsetof(struct proc, p_filemon) == 0x3d0,
     "struct proc KBI p_filemon");
-_Static_assert(offsetof(struct proc, p_comm) == 0x3e4,
+_Static_assert(offsetof(struct proc, p_comm) == 0x3e8,
     "struct proc KBI p_comm");
-_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b8,
+_Static_assert(offsetof(struct proc, p_emuldata) == 0x4c0,
     "struct proc KBI p_emuldata");
 #endif
 #ifdef __i386__
@@ -112,9 +112,9 @@ _Static_assert(offsetof(struct proc, p_pid) == 0x74,
     "struct proc KBI p_pid");
 _Static_assert(offsetof(struct proc, p_filemon) == 0x27c,
     "struct proc KBI p_filemon");
-_Static_assert(offsetof(struct proc, p_comm) == 0x28c,
+_Static_assert(offsetof(struct proc, p_comm) == 0x290,
     "struct proc KBI p_comm");
-_Static_assert(offsetof(struct proc, p_emuldata) == 0x318,
+_Static_assert(offsetof(struct proc, p_emuldata) == 0x31c,
     "struct proc KBI p_emuldata");
 #endif
 

Modified: head/sys/sys/proc.h
==============================================================================
--- head/sys/sys/proc.h	Fri Nov 23 23:07:49 2018	(r340859)
+++ head/sys/sys/proc.h	Fri Nov 23 23:07:57 2018	(r340860)
@@ -642,6 +642,7 @@ struct proc {
 	u_int		p_magic;	/* (b) Magic number. */
 	int		p_osrel;	/* (x) osreldate for the
 					       binary (from ELF note, if any) */
+	uint32_t	p_fctl0;	/* (x) ABI feature control, ELF note */
 	char		p_comm[MAXCOMLEN + 1];	/* (x) Process name. */
 	struct sysentvec *p_sysent;	/* (b) Syscall dispatch info. */
 	struct pargs	*p_args;	/* (c) Process arguments. */


More information about the svn-src-all mailing list