Notifications
Clear all
Topic starter
June 29, 2026 2:00 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Trying to build a minimal runtime profile for a Go binary in NanoClaw. The default seccomp is too permissive for my case. My custom filter blocks everything except `read`, `write`, `exit`, `nanosleep`, `futex`, `mmap`, `munmap`, `brk`, `rt_sigreturn`.
But the process fails with `permission denied` (EPERM) on `mmap`. If I allow `mmap` unconditionally, it works. The issue seems to be with the `args` for `mmap` filtering.
Here's the failing rule:
```c
struct scmp_arg_cond arg_cond[] = {
{ 2, SCMP_CMP_EQ, PROT_READ|PROT_WRITE },
{ 3, SCMP_CMP_EQ, MAP_PRIVATE|MAP_ANONYMOUS }
};
```
Is the bitmask comparison wrong for seccomp-bpf? Should I be using `SCMP_CMP_MASKED_EQ`? The man pages are unclear on handling multiple flag bits.