privsep patch, Please test

Tim Rice tim at multitalents.net
Thu May 30 13:57:46 EST 2002


On Wed, 29 May 2002, Ben Lindstrom wrote:

>
> What bothers me is the 1.3.x Linux kernel manpage talks about MAP_ANON
> being implemented.
>
> [..]
>        The  above three flags are described in POSIX.1b (formerly
>        POSIX.4).  Linux also knows about MAP_DENYWRITE,  MAP_EXE-
>        CUTABLE and MAP_ANON(YMOUS).
> [..]

Here is what Joshua Hill <josh-openssh at untruth.org> had to say

> mmap(0, 65536, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = -1
> EINVAL (Invalid argument)
> write(2, "mmap(65536)\r\n", 13)         = 13
[snip]
> The kernel is a somewhat older Linux 2.2.13.
[snip]

Herein lies your problem.

The flag combination (MAP_SHARED|MAP_ANONYMOUS) is not supported in
the linux 2.2 kernels.  Searching the linux-mm list archives reveals
that this can't be trivially added due the linux-2.2 VM's assumption
that all swap cache pages are read-only; see the linux-mm thread that
starts at http://mail.nl.linux.org/linux-mm/1999-01/msg00034.html for
some proposals for adding shared anonymous mappings to the linux 2.2 VM
that didn't quite work out

The linux-2.4 VM supports shared anonymous mappings.  I'm not prepared
[snip]

>
>
> - Ben
>

-- 
Tim Rice				Multitalents	(707) 887-1469
tim at multitalents.net





More information about the openssh-unix-dev mailing list