svn commit: r314690 - in head: share/man/man5 sys/conf sys/fs/procfs sys/modules/procfs

Eric Badger badger at FreeBSD.org
Sun Mar 5 03:05:26 UTC 2017


Author: badger
Date: Sun Mar  5 03:05:24 2017
New Revision: 314690
URL: https://svnweb.freebsd.org/changeset/base/314690

Log:
  remove procfs ctl interface
  
  This interface has no in-tree consumers and has been more or less
  non-functional for several releases.
  
  Remove manpage note that the procfs special file 'mem' is grouped to
  kmem. This hasn't been true since r81107.
  
  Remove procfs' README file. It is an out of date duplication of the manpage
  (quoth the README: "since the bsd kernel is single-processor...").
  
  Reviewed by:	vangyzen, bcr (manpage)
  Approved by:	des (procfs maintainer), vangyzen (mentor)
  Differential Revision:	https://reviews.freebsd.org/D9802

Deleted:
  head/sys/fs/procfs/README
  head/sys/fs/procfs/procfs_ctl.c
Modified:
  head/share/man/man5/procfs.5
  head/sys/conf/files
  head/sys/fs/procfs/procfs.c
  head/sys/fs/procfs/procfs.h
  head/sys/modules/procfs/Makefile

Modified: head/share/man/man5/procfs.5
==============================================================================
--- head/share/man/man5/procfs.5	Sun Mar  5 00:37:23 2017	(r314689)
+++ head/share/man/man5/procfs.5	Sun Mar  5 03:05:24 2017	(r314690)
@@ -2,7 +2,7 @@
 .\" Written by Garrett Wollman
 .\" This file is in the public domain.
 .\"
-.Dd December 26, 2015
+.Dd March 4, 2017
 .Dt PROCFS 5
 .Os
 .Sh NAME
@@ -33,48 +33,7 @@ special node called
 which always refers to the process making the lookup request.
 .Pp
 Each node is a directory which contains the following entries:
-.Pp
-Each directory contains several files:
 .Bl -tag -width status
-.It Pa ctl
-a write-only file which supports a variety
-of control operations.
-Control commands are written as strings to the
-.Pa ctl
-file.
-The control commands are:
-.Bl -tag -width detach -compact
-.It attach
-stops the target process and arranges for the sending
-process to become the debug control process.
-.It detach
-continue execution of the target process and
-remove it from control by the debug process (which
-need not be the sending process).
-.It run
-continue running the target process until
-a signal is delivered, a breakpoint is hit, or the
-target process exits.
-.It step
-single step the target process, with no signal delivery.
-.It wait
-wait for the target process to come to a steady
-state ready for debugging.
-The target process must be in this state before
-any of the other commands are allowed.
-.El
-.Pp
-The string can also be the name of a signal, lower case
-and without the
-.Dv SIG
-prefix,
-in which case that signal is delivered to the process
-(see
-.Xr sigaction 2 ) .
-.Pp
-The
-.Xr procctl 8
-utility can be used to clear tracepoints in a stuck process.
 .It Pa dbregs
 The debug registers as defined by
 .Dv "struct dbregs"
@@ -188,30 +147,8 @@ to indicate that the process is not runn
 .El
 .El
 .Pp
-In a normal debugging environment,
-where the target is fork/exec'd by the debugger,
-the debugger should fork and the child should stop
-itself (with a self-inflicted
-.Dv SIGSTOP
-for example).
-The parent should issue a
-.Dv wait
-and then an
-.Dv attach
-command via the appropriate
-.Pa ctl
-file.
-The child process will receive a
-.Dv SIGTRAP
-immediately after the call to exec (see
-.Xr execve 2 ) .
-.Pp
 Each node is owned by the process's user, and belongs to that user's
-primary group, except for the
-.Pa mem
-node, which belongs to the
-.Li kmem
-group.
+primary group.
 .Sh FILES
 .Bl -tag -width /proc/curproc/XXXXXXX -compact
 .It Pa /proc
