git: 9354e204f5ac - main - sound: Force-disable hw.snd.compat_linux_mmap by default
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 15 May 2026 15:08:52 UTC
The branch main has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=9354e204f5ac797cbf1ef8e05294703c378bc9b6
commit 9354e204f5ac797cbf1ef8e05294703c378bc9b6
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-05-15 14:47:10 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-05-15 15:08:11 +0000
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
---
share/man/man4/pcm.4 | 2 +-
sys/dev/sound/pcm/dsp.c | 2 +-
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)");