xref: /freebsd/usr.bin/proccontrol/proccontrol.1 (revision 504748bc88f1295a9410601225bb82c133ffe51b)
114653744SKonstantin Belousov.\" Copyright (c) 2019 The FreeBSD Foundation, Inc.
214653744SKonstantin Belousov.\" All rights reserved.
314653744SKonstantin Belousov.\"
414653744SKonstantin Belousov.\" This documentation was written by
514653744SKonstantin Belousov.\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship
614653744SKonstantin Belousov.\" from the FreeBSD Foundation.
714653744SKonstantin Belousov.\"
814653744SKonstantin Belousov.\" Redistribution and use in source and binary forms, with or without
914653744SKonstantin Belousov.\" modification, are permitted provided that the following conditions
1014653744SKonstantin Belousov.\" are met:
1114653744SKonstantin Belousov.\" 1. Redistributions of source code must retain the above copyright
1214653744SKonstantin Belousov.\"    notice, this list of conditions and the following disclaimer.
1314653744SKonstantin Belousov.\" 2. Redistributions in binary form must reproduce the above copyright
1414653744SKonstantin Belousov.\"    notice, this list of conditions and the following disclaimer in the
1514653744SKonstantin Belousov.\"    documentation and/or other materials provided with the distribution.
1614653744SKonstantin Belousov.\"
1714653744SKonstantin Belousov.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
1814653744SKonstantin Belousov.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1914653744SKonstantin Belousov.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2014653744SKonstantin Belousov.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
2114653744SKonstantin Belousov.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2214653744SKonstantin Belousov.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2314653744SKonstantin Belousov.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2414653744SKonstantin Belousov.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2514653744SKonstantin Belousov.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2614653744SKonstantin Belousov.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2714653744SKonstantin Belousov.\" SUCH DAMAGE.
2814653744SKonstantin Belousov.\"
2914653744SKonstantin Belousov.\" $FreeBSD$
3014653744SKonstantin Belousov.\"
31*504748bcSKonstantin Belousov.Dd March 13, 2019
3214653744SKonstantin Belousov.Dt PROCCONTROL 1
3314653744SKonstantin Belousov.Os
3414653744SKonstantin Belousov.Sh NAME
3514653744SKonstantin Belousov.Nm proccontrol
3614653744SKonstantin Belousov.Nd Control some process execution aspects
3714653744SKonstantin Belousov.Sh SYNOPSIS
3814653744SKonstantin Belousov.Nm
3914653744SKonstantin Belousov.Fl m Ar mode
4014653744SKonstantin Belousov.Op Fl s Ar control
4114653744SKonstantin Belousov.Op Fl q
4214653744SKonstantin Belousov.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:
5914653744SKonstantin Belousov.Bl -tag -width trapcap
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.
65*504748bcSKonstantin BelousovNote that process is only allowed to enable tracing for itself,
66*504748bcSKonstantin Belousovnot for any other process.
6714653744SKonstantin Belousov.It Ar trapcap
6814653744SKonstantin BelousovControls the signalling of capability mode access violations.
6914653744SKonstantin Belousov.El
7014653744SKonstantin Belousov.Pp
7114653744SKonstantin BelousovThe
72*504748bcSKonstantin Belousov.Ar control
7314653744SKonstantin Belousovspecifies if the selected
7414653744SKonstantin Belousov.Ar mode
7514653744SKonstantin Belousovshould be enabled or disabled.
7614653744SKonstantin BelousovPossible values are
7714653744SKonstantin Belousov.Ar enable
7814653744SKonstantin Belousovand
7914653744SKonstantin Belousov.Ar disable ,
8014653744SKonstantin Belousovwith the default value being
8114653744SKonstantin Belousov.Ar enable
8214653744SKonstantin Belousovif not specified.
8314653744SKonstantin BelousovSee
8414653744SKonstantin Belousov.Xr procctl 2
8514653744SKonstantin Belousovfor detailed description of each mode effects and interaction with other
8614653744SKonstantin Belousovprocess control facilities.
8714653744SKonstantin Belousov.Pp
8814653744SKonstantin BelousovThe
89*504748bcSKonstantin Belousov.Fl q
9014653744SKonstantin Belousovswitch makes the utility query and print the current setting for
9114653744SKonstantin Belousovthe selected mode.
92*504748bcSKonstantin BelousovThe
93*504748bcSKonstantin Belousov.Fl q
94*504748bcSKonstantin Belousovrequires the query target process specification with
95*504748bcSKonstantin Belousov.Fl p .
9614653744SKonstantin Belousov.Sh EXIT STATUS
9714653744SKonstantin Belousov.Ex -std
9814653744SKonstantin Belousov.Sh EXAMPLES
9914653744SKonstantin Belousov.Bl -bullet
10014653744SKonstantin Belousov.It
10114653744SKonstantin BelousovTo disable debuggers attachment to the process 1020, execute
10214653744SKonstantin Belousov.Dl "proccontrol -m trace -s disable -p 1020"
10314653744SKonstantin Belousov.It
10414653744SKonstantin BelousovTo execute the
10514653744SKonstantin Belousov.Xr uniq 1
10614653744SKonstantin Belousovprogram in a mode where capability access violations cause
10714653744SKonstantin Belousov.Dv SIGTRAP
10814653744SKonstantin Belousovdelivery, do
10914653744SKonstantin Belousov.Dl "proccontrol -m trapcap uniq"
11014653744SKonstantin Belousov.It
11114653744SKonstantin BelousovTo query the current ASLR enablement mode for the running
11214653744SKonstantin Belousovprocess 1020, do
11314653744SKonstantin Belousov.Dl "proccontrol -m aslr -q -p 1020"
11414653744SKonstantin Belousov.El
11514653744SKonstantin Belousov.Sh SEE ALSO
11614653744SKonstantin Belousov.Xr kill 2 ,
11714653744SKonstantin Belousov.Xr procctl 2 ,
11814653744SKonstantin Belousov.Xr ptrace 2
11914653744SKonstantin Belousov.Sh HISTORY
12014653744SKonstantin BelousovThe
12114653744SKonstantin Belousov.Nm
12214653744SKonstantin Belousovcommand appeared in
12314653744SKonstantin Belousov.Fx 10.0 .
12414653744SKonstantin Belousov.Sh AUTHORS
12514653744SKonstantin BelousovThe
12614653744SKonstantin Belousov.Nm
12714653744SKonstantin Belousovcommand and this manual page were written by
12814653744SKonstantin Belousov.An Konstantin Belousov Aq Mt kib@freebsd.org
12914653744SKonstantin Belousovunder sponsorship from The FreeBSD Foundation.
130