diff options
author | 2020-09-16 08:02:53 +0000 | |
---|---|---|
committer | 2020-09-16 08:02:53 +0000 | |
commit | 3de0412fa4bcf517bed9dc31e2af092872f90bcc (patch) | |
tree | 08aa40fa3cec9351ed877f1783d5357dd03676f6 | |
parent | Document that `p_siglist' and `p_sigmask' are updated via atomics. (diff) | |
download | wireguard-openbsd-3de0412fa4bcf517bed9dc31e2af092872f90bcc.tar.xz wireguard-openbsd-3de0412fa4bcf517bed9dc31e2af092872f90bcc.zip |
As discovered by kettenis, recent mesa wants sysctl hw.physmem64, and
in pledged programs that is unfortable. My snark levels are a bit drained,
but I must say I'm always dissapointed when programs operating on virtual
resources enquire about total physical resource availability, the only
reason to ask is so they can act unfair relative to others in the shared
environment. SIGH.
-rw-r--r-- | sys/kern/kern_pledge.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 75539b95db2..2372f2bc9a2 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.263 2020/07/17 16:28:19 florian Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.264 2020/09/16 08:02:53 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -883,9 +883,6 @@ pledge_sysctl(struct proc *p, int miblen, int *mib, void *new) if (miblen == 3 && /* kern.proc_cwd.* */ mib[0] == CTL_KERN && mib[1] == KERN_PROC_CWD) return (0); - if (miblen == 2 && /* hw.physmem */ - mib[0] == CTL_HW && mib[1] == HW_PHYSMEM64) - return (0); if (miblen == 2 && /* kern.ccpu */ mib[0] == CTL_KERN && mib[1] == KERN_CCPU) return (0); @@ -949,6 +946,7 @@ pledge_sysctl(struct proc *p, int miblen, int *mib, void *new) switch (mib[0]) { case CTL_KERN: switch (mib[1]) { + case HW_PHYSMEM64: /* hw.physmem */ case KERN_DOMAINNAME: /* getdomainname() */ case KERN_HOSTNAME: /* gethostname() */ case KERN_OSTYPE: /* uname() */ |