On Thu, 1 Nov 2007, Nick Piggin wrote: > > Untested patch follows Ok, this looks ok. Except I would remove the VM_MAYSHARE bit from the test. That whole bit should go, in fact. We used to make it something different: iirc, a read-only SHARED mapping was downgraded to a non-shared mapping, because we wanted to avoid some of the costs we used to have with the VM implementation (actually, I think it was various filesystems that don't like shared mappings because they don't have a per-page writeback). But we left the VM_MAYSHARE bit on, to get /proc/<pid>/mmap things right. Or something like that. I forget the details. But I *think* we don't actually need this any more. But basically, the "right" way to test for shared mappings is historically to just test the VM_MAYSHARE bit - but not *both* bits. Because VM_SHARE may have been artificially cleared. Somebody should double-check my memory. 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/
- Follow-Ups:
- References:
- 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- From: "Duane Griffin" <[email protected]>
- Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- From: Nick Piggin <[email protected]>
- Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- From: Linus Torvalds <[email protected]>
- Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- From: Nick Piggin <[email protected]>
- Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- From: Linus Torvalds <[email protected]>
- Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- From: Nick Piggin <[email protected]>
- Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- From: Linus Torvalds <[email protected]>
- Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- From: Nick Piggin <[email protected]>
- Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- From: Linus Torvalds <[email protected]>
- Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- From: Nick Piggin <[email protected]>
- 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- Prev by Date: Re: "Fix ATAPI transfer lengths" causes CD writing regression
- Next by Date: Re: [patch] PID namespace design bug, workaround
- Previous by thread: Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- Next by thread: Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
- Index(es):