@@ -224,8 +161,6 @@ directory containing process information
 directory containing process information for the current process
 .It Pa /proc/curproc/cmdline
 the process executable name
-.It Pa /proc/curproc/ctl
-used to send control messages to the process
 .It Pa /proc/curproc/etype
 executable type
 .It Pa /proc/curproc/file

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Sun Mar  5 00:37:23 2017	(r314689)
+++ head/sys/conf/files	Sun Mar  5 03:05:24 2017	(r314690)
@@ -3384,7 +3384,6 @@ fs/nullfs/null_subr.c		optional nullfs
 fs/nullfs/null_vfsops.c		optional nullfs
 fs/nullfs/null_vnops.c		optional nullfs
 fs/procfs/procfs.c		optional procfs
-fs/procfs/procfs_ctl.c		optional procfs
 fs/procfs/procfs_dbregs.c	optional procfs
 fs/procfs/procfs_fpregs.c	optional procfs
 fs/procfs/procfs_ioctl.c	optional procfs

Modified: head/sys/fs/procfs/procfs.c
==============================================================================
--- head/sys/fs/procfs/procfs.c	Sun Mar  5 00:37:23 2017	(r314689)
+++ head/sys/fs/procfs/procfs.c	Sun Mar  5 03:05:24 2017	(r314690)
@@ -104,8 +104,7 @@ procfs_attr(PFS_ATTR_ARGS)
 {
 
 	/* XXX inefficient, split into separate functions */
-	if (strcmp(pn->pn_name, "ctl") == 0 ||
-	    strcmp(pn->pn_name, "note") == 0 ||
+	if (strcmp(pn->pn_name, "note") == 0 ||
 	    strcmp(pn->pn_name, "notepg") == 0)
 		vap->va_mode = 0200;
 	else if (strcmp(pn->pn_name, "mem") == 0 ||
@@ -166,8 +165,6 @@ procfs_init(PFS_INIT_ARGS)
 	    procfs_attr, NULL, NULL, PFS_PROCDEP);
 	pfs_create_file(dir, "cmdline", procfs_doproccmdline,
 	    NULL, NULL, NULL, PFS_RD);
-	pfs_create_file(dir, "ctl", procfs_doprocctl,
-	    procfs_attr, NULL, NULL, PFS_WR);
 	pfs_create_file(dir, "dbregs", procfs_doprocdbregs,
 	    procfs_attr, procfs_candebug, NULL, PFS_RDWR|PFS_RAW);
 	pfs_create_file(dir, "etype", procfs_doproctype,

Modified: head/sys/fs/procfs/procfs.h
==============================================================================
--- head/sys/fs/procfs/procfs.h	Sun Mar  5 00:37:23 2017	(r314689)
+++ head/sys/fs/procfs/procfs.h	Sun Mar  5 03:05:24 2017	(r314690)
@@ -41,7 +41,6 @@
 int	 procfs_docurproc(PFS_FILL_ARGS);
 int	 procfs_doosrel(PFS_FILL_ARGS);
 int	 procfs_doproccmdline(PFS_FILL_ARGS);
-int	 procfs_doprocctl(PFS_FILL_ARGS);
 int	 procfs_doprocdbregs(PFS_FILL_ARGS);
 int	 procfs_doprocfile(PFS_FILL_ARGS);
 int	 procfs_doprocfpregs(PFS_FILL_ARGS);

Modified: head/sys/modules/procfs/Makefile
==============================================================================
--- head/sys/modules/procfs/Makefile	Sun Mar  5 00:37:23 2017	(r314689)
+++ head/sys/modules/procfs/Makefile	Sun Mar  5 03:05:24 2017	(r314690)
@@ -6,7 +6,6 @@ KMOD=		procfs
 SRCS=
 SRCS+=		opt_compat.h
 SRCS+=		vnode_if.h
-SRCS+=		procfs_ctl.c
 SRCS+=		procfs_dbregs.c
 SRCS+=		procfs_fpregs.c
 SRCS+=		procfs_ioctl.c


More information about the svn-src-head mailing list