summaryrefslogtreecommitdiffstats
path: root/usr.bin/kdump
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-09-19 18:53:42 +0000
committerjhb <jhb@FreeBSD.org>2013-09-19 18:53:42 +0000
commitd3ef75b6c79e9e6d642efa9c32a96524d7a5a5b7 (patch)
tree56c7a97f082d488a8b917c2d2d52956076373329 /usr.bin/kdump
parent8ecfe4666e7be9cea4cf6c3ef929de2e8d286f41 (diff)
downloadFreeBSD-src-d3ef75b6c79e9e6d642efa9c32a96524d7a5a5b7.zip
FreeBSD-src-d3ef75b6c79e9e6d642efa9c32a96524d7a5a5b7.tar.gz
Extend the support for exempting processes from being killed when swap is
exhausted. - Add a new protect(1) command that can be used to set or revoke protection from arbitrary processes. Similar to ktrace it can apply a change to all existing descendants of a process as well as future descendants. - Add a new procctl(2) system call that provides a generic interface for control operations on processes (as opposed to the debugger-specific operations provided by ptrace(2)). procctl(2) uses a combination of idtype_t and an id to identify the set of processes on which to operate similar to wait6(). - Add a PROC_SPROTECT control operation to manage the protection status of a set of processes. MADV_PROTECT still works for backwards compatability. - Add a p_flag2 to struct proc (and a corresponding ki_flag2 to kinfo_proc) the first bit of which is used to track if P_PROTECT should be inherited by new child processes. Reviewed by: kib, jilles (earlier version) Approved by: re (delphij) MFC after: 1 month
Diffstat (limited to 'usr.bin/kdump')
-rw-r--r--usr.bin/kdump/kdump.c12
-rw-r--r--usr.bin/kdump/mksubr2
2 files changed, 14 insertions, 0 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index c49b45b..e3e6927 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -1161,6 +1161,18 @@ ktrsyscall(struct ktr_syscall *ktr, u_int flags)
ip++;
narg--;
break;
+ case SYS_procctl:
+ putchar('(');
+ idtypename(*ip, decimal);
+ c = ',';
+ ip++;
+ narg--;
+ print_number(ip, narg, c);
+ putchar(',');
+ procctlcmdname(*ip);
+ ip++;
+ narg--;
+ break;
}
}
while (narg > 0) {
diff --git a/usr.bin/kdump/mksubr b/usr.bin/kdump/mksubr
index 7fd42b7..1859086 100644
--- a/usr.bin/kdump/mksubr
+++ b/usr.bin/kdump/mksubr
@@ -169,6 +169,7 @@ cat <<_EOF_
#include <netinet/in.h>
#include <sys/param.h>
#include <sys/mount.h>
+#include <sys/procctl.h>
#include <sys/ptrace.h>
#include <sys/resource.h>
#include <sys/reboot.h>
@@ -465,6 +466,7 @@ auto_or_type "mountflagsname" "MNT_[A-Z]+[[:space:]]+0x[0-9]+"
auto_switch_type "msyncflagsname" "MS_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h"
auto_or_type "nfssvcname" "NFSSVC_[A-Z0-9]+[[:space:]]+0x[0-9]+" "nfs/nfssvc.h"
auto_switch_type "prioname" "PRIO_[A-Z]+[[:space:]]+[0-9]" "sys/resource.h"
+auto_switch_type "procctlcmdname" "PROC_[A-Z]+[[:space:]]+[0-9]" "sys/procctl.h"
auto_switch_type "ptraceopname" "PT_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/ptrace.h"
auto_switch_type "quotactlname" "Q_[A-Z]+[[:space:]]+0x[0-9]+" "ufs/ufs/quota.h"
auto_or_type "rebootoptname" "RB_[A-Z]+[[:space:]]+0x[0-9]+" "sys/reboot.h"
OpenPOWER on IntegriCloud