From owner-svn-src-head@freebsd.org Fri Nov 23 23:08:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F7151133A1A; Fri, 23 Nov 2018 23:08:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 695337880B; Fri, 23 Nov 2018 23:08:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40E20252D8; Fri, 23 Nov 2018 23:07:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wANN7wAF032779; Fri, 23 Nov 2018 23:07:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wANN7vYH032776; Fri, 23 Nov 2018 23:07:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201811232307.wANN7vYH032776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Nov 2018 23:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340860 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 340860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 695337880B X-Spamd-Result: default: False [1.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.42)[0.420,0]; NEURAL_SPAM_MEDIUM(0.73)[0.730,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.51)[0.506,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2018 23:08:04 -0000 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. */