aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2026-05-15 14:47:10 +0000
committerChristos Margiolis <christos@FreeBSD.org>2026-05-15 15:08:11 +0000
commit9354e204f5ac797cbf1ef8e05294703c378bc9b6 (patch)
tree16bc6c047b5d047f532362297ec35896f8ea20fc
parentb9c10eeb380b3ba629421062af8658e79a9171cd (diff)
sound: Force-disable hw.snd.compat_linux_mmap by default
Eventually this hack will be removed, so start by disabling it by default. Sponsored by: The FreeBSD Foundation MFC after: 12 months Reviewed by: emaste Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/29
-rw-r--r--share/man/man4/pcm.42
-rw-r--r--sys/dev/sound/pcm/dsp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4
index 8a92cefa3549..4e70d95d5441 100644
--- a/share/man/man4/pcm.4
+++ b/share/man/man4/pcm.4
@@ -267,7 +267,7 @@ call, which
.Fx
does not.
.Pp
-The following values are supported (default is 0):
+The following values are supported (default is -1):
.Bl -tag -width 2n
.It -1
Force-disable PROT_EXEC
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index d9726ffdd6bb..7b4f3f15645e 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -55,7 +55,7 @@ struct dsp_cdevpriv {
};
#ifdef SV_ABI_LINUX
-static int dsp_mmap_allow_prot_exec = 0;
+static int dsp_mmap_allow_prot_exec = -1;
SYSCTL_INT(_hw_snd, OID_AUTO, compat_linux_mmap, CTLFLAG_RWTUN,
&dsp_mmap_allow_prot_exec, 0,
"linux mmap compatibility (-1=force-disable 0=auto)");