summaryrefslogtreecommitdiffstats
path: root/sys/sys/ptrace.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-08-15 05:25:06 +0000
committermarcel <marcel@FreeBSD.org>2003-08-15 05:25:06 +0000
commit77c3cd3d303099ad2d819725741f948ad5ff37d8 (patch)
tree6290146a54abb5f571d622ed83197b37076b3bc8 /sys/sys/ptrace.h
parent5f9e1c9d2c9abe81bdafc8d2a4a2ce5ef5f487fb (diff)
downloadFreeBSD-src-77c3cd3d303099ad2d819725741f948ad5ff37d8.zip
FreeBSD-src-77c3cd3d303099ad2d819725741f948ad5ff37d8.tar.gz
Add or finish support for machine dependent ptrace requests. When we
check for permissions, do it for all requests, not the known requests. Later when we actually service the request we deal with the invalid requests we previously caught earlier. This commit changes the behaviour of the ptrace(2) interface for boundary cases such as an unknown request without proper permissions. Previously we would return EINVAL. Now we return EBUSY or EPERM. Platforms need to define __HAVE_PTRACE_MACHDEP when they have MD requests. This makes the prototype of cpu_ptrace() visible and introduces a call to this function for all requests greater or equal to PT_FIRSTMACH. Silence on: audit
Diffstat (limited to 'sys/sys/ptrace.h')
-rw-r--r--sys/sys/ptrace.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h
index 09d8742..ef7262a 100644
--- a/sys/sys/ptrace.h
+++ b/sys/sys/ptrace.h
@@ -81,6 +81,10 @@ struct ptrace_io_desc {
int ptrace_set_pc(struct thread *_td, unsigned long _addr);
int ptrace_single_step(struct thread *_td);
+#ifdef __HAVE_PTRACE_MACHDEP
+int cpu_ptrace(struct thread *_td, int _req, void *_addr, int _data);
+#endif
+
/*
* These are prototypes for functions that implement some of the
* debugging functionality exported by procfs / linprocfs and by the
OpenPOWER on IntegriCloud