CHDEV(1) CHDEV(1)
NAME
chdev - change kernel driver access
SYNOPSIS
chdev [ -nr ] devmask...
DESCRIPTION
Chdev modifies access to kernel drivers for the current pro-
cess and processes within the same name group (see fork(2)).
Access is defined as the ability for a process to walk files
and directories served by the driver through its location
within '#'. Existing binds of drivers are left unaffected.
Access may only be removed; after a specific driver is
ejected no further operations can permit access again.
Access is inherited by all children of the name group,
regardless if the child has elected to receive a clean
namespace.
Devmask is a string of driver characters. The default behav-
ior is to block access to all but the listed drivers. Flags
provide a way to modify this behavior:
-r Retain access to all but the specified drivers.
-n Remove access to all drivers. Devmask is ignored.
Access to some drivers is tied to other related process
capabilities:
mnt(3)
Ability to perform the mount(2) system call, and to
post new services to shr(3).
pipe(3)
Ability to perform the pipe(2) system call.
EXAMPLES
Permit access to only draw(3), rtc(3), fs(3), and srv(3):
chdev irks
Remove access to cons(3), rtc(3), audio(3), and proc(3):
chdev -r crAp
Create a pipe(3) then remove the ability to create more:
Page 1 Plan 9 (printed 12/13/25)
CHDEV(1) CHDEV(1)
bind '#|' /n/pipe
chdev -r '|'
SOURCE
/rc/bin/chdev
SEE ALSO
/dev/drivers for a list of current drivers.
intro(3), cons(3)
DIAGNOSTICS
Chdev is implemented through writes to /dev/drivers, served
by cons(3).
HISTORY
Chdev first appeared in 9front (May, 2022).
Page 2 Plan 9 (printed 12/13/25)