Comments (4)
Hi @yvesf, I don't have an answer for you right now, but @drakenclimber and myself will be spending a bit more time with the libseccomp golang bindings in the near future; hopefully we will be able to answer your question better at that point in time.
If you do find a better answer, please let us know!
from libseccomp-golang.
I looked into this issue a little bit this morning.
I created a small demo where I also can override siginfo.si_code to 0.
I agree, the info->si_code = 0;
line really stinks, but that seems like a golang issue and not a seccomp or seccomp-golang issue.
In that case Go dispatches the signal but the unfortunate side-effect is that the caller of the syscall is then no longer blocked and returns. I don't know how to prevent that and still it's an ugly hack.
For me anyway, the actual signal handler itself behaved just as it would in C. I didn't experience the nonblocking behavior you outlined above.
With this handler, here's what I saw:
static void mySigHandler(int signum, siginfo_t *info, void *context) {
fprintf(stderr, "received of SIGSYS. si_syscall=%d\n", info->si_syscall);
fflush(stderr);
info->si_code = 0;
sleep(10);
exit(5);
}
$ ./traptest
received of SIGSYS. si_syscall=260
<as requested, there was a 10-second delay before the console returned>
In the following case, I commented out the exit()
. Just like in C, the signal was handled - poorly I might add :) - and the main program continued to run after the handler completed. I didn't see any strange nonblocking behavior here.
static void mySigHandler(int signum, siginfo_t *info, void *context) {
fprintf(stderr, "received of SIGSYS. si_syscall=%d\n", info->si_syscall);
fflush(stderr);
info->si_code = 0;
sleep(10);
//exit(5);
}
$ ./traptest
received of SIGSYS. si_syscall=260
<there was a 10-second delay before the following line printed>
should never reach me
from libseccomp-golang.
@drakenclimber @yvesf so, should this be closed as we're unable to reproduce it?
from libseccomp-golang.
@drakenclimber @yvesf so, should this be closed as we're unable to reproduce it?
Yes, I believe so. @yvesf, feel free to reopen this issue if new information is available. Thanks, all.
from libseccomp-golang.
Related Issues (20)
- RFE: drop libseccomp < 2.5.0 support HOT 2
- Q: Is there any way for the NotifReceive function to endοΌ HOT 6
- Check negative value in GetSyscallFromName
- BUG: rename the "master" branch to "main" #255 HOT 2
- BUG: documented CompareMaskedEqual value order incorrect HOT 3
- RFE: add support for RISCV64 HOT 2
- Q: cut a new release HOT 6
- RFE: add seccomp notifier support HOT 5
- BUG: look into replacing Travis CI with GitHub actions HOT 4
- BUG: test failure on ppc64le HOT 21
- BUG: Replace TravisCI Badge with Github Actions Badge HOT 2
- RFE: add release process document HOT 1
- Q: please cut a 0.9.1.1 release with RISC-V support HOT 1
- Q: Ubuntu 20.04 with installed libseccomp-dev libraries HOT 2
- BUG: missing security policy
- ADMIN: add Kir Kolyshkin as a maintainer HOT 12
- Q: enable seccomp notify for API level 5, linux kernel 5.6 and below HOT 4
- BUG: unable to compile on Archlinux HOT 10
- BUG: updated README.md to include the first signed release tag version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libseccomp-golang.