@@ -186,6 +186,7 @@ type InWorkspaceHandler struct {
186
186
Ring2PID int
187
187
Ring2Rootfs string
188
188
BindEvents chan <- BindEvent
189
+ WorkspaceId string
189
190
}
190
191
191
192
// BindEvent describes a process binding to a socket
@@ -196,9 +197,10 @@ type BindEvent struct {
196
197
// Mount handles mount syscalls
197
198
func (h * InWorkspaceHandler ) Mount (req * libseccomp.ScmpNotifReq ) (val uint64 , errno int32 , flags uint32 ) {
198
199
log := log .WithFields (map [string ]interface {}{
199
- "syscall" : "mount" ,
200
- "pid" : req .Pid ,
201
- "id" : req .ID ,
200
+ "syscall" : "mount" ,
201
+ "worksapceId" : h .WorkspaceId ,
202
+ "pid" : req .Pid ,
203
+ "id" : req .ID ,
202
204
})
203
205
204
206
memFile , err := readarg .OpenMem (req .Pid )
@@ -301,9 +303,10 @@ func (h *InWorkspaceHandler) Mount(req *libseccomp.ScmpNotifReq) (val uint64, er
301
303
func (h * InWorkspaceHandler ) Umount (req * libseccomp.ScmpNotifReq ) (val uint64 , errno int32 , flags uint32 ) {
302
304
nme , _ := req .Data .Syscall .GetName ()
303
305
log := log .WithFields (map [string ]interface {}{
304
- "syscall" : nme ,
305
- "pid" : req .Pid ,
306
- "id" : req .ID ,
306
+ "syscall" : nme ,
307
+ "workspaceId" : h .WorkspaceId ,
308
+ "pid" : req .Pid ,
309
+ "id" : req .ID ,
307
310
})
308
311
309
312
memFile , err := readarg .OpenMem (req .Pid )
@@ -380,9 +383,10 @@ func (h *InWorkspaceHandler) Umount(req *libseccomp.ScmpNotifReq) (val uint64, e
380
383
381
384
func (h * InWorkspaceHandler ) Bind (req * libseccomp.ScmpNotifReq ) (val uint64 , errno int32 , flags uint32 ) {
382
385
log := log .WithFields (map [string ]interface {}{
383
- "syscall" : "bind" ,
384
- "pid" : req .Pid ,
385
- "id" : req .ID ,
386
+ "syscall" : "bind" ,
387
+ "workspaceId" : h .WorkspaceId ,
388
+ "pid" : req .Pid ,
389
+ "id" : req .ID ,
386
390
})
387
391
// We want the syscall to succeed, no matter what we do in this handler.
388
392
// The Kernel will execute the syscall for us.
@@ -425,9 +429,10 @@ func (h *InWorkspaceHandler) Bind(req *libseccomp.ScmpNotifReq) (val uint64, err
425
429
426
430
func (h * InWorkspaceHandler ) Chown (req * libseccomp.ScmpNotifReq ) (val uint64 , errno int32 , flags uint32 ) {
427
431
log := log .WithFields (map [string ]interface {}{
428
- "syscall" : "chown" ,
429
- "pid" : req .Pid ,
430
- "id" : req .ID ,
432
+ "syscall" : "chown" ,
433
+ "workspaceId" : h .WorkspaceId ,
434
+ "pid" : req .Pid ,
435
+ "id" : req .ID ,
431
436
})
432
437
433
438
memFile , err := readarg .OpenMem (req .Pid )
0 commit comments