Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Sep 2021 21:19:42 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 397f188936c8 - main - Remove SV_CAPSICUM
Message-ID:  <202109212119.18LLJgqC041687@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=397f188936c8a29b6a2d4d13f0cf5681b4bcb9a3

commit 397f188936c8a29b6a2d4d13f0cf5681b4bcb9a3
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-09-13 09:49:13 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-09-21 21:18:44 +0000

    Remove SV_CAPSICUM
    
    It was only needed for cloudabi
    
    Reviewed by:    emaste
    Sponsored by:   The FreeBSD Foundation
    Differential revision:  https://reviews.freebsd.org/D31923
---
 sys/kern/kern_exec.c | 4 ----
 sys/sys/sysent.h     | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index b6959dc18f50..cbe0152a8001 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -681,10 +681,6 @@ interpret:
 		goto exec_fail_dealloc;
 	}
 
-	/* ABI enforces the use of Capsicum. Switch into capabilities mode. */
-	if (SV_PROC_FLAG(p, SV_CAPSICUM))
-		sys_cap_enter(td, NULL);
-
 	/*
 	 * Copy out strings (args and env) and initialize stack base.
 	 */
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index 36d5e473142e..ad50bf56e87d 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -165,7 +165,7 @@ struct sysentvec {
 #define	SV_IA32		0x004000	/* Intel 32-bit executable. */
 #define	SV_AOUT		0x008000	/* a.out executable. */
 #define	SV_SHP		0x010000	/* Shared page. */
-#define	SV_CAPSICUM	0x020000	/* Force cap_enter() on startup. */
+#define	SV_AVAIL1	0x020000	/* Unused */
 #define	SV_TIMEKEEP	0x040000	/* Shared page timehands. */
 #define	SV_ASLR		0x080000	/* ASLR allowed. */
 #define	SV_RNG_SEED_VER	0x100000	/* random(4) reseed generation. */



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