On Wed, 15 Mar 2006, Bryan O'Sullivan wrote:
>
> I don't know what to to protect chip memory that I'm mapping into
> userspace.
>
> I think I shouldn't be calling SetPageReserved at all, but I don't know
> what I should be doing instead. Naively using get_page instead just
> gets me a big crash.
You should just use "remap_pfn_range()", and new kernels will just
automatically DTRT.
For true chip memory (ie no RAM), even old kernels don't want any
SetPageReserved() games, since there are no actual real real RAM pages for
them - in fact, you shouldn't have any "struct page" to mark reserved -
but if you allocate regular RAM you might want to mark such pages
reserved.
(The current VM no longer needs it or even cares, but that is needed for
older kernels).
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]