github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/sentry/kernel/kernel_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package kernel 4 5 import ( 6 "github.com/MerlinKodo/gvisor/pkg/bpf" 7 "github.com/MerlinKodo/gvisor/pkg/state" 8 "github.com/MerlinKodo/gvisor/pkg/tcpip" 9 ) 10 11 func (a *abstractEndpoint) StateTypeName() string { 12 return "pkg/sentry/kernel.abstractEndpoint" 13 } 14 15 func (a *abstractEndpoint) StateFields() []string { 16 return []string{ 17 "ep", 18 "socket", 19 "name", 20 "ns", 21 } 22 } 23 24 func (a *abstractEndpoint) beforeSave() {} 25 26 // +checklocksignore 27 func (a *abstractEndpoint) StateSave(stateSinkObject state.Sink) { 28 a.beforeSave() 29 stateSinkObject.Save(0, &a.ep) 30 stateSinkObject.Save(1, &a.socket) 31 stateSinkObject.Save(2, &a.name) 32 stateSinkObject.Save(3, &a.ns) 33 } 34 35 func (a *abstractEndpoint) afterLoad() {} 36 37 // +checklocksignore 38 func (a *abstractEndpoint) StateLoad(stateSourceObject state.Source) { 39 stateSourceObject.Load(0, &a.ep) 40 stateSourceObject.Load(1, &a.socket) 41 stateSourceObject.Load(2, &a.name) 42 stateSourceObject.Load(3, &a.ns) 43 } 44 45 func (a *AbstractSocketNamespace) StateTypeName() string { 46 return "pkg/sentry/kernel.AbstractSocketNamespace" 47 } 48 49 func (a *AbstractSocketNamespace) StateFields() []string { 50 return []string{ 51 "endpoints", 52 } 53 } 54 55 func (a *AbstractSocketNamespace) beforeSave() {} 56 57 // +checklocksignore 58 func (a *AbstractSocketNamespace) StateSave(stateSinkObject state.Sink) { 59 a.beforeSave() 60 stateSinkObject.Save(0, &a.endpoints) 61 } 62 63 func (a *AbstractSocketNamespace) afterLoad() {} 64 65 // +checklocksignore 66 func (a *AbstractSocketNamespace) StateLoad(stateSourceObject state.Source) { 67 stateSourceObject.Load(0, &a.endpoints) 68 } 69 70 func (c *Cgroup) StateTypeName() string { 71 return "pkg/sentry/kernel.Cgroup" 72 } 73 74 func (c *Cgroup) StateFields() []string { 75 return []string{ 76 "Dentry", 77 "CgroupImpl", 78 } 79 } 80 81 func (c *Cgroup) beforeSave() {} 82 83 // +checklocksignore 84 func (c *Cgroup) StateSave(stateSinkObject state.Sink) { 85 c.beforeSave() 86 stateSinkObject.Save(0, &c.Dentry) 87 stateSinkObject.Save(1, &c.CgroupImpl) 88 } 89 90 func (c *Cgroup) afterLoad() {} 91 92 // +checklocksignore 93 func (c *Cgroup) StateLoad(stateSourceObject state.Source) { 94 stateSourceObject.Load(0, &c.Dentry) 95 stateSourceObject.Load(1, &c.CgroupImpl) 96 } 97 98 func (h *hierarchy) StateTypeName() string { 99 return "pkg/sentry/kernel.hierarchy" 100 } 101 102 func (h *hierarchy) StateFields() []string { 103 return []string{ 104 "id", 105 "name", 106 "controllers", 107 "fs", 108 } 109 } 110 111 func (h *hierarchy) beforeSave() {} 112 113 // +checklocksignore 114 func (h *hierarchy) StateSave(stateSinkObject state.Sink) { 115 h.beforeSave() 116 stateSinkObject.Save(0, &h.id) 117 stateSinkObject.Save(1, &h.name) 118 stateSinkObject.Save(2, &h.controllers) 119 stateSinkObject.Save(3, &h.fs) 120 } 121 122 func (h *hierarchy) afterLoad() {} 123 124 // +checklocksignore 125 func (h *hierarchy) StateLoad(stateSourceObject state.Source) { 126 stateSourceObject.Load(0, &h.id) 127 stateSourceObject.Load(1, &h.name) 128 stateSourceObject.Load(2, &h.controllers) 129 stateSourceObject.Load(3, &h.fs) 130 } 131 132 func (r *CgroupRegistry) StateTypeName() string { 133 return "pkg/sentry/kernel.CgroupRegistry" 134 } 135 136 func (r *CgroupRegistry) StateFields() []string { 137 return []string{ 138 "lastHierarchyID", 139 "lastCgroupID", 140 "controllers", 141 "hierarchies", 142 "hierarchiesByName", 143 "cgroups", 144 } 145 } 146 147 func (r *CgroupRegistry) beforeSave() {} 148 149 // +checklocksignore 150 func (r *CgroupRegistry) StateSave(stateSinkObject state.Sink) { 151 r.beforeSave() 152 stateSinkObject.Save(0, &r.lastHierarchyID) 153 stateSinkObject.Save(1, &r.lastCgroupID) 154 stateSinkObject.Save(2, &r.controllers) 155 stateSinkObject.Save(3, &r.hierarchies) 156 stateSinkObject.Save(4, &r.hierarchiesByName) 157 stateSinkObject.Save(5, &r.cgroups) 158 } 159 160 func (r *CgroupRegistry) afterLoad() {} 161 162 // +checklocksignore 163 func (r *CgroupRegistry) StateLoad(stateSourceObject state.Source) { 164 stateSourceObject.Load(0, &r.lastHierarchyID) 165 stateSourceObject.Load(1, &r.lastCgroupID) 166 stateSourceObject.Load(2, &r.controllers) 167 stateSourceObject.Load(3, &r.hierarchies) 168 stateSourceObject.Load(4, &r.hierarchiesByName) 169 stateSourceObject.Load(5, &r.cgroups) 170 } 171 172 func (f *FDFlags) StateTypeName() string { 173 return "pkg/sentry/kernel.FDFlags" 174 } 175 176 func (f *FDFlags) StateFields() []string { 177 return []string{ 178 "CloseOnExec", 179 } 180 } 181 182 func (f *FDFlags) beforeSave() {} 183 184 // +checklocksignore 185 func (f *FDFlags) StateSave(stateSinkObject state.Sink) { 186 f.beforeSave() 187 stateSinkObject.Save(0, &f.CloseOnExec) 188 } 189 190 func (f *FDFlags) afterLoad() {} 191 192 // +checklocksignore 193 func (f *FDFlags) StateLoad(stateSourceObject state.Source) { 194 stateSourceObject.Load(0, &f.CloseOnExec) 195 } 196 197 func (d *descriptor) StateTypeName() string { 198 return "pkg/sentry/kernel.descriptor" 199 } 200 201 func (d *descriptor) StateFields() []string { 202 return []string{ 203 "file", 204 "flags", 205 } 206 } 207 208 func (d *descriptor) beforeSave() {} 209 210 // +checklocksignore 211 func (d *descriptor) StateSave(stateSinkObject state.Sink) { 212 d.beforeSave() 213 stateSinkObject.Save(0, &d.file) 214 stateSinkObject.Save(1, &d.flags) 215 } 216 217 func (d *descriptor) afterLoad() {} 218 219 // +checklocksignore 220 func (d *descriptor) StateLoad(stateSourceObject state.Source) { 221 stateSourceObject.Load(0, &d.file) 222 stateSourceObject.Load(1, &d.flags) 223 } 224 225 func (f *FDTable) StateTypeName() string { 226 return "pkg/sentry/kernel.FDTable" 227 } 228 229 func (f *FDTable) StateFields() []string { 230 return []string{ 231 "FDTableRefs", 232 "k", 233 "descriptorTable", 234 } 235 } 236 237 func (f *FDTable) beforeSave() {} 238 239 // +checklocksignore 240 func (f *FDTable) StateSave(stateSinkObject state.Sink) { 241 f.beforeSave() 242 var descriptorTableValue map[int32]descriptor 243 descriptorTableValue = f.saveDescriptorTable() 244 stateSinkObject.SaveValue(2, descriptorTableValue) 245 stateSinkObject.Save(0, &f.FDTableRefs) 246 stateSinkObject.Save(1, &f.k) 247 } 248 249 func (f *FDTable) afterLoad() {} 250 251 // +checklocksignore 252 func (f *FDTable) StateLoad(stateSourceObject state.Source) { 253 stateSourceObject.Load(0, &f.FDTableRefs) 254 stateSourceObject.Load(1, &f.k) 255 stateSourceObject.LoadValue(2, new(map[int32]descriptor), func(y any) { f.loadDescriptorTable(y.(map[int32]descriptor)) }) 256 } 257 258 func (r *FDTableRefs) StateTypeName() string { 259 return "pkg/sentry/kernel.FDTableRefs" 260 } 261 262 func (r *FDTableRefs) StateFields() []string { 263 return []string{ 264 "refCount", 265 } 266 } 267 268 func (r *FDTableRefs) beforeSave() {} 269 270 // +checklocksignore 271 func (r *FDTableRefs) StateSave(stateSinkObject state.Sink) { 272 r.beforeSave() 273 stateSinkObject.Save(0, &r.refCount) 274 } 275 276 // +checklocksignore 277 func (r *FDTableRefs) StateLoad(stateSourceObject state.Source) { 278 stateSourceObject.Load(0, &r.refCount) 279 stateSourceObject.AfterLoad(r.afterLoad) 280 } 281 282 func (f *FSContext) StateTypeName() string { 283 return "pkg/sentry/kernel.FSContext" 284 } 285 286 func (f *FSContext) StateFields() []string { 287 return []string{ 288 "FSContextRefs", 289 "root", 290 "cwd", 291 "umask", 292 } 293 } 294 295 func (f *FSContext) beforeSave() {} 296 297 // +checklocksignore 298 func (f *FSContext) StateSave(stateSinkObject state.Sink) { 299 f.beforeSave() 300 stateSinkObject.Save(0, &f.FSContextRefs) 301 stateSinkObject.Save(1, &f.root) 302 stateSinkObject.Save(2, &f.cwd) 303 stateSinkObject.Save(3, &f.umask) 304 } 305 306 func (f *FSContext) afterLoad() {} 307 308 // +checklocksignore 309 func (f *FSContext) StateLoad(stateSourceObject state.Source) { 310 stateSourceObject.Load(0, &f.FSContextRefs) 311 stateSourceObject.Load(1, &f.root) 312 stateSourceObject.Load(2, &f.cwd) 313 stateSourceObject.Load(3, &f.umask) 314 } 315 316 func (r *FSContextRefs) StateTypeName() string { 317 return "pkg/sentry/kernel.FSContextRefs" 318 } 319 320 func (r *FSContextRefs) StateFields() []string { 321 return []string{ 322 "refCount", 323 } 324 } 325 326 func (r *FSContextRefs) beforeSave() {} 327 328 // +checklocksignore 329 func (r *FSContextRefs) StateSave(stateSinkObject state.Sink) { 330 r.beforeSave() 331 stateSinkObject.Save(0, &r.refCount) 332 } 333 334 // +checklocksignore 335 func (r *FSContextRefs) StateLoad(stateSourceObject state.Source) { 336 stateSourceObject.Load(0, &r.refCount) 337 stateSourceObject.AfterLoad(r.afterLoad) 338 } 339 340 func (i *IPCNamespace) StateTypeName() string { 341 return "pkg/sentry/kernel.IPCNamespace" 342 } 343 344 func (i *IPCNamespace) StateFields() []string { 345 return []string{ 346 "inode", 347 "userNS", 348 "queues", 349 "semaphores", 350 "shms", 351 "posixQueues", 352 } 353 } 354 355 func (i *IPCNamespace) beforeSave() {} 356 357 // +checklocksignore 358 func (i *IPCNamespace) StateSave(stateSinkObject state.Sink) { 359 i.beforeSave() 360 stateSinkObject.Save(0, &i.inode) 361 stateSinkObject.Save(1, &i.userNS) 362 stateSinkObject.Save(2, &i.queues) 363 stateSinkObject.Save(3, &i.semaphores) 364 stateSinkObject.Save(4, &i.shms) 365 stateSinkObject.Save(5, &i.posixQueues) 366 } 367 368 func (i *IPCNamespace) afterLoad() {} 369 370 // +checklocksignore 371 func (i *IPCNamespace) StateLoad(stateSourceObject state.Source) { 372 stateSourceObject.Load(0, &i.inode) 373 stateSourceObject.Load(1, &i.userNS) 374 stateSourceObject.Load(2, &i.queues) 375 stateSourceObject.Load(3, &i.semaphores) 376 stateSourceObject.Load(4, &i.shms) 377 stateSourceObject.Load(5, &i.posixQueues) 378 } 379 380 func (uc *userCounters) StateTypeName() string { 381 return "pkg/sentry/kernel.userCounters" 382 } 383 384 func (uc *userCounters) StateFields() []string { 385 return []string{ 386 "uid", 387 "rlimitNProc", 388 } 389 } 390 391 func (uc *userCounters) beforeSave() {} 392 393 // +checklocksignore 394 func (uc *userCounters) StateSave(stateSinkObject state.Sink) { 395 uc.beforeSave() 396 stateSinkObject.Save(0, &uc.uid) 397 stateSinkObject.Save(1, &uc.rlimitNProc) 398 } 399 400 func (uc *userCounters) afterLoad() {} 401 402 // +checklocksignore 403 func (uc *userCounters) StateLoad(stateSourceObject state.Source) { 404 stateSourceObject.Load(0, &uc.uid) 405 stateSourceObject.Load(1, &uc.rlimitNProc) 406 } 407 408 func (k *Kernel) StateTypeName() string { 409 return "pkg/sentry/kernel.Kernel" 410 } 411 412 func (k *Kernel) StateFields() []string { 413 return []string{ 414 "featureSet", 415 "timekeeper", 416 "tasks", 417 "rootUserNamespace", 418 "rootNetworkNamespace", 419 "applicationCores", 420 "useHostCores", 421 "extraAuxv", 422 "vdso", 423 "rootUTSNamespace", 424 "rootIPCNamespace", 425 "rootAbstractSocketNamespace", 426 "futexes", 427 "globalInit", 428 "syslog", 429 "runningTasks", 430 "cpuClock", 431 "cpuClockTickerRunning", 432 "uniqueID", 433 "nextInotifyCookie", 434 "netlinkPorts", 435 "danglingEndpoints", 436 "sockets", 437 "nextSocketRecord", 438 "SpecialOpts", 439 "vfs", 440 "hostMount", 441 "pipeMount", 442 "nsfsMount", 443 "shmMount", 444 "socketMount", 445 "sysVShmDevID", 446 "SleepForAddressSpaceActivation", 447 "ptraceExceptions", 448 "YAMAPtraceScope", 449 "cgroupRegistry", 450 "userCountersMap", 451 } 452 } 453 454 func (k *Kernel) beforeSave() {} 455 456 // +checklocksignore 457 func (k *Kernel) StateSave(stateSinkObject state.Sink) { 458 k.beforeSave() 459 var danglingEndpointsValue []tcpip.Endpoint 460 danglingEndpointsValue = k.saveDanglingEndpoints() 461 stateSinkObject.SaveValue(21, danglingEndpointsValue) 462 stateSinkObject.Save(0, &k.featureSet) 463 stateSinkObject.Save(1, &k.timekeeper) 464 stateSinkObject.Save(2, &k.tasks) 465 stateSinkObject.Save(3, &k.rootUserNamespace) 466 stateSinkObject.Save(4, &k.rootNetworkNamespace) 467 stateSinkObject.Save(5, &k.applicationCores) 468 stateSinkObject.Save(6, &k.useHostCores) 469 stateSinkObject.Save(7, &k.extraAuxv) 470 stateSinkObject.Save(8, &k.vdso) 471 stateSinkObject.Save(9, &k.rootUTSNamespace) 472 stateSinkObject.Save(10, &k.rootIPCNamespace) 473 stateSinkObject.Save(11, &k.rootAbstractSocketNamespace) 474 stateSinkObject.Save(12, &k.futexes) 475 stateSinkObject.Save(13, &k.globalInit) 476 stateSinkObject.Save(14, &k.syslog) 477 stateSinkObject.Save(15, &k.runningTasks) 478 stateSinkObject.Save(16, &k.cpuClock) 479 stateSinkObject.Save(17, &k.cpuClockTickerRunning) 480 stateSinkObject.Save(18, &k.uniqueID) 481 stateSinkObject.Save(19, &k.nextInotifyCookie) 482 stateSinkObject.Save(20, &k.netlinkPorts) 483 stateSinkObject.Save(22, &k.sockets) 484 stateSinkObject.Save(23, &k.nextSocketRecord) 485 stateSinkObject.Save(24, &k.SpecialOpts) 486 stateSinkObject.Save(25, &k.vfs) 487 stateSinkObject.Save(26, &k.hostMount) 488 stateSinkObject.Save(27, &k.pipeMount) 489 stateSinkObject.Save(28, &k.nsfsMount) 490 stateSinkObject.Save(29, &k.shmMount) 491 stateSinkObject.Save(30, &k.socketMount) 492 stateSinkObject.Save(31, &k.sysVShmDevID) 493 stateSinkObject.Save(32, &k.SleepForAddressSpaceActivation) 494 stateSinkObject.Save(33, &k.ptraceExceptions) 495 stateSinkObject.Save(34, &k.YAMAPtraceScope) 496 stateSinkObject.Save(35, &k.cgroupRegistry) 497 stateSinkObject.Save(36, &k.userCountersMap) 498 } 499 500 func (k *Kernel) afterLoad() {} 501 502 // +checklocksignore 503 func (k *Kernel) StateLoad(stateSourceObject state.Source) { 504 stateSourceObject.Load(0, &k.featureSet) 505 stateSourceObject.Load(1, &k.timekeeper) 506 stateSourceObject.Load(2, &k.tasks) 507 stateSourceObject.Load(3, &k.rootUserNamespace) 508 stateSourceObject.Load(4, &k.rootNetworkNamespace) 509 stateSourceObject.Load(5, &k.applicationCores) 510 stateSourceObject.Load(6, &k.useHostCores) 511 stateSourceObject.Load(7, &k.extraAuxv) 512 stateSourceObject.Load(8, &k.vdso) 513 stateSourceObject.Load(9, &k.rootUTSNamespace) 514 stateSourceObject.Load(10, &k.rootIPCNamespace) 515 stateSourceObject.Load(11, &k.rootAbstractSocketNamespace) 516 stateSourceObject.Load(12, &k.futexes) 517 stateSourceObject.Load(13, &k.globalInit) 518 stateSourceObject.Load(14, &k.syslog) 519 stateSourceObject.Load(15, &k.runningTasks) 520 stateSourceObject.Load(16, &k.cpuClock) 521 stateSourceObject.Load(17, &k.cpuClockTickerRunning) 522 stateSourceObject.Load(18, &k.uniqueID) 523 stateSourceObject.Load(19, &k.nextInotifyCookie) 524 stateSourceObject.Load(20, &k.netlinkPorts) 525 stateSourceObject.Load(22, &k.sockets) 526 stateSourceObject.Load(23, &k.nextSocketRecord) 527 stateSourceObject.Load(24, &k.SpecialOpts) 528 stateSourceObject.Load(25, &k.vfs) 529 stateSourceObject.Load(26, &k.hostMount) 530 stateSourceObject.Load(27, &k.pipeMount) 531 stateSourceObject.Load(28, &k.nsfsMount) 532 stateSourceObject.Load(29, &k.shmMount) 533 stateSourceObject.Load(30, &k.socketMount) 534 stateSourceObject.Load(31, &k.sysVShmDevID) 535 stateSourceObject.Load(32, &k.SleepForAddressSpaceActivation) 536 stateSourceObject.Load(33, &k.ptraceExceptions) 537 stateSourceObject.Load(34, &k.YAMAPtraceScope) 538 stateSourceObject.Load(35, &k.cgroupRegistry) 539 stateSourceObject.Load(36, &k.userCountersMap) 540 stateSourceObject.LoadValue(21, new([]tcpip.Endpoint), func(y any) { k.loadDanglingEndpoints(y.([]tcpip.Endpoint)) }) 541 } 542 543 func (s *SocketRecord) StateTypeName() string { 544 return "pkg/sentry/kernel.SocketRecord" 545 } 546 547 func (s *SocketRecord) StateFields() []string { 548 return []string{ 549 "k", 550 "Sock", 551 "ID", 552 } 553 } 554 555 func (s *SocketRecord) beforeSave() {} 556 557 // +checklocksignore 558 func (s *SocketRecord) StateSave(stateSinkObject state.Sink) { 559 s.beforeSave() 560 stateSinkObject.Save(0, &s.k) 561 stateSinkObject.Save(1, &s.Sock) 562 stateSinkObject.Save(2, &s.ID) 563 } 564 565 func (s *SocketRecord) afterLoad() {} 566 567 // +checklocksignore 568 func (s *SocketRecord) StateLoad(stateSourceObject state.Source) { 569 stateSourceObject.Load(0, &s.k) 570 stateSourceObject.Load(1, &s.Sock) 571 stateSourceObject.Load(2, &s.ID) 572 } 573 574 func (p *pendingSignals) StateTypeName() string { 575 return "pkg/sentry/kernel.pendingSignals" 576 } 577 578 func (p *pendingSignals) StateFields() []string { 579 return []string{ 580 "signals", 581 } 582 } 583 584 func (p *pendingSignals) beforeSave() {} 585 586 // +checklocksignore 587 func (p *pendingSignals) StateSave(stateSinkObject state.Sink) { 588 p.beforeSave() 589 var signalsValue []savedPendingSignal 590 signalsValue = p.saveSignals() 591 stateSinkObject.SaveValue(0, signalsValue) 592 } 593 594 func (p *pendingSignals) afterLoad() {} 595 596 // +checklocksignore 597 func (p *pendingSignals) StateLoad(stateSourceObject state.Source) { 598 stateSourceObject.LoadValue(0, new([]savedPendingSignal), func(y any) { p.loadSignals(y.([]savedPendingSignal)) }) 599 } 600 601 func (p *pendingSignalQueue) StateTypeName() string { 602 return "pkg/sentry/kernel.pendingSignalQueue" 603 } 604 605 func (p *pendingSignalQueue) StateFields() []string { 606 return []string{ 607 "pendingSignalList", 608 "length", 609 } 610 } 611 612 func (p *pendingSignalQueue) beforeSave() {} 613 614 // +checklocksignore 615 func (p *pendingSignalQueue) StateSave(stateSinkObject state.Sink) { 616 p.beforeSave() 617 stateSinkObject.Save(0, &p.pendingSignalList) 618 stateSinkObject.Save(1, &p.length) 619 } 620 621 func (p *pendingSignalQueue) afterLoad() {} 622 623 // +checklocksignore 624 func (p *pendingSignalQueue) StateLoad(stateSourceObject state.Source) { 625 stateSourceObject.Load(0, &p.pendingSignalList) 626 stateSourceObject.Load(1, &p.length) 627 } 628 629 func (p *pendingSignal) StateTypeName() string { 630 return "pkg/sentry/kernel.pendingSignal" 631 } 632 633 func (p *pendingSignal) StateFields() []string { 634 return []string{ 635 "pendingSignalEntry", 636 "SignalInfo", 637 "timer", 638 } 639 } 640 641 func (p *pendingSignal) beforeSave() {} 642 643 // +checklocksignore 644 func (p *pendingSignal) StateSave(stateSinkObject state.Sink) { 645 p.beforeSave() 646 stateSinkObject.Save(0, &p.pendingSignalEntry) 647 stateSinkObject.Save(1, &p.SignalInfo) 648 stateSinkObject.Save(2, &p.timer) 649 } 650 651 func (p *pendingSignal) afterLoad() {} 652 653 // +checklocksignore 654 func (p *pendingSignal) StateLoad(stateSourceObject state.Source) { 655 stateSourceObject.Load(0, &p.pendingSignalEntry) 656 stateSourceObject.Load(1, &p.SignalInfo) 657 stateSourceObject.Load(2, &p.timer) 658 } 659 660 func (l *pendingSignalList) StateTypeName() string { 661 return "pkg/sentry/kernel.pendingSignalList" 662 } 663 664 func (l *pendingSignalList) StateFields() []string { 665 return []string{ 666 "head", 667 "tail", 668 } 669 } 670 671 func (l *pendingSignalList) beforeSave() {} 672 673 // +checklocksignore 674 func (l *pendingSignalList) StateSave(stateSinkObject state.Sink) { 675 l.beforeSave() 676 stateSinkObject.Save(0, &l.head) 677 stateSinkObject.Save(1, &l.tail) 678 } 679 680 func (l *pendingSignalList) afterLoad() {} 681 682 // +checklocksignore 683 func (l *pendingSignalList) StateLoad(stateSourceObject state.Source) { 684 stateSourceObject.Load(0, &l.head) 685 stateSourceObject.Load(1, &l.tail) 686 } 687 688 func (e *pendingSignalEntry) StateTypeName() string { 689 return "pkg/sentry/kernel.pendingSignalEntry" 690 } 691 692 func (e *pendingSignalEntry) StateFields() []string { 693 return []string{ 694 "next", 695 "prev", 696 } 697 } 698 699 func (e *pendingSignalEntry) beforeSave() {} 700 701 // +checklocksignore 702 func (e *pendingSignalEntry) StateSave(stateSinkObject state.Sink) { 703 e.beforeSave() 704 stateSinkObject.Save(0, &e.next) 705 stateSinkObject.Save(1, &e.prev) 706 } 707 708 func (e *pendingSignalEntry) afterLoad() {} 709 710 // +checklocksignore 711 func (e *pendingSignalEntry) StateLoad(stateSourceObject state.Source) { 712 stateSourceObject.Load(0, &e.next) 713 stateSourceObject.Load(1, &e.prev) 714 } 715 716 func (s *savedPendingSignal) StateTypeName() string { 717 return "pkg/sentry/kernel.savedPendingSignal" 718 } 719 720 func (s *savedPendingSignal) StateFields() []string { 721 return []string{ 722 "si", 723 "timer", 724 } 725 } 726 727 func (s *savedPendingSignal) beforeSave() {} 728 729 // +checklocksignore 730 func (s *savedPendingSignal) StateSave(stateSinkObject state.Sink) { 731 s.beforeSave() 732 stateSinkObject.Save(0, &s.si) 733 stateSinkObject.Save(1, &s.timer) 734 } 735 736 func (s *savedPendingSignal) afterLoad() {} 737 738 // +checklocksignore 739 func (s *savedPendingSignal) StateLoad(stateSourceObject state.Source) { 740 stateSourceObject.Load(0, &s.si) 741 stateSourceObject.Load(1, &s.timer) 742 } 743 744 func (it *IntervalTimer) StateTypeName() string { 745 return "pkg/sentry/kernel.IntervalTimer" 746 } 747 748 func (it *IntervalTimer) StateFields() []string { 749 return []string{ 750 "timer", 751 "target", 752 "signo", 753 "id", 754 "sigval", 755 "group", 756 "sigpending", 757 "sigorphan", 758 "overrunCur", 759 "overrunLast", 760 } 761 } 762 763 func (it *IntervalTimer) beforeSave() {} 764 765 // +checklocksignore 766 func (it *IntervalTimer) StateSave(stateSinkObject state.Sink) { 767 it.beforeSave() 768 stateSinkObject.Save(0, &it.timer) 769 stateSinkObject.Save(1, &it.target) 770 stateSinkObject.Save(2, &it.signo) 771 stateSinkObject.Save(3, &it.id) 772 stateSinkObject.Save(4, &it.sigval) 773 stateSinkObject.Save(5, &it.group) 774 stateSinkObject.Save(6, &it.sigpending) 775 stateSinkObject.Save(7, &it.sigorphan) 776 stateSinkObject.Save(8, &it.overrunCur) 777 stateSinkObject.Save(9, &it.overrunLast) 778 } 779 780 func (it *IntervalTimer) afterLoad() {} 781 782 // +checklocksignore 783 func (it *IntervalTimer) StateLoad(stateSourceObject state.Source) { 784 stateSourceObject.Load(0, &it.timer) 785 stateSourceObject.Load(1, &it.target) 786 stateSourceObject.Load(2, &it.signo) 787 stateSourceObject.Load(3, &it.id) 788 stateSourceObject.Load(4, &it.sigval) 789 stateSourceObject.Load(5, &it.group) 790 stateSourceObject.Load(6, &it.sigpending) 791 stateSourceObject.Load(7, &it.sigorphan) 792 stateSourceObject.Load(8, &it.overrunCur) 793 stateSourceObject.Load(9, &it.overrunLast) 794 } 795 796 func (l *processGroupList) StateTypeName() string { 797 return "pkg/sentry/kernel.processGroupList" 798 } 799 800 func (l *processGroupList) StateFields() []string { 801 return []string{ 802 "head", 803 "tail", 804 } 805 } 806 807 func (l *processGroupList) beforeSave() {} 808 809 // +checklocksignore 810 func (l *processGroupList) StateSave(stateSinkObject state.Sink) { 811 l.beforeSave() 812 stateSinkObject.Save(0, &l.head) 813 stateSinkObject.Save(1, &l.tail) 814 } 815 816 func (l *processGroupList) afterLoad() {} 817 818 // +checklocksignore 819 func (l *processGroupList) StateLoad(stateSourceObject state.Source) { 820 stateSourceObject.Load(0, &l.head) 821 stateSourceObject.Load(1, &l.tail) 822 } 823 824 func (e *processGroupEntry) StateTypeName() string { 825 return "pkg/sentry/kernel.processGroupEntry" 826 } 827 828 func (e *processGroupEntry) StateFields() []string { 829 return []string{ 830 "next", 831 "prev", 832 } 833 } 834 835 func (e *processGroupEntry) beforeSave() {} 836 837 // +checklocksignore 838 func (e *processGroupEntry) StateSave(stateSinkObject state.Sink) { 839 e.beforeSave() 840 stateSinkObject.Save(0, &e.next) 841 stateSinkObject.Save(1, &e.prev) 842 } 843 844 func (e *processGroupEntry) afterLoad() {} 845 846 // +checklocksignore 847 func (e *processGroupEntry) StateLoad(stateSourceObject state.Source) { 848 stateSourceObject.Load(0, &e.next) 849 stateSourceObject.Load(1, &e.prev) 850 } 851 852 func (r *ProcessGroupRefs) StateTypeName() string { 853 return "pkg/sentry/kernel.ProcessGroupRefs" 854 } 855 856 func (r *ProcessGroupRefs) StateFields() []string { 857 return []string{ 858 "refCount", 859 } 860 } 861 862 func (r *ProcessGroupRefs) beforeSave() {} 863 864 // +checklocksignore 865 func (r *ProcessGroupRefs) StateSave(stateSinkObject state.Sink) { 866 r.beforeSave() 867 stateSinkObject.Save(0, &r.refCount) 868 } 869 870 // +checklocksignore 871 func (r *ProcessGroupRefs) StateLoad(stateSourceObject state.Source) { 872 stateSourceObject.Load(0, &r.refCount) 873 stateSourceObject.AfterLoad(r.afterLoad) 874 } 875 876 func (p *ptraceOptions) StateTypeName() string { 877 return "pkg/sentry/kernel.ptraceOptions" 878 } 879 880 func (p *ptraceOptions) StateFields() []string { 881 return []string{ 882 "ExitKill", 883 "SysGood", 884 "TraceClone", 885 "TraceExec", 886 "TraceExit", 887 "TraceFork", 888 "TraceSeccomp", 889 "TraceVfork", 890 "TraceVforkDone", 891 } 892 } 893 894 func (p *ptraceOptions) beforeSave() {} 895 896 // +checklocksignore 897 func (p *ptraceOptions) StateSave(stateSinkObject state.Sink) { 898 p.beforeSave() 899 stateSinkObject.Save(0, &p.ExitKill) 900 stateSinkObject.Save(1, &p.SysGood) 901 stateSinkObject.Save(2, &p.TraceClone) 902 stateSinkObject.Save(3, &p.TraceExec) 903 stateSinkObject.Save(4, &p.TraceExit) 904 stateSinkObject.Save(5, &p.TraceFork) 905 stateSinkObject.Save(6, &p.TraceSeccomp) 906 stateSinkObject.Save(7, &p.TraceVfork) 907 stateSinkObject.Save(8, &p.TraceVforkDone) 908 } 909 910 func (p *ptraceOptions) afterLoad() {} 911 912 // +checklocksignore 913 func (p *ptraceOptions) StateLoad(stateSourceObject state.Source) { 914 stateSourceObject.Load(0, &p.ExitKill) 915 stateSourceObject.Load(1, &p.SysGood) 916 stateSourceObject.Load(2, &p.TraceClone) 917 stateSourceObject.Load(3, &p.TraceExec) 918 stateSourceObject.Load(4, &p.TraceExit) 919 stateSourceObject.Load(5, &p.TraceFork) 920 stateSourceObject.Load(6, &p.TraceSeccomp) 921 stateSourceObject.Load(7, &p.TraceVfork) 922 stateSourceObject.Load(8, &p.TraceVforkDone) 923 } 924 925 func (s *ptraceStop) StateTypeName() string { 926 return "pkg/sentry/kernel.ptraceStop" 927 } 928 929 func (s *ptraceStop) StateFields() []string { 930 return []string{ 931 "frozen", 932 "listen", 933 } 934 } 935 936 func (s *ptraceStop) beforeSave() {} 937 938 // +checklocksignore 939 func (s *ptraceStop) StateSave(stateSinkObject state.Sink) { 940 s.beforeSave() 941 stateSinkObject.Save(0, &s.frozen) 942 stateSinkObject.Save(1, &s.listen) 943 } 944 945 func (s *ptraceStop) afterLoad() {} 946 947 // +checklocksignore 948 func (s *ptraceStop) StateLoad(stateSourceObject state.Source) { 949 stateSourceObject.Load(0, &s.frozen) 950 stateSourceObject.Load(1, &s.listen) 951 } 952 953 func (o *OldRSeqCriticalRegion) StateTypeName() string { 954 return "pkg/sentry/kernel.OldRSeqCriticalRegion" 955 } 956 957 func (o *OldRSeqCriticalRegion) StateFields() []string { 958 return []string{ 959 "CriticalSection", 960 "Restart", 961 } 962 } 963 964 func (o *OldRSeqCriticalRegion) beforeSave() {} 965 966 // +checklocksignore 967 func (o *OldRSeqCriticalRegion) StateSave(stateSinkObject state.Sink) { 968 o.beforeSave() 969 stateSinkObject.Save(0, &o.CriticalSection) 970 stateSinkObject.Save(1, &o.Restart) 971 } 972 973 func (o *OldRSeqCriticalRegion) afterLoad() {} 974 975 // +checklocksignore 976 func (o *OldRSeqCriticalRegion) StateLoad(stateSourceObject state.Source) { 977 stateSourceObject.Load(0, &o.CriticalSection) 978 stateSourceObject.Load(1, &o.Restart) 979 } 980 981 func (l *sessionList) StateTypeName() string { 982 return "pkg/sentry/kernel.sessionList" 983 } 984 985 func (l *sessionList) StateFields() []string { 986 return []string{ 987 "head", 988 "tail", 989 } 990 } 991 992 func (l *sessionList) beforeSave() {} 993 994 // +checklocksignore 995 func (l *sessionList) StateSave(stateSinkObject state.Sink) { 996 l.beforeSave() 997 stateSinkObject.Save(0, &l.head) 998 stateSinkObject.Save(1, &l.tail) 999 } 1000 1001 func (l *sessionList) afterLoad() {} 1002 1003 // +checklocksignore 1004 func (l *sessionList) StateLoad(stateSourceObject state.Source) { 1005 stateSourceObject.Load(0, &l.head) 1006 stateSourceObject.Load(1, &l.tail) 1007 } 1008 1009 func (e *sessionEntry) StateTypeName() string { 1010 return "pkg/sentry/kernel.sessionEntry" 1011 } 1012 1013 func (e *sessionEntry) StateFields() []string { 1014 return []string{ 1015 "next", 1016 "prev", 1017 } 1018 } 1019 1020 func (e *sessionEntry) beforeSave() {} 1021 1022 // +checklocksignore 1023 func (e *sessionEntry) StateSave(stateSinkObject state.Sink) { 1024 e.beforeSave() 1025 stateSinkObject.Save(0, &e.next) 1026 stateSinkObject.Save(1, &e.prev) 1027 } 1028 1029 func (e *sessionEntry) afterLoad() {} 1030 1031 // +checklocksignore 1032 func (e *sessionEntry) StateLoad(stateSourceObject state.Source) { 1033 stateSourceObject.Load(0, &e.next) 1034 stateSourceObject.Load(1, &e.prev) 1035 } 1036 1037 func (r *SessionRefs) StateTypeName() string { 1038 return "pkg/sentry/kernel.SessionRefs" 1039 } 1040 1041 func (r *SessionRefs) StateFields() []string { 1042 return []string{ 1043 "refCount", 1044 } 1045 } 1046 1047 func (r *SessionRefs) beforeSave() {} 1048 1049 // +checklocksignore 1050 func (r *SessionRefs) StateSave(stateSinkObject state.Sink) { 1051 r.beforeSave() 1052 stateSinkObject.Save(0, &r.refCount) 1053 } 1054 1055 // +checklocksignore 1056 func (r *SessionRefs) StateLoad(stateSourceObject state.Source) { 1057 stateSourceObject.Load(0, &r.refCount) 1058 stateSourceObject.AfterLoad(r.afterLoad) 1059 } 1060 1061 func (s *Session) StateTypeName() string { 1062 return "pkg/sentry/kernel.Session" 1063 } 1064 1065 func (s *Session) StateFields() []string { 1066 return []string{ 1067 "SessionRefs", 1068 "leader", 1069 "id", 1070 "foreground", 1071 "processGroups", 1072 "sessionEntry", 1073 } 1074 } 1075 1076 func (s *Session) beforeSave() {} 1077 1078 // +checklocksignore 1079 func (s *Session) StateSave(stateSinkObject state.Sink) { 1080 s.beforeSave() 1081 stateSinkObject.Save(0, &s.SessionRefs) 1082 stateSinkObject.Save(1, &s.leader) 1083 stateSinkObject.Save(2, &s.id) 1084 stateSinkObject.Save(3, &s.foreground) 1085 stateSinkObject.Save(4, &s.processGroups) 1086 stateSinkObject.Save(5, &s.sessionEntry) 1087 } 1088 1089 func (s *Session) afterLoad() {} 1090 1091 // +checklocksignore 1092 func (s *Session) StateLoad(stateSourceObject state.Source) { 1093 stateSourceObject.Load(0, &s.SessionRefs) 1094 stateSourceObject.Load(1, &s.leader) 1095 stateSourceObject.Load(2, &s.id) 1096 stateSourceObject.Load(3, &s.foreground) 1097 stateSourceObject.Load(4, &s.processGroups) 1098 stateSourceObject.Load(5, &s.sessionEntry) 1099 } 1100 1101 func (pg *ProcessGroup) StateTypeName() string { 1102 return "pkg/sentry/kernel.ProcessGroup" 1103 } 1104 1105 func (pg *ProcessGroup) StateFields() []string { 1106 return []string{ 1107 "refs", 1108 "originator", 1109 "id", 1110 "session", 1111 "ancestors", 1112 "processGroupEntry", 1113 } 1114 } 1115 1116 func (pg *ProcessGroup) beforeSave() {} 1117 1118 // +checklocksignore 1119 func (pg *ProcessGroup) StateSave(stateSinkObject state.Sink) { 1120 pg.beforeSave() 1121 stateSinkObject.Save(0, &pg.refs) 1122 stateSinkObject.Save(1, &pg.originator) 1123 stateSinkObject.Save(2, &pg.id) 1124 stateSinkObject.Save(3, &pg.session) 1125 stateSinkObject.Save(4, &pg.ancestors) 1126 stateSinkObject.Save(5, &pg.processGroupEntry) 1127 } 1128 1129 func (pg *ProcessGroup) afterLoad() {} 1130 1131 // +checklocksignore 1132 func (pg *ProcessGroup) StateLoad(stateSourceObject state.Source) { 1133 stateSourceObject.Load(0, &pg.refs) 1134 stateSourceObject.Load(1, &pg.originator) 1135 stateSourceObject.Load(2, &pg.id) 1136 stateSourceObject.Load(3, &pg.session) 1137 stateSourceObject.Load(4, &pg.ancestors) 1138 stateSourceObject.Load(5, &pg.processGroupEntry) 1139 } 1140 1141 func (sh *SignalHandlers) StateTypeName() string { 1142 return "pkg/sentry/kernel.SignalHandlers" 1143 } 1144 1145 func (sh *SignalHandlers) StateFields() []string { 1146 return []string{ 1147 "actions", 1148 } 1149 } 1150 1151 func (sh *SignalHandlers) beforeSave() {} 1152 1153 // +checklocksignore 1154 func (sh *SignalHandlers) StateSave(stateSinkObject state.Sink) { 1155 sh.beforeSave() 1156 stateSinkObject.Save(0, &sh.actions) 1157 } 1158 1159 func (sh *SignalHandlers) afterLoad() {} 1160 1161 // +checklocksignore 1162 func (sh *SignalHandlers) StateLoad(stateSourceObject state.Source) { 1163 stateSourceObject.Load(0, &sh.actions) 1164 } 1165 1166 func (s *syscallTableInfo) StateTypeName() string { 1167 return "pkg/sentry/kernel.syscallTableInfo" 1168 } 1169 1170 func (s *syscallTableInfo) StateFields() []string { 1171 return []string{ 1172 "OS", 1173 "Arch", 1174 } 1175 } 1176 1177 func (s *syscallTableInfo) beforeSave() {} 1178 1179 // +checklocksignore 1180 func (s *syscallTableInfo) StateSave(stateSinkObject state.Sink) { 1181 s.beforeSave() 1182 stateSinkObject.Save(0, &s.OS) 1183 stateSinkObject.Save(1, &s.Arch) 1184 } 1185 1186 func (s *syscallTableInfo) afterLoad() {} 1187 1188 // +checklocksignore 1189 func (s *syscallTableInfo) StateLoad(stateSourceObject state.Source) { 1190 stateSourceObject.Load(0, &s.OS) 1191 stateSourceObject.Load(1, &s.Arch) 1192 } 1193 1194 func (s *syslog) StateTypeName() string { 1195 return "pkg/sentry/kernel.syslog" 1196 } 1197 1198 func (s *syslog) StateFields() []string { 1199 return []string{ 1200 "msg", 1201 } 1202 } 1203 1204 func (s *syslog) beforeSave() {} 1205 1206 // +checklocksignore 1207 func (s *syslog) StateSave(stateSinkObject state.Sink) { 1208 s.beforeSave() 1209 stateSinkObject.Save(0, &s.msg) 1210 } 1211 1212 func (s *syslog) afterLoad() {} 1213 1214 // +checklocksignore 1215 func (s *syslog) StateLoad(stateSourceObject state.Source) { 1216 stateSourceObject.Load(0, &s.msg) 1217 } 1218 1219 func (t *Task) StateTypeName() string { 1220 return "pkg/sentry/kernel.Task" 1221 } 1222 1223 func (t *Task) StateFields() []string { 1224 return []string{ 1225 "taskNode", 1226 "runState", 1227 "taskWorkCount", 1228 "taskWork", 1229 "haveSyscallReturn", 1230 "gosched", 1231 "yieldCount", 1232 "pendingSignals", 1233 "signalMask", 1234 "realSignalMask", 1235 "haveSavedSignalMask", 1236 "savedSignalMask", 1237 "signalStack", 1238 "signalQueue", 1239 "groupStopPending", 1240 "groupStopAcknowledged", 1241 "trapStopPending", 1242 "trapNotifyPending", 1243 "stop", 1244 "exitStatus", 1245 "syscallRestartBlock", 1246 "k", 1247 "containerID", 1248 "image", 1249 "fsContext", 1250 "fdTable", 1251 "vforkParent", 1252 "exitState", 1253 "exitTracerNotified", 1254 "exitTracerAcked", 1255 "exitParentNotified", 1256 "exitParentAcked", 1257 "ptraceTracer", 1258 "ptraceTracees", 1259 "ptraceSeized", 1260 "ptraceOpts", 1261 "ptraceSyscallMode", 1262 "ptraceSinglestep", 1263 "ptraceCode", 1264 "ptraceSiginfo", 1265 "ptraceEventMsg", 1266 "ptraceYAMAExceptionAdded", 1267 "ioUsage", 1268 "creds", 1269 "utsns", 1270 "ipcns", 1271 "abstractSockets", 1272 "mountNamespace", 1273 "parentDeathSignal", 1274 "syscallFilters", 1275 "cleartid", 1276 "allowedCPUMask", 1277 "cpu", 1278 "niceness", 1279 "numaPolicy", 1280 "numaNodeMask", 1281 "netns", 1282 "rseqCPU", 1283 "oldRSeqCPUAddr", 1284 "rseqAddr", 1285 "rseqSignature", 1286 "robustList", 1287 "startTime", 1288 "kcov", 1289 "cgroups", 1290 "memCgID", 1291 "userCounters", 1292 "sessionKeyring", 1293 } 1294 } 1295 1296 func (t *Task) beforeSave() {} 1297 1298 // +checklocksignore 1299 func (t *Task) StateSave(stateSinkObject state.Sink) { 1300 t.beforeSave() 1301 var ptraceTracerValue *Task 1302 ptraceTracerValue = t.savePtraceTracer() 1303 stateSinkObject.SaveValue(32, ptraceTracerValue) 1304 var syscallFiltersValue []bpf.Program 1305 syscallFiltersValue = t.saveSyscallFilters() 1306 stateSinkObject.SaveValue(49, syscallFiltersValue) 1307 stateSinkObject.Save(0, &t.taskNode) 1308 stateSinkObject.Save(1, &t.runState) 1309 stateSinkObject.Save(2, &t.taskWorkCount) 1310 stateSinkObject.Save(3, &t.taskWork) 1311 stateSinkObject.Save(4, &t.haveSyscallReturn) 1312 stateSinkObject.Save(5, &t.gosched) 1313 stateSinkObject.Save(6, &t.yieldCount) 1314 stateSinkObject.Save(7, &t.pendingSignals) 1315 stateSinkObject.Save(8, &t.signalMask) 1316 stateSinkObject.Save(9, &t.realSignalMask) 1317 stateSinkObject.Save(10, &t.haveSavedSignalMask) 1318 stateSinkObject.Save(11, &t.savedSignalMask) 1319 stateSinkObject.Save(12, &t.signalStack) 1320 stateSinkObject.Save(13, &t.signalQueue) 1321 stateSinkObject.Save(14, &t.groupStopPending) 1322 stateSinkObject.Save(15, &t.groupStopAcknowledged) 1323 stateSinkObject.Save(16, &t.trapStopPending) 1324 stateSinkObject.Save(17, &t.trapNotifyPending) 1325 stateSinkObject.Save(18, &t.stop) 1326 stateSinkObject.Save(19, &t.exitStatus) 1327 stateSinkObject.Save(20, &t.syscallRestartBlock) 1328 stateSinkObject.Save(21, &t.k) 1329 stateSinkObject.Save(22, &t.containerID) 1330 stateSinkObject.Save(23, &t.image) 1331 stateSinkObject.Save(24, &t.fsContext) 1332 stateSinkObject.Save(25, &t.fdTable) 1333 stateSinkObject.Save(26, &t.vforkParent) 1334 stateSinkObject.Save(27, &t.exitState) 1335 stateSinkObject.Save(28, &t.exitTracerNotified) 1336 stateSinkObject.Save(29, &t.exitTracerAcked) 1337 stateSinkObject.Save(30, &t.exitParentNotified) 1338 stateSinkObject.Save(31, &t.exitParentAcked) 1339 stateSinkObject.Save(33, &t.ptraceTracees) 1340 stateSinkObject.Save(34, &t.ptraceSeized) 1341 stateSinkObject.Save(35, &t.ptraceOpts) 1342 stateSinkObject.Save(36, &t.ptraceSyscallMode) 1343 stateSinkObject.Save(37, &t.ptraceSinglestep) 1344 stateSinkObject.Save(38, &t.ptraceCode) 1345 stateSinkObject.Save(39, &t.ptraceSiginfo) 1346 stateSinkObject.Save(40, &t.ptraceEventMsg) 1347 stateSinkObject.Save(41, &t.ptraceYAMAExceptionAdded) 1348 stateSinkObject.Save(42, &t.ioUsage) 1349 stateSinkObject.Save(43, &t.creds) 1350 stateSinkObject.Save(44, &t.utsns) 1351 stateSinkObject.Save(45, &t.ipcns) 1352 stateSinkObject.Save(46, &t.abstractSockets) 1353 stateSinkObject.Save(47, &t.mountNamespace) 1354 stateSinkObject.Save(48, &t.parentDeathSignal) 1355 stateSinkObject.Save(50, &t.cleartid) 1356 stateSinkObject.Save(51, &t.allowedCPUMask) 1357 stateSinkObject.Save(52, &t.cpu) 1358 stateSinkObject.Save(53, &t.niceness) 1359 stateSinkObject.Save(54, &t.numaPolicy) 1360 stateSinkObject.Save(55, &t.numaNodeMask) 1361 stateSinkObject.Save(56, &t.netns) 1362 stateSinkObject.Save(57, &t.rseqCPU) 1363 stateSinkObject.Save(58, &t.oldRSeqCPUAddr) 1364 stateSinkObject.Save(59, &t.rseqAddr) 1365 stateSinkObject.Save(60, &t.rseqSignature) 1366 stateSinkObject.Save(61, &t.robustList) 1367 stateSinkObject.Save(62, &t.startTime) 1368 stateSinkObject.Save(63, &t.kcov) 1369 stateSinkObject.Save(64, &t.cgroups) 1370 stateSinkObject.Save(65, &t.memCgID) 1371 stateSinkObject.Save(66, &t.userCounters) 1372 stateSinkObject.Save(67, &t.sessionKeyring) 1373 } 1374 1375 // +checklocksignore 1376 func (t *Task) StateLoad(stateSourceObject state.Source) { 1377 stateSourceObject.Load(0, &t.taskNode) 1378 stateSourceObject.Load(1, &t.runState) 1379 stateSourceObject.Load(2, &t.taskWorkCount) 1380 stateSourceObject.Load(3, &t.taskWork) 1381 stateSourceObject.Load(4, &t.haveSyscallReturn) 1382 stateSourceObject.Load(5, &t.gosched) 1383 stateSourceObject.Load(6, &t.yieldCount) 1384 stateSourceObject.Load(7, &t.pendingSignals) 1385 stateSourceObject.Load(8, &t.signalMask) 1386 stateSourceObject.Load(9, &t.realSignalMask) 1387 stateSourceObject.Load(10, &t.haveSavedSignalMask) 1388 stateSourceObject.Load(11, &t.savedSignalMask) 1389 stateSourceObject.Load(12, &t.signalStack) 1390 stateSourceObject.Load(13, &t.signalQueue) 1391 stateSourceObject.Load(14, &t.groupStopPending) 1392 stateSourceObject.Load(15, &t.groupStopAcknowledged) 1393 stateSourceObject.Load(16, &t.trapStopPending) 1394 stateSourceObject.Load(17, &t.trapNotifyPending) 1395 stateSourceObject.Load(18, &t.stop) 1396 stateSourceObject.Load(19, &t.exitStatus) 1397 stateSourceObject.Load(20, &t.syscallRestartBlock) 1398 stateSourceObject.Load(21, &t.k) 1399 stateSourceObject.Load(22, &t.containerID) 1400 stateSourceObject.Load(23, &t.image) 1401 stateSourceObject.Load(24, &t.fsContext) 1402 stateSourceObject.Load(25, &t.fdTable) 1403 stateSourceObject.Load(26, &t.vforkParent) 1404 stateSourceObject.Load(27, &t.exitState) 1405 stateSourceObject.Load(28, &t.exitTracerNotified) 1406 stateSourceObject.Load(29, &t.exitTracerAcked) 1407 stateSourceObject.Load(30, &t.exitParentNotified) 1408 stateSourceObject.Load(31, &t.exitParentAcked) 1409 stateSourceObject.Load(33, &t.ptraceTracees) 1410 stateSourceObject.Load(34, &t.ptraceSeized) 1411 stateSourceObject.Load(35, &t.ptraceOpts) 1412 stateSourceObject.Load(36, &t.ptraceSyscallMode) 1413 stateSourceObject.Load(37, &t.ptraceSinglestep) 1414 stateSourceObject.Load(38, &t.ptraceCode) 1415 stateSourceObject.Load(39, &t.ptraceSiginfo) 1416 stateSourceObject.Load(40, &t.ptraceEventMsg) 1417 stateSourceObject.Load(41, &t.ptraceYAMAExceptionAdded) 1418 stateSourceObject.Load(42, &t.ioUsage) 1419 stateSourceObject.Load(43, &t.creds) 1420 stateSourceObject.Load(44, &t.utsns) 1421 stateSourceObject.Load(45, &t.ipcns) 1422 stateSourceObject.Load(46, &t.abstractSockets) 1423 stateSourceObject.Load(47, &t.mountNamespace) 1424 stateSourceObject.Load(48, &t.parentDeathSignal) 1425 stateSourceObject.Load(50, &t.cleartid) 1426 stateSourceObject.Load(51, &t.allowedCPUMask) 1427 stateSourceObject.Load(52, &t.cpu) 1428 stateSourceObject.Load(53, &t.niceness) 1429 stateSourceObject.Load(54, &t.numaPolicy) 1430 stateSourceObject.Load(55, &t.numaNodeMask) 1431 stateSourceObject.Load(56, &t.netns) 1432 stateSourceObject.Load(57, &t.rseqCPU) 1433 stateSourceObject.Load(58, &t.oldRSeqCPUAddr) 1434 stateSourceObject.Load(59, &t.rseqAddr) 1435 stateSourceObject.Load(60, &t.rseqSignature) 1436 stateSourceObject.Load(61, &t.robustList) 1437 stateSourceObject.Load(62, &t.startTime) 1438 stateSourceObject.Load(63, &t.kcov) 1439 stateSourceObject.Load(64, &t.cgroups) 1440 stateSourceObject.Load(65, &t.memCgID) 1441 stateSourceObject.Load(66, &t.userCounters) 1442 stateSourceObject.Load(67, &t.sessionKeyring) 1443 stateSourceObject.LoadValue(32, new(*Task), func(y any) { t.loadPtraceTracer(y.(*Task)) }) 1444 stateSourceObject.LoadValue(49, new([]bpf.Program), func(y any) { t.loadSyscallFilters(y.([]bpf.Program)) }) 1445 stateSourceObject.AfterLoad(t.afterLoad) 1446 } 1447 1448 func (r *runSyscallAfterPtraceEventClone) StateTypeName() string { 1449 return "pkg/sentry/kernel.runSyscallAfterPtraceEventClone" 1450 } 1451 1452 func (r *runSyscallAfterPtraceEventClone) StateFields() []string { 1453 return []string{ 1454 "vforkChild", 1455 "vforkChildTID", 1456 } 1457 } 1458 1459 func (r *runSyscallAfterPtraceEventClone) beforeSave() {} 1460 1461 // +checklocksignore 1462 func (r *runSyscallAfterPtraceEventClone) StateSave(stateSinkObject state.Sink) { 1463 r.beforeSave() 1464 stateSinkObject.Save(0, &r.vforkChild) 1465 stateSinkObject.Save(1, &r.vforkChildTID) 1466 } 1467 1468 func (r *runSyscallAfterPtraceEventClone) afterLoad() {} 1469 1470 // +checklocksignore 1471 func (r *runSyscallAfterPtraceEventClone) StateLoad(stateSourceObject state.Source) { 1472 stateSourceObject.Load(0, &r.vforkChild) 1473 stateSourceObject.Load(1, &r.vforkChildTID) 1474 } 1475 1476 func (r *runSyscallAfterVforkStop) StateTypeName() string { 1477 return "pkg/sentry/kernel.runSyscallAfterVforkStop" 1478 } 1479 1480 func (r *runSyscallAfterVforkStop) StateFields() []string { 1481 return []string{ 1482 "childTID", 1483 } 1484 } 1485 1486 func (r *runSyscallAfterVforkStop) beforeSave() {} 1487 1488 // +checklocksignore 1489 func (r *runSyscallAfterVforkStop) StateSave(stateSinkObject state.Sink) { 1490 r.beforeSave() 1491 stateSinkObject.Save(0, &r.childTID) 1492 } 1493 1494 func (r *runSyscallAfterVforkStop) afterLoad() {} 1495 1496 // +checklocksignore 1497 func (r *runSyscallAfterVforkStop) StateLoad(stateSourceObject state.Source) { 1498 stateSourceObject.Load(0, &r.childTID) 1499 } 1500 1501 func (v *vforkStop) StateTypeName() string { 1502 return "pkg/sentry/kernel.vforkStop" 1503 } 1504 1505 func (v *vforkStop) StateFields() []string { 1506 return []string{} 1507 } 1508 1509 func (v *vforkStop) beforeSave() {} 1510 1511 // +checklocksignore 1512 func (v *vforkStop) StateSave(stateSinkObject state.Sink) { 1513 v.beforeSave() 1514 } 1515 1516 func (v *vforkStop) afterLoad() {} 1517 1518 // +checklocksignore 1519 func (v *vforkStop) StateLoad(stateSourceObject state.Source) { 1520 } 1521 1522 func (e *execStop) StateTypeName() string { 1523 return "pkg/sentry/kernel.execStop" 1524 } 1525 1526 func (e *execStop) StateFields() []string { 1527 return []string{} 1528 } 1529 1530 func (e *execStop) beforeSave() {} 1531 1532 // +checklocksignore 1533 func (e *execStop) StateSave(stateSinkObject state.Sink) { 1534 e.beforeSave() 1535 } 1536 1537 func (e *execStop) afterLoad() {} 1538 1539 // +checklocksignore 1540 func (e *execStop) StateLoad(stateSourceObject state.Source) { 1541 } 1542 1543 func (r *runSyscallAfterExecStop) StateTypeName() string { 1544 return "pkg/sentry/kernel.runSyscallAfterExecStop" 1545 } 1546 1547 func (r *runSyscallAfterExecStop) StateFields() []string { 1548 return []string{ 1549 "image", 1550 } 1551 } 1552 1553 func (r *runSyscallAfterExecStop) beforeSave() {} 1554 1555 // +checklocksignore 1556 func (r *runSyscallAfterExecStop) StateSave(stateSinkObject state.Sink) { 1557 r.beforeSave() 1558 stateSinkObject.Save(0, &r.image) 1559 } 1560 1561 func (r *runSyscallAfterExecStop) afterLoad() {} 1562 1563 // +checklocksignore 1564 func (r *runSyscallAfterExecStop) StateLoad(stateSourceObject state.Source) { 1565 stateSourceObject.Load(0, &r.image) 1566 } 1567 1568 func (r *runExit) StateTypeName() string { 1569 return "pkg/sentry/kernel.runExit" 1570 } 1571 1572 func (r *runExit) StateFields() []string { 1573 return []string{} 1574 } 1575 1576 func (r *runExit) beforeSave() {} 1577 1578 // +checklocksignore 1579 func (r *runExit) StateSave(stateSinkObject state.Sink) { 1580 r.beforeSave() 1581 } 1582 1583 func (r *runExit) afterLoad() {} 1584 1585 // +checklocksignore 1586 func (r *runExit) StateLoad(stateSourceObject state.Source) { 1587 } 1588 1589 func (r *runExitMain) StateTypeName() string { 1590 return "pkg/sentry/kernel.runExitMain" 1591 } 1592 1593 func (r *runExitMain) StateFields() []string { 1594 return []string{} 1595 } 1596 1597 func (r *runExitMain) beforeSave() {} 1598 1599 // +checklocksignore 1600 func (r *runExitMain) StateSave(stateSinkObject state.Sink) { 1601 r.beforeSave() 1602 } 1603 1604 func (r *runExitMain) afterLoad() {} 1605 1606 // +checklocksignore 1607 func (r *runExitMain) StateLoad(stateSourceObject state.Source) { 1608 } 1609 1610 func (r *runExitNotify) StateTypeName() string { 1611 return "pkg/sentry/kernel.runExitNotify" 1612 } 1613 1614 func (r *runExitNotify) StateFields() []string { 1615 return []string{} 1616 } 1617 1618 func (r *runExitNotify) beforeSave() {} 1619 1620 // +checklocksignore 1621 func (r *runExitNotify) StateSave(stateSinkObject state.Sink) { 1622 r.beforeSave() 1623 } 1624 1625 func (r *runExitNotify) afterLoad() {} 1626 1627 // +checklocksignore 1628 func (r *runExitNotify) StateLoad(stateSourceObject state.Source) { 1629 } 1630 1631 func (image *TaskImage) StateTypeName() string { 1632 return "pkg/sentry/kernel.TaskImage" 1633 } 1634 1635 func (image *TaskImage) StateFields() []string { 1636 return []string{ 1637 "Name", 1638 "Arch", 1639 "MemoryManager", 1640 "fu", 1641 "st", 1642 } 1643 } 1644 1645 func (image *TaskImage) beforeSave() {} 1646 1647 // +checklocksignore 1648 func (image *TaskImage) StateSave(stateSinkObject state.Sink) { 1649 image.beforeSave() 1650 var stValue syscallTableInfo 1651 stValue = image.saveSt() 1652 stateSinkObject.SaveValue(4, stValue) 1653 stateSinkObject.Save(0, &image.Name) 1654 stateSinkObject.Save(1, &image.Arch) 1655 stateSinkObject.Save(2, &image.MemoryManager) 1656 stateSinkObject.Save(3, &image.fu) 1657 } 1658 1659 func (image *TaskImage) afterLoad() {} 1660 1661 // +checklocksignore 1662 func (image *TaskImage) StateLoad(stateSourceObject state.Source) { 1663 stateSourceObject.Load(0, &image.Name) 1664 stateSourceObject.Load(1, &image.Arch) 1665 stateSourceObject.Load(2, &image.MemoryManager) 1666 stateSourceObject.Load(3, &image.fu) 1667 stateSourceObject.LoadValue(4, new(syscallTableInfo), func(y any) { image.loadSt(y.(syscallTableInfo)) }) 1668 } 1669 1670 func (l *taskList) StateTypeName() string { 1671 return "pkg/sentry/kernel.taskList" 1672 } 1673 1674 func (l *taskList) StateFields() []string { 1675 return []string{ 1676 "head", 1677 "tail", 1678 } 1679 } 1680 1681 func (l *taskList) beforeSave() {} 1682 1683 // +checklocksignore 1684 func (l *taskList) StateSave(stateSinkObject state.Sink) { 1685 l.beforeSave() 1686 stateSinkObject.Save(0, &l.head) 1687 stateSinkObject.Save(1, &l.tail) 1688 } 1689 1690 func (l *taskList) afterLoad() {} 1691 1692 // +checklocksignore 1693 func (l *taskList) StateLoad(stateSourceObject state.Source) { 1694 stateSourceObject.Load(0, &l.head) 1695 stateSourceObject.Load(1, &l.tail) 1696 } 1697 1698 func (e *taskEntry) StateTypeName() string { 1699 return "pkg/sentry/kernel.taskEntry" 1700 } 1701 1702 func (e *taskEntry) StateFields() []string { 1703 return []string{ 1704 "next", 1705 "prev", 1706 } 1707 } 1708 1709 func (e *taskEntry) beforeSave() {} 1710 1711 // +checklocksignore 1712 func (e *taskEntry) StateSave(stateSinkObject state.Sink) { 1713 e.beforeSave() 1714 stateSinkObject.Save(0, &e.next) 1715 stateSinkObject.Save(1, &e.prev) 1716 } 1717 1718 func (e *taskEntry) afterLoad() {} 1719 1720 // +checklocksignore 1721 func (e *taskEntry) StateLoad(stateSourceObject state.Source) { 1722 stateSourceObject.Load(0, &e.next) 1723 stateSourceObject.Load(1, &e.prev) 1724 } 1725 1726 func (app *runApp) StateTypeName() string { 1727 return "pkg/sentry/kernel.runApp" 1728 } 1729 1730 func (app *runApp) StateFields() []string { 1731 return []string{} 1732 } 1733 1734 func (app *runApp) beforeSave() {} 1735 1736 // +checklocksignore 1737 func (app *runApp) StateSave(stateSinkObject state.Sink) { 1738 app.beforeSave() 1739 } 1740 1741 func (app *runApp) afterLoad() {} 1742 1743 // +checklocksignore 1744 func (app *runApp) StateLoad(stateSourceObject state.Source) { 1745 } 1746 1747 func (ts *TaskGoroutineSchedInfo) StateTypeName() string { 1748 return "pkg/sentry/kernel.TaskGoroutineSchedInfo" 1749 } 1750 1751 func (ts *TaskGoroutineSchedInfo) StateFields() []string { 1752 return []string{ 1753 "Timestamp", 1754 "State", 1755 "UserTicks", 1756 "SysTicks", 1757 } 1758 } 1759 1760 func (ts *TaskGoroutineSchedInfo) beforeSave() {} 1761 1762 // +checklocksignore 1763 func (ts *TaskGoroutineSchedInfo) StateSave(stateSinkObject state.Sink) { 1764 ts.beforeSave() 1765 stateSinkObject.Save(0, &ts.Timestamp) 1766 stateSinkObject.Save(1, &ts.State) 1767 stateSinkObject.Save(2, &ts.UserTicks) 1768 stateSinkObject.Save(3, &ts.SysTicks) 1769 } 1770 1771 func (ts *TaskGoroutineSchedInfo) afterLoad() {} 1772 1773 // +checklocksignore 1774 func (ts *TaskGoroutineSchedInfo) StateLoad(stateSourceObject state.Source) { 1775 stateSourceObject.Load(0, &ts.Timestamp) 1776 stateSourceObject.Load(1, &ts.State) 1777 stateSourceObject.Load(2, &ts.UserTicks) 1778 stateSourceObject.Load(3, &ts.SysTicks) 1779 } 1780 1781 func (tc *taskClock) StateTypeName() string { 1782 return "pkg/sentry/kernel.taskClock" 1783 } 1784 1785 func (tc *taskClock) StateFields() []string { 1786 return []string{ 1787 "t", 1788 "includeSys", 1789 } 1790 } 1791 1792 func (tc *taskClock) beforeSave() {} 1793 1794 // +checklocksignore 1795 func (tc *taskClock) StateSave(stateSinkObject state.Sink) { 1796 tc.beforeSave() 1797 stateSinkObject.Save(0, &tc.t) 1798 stateSinkObject.Save(1, &tc.includeSys) 1799 } 1800 1801 func (tc *taskClock) afterLoad() {} 1802 1803 // +checklocksignore 1804 func (tc *taskClock) StateLoad(stateSourceObject state.Source) { 1805 stateSourceObject.Load(0, &tc.t) 1806 stateSourceObject.Load(1, &tc.includeSys) 1807 } 1808 1809 func (tgc *tgClock) StateTypeName() string { 1810 return "pkg/sentry/kernel.tgClock" 1811 } 1812 1813 func (tgc *tgClock) StateFields() []string { 1814 return []string{ 1815 "tg", 1816 "includeSys", 1817 } 1818 } 1819 1820 func (tgc *tgClock) beforeSave() {} 1821 1822 // +checklocksignore 1823 func (tgc *tgClock) StateSave(stateSinkObject state.Sink) { 1824 tgc.beforeSave() 1825 stateSinkObject.Save(0, &tgc.tg) 1826 stateSinkObject.Save(1, &tgc.includeSys) 1827 } 1828 1829 func (tgc *tgClock) afterLoad() {} 1830 1831 // +checklocksignore 1832 func (tgc *tgClock) StateLoad(stateSourceObject state.Source) { 1833 stateSourceObject.Load(0, &tgc.tg) 1834 stateSourceObject.Load(1, &tgc.includeSys) 1835 } 1836 1837 func (g *groupStop) StateTypeName() string { 1838 return "pkg/sentry/kernel.groupStop" 1839 } 1840 1841 func (g *groupStop) StateFields() []string { 1842 return []string{} 1843 } 1844 1845 func (g *groupStop) beforeSave() {} 1846 1847 // +checklocksignore 1848 func (g *groupStop) StateSave(stateSinkObject state.Sink) { 1849 g.beforeSave() 1850 } 1851 1852 func (g *groupStop) afterLoad() {} 1853 1854 // +checklocksignore 1855 func (g *groupStop) StateLoad(stateSourceObject state.Source) { 1856 } 1857 1858 func (r *runInterrupt) StateTypeName() string { 1859 return "pkg/sentry/kernel.runInterrupt" 1860 } 1861 1862 func (r *runInterrupt) StateFields() []string { 1863 return []string{} 1864 } 1865 1866 func (r *runInterrupt) beforeSave() {} 1867 1868 // +checklocksignore 1869 func (r *runInterrupt) StateSave(stateSinkObject state.Sink) { 1870 r.beforeSave() 1871 } 1872 1873 func (r *runInterrupt) afterLoad() {} 1874 1875 // +checklocksignore 1876 func (r *runInterrupt) StateLoad(stateSourceObject state.Source) { 1877 } 1878 1879 func (r *runInterruptAfterSignalDeliveryStop) StateTypeName() string { 1880 return "pkg/sentry/kernel.runInterruptAfterSignalDeliveryStop" 1881 } 1882 1883 func (r *runInterruptAfterSignalDeliveryStop) StateFields() []string { 1884 return []string{} 1885 } 1886 1887 func (r *runInterruptAfterSignalDeliveryStop) beforeSave() {} 1888 1889 // +checklocksignore 1890 func (r *runInterruptAfterSignalDeliveryStop) StateSave(stateSinkObject state.Sink) { 1891 r.beforeSave() 1892 } 1893 1894 func (r *runInterruptAfterSignalDeliveryStop) afterLoad() {} 1895 1896 // +checklocksignore 1897 func (r *runInterruptAfterSignalDeliveryStop) StateLoad(stateSourceObject state.Source) { 1898 } 1899 1900 func (r *runSyscallAfterSyscallEnterStop) StateTypeName() string { 1901 return "pkg/sentry/kernel.runSyscallAfterSyscallEnterStop" 1902 } 1903 1904 func (r *runSyscallAfterSyscallEnterStop) StateFields() []string { 1905 return []string{} 1906 } 1907 1908 func (r *runSyscallAfterSyscallEnterStop) beforeSave() {} 1909 1910 // +checklocksignore 1911 func (r *runSyscallAfterSyscallEnterStop) StateSave(stateSinkObject state.Sink) { 1912 r.beforeSave() 1913 } 1914 1915 func (r *runSyscallAfterSyscallEnterStop) afterLoad() {} 1916 1917 // +checklocksignore 1918 func (r *runSyscallAfterSyscallEnterStop) StateLoad(stateSourceObject state.Source) { 1919 } 1920 1921 func (r *runSyscallAfterSysemuStop) StateTypeName() string { 1922 return "pkg/sentry/kernel.runSyscallAfterSysemuStop" 1923 } 1924 1925 func (r *runSyscallAfterSysemuStop) StateFields() []string { 1926 return []string{} 1927 } 1928 1929 func (r *runSyscallAfterSysemuStop) beforeSave() {} 1930 1931 // +checklocksignore 1932 func (r *runSyscallAfterSysemuStop) StateSave(stateSinkObject state.Sink) { 1933 r.beforeSave() 1934 } 1935 1936 func (r *runSyscallAfterSysemuStop) afterLoad() {} 1937 1938 // +checklocksignore 1939 func (r *runSyscallAfterSysemuStop) StateLoad(stateSourceObject state.Source) { 1940 } 1941 1942 func (r *runSyscallReinvoke) StateTypeName() string { 1943 return "pkg/sentry/kernel.runSyscallReinvoke" 1944 } 1945 1946 func (r *runSyscallReinvoke) StateFields() []string { 1947 return []string{} 1948 } 1949 1950 func (r *runSyscallReinvoke) beforeSave() {} 1951 1952 // +checklocksignore 1953 func (r *runSyscallReinvoke) StateSave(stateSinkObject state.Sink) { 1954 r.beforeSave() 1955 } 1956 1957 func (r *runSyscallReinvoke) afterLoad() {} 1958 1959 // +checklocksignore 1960 func (r *runSyscallReinvoke) StateLoad(stateSourceObject state.Source) { 1961 } 1962 1963 func (r *runSyscallExit) StateTypeName() string { 1964 return "pkg/sentry/kernel.runSyscallExit" 1965 } 1966 1967 func (r *runSyscallExit) StateFields() []string { 1968 return []string{} 1969 } 1970 1971 func (r *runSyscallExit) beforeSave() {} 1972 1973 // +checklocksignore 1974 func (r *runSyscallExit) StateSave(stateSinkObject state.Sink) { 1975 r.beforeSave() 1976 } 1977 1978 func (r *runSyscallExit) afterLoad() {} 1979 1980 // +checklocksignore 1981 func (r *runSyscallExit) StateLoad(stateSourceObject state.Source) { 1982 } 1983 1984 func (tg *ThreadGroup) StateTypeName() string { 1985 return "pkg/sentry/kernel.ThreadGroup" 1986 } 1987 1988 func (tg *ThreadGroup) StateFields() []string { 1989 return []string{ 1990 "threadGroupNode", 1991 "signalHandlers", 1992 "pendingSignals", 1993 "groupStopDequeued", 1994 "groupStopSignal", 1995 "groupStopPendingCount", 1996 "groupStopComplete", 1997 "groupStopWaitable", 1998 "groupContNotify", 1999 "groupContInterrupted", 2000 "groupContWaitable", 2001 "exiting", 2002 "exitStatus", 2003 "terminationSignal", 2004 "itimerRealTimer", 2005 "itimerVirtSetting", 2006 "itimerProfSetting", 2007 "rlimitCPUSoftSetting", 2008 "cpuTimersEnabled", 2009 "timers", 2010 "nextTimerID", 2011 "exitedCPUStats", 2012 "childCPUStats", 2013 "ioUsage", 2014 "maxRSS", 2015 "childMaxRSS", 2016 "limits", 2017 "processGroup", 2018 "execed", 2019 "oldRSeqCritical", 2020 "tty", 2021 "oomScoreAdj", 2022 "isChildSubreaper", 2023 "hasChildSubreaper", 2024 } 2025 } 2026 2027 func (tg *ThreadGroup) beforeSave() {} 2028 2029 // +checklocksignore 2030 func (tg *ThreadGroup) StateSave(stateSinkObject state.Sink) { 2031 tg.beforeSave() 2032 var oldRSeqCriticalValue *OldRSeqCriticalRegion 2033 oldRSeqCriticalValue = tg.saveOldRSeqCritical() 2034 stateSinkObject.SaveValue(29, oldRSeqCriticalValue) 2035 stateSinkObject.Save(0, &tg.threadGroupNode) 2036 stateSinkObject.Save(1, &tg.signalHandlers) 2037 stateSinkObject.Save(2, &tg.pendingSignals) 2038 stateSinkObject.Save(3, &tg.groupStopDequeued) 2039 stateSinkObject.Save(4, &tg.groupStopSignal) 2040 stateSinkObject.Save(5, &tg.groupStopPendingCount) 2041 stateSinkObject.Save(6, &tg.groupStopComplete) 2042 stateSinkObject.Save(7, &tg.groupStopWaitable) 2043 stateSinkObject.Save(8, &tg.groupContNotify) 2044 stateSinkObject.Save(9, &tg.groupContInterrupted) 2045 stateSinkObject.Save(10, &tg.groupContWaitable) 2046 stateSinkObject.Save(11, &tg.exiting) 2047 stateSinkObject.Save(12, &tg.exitStatus) 2048 stateSinkObject.Save(13, &tg.terminationSignal) 2049 stateSinkObject.Save(14, &tg.itimerRealTimer) 2050 stateSinkObject.Save(15, &tg.itimerVirtSetting) 2051 stateSinkObject.Save(16, &tg.itimerProfSetting) 2052 stateSinkObject.Save(17, &tg.rlimitCPUSoftSetting) 2053 stateSinkObject.Save(18, &tg.cpuTimersEnabled) 2054 stateSinkObject.Save(19, &tg.timers) 2055 stateSinkObject.Save(20, &tg.nextTimerID) 2056 stateSinkObject.Save(21, &tg.exitedCPUStats) 2057 stateSinkObject.Save(22, &tg.childCPUStats) 2058 stateSinkObject.Save(23, &tg.ioUsage) 2059 stateSinkObject.Save(24, &tg.maxRSS) 2060 stateSinkObject.Save(25, &tg.childMaxRSS) 2061 stateSinkObject.Save(26, &tg.limits) 2062 stateSinkObject.Save(27, &tg.processGroup) 2063 stateSinkObject.Save(28, &tg.execed) 2064 stateSinkObject.Save(30, &tg.tty) 2065 stateSinkObject.Save(31, &tg.oomScoreAdj) 2066 stateSinkObject.Save(32, &tg.isChildSubreaper) 2067 stateSinkObject.Save(33, &tg.hasChildSubreaper) 2068 } 2069 2070 func (tg *ThreadGroup) afterLoad() {} 2071 2072 // +checklocksignore 2073 func (tg *ThreadGroup) StateLoad(stateSourceObject state.Source) { 2074 stateSourceObject.Load(0, &tg.threadGroupNode) 2075 stateSourceObject.Load(1, &tg.signalHandlers) 2076 stateSourceObject.Load(2, &tg.pendingSignals) 2077 stateSourceObject.Load(3, &tg.groupStopDequeued) 2078 stateSourceObject.Load(4, &tg.groupStopSignal) 2079 stateSourceObject.Load(5, &tg.groupStopPendingCount) 2080 stateSourceObject.Load(6, &tg.groupStopComplete) 2081 stateSourceObject.Load(7, &tg.groupStopWaitable) 2082 stateSourceObject.Load(8, &tg.groupContNotify) 2083 stateSourceObject.Load(9, &tg.groupContInterrupted) 2084 stateSourceObject.Load(10, &tg.groupContWaitable) 2085 stateSourceObject.Load(11, &tg.exiting) 2086 stateSourceObject.Load(12, &tg.exitStatus) 2087 stateSourceObject.Load(13, &tg.terminationSignal) 2088 stateSourceObject.Load(14, &tg.itimerRealTimer) 2089 stateSourceObject.Load(15, &tg.itimerVirtSetting) 2090 stateSourceObject.Load(16, &tg.itimerProfSetting) 2091 stateSourceObject.Load(17, &tg.rlimitCPUSoftSetting) 2092 stateSourceObject.Load(18, &tg.cpuTimersEnabled) 2093 stateSourceObject.Load(19, &tg.timers) 2094 stateSourceObject.Load(20, &tg.nextTimerID) 2095 stateSourceObject.Load(21, &tg.exitedCPUStats) 2096 stateSourceObject.Load(22, &tg.childCPUStats) 2097 stateSourceObject.Load(23, &tg.ioUsage) 2098 stateSourceObject.Load(24, &tg.maxRSS) 2099 stateSourceObject.Load(25, &tg.childMaxRSS) 2100 stateSourceObject.Load(26, &tg.limits) 2101 stateSourceObject.Load(27, &tg.processGroup) 2102 stateSourceObject.Load(28, &tg.execed) 2103 stateSourceObject.Load(30, &tg.tty) 2104 stateSourceObject.Load(31, &tg.oomScoreAdj) 2105 stateSourceObject.Load(32, &tg.isChildSubreaper) 2106 stateSourceObject.Load(33, &tg.hasChildSubreaper) 2107 stateSourceObject.LoadValue(29, new(*OldRSeqCriticalRegion), func(y any) { tg.loadOldRSeqCritical(y.(*OldRSeqCriticalRegion)) }) 2108 } 2109 2110 func (l *itimerRealListener) StateTypeName() string { 2111 return "pkg/sentry/kernel.itimerRealListener" 2112 } 2113 2114 func (l *itimerRealListener) StateFields() []string { 2115 return []string{ 2116 "tg", 2117 } 2118 } 2119 2120 func (l *itimerRealListener) beforeSave() {} 2121 2122 // +checklocksignore 2123 func (l *itimerRealListener) StateSave(stateSinkObject state.Sink) { 2124 l.beforeSave() 2125 stateSinkObject.Save(0, &l.tg) 2126 } 2127 2128 func (l *itimerRealListener) afterLoad() {} 2129 2130 // +checklocksignore 2131 func (l *itimerRealListener) StateLoad(stateSourceObject state.Source) { 2132 stateSourceObject.Load(0, &l.tg) 2133 } 2134 2135 func (ts *TaskSet) StateTypeName() string { 2136 return "pkg/sentry/kernel.TaskSet" 2137 } 2138 2139 func (ts *TaskSet) StateFields() []string { 2140 return []string{ 2141 "Root", 2142 "sessions", 2143 } 2144 } 2145 2146 func (ts *TaskSet) beforeSave() {} 2147 2148 // +checklocksignore 2149 func (ts *TaskSet) StateSave(stateSinkObject state.Sink) { 2150 ts.beforeSave() 2151 stateSinkObject.Save(0, &ts.Root) 2152 stateSinkObject.Save(1, &ts.sessions) 2153 } 2154 2155 func (ts *TaskSet) afterLoad() {} 2156 2157 // +checklocksignore 2158 func (ts *TaskSet) StateLoad(stateSourceObject state.Source) { 2159 stateSourceObject.Load(0, &ts.Root) 2160 stateSourceObject.Load(1, &ts.sessions) 2161 } 2162 2163 func (ns *PIDNamespace) StateTypeName() string { 2164 return "pkg/sentry/kernel.PIDNamespace" 2165 } 2166 2167 func (ns *PIDNamespace) StateFields() []string { 2168 return []string{ 2169 "owner", 2170 "parent", 2171 "userns", 2172 "id", 2173 "last", 2174 "tasks", 2175 "tids", 2176 "tgids", 2177 "sessions", 2178 "sids", 2179 "processGroups", 2180 "pgids", 2181 "exiting", 2182 "extra", 2183 } 2184 } 2185 2186 func (ns *PIDNamespace) beforeSave() {} 2187 2188 // +checklocksignore 2189 func (ns *PIDNamespace) StateSave(stateSinkObject state.Sink) { 2190 ns.beforeSave() 2191 stateSinkObject.Save(0, &ns.owner) 2192 stateSinkObject.Save(1, &ns.parent) 2193 stateSinkObject.Save(2, &ns.userns) 2194 stateSinkObject.Save(3, &ns.id) 2195 stateSinkObject.Save(4, &ns.last) 2196 stateSinkObject.Save(5, &ns.tasks) 2197 stateSinkObject.Save(6, &ns.tids) 2198 stateSinkObject.Save(7, &ns.tgids) 2199 stateSinkObject.Save(8, &ns.sessions) 2200 stateSinkObject.Save(9, &ns.sids) 2201 stateSinkObject.Save(10, &ns.processGroups) 2202 stateSinkObject.Save(11, &ns.pgids) 2203 stateSinkObject.Save(12, &ns.exiting) 2204 stateSinkObject.Save(13, &ns.extra) 2205 } 2206 2207 func (ns *PIDNamespace) afterLoad() {} 2208 2209 // +checklocksignore 2210 func (ns *PIDNamespace) StateLoad(stateSourceObject state.Source) { 2211 stateSourceObject.Load(0, &ns.owner) 2212 stateSourceObject.Load(1, &ns.parent) 2213 stateSourceObject.Load(2, &ns.userns) 2214 stateSourceObject.Load(3, &ns.id) 2215 stateSourceObject.Load(4, &ns.last) 2216 stateSourceObject.Load(5, &ns.tasks) 2217 stateSourceObject.Load(6, &ns.tids) 2218 stateSourceObject.Load(7, &ns.tgids) 2219 stateSourceObject.Load(8, &ns.sessions) 2220 stateSourceObject.Load(9, &ns.sids) 2221 stateSourceObject.Load(10, &ns.processGroups) 2222 stateSourceObject.Load(11, &ns.pgids) 2223 stateSourceObject.Load(12, &ns.exiting) 2224 stateSourceObject.Load(13, &ns.extra) 2225 } 2226 2227 func (t *threadGroupNode) StateTypeName() string { 2228 return "pkg/sentry/kernel.threadGroupNode" 2229 } 2230 2231 func (t *threadGroupNode) StateFields() []string { 2232 return []string{ 2233 "pidns", 2234 "pidWithinNS", 2235 "eventQueue", 2236 "leader", 2237 "execing", 2238 "tasks", 2239 "tasksCount", 2240 "liveTasks", 2241 "activeTasks", 2242 } 2243 } 2244 2245 func (t *threadGroupNode) beforeSave() {} 2246 2247 // +checklocksignore 2248 func (t *threadGroupNode) StateSave(stateSinkObject state.Sink) { 2249 t.beforeSave() 2250 stateSinkObject.Save(0, &t.pidns) 2251 stateSinkObject.Save(1, &t.pidWithinNS) 2252 stateSinkObject.Save(2, &t.eventQueue) 2253 stateSinkObject.Save(3, &t.leader) 2254 stateSinkObject.Save(4, &t.execing) 2255 stateSinkObject.Save(5, &t.tasks) 2256 stateSinkObject.Save(6, &t.tasksCount) 2257 stateSinkObject.Save(7, &t.liveTasks) 2258 stateSinkObject.Save(8, &t.activeTasks) 2259 } 2260 2261 func (t *threadGroupNode) afterLoad() {} 2262 2263 // +checklocksignore 2264 func (t *threadGroupNode) StateLoad(stateSourceObject state.Source) { 2265 stateSourceObject.Load(0, &t.pidns) 2266 stateSourceObject.Load(1, &t.pidWithinNS) 2267 stateSourceObject.Load(2, &t.eventQueue) 2268 stateSourceObject.Load(3, &t.leader) 2269 stateSourceObject.Load(4, &t.execing) 2270 stateSourceObject.Load(5, &t.tasks) 2271 stateSourceObject.Load(6, &t.tasksCount) 2272 stateSourceObject.Load(7, &t.liveTasks) 2273 stateSourceObject.Load(8, &t.activeTasks) 2274 } 2275 2276 func (t *taskNode) StateTypeName() string { 2277 return "pkg/sentry/kernel.taskNode" 2278 } 2279 2280 func (t *taskNode) StateFields() []string { 2281 return []string{ 2282 "tg", 2283 "taskEntry", 2284 "parent", 2285 "children", 2286 "childPIDNamespace", 2287 } 2288 } 2289 2290 func (t *taskNode) beforeSave() {} 2291 2292 // +checklocksignore 2293 func (t *taskNode) StateSave(stateSinkObject state.Sink) { 2294 t.beforeSave() 2295 stateSinkObject.Save(0, &t.tg) 2296 stateSinkObject.Save(1, &t.taskEntry) 2297 stateSinkObject.Save(2, &t.parent) 2298 stateSinkObject.Save(3, &t.children) 2299 stateSinkObject.Save(4, &t.childPIDNamespace) 2300 } 2301 2302 func (t *taskNode) afterLoad() {} 2303 2304 // +checklocksignore 2305 func (t *taskNode) StateLoad(stateSourceObject state.Source) { 2306 stateSourceObject.LoadWait(0, &t.tg) 2307 stateSourceObject.Load(1, &t.taskEntry) 2308 stateSourceObject.Load(2, &t.parent) 2309 stateSourceObject.Load(3, &t.children) 2310 stateSourceObject.Load(4, &t.childPIDNamespace) 2311 } 2312 2313 func (t *Timekeeper) StateTypeName() string { 2314 return "pkg/sentry/kernel.Timekeeper" 2315 } 2316 2317 func (t *Timekeeper) StateFields() []string { 2318 return []string{ 2319 "realtimeClock", 2320 "monotonicClock", 2321 "bootTime", 2322 "saveMonotonic", 2323 "saveRealtime", 2324 "params", 2325 } 2326 } 2327 2328 // +checklocksignore 2329 func (t *Timekeeper) StateSave(stateSinkObject state.Sink) { 2330 t.beforeSave() 2331 stateSinkObject.Save(0, &t.realtimeClock) 2332 stateSinkObject.Save(1, &t.monotonicClock) 2333 stateSinkObject.Save(2, &t.bootTime) 2334 stateSinkObject.Save(3, &t.saveMonotonic) 2335 stateSinkObject.Save(4, &t.saveRealtime) 2336 stateSinkObject.Save(5, &t.params) 2337 } 2338 2339 // +checklocksignore 2340 func (t *Timekeeper) StateLoad(stateSourceObject state.Source) { 2341 stateSourceObject.Load(0, &t.realtimeClock) 2342 stateSourceObject.Load(1, &t.monotonicClock) 2343 stateSourceObject.Load(2, &t.bootTime) 2344 stateSourceObject.Load(3, &t.saveMonotonic) 2345 stateSourceObject.Load(4, &t.saveRealtime) 2346 stateSourceObject.Load(5, &t.params) 2347 stateSourceObject.AfterLoad(t.afterLoad) 2348 } 2349 2350 func (tc *timekeeperClock) StateTypeName() string { 2351 return "pkg/sentry/kernel.timekeeperClock" 2352 } 2353 2354 func (tc *timekeeperClock) StateFields() []string { 2355 return []string{ 2356 "tk", 2357 "c", 2358 } 2359 } 2360 2361 func (tc *timekeeperClock) beforeSave() {} 2362 2363 // +checklocksignore 2364 func (tc *timekeeperClock) StateSave(stateSinkObject state.Sink) { 2365 tc.beforeSave() 2366 stateSinkObject.Save(0, &tc.tk) 2367 stateSinkObject.Save(1, &tc.c) 2368 } 2369 2370 func (tc *timekeeperClock) afterLoad() {} 2371 2372 // +checklocksignore 2373 func (tc *timekeeperClock) StateLoad(stateSourceObject state.Source) { 2374 stateSourceObject.Load(0, &tc.tk) 2375 stateSourceObject.Load(1, &tc.c) 2376 } 2377 2378 func (tty *TTY) StateTypeName() string { 2379 return "pkg/sentry/kernel.TTY" 2380 } 2381 2382 func (tty *TTY) StateFields() []string { 2383 return []string{ 2384 "Index", 2385 "tg", 2386 } 2387 } 2388 2389 func (tty *TTY) beforeSave() {} 2390 2391 // +checklocksignore 2392 func (tty *TTY) StateSave(stateSinkObject state.Sink) { 2393 tty.beforeSave() 2394 stateSinkObject.Save(0, &tty.Index) 2395 stateSinkObject.Save(1, &tty.tg) 2396 } 2397 2398 func (tty *TTY) afterLoad() {} 2399 2400 // +checklocksignore 2401 func (tty *TTY) StateLoad(stateSourceObject state.Source) { 2402 stateSourceObject.Load(0, &tty.Index) 2403 stateSourceObject.Load(1, &tty.tg) 2404 } 2405 2406 func (u *UTSNamespace) StateTypeName() string { 2407 return "pkg/sentry/kernel.UTSNamespace" 2408 } 2409 2410 func (u *UTSNamespace) StateFields() []string { 2411 return []string{ 2412 "hostName", 2413 "domainName", 2414 "userns", 2415 "inode", 2416 } 2417 } 2418 2419 func (u *UTSNamespace) beforeSave() {} 2420 2421 // +checklocksignore 2422 func (u *UTSNamespace) StateSave(stateSinkObject state.Sink) { 2423 u.beforeSave() 2424 stateSinkObject.Save(0, &u.hostName) 2425 stateSinkObject.Save(1, &u.domainName) 2426 stateSinkObject.Save(2, &u.userns) 2427 stateSinkObject.Save(3, &u.inode) 2428 } 2429 2430 func (u *UTSNamespace) afterLoad() {} 2431 2432 // +checklocksignore 2433 func (u *UTSNamespace) StateLoad(stateSourceObject state.Source) { 2434 stateSourceObject.Load(0, &u.hostName) 2435 stateSourceObject.Load(1, &u.domainName) 2436 stateSourceObject.Load(2, &u.userns) 2437 stateSourceObject.Load(3, &u.inode) 2438 } 2439 2440 func (v *VDSOParamPage) StateTypeName() string { 2441 return "pkg/sentry/kernel.VDSOParamPage" 2442 } 2443 2444 func (v *VDSOParamPage) StateFields() []string { 2445 return []string{ 2446 "mfp", 2447 "fr", 2448 "seq", 2449 "copyScratchBuffer", 2450 } 2451 } 2452 2453 func (v *VDSOParamPage) beforeSave() {} 2454 2455 // +checklocksignore 2456 func (v *VDSOParamPage) StateSave(stateSinkObject state.Sink) { 2457 v.beforeSave() 2458 stateSinkObject.Save(0, &v.mfp) 2459 stateSinkObject.Save(1, &v.fr) 2460 stateSinkObject.Save(2, &v.seq) 2461 stateSinkObject.Save(3, &v.copyScratchBuffer) 2462 } 2463 2464 func (v *VDSOParamPage) afterLoad() {} 2465 2466 // +checklocksignore 2467 func (v *VDSOParamPage) StateLoad(stateSourceObject state.Source) { 2468 stateSourceObject.Load(0, &v.mfp) 2469 stateSourceObject.Load(1, &v.fr) 2470 stateSourceObject.Load(2, &v.seq) 2471 stateSourceObject.Load(3, &v.copyScratchBuffer) 2472 } 2473 2474 func init() { 2475 state.Register((*abstractEndpoint)(nil)) 2476 state.Register((*AbstractSocketNamespace)(nil)) 2477 state.Register((*Cgroup)(nil)) 2478 state.Register((*hierarchy)(nil)) 2479 state.Register((*CgroupRegistry)(nil)) 2480 state.Register((*FDFlags)(nil)) 2481 state.Register((*descriptor)(nil)) 2482 state.Register((*FDTable)(nil)) 2483 state.Register((*FDTableRefs)(nil)) 2484 state.Register((*FSContext)(nil)) 2485 state.Register((*FSContextRefs)(nil)) 2486 state.Register((*IPCNamespace)(nil)) 2487 state.Register((*userCounters)(nil)) 2488 state.Register((*Kernel)(nil)) 2489 state.Register((*SocketRecord)(nil)) 2490 state.Register((*pendingSignals)(nil)) 2491 state.Register((*pendingSignalQueue)(nil)) 2492 state.Register((*pendingSignal)(nil)) 2493 state.Register((*pendingSignalList)(nil)) 2494 state.Register((*pendingSignalEntry)(nil)) 2495 state.Register((*savedPendingSignal)(nil)) 2496 state.Register((*IntervalTimer)(nil)) 2497 state.Register((*processGroupList)(nil)) 2498 state.Register((*processGroupEntry)(nil)) 2499 state.Register((*ProcessGroupRefs)(nil)) 2500 state.Register((*ptraceOptions)(nil)) 2501 state.Register((*ptraceStop)(nil)) 2502 state.Register((*OldRSeqCriticalRegion)(nil)) 2503 state.Register((*sessionList)(nil)) 2504 state.Register((*sessionEntry)(nil)) 2505 state.Register((*SessionRefs)(nil)) 2506 state.Register((*Session)(nil)) 2507 state.Register((*ProcessGroup)(nil)) 2508 state.Register((*SignalHandlers)(nil)) 2509 state.Register((*syscallTableInfo)(nil)) 2510 state.Register((*syslog)(nil)) 2511 state.Register((*Task)(nil)) 2512 state.Register((*runSyscallAfterPtraceEventClone)(nil)) 2513 state.Register((*runSyscallAfterVforkStop)(nil)) 2514 state.Register((*vforkStop)(nil)) 2515 state.Register((*execStop)(nil)) 2516 state.Register((*runSyscallAfterExecStop)(nil)) 2517 state.Register((*runExit)(nil)) 2518 state.Register((*runExitMain)(nil)) 2519 state.Register((*runExitNotify)(nil)) 2520 state.Register((*TaskImage)(nil)) 2521 state.Register((*taskList)(nil)) 2522 state.Register((*taskEntry)(nil)) 2523 state.Register((*runApp)(nil)) 2524 state.Register((*TaskGoroutineSchedInfo)(nil)) 2525 state.Register((*taskClock)(nil)) 2526 state.Register((*tgClock)(nil)) 2527 state.Register((*groupStop)(nil)) 2528 state.Register((*runInterrupt)(nil)) 2529 state.Register((*runInterruptAfterSignalDeliveryStop)(nil)) 2530 state.Register((*runSyscallAfterSyscallEnterStop)(nil)) 2531 state.Register((*runSyscallAfterSysemuStop)(nil)) 2532 state.Register((*runSyscallReinvoke)(nil)) 2533 state.Register((*runSyscallExit)(nil)) 2534 state.Register((*ThreadGroup)(nil)) 2535 state.Register((*itimerRealListener)(nil)) 2536 state.Register((*TaskSet)(nil)) 2537 state.Register((*PIDNamespace)(nil)) 2538 state.Register((*threadGroupNode)(nil)) 2539 state.Register((*taskNode)(nil)) 2540 state.Register((*Timekeeper)(nil)) 2541 state.Register((*timekeeperClock)(nil)) 2542 state.Register((*TTY)(nil)) 2543 state.Register((*UTSNamespace)(nil)) 2544 state.Register((*VDSOParamPage)(nil)) 2545 }