Commit d1b58568 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4fbdd270
...@@ -323,7 +323,7 @@ package main ...@@ -323,7 +323,7 @@ package main
// //
// remmapping is done synchronously via ptrace. // remmapping is done synchronously via ptrace.
// XXX via running wcfs-trusted code wcfs injects into clients. // XXX via running wcfs-trusted code wcfs injects into clients.
// FIXME ptrace won't work when client thread is blocked under pagefault or syscall. // FIXME ptrace won't work when client thread is blocked under pagefault or syscall(+).
// //
// in order to support remmapping for each file/head/data // in order to support remmapping for each file/head/data
// //
...@@ -403,6 +403,26 @@ package main ...@@ -403,6 +403,26 @@ package main
// but before that the analysis remains FUSE-specific. // but before that the analysis remains FUSE-specific.
// //
// //
// (+) the kernel sends SIGSTOP to interrupt tracee, but the signal will be
// processed only when the process returns from kernel space, e.g. here
//
// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/entry/common.c?id=v4.19-rc8-151-g23469de647c4#n160
//
// This way the tracer won't receive obligatory information that tracee
// stopped (via wait...) and even though ptrace(ATTACH) succeeds, all other
// ptrace commands will fail:
//
// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/ptrace.c?id=v4.19-rc8-151-g23469de647c4#n1140
// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/ptrace.c?id=v4.19-rc8-151-g23469de647c4#n207
//
// My original idea was to use ptrace to run code in process to change it's
// memory mappings, while the triggering process is under pagefault/read
// to wcfs, and the above shows it won't work - trying to ptrace the
// client from under wcfs will just block forever (the kernel will be
// waiting for read operation to finish for ptrace, and read will be first
// waiting on ptrace stopping to complete = deadlock)
//
//
// XXX mmap(@at) open // XXX mmap(@at) open
// //
// XXX zconn(s) for historical state // XXX zconn(s) for historical state
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment