summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/ptrace
AgeCommit message (Collapse)Author
2020-03-11Merge release-20200219.0-136-g24e7005 (automated)gVisor bot
2020-03-09Enable thread local storage support on arm64.Haibo Xu
Linux use the task.thread.uw.tp_value field to store the TLS pointer on arm64 platform, and we use a similar way in gvisor to store it in the arch/State struct. Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: Ie76b5c6d109bc27ccfd594008a96753806db7764
2020-03-03Merge release-20200219.0-92-g277a0d5 (automated)gVisor bot
2020-03-03platform/ptrace: don't call probeSeccomp on arm64Andrei Vagin
The support of PTRACE_SYSEMU on arm64 was added in the 5.3 kernel, so we can be sure that the current version is higher that 5.3. And this change moves vsyscall seccomp rules to the arch specific file, because vsyscall isn't supported on arm64. PiperOrigin-RevId: 298696493
2020-02-06Merge release-20200127.0-85-g1b6a12a (automated)gVisor bot
2020-02-04Merge release-20200127.0-65-g95ce8bb (automated)gVisor bot
2020-01-27Merge release-20200115.0-110-g0e2f1b7 (automated)gVisor bot
2020-01-27Update package locations.Adin Scannell
Because the abi will depend on the core types for marshalling (usermem, context, safemem, safecopy), these need to be flattened from the sentry directory. These packages contain no sentry-specific details. PiperOrigin-RevId: 291811289
2020-01-27Standardize on tools directory.Adin Scannell
PiperOrigin-RevId: 291745021
2020-01-10Merge release-20191213.0-96-g27500d5 (automated)gVisor bot
2020-01-09New sync package.Ian Gudger
* Rename syncutil to sync. * Add aliases to sync types. * Replace existing usage of standard library sync package. This will make it easier to swap out synchronization primitives. For example, this will allow us to use primitives from github.com/sasha-s/go-deadlock to check for lock ordering violations. Updates #1472 PiperOrigin-RevId: 289033387
2020-01-07Merge release-20191213.0-63-g17c1824 (automated)gVisor bot
2020-01-06platform/syscall: use syscall + int3 to execute a system call in a stub processAndrei Vagin
Right now, we need to call ptrace(PTRACE_SYSCALL) and wait() twice to execute one system call in a stub process. With these changes, we will need to call ptrace + wait only once. In addition, this allows to workaround the kernel bug when a stub process doesn't stop on syscall-exit-stop and starts executing the next system call. Reported-by: syzbot+37143cafa8dc3b5008ee@syzkaller.appspotmail.com PiperOrigin-RevId: 288393029
2019-12-26Merge release-20191213.0-53-g5b9034c (automated)gVisor bot
2019-12-23Replace syscall.PTRACE_SYSEMU with unix.PTRACE_SYSEMUHaibo Xu
Linux PTRACE_SYSEMU support on arm64 was merged to mainline from V5.3, and the corresponding support in go also enabled recently. Since the "syscall" package is locked down from go 1.4, so the ptrace PTRACE_SYSEMU definition can't be added to package "syscall" on arm64. According to the golang community, updates required by new systems or versions should use the corresponding package in the golang.org/x/sys repository instead(https://golang.org/pkg/syscall/). Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: I2f917bb2be62f990c3e158e2bb99e094ea03f751
2019-12-17Merge release-20191210.0-42-g91f1ac7 (automated)gVisor bot
2019-12-17Mark enableCpuidFault nosplitMichael Pratt
This is called after fork, so it must be nosplit. Updates #1408 PiperOrigin-RevId: 286053054
2019-12-11Merge release-20191129.0-47-gb80cba6 (automated)gVisor bot
2019-12-03platform/ptrace: make some operations arch specificHaibo Xu
Make the patchSignalInfo/cpuid faulting/initial thread seccomp rules operations architecture dependent. Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: Iaf692dbe3700d2e01168ec2f1b4beeda9136fd62
2019-11-18Merge release-20191114.0-14-g26b3341 (automated)gVisor bot
2019-11-18platform/ptrace: use host.GetCPU instead of the getcpu syscallAndrei Vagin
This should save ~200ns from switchToApp (on ptrace too). // mpratt PiperOrigin-RevId: 281159895
2019-10-29Merge release-20190806.1-340-gc0b8fd4 (automated)gVisor bot
2019-10-29Update build tags to allow Go 1.14Michael Pratt
Currently there are no ABI changes. We should check again closer to release. PiperOrigin-RevId: 277349744
2019-10-25Merge release-20190806.1-325-gfd59891 (automated)gVisor bot
2019-10-25platform/ptrace: use tgkill instead of killAndrei Vagin
The syscall filters don't allow kill, just tgkill. PiperOrigin-RevId: 276718421
2019-10-22Merge release-20190806.1-303-ge63ff6d (automated)gVisor bot
2019-10-22platform/ptrace: exit without panic if a stub process has been killed by SIGKILLAndrei Vagin
SIGKILL can be sent only by an user or OOM-killer. In both cases, we don't need to panic. PiperOrigin-RevId: 276150120
2019-09-25Merge release-20190806.1-180-g76ff194 (automated)gVisor bot
2019-09-24gvisor: change syscall.RawSyscall to syscall.RawSyscall6 where requiredgVisor bot
Before https://golang.org/cl/173160 syscall.RawSyscall would zero out the last three register arguments to the system call. That no longer happens. For system calls that take more than three arguments, use RawSyscall6 to ensure that we pass zero, not random data, for the additional arguments. PiperOrigin-RevId: 271062527
2019-09-17Merge release-20190806.1-151-g3b7119a (automated)gVisor bot
2019-09-17platform/ptrace: log exit code for stub processesAndrei Vagin
PiperOrigin-RevId: 269631877
2019-08-17Merge 2a130335 (automated)gVisor bot
2019-08-16ptrace: detect if a stub process exited unexpectedlyAndrei Vagin
PiperOrigin-RevId: 263880577
2019-08-09Merge 5a38eb12 (automated)gVisor bot
2019-08-09Add initial ptrace stub and syscall support for arm64.Haibo Xu
Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: I1dbd23bb240cca71d0cc30fc75ca5be28cb4c37c PiperOrigin-RevId: 262619519
2019-07-12Merge 69e0affa (automated)gVisor bot
2019-07-03Avoid importing platforms from many source filesAndrei Vagin
PiperOrigin-RevId: 256494243
2019-06-28platform/ptrace: return more detailed errorsAndrei Vagin
Right now, if we can't create a stub process, we will see this error: panic: unable to activate mm: resource temporarily unavailable It would be better to know the root cause of this "resource temporarily unavailable". PiperOrigin-RevId: 255656831
2019-06-27Merge 5b41ba5d (automated)gVisor bot
2019-06-27Merge 085a9075 (automated)gVisor bot
2019-06-27Fix various spelling issues in the documentationMichael Pratt
Addresses obvious typos, in the documentation only. COPYBARA_INTEGRATE_REVIEW=https://github.com/google/gvisor/pull/443 from Pixep:fix/documentation-spelling 4d0688164eafaf0b3010e5f4824b35d1e7176d65 PiperOrigin-RevId: 255477779
2019-06-27gvisor/ptrace: grub initial thread registers only onceAndrei Vagin
PiperOrigin-RevId: 255465635
2019-06-25Merge 7f5d0afe (automated)gVisor bot
2019-06-24Add O_EXITKILL to ptrace options.Adin Scannell
This prevents a race before PDEATH_SIG can take effect during a sentry crash. Discovered and solution by avagin@. PiperOrigin-RevId: 254871534
2019-06-24Merge c5486f51 (automated)gVisor bot
2019-06-24platform/ptrace: specify PTRACE_O_TRACEEXIT for stub-processesAndrei Vagin
The tracee is stopped early during process exit, when registers are still available, allowing the tracer to see where the exit occurred, whereas the normal exit notifi? cation is done after the process is finished exiting. Without this option, dumpAndPanic fails to get registers. PiperOrigin-RevId: 254852917
2019-06-13Merge add40fd6 (automated)gVisor bot
2019-06-13Update canonical repository.Adin Scannell
This can be merged after: https://github.com/google/gvisor-website/pull/77 or https://github.com/google/gvisor-website/pull/78 PiperOrigin-RevId: 253132620
2019-06-12Merge 0d05a12f (automated)gVisor bot
2019-06-12gvisor/ptrace: print guest registers if a stub stopped with unexpected codeAndrei Vagin
PiperOrigin-RevId: 252855280