New issue
Advanced search Search tips

Issue 856316 link

Starred by 0 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

minijail: support logging of children seccomp syscall failures

Project Member Reported by vapier@chromium.org, Jun 25 2018

Issue description

background thread:
  https://groups.google.com/a/google.com/forum/#!topic/minijail-users/V0IonkB5mJE

i looked at improving minijail's "child process 4570 received signal 31" message, but it looks like that's not easy today.  the waitid() syscall fills in siginfo_t like it's always a SIGCHLD event instead of filling it out like a sigaction signal handler would.
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/exit.c?h=v4.11#n1620

and the minijail loop code works by calling minijail_wait() which calls waitid().  we could update minijail0.c so that it listened for events and saved the full siginfo_t data, but it wouldn't work for direct libminijail0 users.  seems like the best course of action would be to update the kernel directly to support filling out siginfo_t the way it would for sigaction callbacks, and then changing minijail to use that.
 
(nonworking) signalfd approach here:
  https://android-review.googlesource.com/838010

i suspect it fails for the same reason outlined in comment #0

Sign in to add a comment