git: truss - Use pread(2) instead of seek+read for reading the process' memory.
Imre Vadasz
ivadasz at crater.dragonflybsd.org
Sun Dec 28 07:22:40 PST 2025
commit 6201675f67266a084102e06781b29a135ed50eff
Author: Imre Vadász <imre at vdsz.com>
Date: Sun Dec 28 14:46:02 2025 +0100
truss - Use pread(2) instead of seek+read for reading the process' memory.
* Also drastically simplifies get_string() by setting an absolute maximum
on the length of the string at MAXPATHLEN. That makes it easy to just use
a pread() to read the memory, and then we can simply extract the string
using strndup().
Summary of changes:
usr.bin/truss/syscall.h | 2 +-
usr.bin/truss/syscalls.c | 84 ++++++++++++++++-----------------------------
usr.bin/truss/x86_64-fbsd.c | 10 +++---
3 files changed, 34 insertions(+), 62 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6201675f67266a084102e06781b29a135ed50eff
--
DragonFly BSD source repository
More information about the Commits
mailing list