mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] restore protections after forced fault in get_user_pages
Date: Mon, 2 Feb 2004 16:09:29 -0800	[thread overview]
Message-ID: <200402030009.i1309TeY016316@magilla.sf.frob.com> (raw)
In-Reply-To: Linus Torvalds's message of  Monday, 2 February 2004 15:55:51 -0800 <Pine.LNX.4.58.0402021551320.9720@home.osdl.org>

> I'd suggest making this be:
>  - handle_mm_fault() take a more detailed flag ("read / write / copy", 
>    where the new "copy" part is a write that actually leaves the page 
>    only readable, but marks it dirty)

On second thought, why is it necessary to have the caller tell
handle_mm_fault "write" vs "copy"?  The existing "write" flag says do COW
and mark it dirty.  Why not just redefine it not to also mean "make the pte
writable", but rather "make the pte as writable as the vma says"?
i.e., just replace pte_mkwrite(pte) with pte_modify(pte, vma->vm_page_prot)
throughout.  That way we don't have to change all the arch/*/fault.c callers.

I think this question is orthogonal to my concern about follow_page.


Thanks,
Roland

  parent reply	other threads:[~2004-02-03  0:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-02  7:29 Roland McGrath
2004-02-02 22:46 ` Andrew Morton
2004-02-02 23:09   ` Linus Torvalds
2004-02-02 23:48   ` Roland McGrath
2004-02-02 23:55     ` Linus Torvalds
2004-02-03  0:03       ` Roland McGrath
2004-02-03  0:09       ` Roland McGrath [this message]
2004-02-03  0:30         ` Linus Torvalds
2004-02-03  0:42           ` Andrew Morton
2004-02-03  0:55           ` Roland McGrath
2004-02-03  8:29           ` Ingo Molnar
2004-02-03 10:25           ` Roland McGrath
2004-02-03 17:04             ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200402030009.i1309TeY016316@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®