1dab59af3SLi-Wen Hsu.\" Copyright (c) 2019 The FreeBSD Foundation 214653744SKonstantin Belousov.\" 314653744SKonstantin Belousov.\" This documentation was written by 414653744SKonstantin Belousov.\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship 514653744SKonstantin Belousov.\" from the FreeBSD Foundation. 614653744SKonstantin Belousov.\" 714653744SKonstantin Belousov.\" Redistribution and use in source and binary forms, with or without 814653744SKonstantin Belousov.\" modification, are permitted provided that the following conditions 914653744SKonstantin Belousov.\" are met: 1014653744SKonstantin Belousov.\" 1. Redistributions of source code must retain the above copyright 1114653744SKonstantin Belousov.\" notice, this list of conditions and the following disclaimer. 1214653744SKonstantin Belousov.\" 2. Redistributions in binary form must reproduce the above copyright 1314653744SKonstantin Belousov.\" notice, this list of conditions and the following disclaimer in the 1414653744SKonstantin Belousov.\" documentation and/or other materials provided with the distribution. 1514653744SKonstantin Belousov.\" 1614653744SKonstantin Belousov.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 1714653744SKonstantin Belousov.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1814653744SKonstantin Belousov.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1914653744SKonstantin Belousov.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 2014653744SKonstantin Belousov.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2114653744SKonstantin Belousov.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2214653744SKonstantin Belousov.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2314653744SKonstantin Belousov.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2414653744SKonstantin Belousov.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2514653744SKonstantin Belousov.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2614653744SKonstantin Belousov.\" SUCH DAMAGE. 2714653744SKonstantin Belousov.\" 28*dabf006aSKyle Evans.Dd December 14, 2024 2914653744SKonstantin Belousov.Dt PROCCONTROL 1 3014653744SKonstantin Belousov.Os 3114653744SKonstantin Belousov.Sh NAME 3214653744SKonstantin Belousov.Nm proccontrol 3314653744SKonstantin Belousov.Nd Control some process execution aspects 3414653744SKonstantin Belousov.Sh SYNOPSIS 3514653744SKonstantin Belousov.Nm 3614653744SKonstantin Belousov.Fl m Ar mode 3770174ef7SBrooks Davis.Fl s Ar control 3814653744SKonstantin Belousov.Fl p Ar pid | command 3970174ef7SBrooks Davis.Nm 4070174ef7SBrooks Davis.Fl m Ar mode 4170174ef7SBrooks Davis.Fl q 4270174ef7SBrooks Davis.Op Fl p Ar pid | command 4314653744SKonstantin Belousov.Sh DESCRIPTION 4414653744SKonstantin BelousovThe 4514653744SKonstantin Belousov.Nm 4614653744SKonstantin Belousovcommand modifies the execution parameter of existing process 4714653744SKonstantin Belousovspecified by the 4814653744SKonstantin Belousov.Ar pid 4914653744SKonstantin Belousovargument, or starts execution of the new program 5014653744SKonstantin Belousov.Ar command 5114653744SKonstantin Belousovwith the execution parameter set for it. 5214653744SKonstantin Belousov.Pp 5314653744SKonstantin BelousovWhich execution parameter is changed, selected by the mandatory 5414653744SKonstantin Belousovparameter 5514653744SKonstantin Belousov.Ar mode . 5614653744SKonstantin BelousovPossible values for 5714653744SKonstantin Belousov.Ar mode 5814653744SKonstantin Belousovare: 59*dabf006aSKyle Evans.Bl -tag -width logsigexit 6014653744SKonstantin Belousov.It Ar aslr 6114653744SKonstantin BelousovControl the Address Space Layout Randomization. 6214653744SKonstantin BelousovOnly applicable to the new process spawned. 6314653744SKonstantin Belousov.It Ar trace 6414653744SKonstantin BelousovControl the permission for debuggers to attach. 65504748bcSKonstantin BelousovNote that process is only allowed to enable tracing for itself, 66504748bcSKonstantin Belousovnot for any other process. 6714653744SKonstantin Belousov.It Ar trapcap 6814653744SKonstantin BelousovControls the signalling of capability mode access violations. 6946922074SKonstantin Belousov.It Ar protmax 7046922074SKonstantin BelousovControls the implicit PROT_MAX application for 7146922074SKonstantin Belousov.Xr mmap 2 . 72acb1f126SEdward Tomasz Napierala.It Ar nonewprivs 73acb1f126SEdward Tomasz NapieralaControls disabling the setuid and sgid bits for 74acb1f126SEdward Tomasz Napierala.Xr execve 2 . 75ac8af193SKonstantin Belousov.It Ar wxmap 76ac8af193SKonstantin BelousovControls the write exclusive execute mode for mappings. 77fab66680SKonstantin Belousov.It Ar kpti 78fab66680SKonstantin BelousovControls the KPTI enable, AMD64 only. 79da477bcdSKonstantin Belousov.It Ar la48 80da477bcdSKonstantin BelousovControl limiting usermode process address space to 48 bits of address, 81da477bcdSKonstantin BelousovAMD64 only, on machines capable of 57-bit addressing. 82*dabf006aSKyle Evans.It Ar logsigexit 83*dabf006aSKyle EvansControls the logging of exits due to a signal that would normally cause a core 84*dabf006aSKyle Evansdump. 8514653744SKonstantin Belousov.El 8614653744SKonstantin Belousov.Pp 8714653744SKonstantin BelousovThe 88504748bcSKonstantin Belousov.Ar control 8914653744SKonstantin Belousovspecifies if the selected 9014653744SKonstantin Belousov.Ar mode 9114653744SKonstantin Belousovshould be enabled or disabled. 9214653744SKonstantin BelousovPossible values are 9314653744SKonstantin Belousov.Ar enable 9414653744SKonstantin Belousovand 9514653744SKonstantin Belousov.Ar disable , 9614653744SKonstantin Belousovwith the default value being 9714653744SKonstantin Belousov.Ar enable 9814653744SKonstantin Belousovif not specified. 9914653744SKonstantin BelousovSee 10014653744SKonstantin Belousov.Xr procctl 2 10114653744SKonstantin Belousovfor detailed description of each mode effects and interaction with other 10214653744SKonstantin Belousovprocess control facilities. 10314653744SKonstantin Belousov.Pp 10414653744SKonstantin BelousovThe 105504748bcSKonstantin Belousov.Fl q 10614653744SKonstantin Belousovswitch makes the utility query and print the current setting for 10714653744SKonstantin Belousovthe selected mode. 108504748bcSKonstantin BelousovThe 109504748bcSKonstantin Belousov.Fl q 110504748bcSKonstantin Belousovrequires the query target process specification with 111504748bcSKonstantin Belousov.Fl p . 11214653744SKonstantin Belousov.Sh EXIT STATUS 11314653744SKonstantin Belousov.Ex -std 11414653744SKonstantin Belousov.Sh EXAMPLES 11514653744SKonstantin Belousov.Bl -bullet 11614653744SKonstantin Belousov.It 11714653744SKonstantin BelousovTo disable debuggers attachment to the process 1020, execute 11814653744SKonstantin Belousov.Dl "proccontrol -m trace -s disable -p 1020" 11914653744SKonstantin Belousov.It 12014653744SKonstantin BelousovTo execute the 12114653744SKonstantin Belousov.Xr uniq 1 12214653744SKonstantin Belousovprogram in a mode where capability access violations cause 12314653744SKonstantin Belousov.Dv SIGTRAP 12414653744SKonstantin Belousovdelivery, do 12514653744SKonstantin Belousov.Dl "proccontrol -m trapcap uniq" 12614653744SKonstantin Belousov.It 12714653744SKonstantin BelousovTo query the current ASLR enablement mode for the running 12814653744SKonstantin Belousovprocess 1020, do 12914653744SKonstantin Belousov.Dl "proccontrol -m aslr -q -p 1020" 13014653744SKonstantin Belousov.El 13114653744SKonstantin Belousov.Sh SEE ALSO 13214653744SKonstantin Belousov.Xr kill 2 , 13314653744SKonstantin Belousov.Xr procctl 2 , 1346e5dcc61SEd Maste.Xr ptrace 2 , 1356e5dcc61SEd Maste.Xr mitigations 7 13614653744SKonstantin Belousov.Sh HISTORY 13714653744SKonstantin BelousovThe 13814653744SKonstantin Belousov.Nm 13914653744SKonstantin Belousovcommand appeared in 14014653744SKonstantin Belousov.Fx 10.0 . 14114653744SKonstantin Belousov.Sh AUTHORS 14214653744SKonstantin BelousovThe 14314653744SKonstantin Belousov.Nm 14414653744SKonstantin Belousovcommand and this manual page were written by 14514653744SKonstantin Belousov.An Konstantin Belousov Aq Mt kib@freebsd.org 14614653744SKonstantin Belousovunder sponsorship from The FreeBSD Foundation. 147