Update unimpl.EmitUnimplementedEvent interface to add the syscall number.

This catches up the interface to the `EmitUnimplementedEvent` method signature
on `kernel.Kernel`.

Also add build-time test to verify that `kernel.Kernel` implements this
interface, in order to catch such breakages at build time in the future.

PiperOrigin-RevId: 519000411
This commit is contained in:
Etienne Perot
2023-03-23 17:01:37 -07:00
committed by gVisor bot
parent 68267dccc8
commit f8b9824813
22 changed files with 74 additions and 37 deletions
+3 -3
View File
@@ -2974,7 +2974,7 @@ func (s *sock) SendMsg(t *kernel.Task, src usermem.IOSequence, to []byte, flags
}
// Ioctl implements vfs.FileDescriptionImpl.
func (s *sock) Ioctl(ctx context.Context, uio usermem.IO, args arch.SyscallArguments) (uintptr, error) {
func (s *sock) Ioctl(ctx context.Context, uio usermem.IO, sysno uintptr, args arch.SyscallArguments) (uintptr, error) {
t := kernel.TaskFromContext(ctx)
if t == nil {
panic("ioctl(2) may only be called from a task goroutine")
@@ -3011,11 +3011,11 @@ func (s *sock) Ioctl(ctx context.Context, uio usermem.IO, args arch.SyscallArgum
return 0, err
}
return Ioctl(ctx, s.Endpoint, uio, args)
return Ioctl(ctx, s.Endpoint, uio, sysno, args)
}
// Ioctl performs a socket ioctl.
func Ioctl(ctx context.Context, ep commonEndpoint, io usermem.IO, args arch.SyscallArguments) (uintptr, error) {
func Ioctl(ctx context.Context, ep commonEndpoint, io usermem.IO, sysno uintptr, args arch.SyscallArguments) (uintptr, error) {
t := kernel.TaskFromContext(ctx)
if t == nil {
panic("ioctl(2) may only be called from a task goroutine")