New issue
Advanced search Search tips

Issue 908695 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

crosvm: print syscall number for SIGSYS

Project Member Reported by smbar...@chromium.org, Nov 27

Issue description

Need a crosvm libc uprev first, then signalfd should provide the syscall number.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/crosvm/+/8ee09731a4df9d74c4789ea34457200404a9483b

commit 8ee09731a4df9d74c4789ea34457200404a9483b
Author: Stephen Barber <smbarber@chromium.org>
Date: Wed Nov 28 03:13:44 2018

uprev crosvm and 9s libc to 0.2.44

BUG=chromium:908695
TEST=emerge crosvm
CQ-DEPEND=CL:1351218

Change-Id: Ife3895ed07eaba6e768fa7816dca403bc290fb7c
Reviewed-on: https://chromium-review.googlesource.com/1351219
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>

[modify] https://crrev.com/8ee09731a4df9d74c4789ea34457200404a9483b/9s/Cargo.toml
[modify] https://crrev.com/8ee09731a4df9d74c4789ea34457200404a9483b/Cargo.lock
[modify] https://crrev.com/8ee09731a4df9d74c4789ea34457200404a9483b/Cargo.toml

Project Member

Comment 2 by bugdroid1@chromium.org, Nov 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/b1964e613553072e759407d555c0961b1adff4c1

commit b1964e613553072e759407d555c0961b1adff4c1
Author: Stephen Barber <smbarber@chromium.org>
Date: Wed Nov 28 03:13:44 2018

crosvm: update libc crate to 0.2.44

BUG=chromium:908695
TEST=emerge crosvm
CQ-DEPEND=CL:1351219

Change-Id: Ib3c20484cf9a0ce2737d4f0ad185f09aca49713d
Reviewed-on: https://chromium-review.googlesource.com/1351218
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>

[modify] https://crrev.com/b1964e613553072e759407d555c0961b1adff4c1/chromeos-base/crosvm/Manifest
[modify] https://crrev.com/b1964e613553072e759407d555c0961b1adff4c1/chromeos-base/crosvm/crosvm-9999.ebuild

how were you planning on using signalfd ?  if it's a parent process watching a child, and the child gets the SIGSYS (and gets killed), then i don't think the parent process will get the details sent over to it.

i implemented that approach in minijail:
  https://android-review.googlesource.com/838010

the SIGSYS fields are all zero.  looking in the kernel's fs/signalfd.c, SIL_CHLD will fill in the pid and related fields, but it doesn't fill in the seccomp related fields like SIL_SYS does.

i had more thoughts in issue 856316 on the topic.
I had thought for sure that there was a mechanism for surfacing the signal info associated with the SIGCHLD. I guess I thought the SIL_CHLD case would fall through? https://elixir.bootlin.com/linux/latest/source/fs/signalfd.c#L137

Seems like the best option is to fix up the kernel to fill out the SIL_SYS fields as well if the child was killed by SIGSYS.
i would love it if you did that ;).  i think waitid() has the same limitation as i noted in that other bug.
Status: Assigned (was: Started)
Moving back to assigned, this would require a bunch of refactoring of exit_group.

Sign in to add a comment