NetBSD/doc/TODO.ptrace
kamil a69b333e73 Remove the filesystem tracing feature
This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.

This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.

This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.

Remove:
 - /proc/#/ctl from mount_procfs(8)
 - P_FSTRACE note from the documentation of ps(1)
 - /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
 - KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
 - source code file miscfs/procfs/procfs_ctl.c
 - PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
 - KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
 - PSL_FSTRACE (0x00010000) from sys/sys/proc.h
 - P_FSTRACE (0x00010000) from sys/sys/sysctl.h

Reduce code complexity after removal of this functionality.

Update TODO.ptrace accordingly: remove two entries about /proc tracing.

Do not keep legacy notes as comments in the headers about removed
PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).

Proposed on tech-kern@.

All filesystem tracing utility users are encouraged to switch to ptrace(2).

Sponsored by <The NetBSD Foundation>
2017-08-28 00:46:06 +00:00

29 lines
1.4 KiB
Plaintext

$NetBSD: TODO.ptrace,v 1.29 2017/08/28 00:46:07 kamil Exp $
Items we (currently) plan to finish in the ptrace(2) field:
- verify ppid of core dump generated with PT_DUMPCORE
it must point to the real parent, not tracer
- adapt OpenBSD regress test (regress/sys/ptrace/ptrace.c) for the ATF context
- reiterate over FreeBSD tests and add missing ones if applicable
- add PT_DUMPCORE tests in the ATF framework
- add ATF tests for PT_WRITE_I and PIOD_WRITE_I - test mprotect restrictions
- research kevent support for tracing a process over a file descriptor,
this means alternative to wait(2)-based events with passing events over the
kqueue API - signal handlers are global per application and they clash with
GUI toolkits (and perhaps other libraries) - this is long term wishlist in
GDB for Linux - the current approach is to fork and debug through GDB remote
protocol (this is how it is done in LLDB)
- add support for PT_STEP, PT_GETREGS, PT_SETREGS, PT_GETFPREGS, PT_SETFPREGS
in all ports
- add proper implementation of PTRACE_VFORK for vfork(2)-like events
- add ATF tests for SIGCHLD
- fix more calls for netbsd32 compat
- research ipkdb(4)
- research kgdb(4)
- check 64-bit debugger on 64-bit kernel tracing capabilities of 32-bit tracee
and of course: fix as many bugs as possible.
Features in ELF, DWARF, CTF, DTrace are out of scope of the above list.