summaryrefslogtreecommitdiff
path: root/psx
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2020-07-05 09:29:31 -0700
committerAndrew G. Morgan <morgan@kernel.org>2020-07-05 09:29:31 -0700
commit264f8dcb14d811b7b1a0a9abbe82a946cff3d955 (patch)
tree4a50839f56d9ccacaaf9ba483cf899806103b3a9 /psx
parent15d7ecae0cfc8dca1dd7e05a7301ecae096081f9 (diff)
downloadlibcap2-264f8dcb14d811b7b1a0a9abbe82a946cff3d955.tar.gz
Documentation fixes for go packages.
Also converted an internal type from int to uint. This change should not affect any client code. Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Diffstat (limited to 'psx')
-rw-r--r--psx/psx.go32
1 files changed, 18 insertions, 14 deletions
diff --git a/psx/psx.go b/psx/psx.go
index 222ca5b..eb18ff4 100644
--- a/psx/psx.go
+++ b/psx/psx.go
@@ -1,28 +1,32 @@
-// Package psx provides CGo wrappers for two system call functions
-// that work by calling the C libpsx functions of these names. The
-// purpose being to perform system calls symultaneously on all the
-// pthreads of the Go (and CGo) combined runtime. Since Go's runtime
-// freely migrates code execution between pthreads, support of this
-// type is required for any successful attempt to fully drop or modify
-// user privilege of a Go program under Linux. More info on how
-// privilege works can be found here:
+// Package psx provides support for system calls that are run
+// simultanously on all pthreads.
+//
+// The package works via CGo wrappers for system call functions that
+// call the C libpsx functions of these names. This ensures that the
+// system calls execute symultaneously on all the pthreads of the Go
+// (and CGo) combined runtime. Since Go's runtime freely migrates code
+// execution between pthreads, support of this type is required for
+// any successful attempt to fully drop or modify user privilege of a
+// Go program under Linux. More info on how privilege works can be
+// found here:
//
// https://sites.google.com/site/fullycapable
//
// Correct compilation of this package may require an extra step:
//
-// If your Go compiler is pre-go1.15, a workaround may be required to
-// be able to link this package. In order to do what it needs to, this
-// package employs some unusual linking flags. You will need to do
-// this for any Go toolchain that that does not include this patch:
+// If your Go compiler is older than go1.15, a workaround may be
+// required to be able to link this package. In order to do what it
+// needs to, this package employs some unusual linking flags. You will
+// need to do this for any Go toolchain that that does not include
+// this patch:
//
// https://go-review.googlesource.com/c/go/+/236139/
//
// As of the time of writing, that is all release tags prior to
// go1.15beta1 .
//
-// The workaround is to build using the CGO_LDFLAGS_ALLOW override as
-// follows:
+// The workaround is to build with the following CGO_LDFLAGS_ALLOW
+// in effect:
//
// export CGO_LDFLAGS_ALLOW="-Wl,-?-wrap[=,][^-.@][^,]*"
//