[lkml]   [2000]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: mapping user space buffer to kernel address space

On Wed, Oct 18, 2000 at 03:23:17PM +0200, Andrea Arcangeli wrote:

> This change makes sense and I agree it would cover the problem. However I
> prefer to clarify that doing it for the swap cache as described is not nearly
> enough to cover the mm corruption (everything that gets written via a memory
> balancing mechanism should do the same).
> Said that I think it would be possible to do it for SHM and shared mappings too.

shm already does it: shm_swap_core returns RETRY unless page count is
1. file maps are close: file swapping already uses the address space
a_ops, but currently uses that at the wrong time: unmap time rather
than last-release. Rik?

> However this still makes me wonder why should we unmap the pte of a page that
> we can't free until we unmap_kiobuf? That's not as bad as having a
> nopage+swapout dummy operations in the sound driver DMA page case, because
> usually user-kiobufs are temporary just for the time of the DMA I/O, though.

It's no different from mlock(): if you've got some reason why one
specific mapping can't be unmapped (either it's locked or it is
inherently non-swappable like a kiobuf), then there's no reason to
make that per-mapping information visible at the per-page level.

We allow multiple processes to mlock() the same page, after all.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:41    [W:0.095 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site