summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/pipe
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-10-20 11:12:26 -0700
committerShentubot <shentubot@google.com>2018-10-20 11:14:23 -0700
commitb2068cf5a5d43f3898cf389ab2d6151cf61908ac (patch)
tree71ec95233e3c3cfa32757ecb4b01aa73ee9adb1b /pkg/sentry/kernel/pipe
parent8fce67af24945f82378b4c2731cca1788936d074 (diff)
Add more unimplemented syscall events
Added events for *ctl syscalls that may have multiple different commands. For runsc, each syscall event is only logged once. For *ctl syscalls, use the cmd as identifier, not only the syscall number. PiperOrigin-RevId: 218015941 Change-Id: Ie3c19131ae36124861e9b492a7dbe1765d9e5e59
Diffstat (limited to 'pkg/sentry/kernel/pipe')
-rw-r--r--pkg/sentry/kernel/pipe/reader_writer.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/pipe/reader_writer.go b/pkg/sentry/kernel/pipe/reader_writer.go
index 63efc5bbe..36be1efc3 100644
--- a/pkg/sentry/kernel/pipe/reader_writer.go
+++ b/pkg/sentry/kernel/pipe/reader_writer.go
@@ -19,6 +19,7 @@ import (
"math"
"syscall"
+ "gvisor.googlesource.com/gvisor/pkg/abi/linux"
"gvisor.googlesource.com/gvisor/pkg/sentry/arch"
"gvisor.googlesource.com/gvisor/pkg/sentry/context"
"gvisor.googlesource.com/gvisor/pkg/sentry/fs"
@@ -77,7 +78,7 @@ func (rw *ReaderWriter) Readiness(mask waiter.EventMask) waiter.EventMask {
func (rw *ReaderWriter) Ioctl(ctx context.Context, io usermem.IO, args arch.SyscallArguments) (uintptr, error) {
// Switch on ioctl request.
switch int(args[1].Int()) {
- case syscall.TIOCINQ:
+ case linux.FIONREAD:
v := rw.queuedSize()
if v > math.MaxInt32 {
panic(fmt.Sprintf("Impossibly large pipe queued size: %d", v))