Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
License | H A D | 25-Apr-2025 | 20 KiB | 399 | 327 | |
README | H A D | 25-Apr-2025 | 1.1 KiB | 29 | 21 | |
doc.go | H A D | 25-Apr-2025 | 2.6 KiB | 61 | 1 | |
go.mod | H A D | 25-Apr-2025 | 62 | 4 | 2 | |
psx.c | H A D | 25-Apr-2025 | 21.6 KiB | 766 | 454 | |
psx.go | H A D | 25-Apr-2025 | 1.2 KiB | 36 | 8 | |
psx_cgo.go | H A D | 25-Apr-2025 | 2.7 KiB | 92 | 38 | |
psx_cgo_test.go | H A D | 25-Apr-2025 | 1 KiB | 41 | 26 | |
psx_syscall.h | H A D | 25-Apr-2025 | 3.4 KiB | 96 | 31 | |
psx_test.go | H A D | 25-Apr-2025 | 3.2 KiB | 126 | 109 |
README
1Package "psx" provides an API for invoking system calls in a way that 2each system call is mirrored on all OS threads of the combined Go/CGo 3runtime. Since the Go runtime treats OS threads as interchangeable, a 4feature like this is needed to meaningfully change process privilege 5(including dropping privilege) in a Go program running on Linux. This 6package is required by: 7 8 "kernel.org/pub/linux/libs/security/libcap/cap" 9 10When compiled CGO_ENABLED=0, the functionality requires go1.16+ to 11build. That release of Go introduced syscall.AllThreadsSyscall*() 12APIs. When compiled this way, the "psx" package functions 13psx.Syscall3() and psx.Syscall6() are aliased to 14syscall.AllThreadsSyscall() and syscall.AllThreadsSyscall6() 15respectively. 16 17When compiled CGO_ENABLED=1, the functionality is implemented by C 18code, [lib]psx, which is distributed with libcap. 19 20The official release announcement site for libcap and libpsx is: 21 22 https://sites.google.com/site/fullycapable/ 23 24Like libcap/libpsx itself, the "psx" package is distributed with a 25"you choose" License. Specifically: BSD three clause, or GPL2. See the 26License file. 27 28Andrew G. Morgan <[email protected]> 29