Page MenuHomeFreeBSD

D40677.1789594022.diff
No OneTemporary

Size
875 B
Referenced Files
None
Subscribers
None

D40677.1789594022.diff

diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c
--- a/sys/kern/kern_cpuset.c
+++ b/sys/kern/kern_cpuset.c
@@ -1768,6 +1768,20 @@
cpuset_check_capabilities(struct thread *td, cpulevel_t level, cpuwhich_t which,
id_t id)
{
+ if (CAP_TRACING(td)) {
+ if (level != CPU_LEVEL_WHICH)
+ ktrcapfail(CAPFAIL_CPUSET, NULL);
+ if (which != CPU_WHICH_TID && which != CPU_WHICH_PID &&
+ which != CPU_WHICH_TIDPID)
+ ktrcapfail(CAPFAIL_CPUSET, NULL);
+ if (id != -1 && which == CPU_WHICH_TIDPID &&
+ id != td->td_tid && id != td->td_proc->p_pid)
+ ktrcapfail(CAPFAIL_CPUSET, NULL);
+ if (id != -1 &&
+ !(which == CPU_WHICH_TID && id == td->td_tid) &&
+ !(which == CPU_WHICH_PID && id == td->td_proc->p_pid))
+ ktrcapfail(CAPFAIL_CPUSET, NULL);
+ }
if (IN_CAPABILITY_MODE(td)) {
if (level != CPU_LEVEL_WHICH)
return (ECAPMODE);

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 16, 9:27 PM (20 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29707259
Default Alt Text
D40677.1789594022.diff (875 B)

Event Timeline