From 69012ea1b2a052ec14338d174c00bf165ba40a22 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 28 Mar 2026 17:12:01 +0000 Subject: [PATCH] After the kernel-writes-the-buffer changes to profil(2) a year ago, the profil(2) call only works for stop/restart of profiling. So pledge no longer interferes and it is available in "stdio". --- lib/libc/sys/pledge.2 | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/libc/sys/pledge.2 b/lib/libc/sys/pledge.2 index 5e63db1a146..2c3d728ce8a 100644 --- a/lib/libc/sys/pledge.2 +++ b/lib/libc/sys/pledge.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pledge.2,v 1.79 2026/03/27 05:14:38 deraadt Exp $ +.\" $OpenBSD: pledge.2,v 1.80 2026/03/28 17:12:01 deraadt Exp $ .\" .\" Copyright (c) 2015 Nicholas Marriott .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 27 2026 $ +.Dd $Mdocdate: March 28 2026 $ .Dt PLEDGE 2 .Os .Sh NAME @@ -157,11 +157,6 @@ These are the promises which can read special files: .Pa /etc/services .Pa /etc/protocols .El -.It Xr profil 2 : -Can only disable profiling. -XXX After the threaded profiling rewrite, is this still true?? I think -the now you can only stop/restart on the existing buffer, because the buffer -is setup at process start. .It Fn pledge : Can only reduce permissions for .Fa promises