1*2810ac1bSKiyoung KimPackage "psx" provides an API for invoking system calls in a way that 2*2810ac1bSKiyoung Kimeach system call is mirrored on all OS threads of the combined Go/CGo 3*2810ac1bSKiyoung Kimruntime. Since the Go runtime treats OS threads as interchangeable, a 4*2810ac1bSKiyoung Kimfeature like this is needed to meaningfully change process privilege 5*2810ac1bSKiyoung Kim(including dropping privilege) in a Go program running on Linux. This 6*2810ac1bSKiyoung Kimpackage is required by: 7*2810ac1bSKiyoung Kim 8*2810ac1bSKiyoung Kim "kernel.org/pub/linux/libs/security/libcap/cap" 9*2810ac1bSKiyoung Kim 10*2810ac1bSKiyoung KimWhen compiled CGO_ENABLED=0, the functionality requires go1.16+ to 11*2810ac1bSKiyoung Kimbuild. That release of Go introduced syscall.AllThreadsSyscall*() 12*2810ac1bSKiyoung KimAPIs. When compiled this way, the "psx" package functions 13*2810ac1bSKiyoung Kimpsx.Syscall3() and psx.Syscall6() are aliased to 14*2810ac1bSKiyoung Kimsyscall.AllThreadsSyscall() and syscall.AllThreadsSyscall6() 15*2810ac1bSKiyoung Kimrespectively. 16*2810ac1bSKiyoung Kim 17*2810ac1bSKiyoung KimWhen compiled CGO_ENABLED=1, the functionality is implemented by C 18*2810ac1bSKiyoung Kimcode, [lib]psx, which is distributed with libcap. 19*2810ac1bSKiyoung Kim 20*2810ac1bSKiyoung KimThe official release announcement site for libcap and libpsx is: 21*2810ac1bSKiyoung Kim 22*2810ac1bSKiyoung Kim https://sites.google.com/site/fullycapable/ 23*2810ac1bSKiyoung Kim 24*2810ac1bSKiyoung KimLike libcap/libpsx itself, the "psx" package is distributed with a 25*2810ac1bSKiyoung Kim"you choose" License. Specifically: BSD three clause, or GPL2. See the 26*2810ac1bSKiyoung KimLicense file. 27*2810ac1bSKiyoung Kim 28*2810ac1bSKiyoung KimAndrew G. Morgan <[email protected]> 29