Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Feb 2003 13:30:30 -0800
From:      "Luoqi Chen" <lchen@briontech.com>
To:        "Ulrich Spoerlein" <q@uni.de>, <freebsd-stable@FreeBSD.ORG>
Subject:   RE: How to debug mmap(2) with pcm(3)?
Message-ID:  <AHEKICEOIHLOGINAFIINEENCCAAA.lchen@briontech.com>
In-Reply-To: <20030224210726.GC87555@galgenberg.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> Hello,
> 
> I'm looking into the issue with mmap()ing the pcm-driver as shown in
> this PR http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/41747 . You can
> quickly verify if this bug is present on your system when you compile
> the test program Maxim Sobolev posted here
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&frame=
> right&th=848249298f77552a&seekm=7e40su4hduj42eufbh2e8vfahgutah94ch
> _4ax.com%40ns.sol.net#link1
> 
> Now what I want to do is, kill the bug with pcm & mmap _before_ 4.8 and
> I would need some pointers where I can start debugging this.
>
This is a "feature" of ia32 architecture, there isn't a notion of
write-only memory access, write access implies read access. If you
want to "fix" the problem with pcm device, very simple, go to file
sys/i386/trap.c and replace all occurrences of PROT_READ|PROT_WRITE
with PROT_WRITE.

-lq

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AHEKICEOIHLOGINAFIINEENCCAAA.lchen>