1*14653744SKonstantin Belousov.\" Copyright (c) 2019 The FreeBSD Foundation, Inc. 2*14653744SKonstantin Belousov.\" All rights reserved. 3*14653744SKonstantin Belousov.\" 4*14653744SKonstantin Belousov.\" This documentation was written by 5*14653744SKonstantin Belousov.\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship 6*14653744SKonstantin Belousov.\" from the FreeBSD Foundation. 7*14653744SKonstantin Belousov.\" 8*14653744SKonstantin Belousov.\" Redistribution and use in source and binary forms, with or without 9*14653744SKonstantin Belousov.\" modification, are permitted provided that the following conditions 10*14653744SKonstantin Belousov.\" are met: 11*14653744SKonstantin Belousov.\" 1. Redistributions of source code must retain the above copyright 12*14653744SKonstantin Belousov.\" notice, this list of conditions and the following disclaimer. 13*14653744SKonstantin Belousov.\" 2. Redistributions in binary form must reproduce the above copyright 14*14653744SKonstantin Belousov.\" notice, this list of conditions and the following disclaimer in the 15*14653744SKonstantin Belousov.\" documentation and/or other materials provided with the distribution. 16*14653744SKonstantin Belousov.\" 17*14653744SKonstantin Belousov.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 18*14653744SKonstantin Belousov.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19*14653744SKonstantin Belousov.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20*14653744SKonstantin Belousov.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 21*14653744SKonstantin Belousov.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22*14653744SKonstantin Belousov.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23*14653744SKonstantin Belousov.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24*14653744SKonstantin Belousov.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25*14653744SKonstantin Belousov.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26*14653744SKonstantin Belousov.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27*14653744SKonstantin Belousov.\" SUCH DAMAGE. 28*14653744SKonstantin Belousov.\" 29*14653744SKonstantin Belousov.\" $FreeBSD$ 30*14653744SKonstantin Belousov.\" 31*14653744SKonstantin Belousov.Dd February 22, 2019 32*14653744SKonstantin Belousov.Dt PROCCONTROL 1 33*14653744SKonstantin Belousov.Os 34*14653744SKonstantin Belousov.Sh NAME 35*14653744SKonstantin Belousov.Nm proccontrol 36*14653744SKonstantin Belousov.Nd Control some process execution aspects 37*14653744SKonstantin Belousov.Sh SYNOPSIS 38*14653744SKonstantin Belousov.Nm 39*14653744SKonstantin Belousov.Fl m Ar mode 40*14653744SKonstantin Belousov.Op Fl s Ar control 41*14653744SKonstantin Belousov.Op Fl q 42*14653744SKonstantin Belousov.Fl p Ar pid | command 43*14653744SKonstantin Belousov.Sh DESCRIPTION 44*14653744SKonstantin BelousovThe 45*14653744SKonstantin Belousov.Nm 46*14653744SKonstantin Belousovcommand modifies the execution parameter of existing process 47*14653744SKonstantin Belousovspecified by the 48*14653744SKonstantin Belousov.Ar pid 49*14653744SKonstantin Belousovargument, or starts execution of the new program 50*14653744SKonstantin Belousov.Ar command 51*14653744SKonstantin Belousovwith the execution parameter set for it. 52*14653744SKonstantin Belousov.Pp 53*14653744SKonstantin BelousovWhich execution parameter is changed, selected by the mandatory 54*14653744SKonstantin Belousovparameter 55*14653744SKonstantin Belousov.Ar mode . 56*14653744SKonstantin BelousovPossible values for 57*14653744SKonstantin Belousov.Ar mode 58*14653744SKonstantin Belousovare: 59*14653744SKonstantin Belousov.Bl -tag -width trapcap 60*14653744SKonstantin Belousov.It Ar aslr 61*14653744SKonstantin BelousovControl the Address Space Layout Randomization. 62*14653744SKonstantin BelousovOnly applicable to the new process spawned. 63*14653744SKonstantin Belousov.It Ar trace 64*14653744SKonstantin BelousovControl the permission for debuggers to attach. 65*14653744SKonstantin Belousov.It Ar trapcap 66*14653744SKonstantin BelousovControls the signalling of capability mode access violations. 67*14653744SKonstantin Belousov.El 68*14653744SKonstantin Belousov.Pp 69*14653744SKonstantin BelousovThe 70*14653744SKonstantin BelousovAr control 71*14653744SKonstantin Belousovspecifies if the selected 72*14653744SKonstantin Belousov.Ar mode 73*14653744SKonstantin Belousovshould be enabled or disabled. 74*14653744SKonstantin BelousovPossible values are 75*14653744SKonstantin Belousov.Ar enable 76*14653744SKonstantin Belousovand 77*14653744SKonstantin Belousov.Ar disable , 78*14653744SKonstantin Belousovwith the default value being 79*14653744SKonstantin Belousov.Ar enable 80*14653744SKonstantin Belousovif not specified. 81*14653744SKonstantin BelousovSee 82*14653744SKonstantin Belousov.Xr procctl 2 83*14653744SKonstantin Belousovfor detailed description of each mode effects and interaction with other 84*14653744SKonstantin Belousovprocess control facilities. 85*14653744SKonstantin Belousov.Pp 86*14653744SKonstantin BelousovThe 87*14653744SKonstantin Belousov.Op Fl q 88*14653744SKonstantin Belousovswitch makes the utility query and print the current setting for 89*14653744SKonstantin Belousovthe selected mode. 90*14653744SKonstantin Belousov.Sh EXIT STATUS 91*14653744SKonstantin Belousov.Ex -std 92*14653744SKonstantin Belousov.Sh EXAMPLES 93*14653744SKonstantin Belousov.Bl -bullet 94*14653744SKonstantin Belousov.It 95*14653744SKonstantin BelousovTo disable debuggers attachment to the process 1020, execute 96*14653744SKonstantin Belousov.Dl "proccontrol -m trace -s disable -p 1020" 97*14653744SKonstantin Belousov.It 98*14653744SKonstantin BelousovTo execute the 99*14653744SKonstantin Belousov.Xr uniq 1 100*14653744SKonstantin Belousovprogram in a mode where capability access violations cause 101*14653744SKonstantin Belousov.Dv SIGTRAP 102*14653744SKonstantin Belousovdelivery, do 103*14653744SKonstantin Belousov.Dl "proccontrol -m trapcap uniq" 104*14653744SKonstantin Belousov.It 105*14653744SKonstantin BelousovTo query the current ASLR enablement mode for the running 106*14653744SKonstantin Belousovprocess 1020, do 107*14653744SKonstantin Belousov.Dl "proccontrol -m aslr -q -p 1020" 108*14653744SKonstantin Belousov.El 109*14653744SKonstantin Belousov.Sh SEE ALSO 110*14653744SKonstantin Belousov.Xr kill 2 , 111*14653744SKonstantin Belousov.Xr procctl 2 , 112*14653744SKonstantin Belousov.Xr ptrace 2 113*14653744SKonstantin Belousov.Sh HISTORY 114*14653744SKonstantin BelousovThe 115*14653744SKonstantin Belousov.Nm 116*14653744SKonstantin Belousovcommand appeared in 117*14653744SKonstantin Belousov.Fx 10.0 . 118*14653744SKonstantin Belousov.Sh AUTHORS 119*14653744SKonstantin BelousovThe 120*14653744SKonstantin Belousov.Nm 121*14653744SKonstantin Belousovcommand and this manual page were written by 122*14653744SKonstantin Belousov.An Konstantin Belousov Aq Mt kib@freebsd.org 123*14653744SKonstantin Belousovunder sponsorship from The FreeBSD Foundation. 124