From 75f9922f6d3c1e5bbbe7b90ca170392cc0f5efbc Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Sun, 21 Oct 2018 16:23:23 +0300 Subject: Refactor io utils, add *-address-rw tools Namespace io_ stuff into mem_io_ to be less likely to collision with anything else. Add io-stream utility for working with streams instead of direct buffers. Add address-rw tools for simple memory read/write, where regions aren't needed. --- src/uio-address-rw.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/uio-address-rw.c (limited to 'src/uio-address-rw.c') diff --git a/src/uio-address-rw.c b/src/uio-address-rw.c new file mode 100644 index 0000000..1606fa4 --- /dev/null +++ b/src/uio-address-rw.c @@ -0,0 +1,13 @@ +#include "cli/cli.h" +#include "mem/io.h" + +// This address-rw uses uio +// It needs recent kernel, but may be racy as it reads / writes while process is running. +// Ideal for realtime memory tools. +// It's recommended to `setcap cap_sys_ptrace=eip uio-region-rw` to run this tool without sudo + +int +main(int argc, const char *argv[]) +{ + return proc_address_rw(argc, argv, mem_io_uio_init); +} -- cgit v1.2.3