Skip to content

Commit 83ac4c4

Browse files
committed
Document caveats
1 parent 5a1c19f commit 83ac4c4

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ COPYCAT="/tmp/a /tmp/b" copycat -- cat /tmp/a # this will print "b"
1212
```
1313

1414
Internally `copycat` uses a modern [Seccomp Notifier](https://man7.org/linux/man-pages/man2/seccomp_unotify.2.html) implementation to reliably intercept system calls.
15-
This is cleaner and much faster than usual `ptrace`-based implementations. However due to this relatively new Linux Kernel feature, `copycat` only works on **Linux 5.9** or higher.
15+
This is more elegant and much faster than usual `ptrace`-based implementations. However due to this relatively new Linux Kernel feature, `copycat` only works on **Linux 5.9** or higher.
1616

1717
# Building
1818

@@ -36,7 +36,7 @@ Historically, system call interception was done using `ptrace()`. This has the d
3636
Using this method it is also incredibly cumbersome to overwrite system call arguments, and one quickly has to deal with architecture-specific quirks.
3737

3838
Recent advancements in the [Seccomp Notifier](https://people.kernel.org/brauner/the-seccomp-notifier-cranking-up-the-crazy-with-bpf) API have made it possible to intercept any system call in a much more elegant way.
39-
This also offers significant speed improvements, now the performance impact is more like running the application in a container (with `seccomp`) instead of running in a debugger (with `ptrace`).
39+
This also offers significant speed improvements, now the performance impact is closer to running the application in a container.
4040

4141
# Rules format
4242

@@ -56,3 +56,15 @@ Otherwise the rule matches source literally, i.e. the rule matches only the sing
5656
# Redirect all files and folders in /tmp/f to the single file /etc/f
5757
/tmp/f/ /etc/f
5858
```
59+
60+
# Caveats
61+
62+
Not all `open()`-style syscalls have been implemented yet.
63+
64+
The following syscalls are intercepted:
65+
66+
[x] [openat](https://man7.org/linux/man-pages/man2/openat.2.html)
67+
[x] [openat2](https://man7.org/linux/man-pages/man2/openat2.2.html)
68+
[ ] [open](https://man7.org/linux/man-pages/man2/open.2.html)
69+
70+
Note that if programs use the glibc wrapper for `open` system calls, they often go through an actual `openat()` system call, so it might sometimes seem like more system calls are intercepted than are actually implemented.

0 commit comments

Comments
 (0)