snd_es137x & -CURRENT, /dev/dsp: Invalid argument -- Could
not mmap /dev/dsp - linux emulation problem?
saper at system.pl
Mon Jun 25 06:05:23 UTC 2007
Jung-uk Kim wrote:
> To mimic (broken) Linux behavior. ;-) Seriously Linux kernel for i386
> (without NX/XD bit support) implies PROT_EXEC when PROT_READ or
> PROT_WRITE is set even if you don't specify. In FreeBSD, we have to
> explicitly specify PROT_EXEC. Therefore the hack was required. In
> fact, 32-bit mmap implementation for Linux/ia64 does exactly this to
> run i386 binaries. Many (broken) Linux-only applications had abused
> this bug in the past and I believe they still exist widely. If you
> want, you can add a tunable to turn off this behavior but please
> leave it on by default.
I just wonder why it breaks now with /dev/dsp*.
Perhaps we should not do PROT_EXEC on devices?
More information about the freebsd-emulation