]> Cypherpunks repositories - gostls13.git/commit
runtime: warn about SELinux based mmap failures on Linux.
authorAdam Langley <agl@golang.org>
Fri, 13 Nov 2009 18:08:51 +0000 (10:08 -0800)
committerAdam Langley <agl@golang.org>
Fri, 13 Nov 2009 18:08:51 +0000 (10:08 -0800)
commit3f7a32405d3a28416d97adc812ac87a0719d6bca
tree4ba8ca5d4da12665c34eacf2d8e760574fa7a9ec
parent593ccd1d447aa20aae4699efba782a70631cfae4
runtime: warn about SELinux based mmap failures on Linux.

SELinux will cause mmap to fail when we request w+x memory unless the
user has configured their policies. We have a warning in make.bash,
but it's quite likely that the policy will be reset at some point and
then all their binaries start failing.

This patch prints a warning on Linux when mmap fails with EACCES.

R=rsc
CC=golang-dev
https://golang.org/cl/152086
src/pkg/runtime/linux/386/sys.s
src/pkg/runtime/linux/amd64/sys.s
src/pkg/runtime/malloc.cgo
src/pkg/runtime/mem.c
src/pkg/runtime/runtime.h